Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.SourceNames.ReducedVolume |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Jacobian |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Transport.BasisCoordinateVolume |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Comparison.SourceGaussian |
| 5 | |
| 6 | /-! |
| 7 | # The horizontal source Gaussian |
| 8 | |
| 9 | The Gaussian in Morgan-Tian Proposition 6.78, pp. 143-144, is measured in |
| 10 | the specified horizontal metric. Orthonormal basis coordinates identify |
| 11 | its actual coordinate measure with the Euclidean one, so M10's Gaussian |
| 12 | integrability and unnormalized mass apply without a normalization change. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open MeasureTheory |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {x : G.Point} |
| 27 | |
| 28 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 29 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 30 | |
| 31 | attribute [local instance] horizontal_t2Space |
| 32 | |
| 33 | /-- Orthonormal coordinates identify the specified horizontal metric square |
| 34 | with the Euclidean norm square, as in Proposition 6.78, pp. 143-144. -/ |
| 35 | theorem horizontal_inner_euclideanCoordinates |
| 36 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 37 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 38 | if i = j then 1 else 0) (v : EuclideanSpace ℝ (Fin n)) : |
| 39 | G.spacetime.horizontalMetric.inner x |
| 40 | (b.euclideanCoordinates v) (b.euclideanCoordinates v) = ‖v‖ ^ 2 := by |
| 41 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 42 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 43 | have ho : Orthonormal ℝ b := orthonormal_iff_ite.mpr hb |
| 44 | let e := (b.toOrthonormalBasis ho).repr.symm |
| 45 | have hi := e.inner_map_map v v |
| 46 | exact hi.trans (real_inner_self_eq_norm_sq v) |
| 47 | |
| 48 | private theorem horizontalGaussian_comp_coordinates |
| 49 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 50 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 51 | if i = j then 1 else 0) : |
| 52 | (fun Z => Real.rpow (2 : ℝ) (n : ℝ) * |
| 53 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) ∘ b.euclideanCoordinates = |
| 54 | fun v => (2 : ℝ) ^ n * Real.exp (-‖v‖ ^ 2) := by |
| 55 | funext v |
| 56 | have hpow : Real.rpow (2 : ℝ) (n : ℝ) = (2 : ℝ) ^ n := Real.rpow_natCast _ _ |
| 57 | simp only [Function.comp_apply, horizontal_inner_euclideanCoordinates b hb, hpow] |
| 58 | |
| 59 | /-- The metric Gaussian of Proposition 6.78, pp. 143-144, is integrable for |
| 60 | the frozen source coordinate measure in every dimension. -/ |
| 61 | theorem horizontalGaussian_integrable |
| 62 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 63 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 64 | if i = j then 1 else 0) : |
| 65 | Integrable (fun Z => Real.rpow (2 : ℝ) (n : ℝ) * |
| 66 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) |
| 67 | (M14HorizontalCoordinateVolume G b) := by |
| 68 | have h := b.integrableOn_coordinateVolume_iff |
| 69 | (fun Z => Real.rpow (2 : ℝ) (n : ℝ) * |
| 70 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) Set.univ |
| 71 | rw [horizontalGaussian_comp_coordinates b hb] at h |
| 72 | simpa only [Set.preimage_univ, integrableOn_univ, M14HorizontalCoordinateVolume] using |
| 73 | h.mpr (by simpa only [Set.preimage_univ, integrableOn_univ] using |
| 74 | M10.sourceGaussian_integrable n) |
| 75 | |
| 76 | /-- The horizontal source Gaussian has the exact unnormalized Euclidean |
| 77 | reduced-volume mass, Proposition 6.78 and Definition 6.70, pp. 140, 143-144. -/ |
| 78 | theorem integral_horizontalGaussian |
| 79 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 80 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 81 | if i = j then 1 else 0) : |
| 82 | (∫ Z, Real.rpow (2 : ℝ) (n : ℝ) * |
| 83 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z) |
| 84 | ∂M14HorizontalCoordinateVolume G b) = euclideanReducedVolume n := by |
| 85 | have h := b.setIntegral_coordinateVolume |
| 86 | (fun Z => Real.rpow (2 : ℝ) (n : ℝ) * |
| 87 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) Set.univ |
| 88 | rw [horizontalGaussian_comp_coordinates b hb] at h |
| 89 | simpa only [Set.preimage_univ, setIntegral_univ, |
| 90 | M10.integral_sourceGaussian, M14HorizontalCoordinateVolume] using h |
| 91 | |
| 92 | /-- The selected Jacobian data use a source measure for which the initial |
| 93 | Gaussian in Proposition 6.78, pp. 143-144, is integrable. -/ |
| 94 | theorem measureData_sourceGaussian_integrable |
| 95 | {T τ : ℝ} {E : M14ExponentialFamily G T x} {H : M14StableSet G T τ x E} |
| 96 | (D : M14MeasureJacobianData G T τ x E H) : |
| 97 | Integrable (fun Z => Real.rpow (2 : ℝ) (n : ℝ) * |
| 98 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) D.sourceMeasure := by |
| 99 | rw [D.source_volume_eq_metric_volume] |
| 100 | exact horizontalGaussian_integrable D.sourceBasis D.source_basis_orthonormal |
| 101 | |
| 102 | /-- The selected Jacobian data preserve the exact initial Gaussian mass in |
| 103 | Proposition 6.78, pp. 143-144, including dimension zero. -/ |
| 104 | theorem measureData_integral_sourceGaussian |
| 105 | {T τ : ℝ} {E : M14ExponentialFamily G T x} {H : M14StableSet G T τ x E} |
| 106 | (D : M14MeasureJacobianData G T τ x E H) : |
| 107 | (∫ Z, Real.rpow (2 : ℝ) (n : ℝ) * |
| 108 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z) ∂D.sourceMeasure) = |
| 109 | euclideanReducedVolume n := by |
| 110 | rw [D.source_volume_eq_metric_volume] |
| 111 | exact integral_horizontalGaussian D.sourceBasis D.source_basis_orthonormal |
| 112 | |
| 113 | end PoincareMT.M14 |