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.Riemannian.ScalarOperators |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.RoundCylinder |
| 3 | import PoincareLib.Geometry.Riemannian.LoopSpace.Width |
| 4 | |
| 5 | /-! |
| 6 | # M60 actual sphere area and energy |
| 7 | |
| 8 | One fixed stereographic parameter identifies the plane with the unit sphere |
| 9 | minus one point. The derivative of this parameter already contributes the |
| 10 | conformal coordinate factor, so the plane integrals have no extra sphere |
| 11 | volume weight. Area counts parametrized multiplicity and energy uses the |
| 12 | one-half normalization. |
| 13 | |
| 14 | Source: Morgan--Tian Lemma 18.10 and Claims 18.12-18.13, printed pp. 424-427; |
| 15 | `reviews/contracts/M60-round1.md` and |
| 16 | `reviews/errata/2026-09-14-sphere-area.md`. The integrals are total definitions; |
| 17 | their geometric conclusions separately require C1 regularity and integrability. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle BigOperators |
| 23 | |
| 24 | open MeasureTheory |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT |
| 29 | |
| 30 | /-- The fixed unit coordinate vector used as the stereographic pole. -/ |
| 31 | noncomputable def m60SpherePole : UnitTwoSphere := |
| 32 | ⟨EuclideanSpace.basisFun (Fin 3) ℝ 0, by |
| 33 | simpa only [Metric.mem_sphere, dist_zero_right] using |
| 34 | (EuclideanSpace.basisFun (Fin 3) ℝ).norm_eq_one 0⟩ |
| 35 | |
| 36 | /-- Mathlib's fixed stereographic chart, independent of the target or metric. -/ |
| 37 | noncomputable def m60SphereChart : |
| 38 | OpenPartialHomeomorph UnitTwoSphere LoopPlane := |
| 39 | letI : Fact (Module.finrank ℝ LoopAmbient = 2 + 1) := ⟨by simp [LoopAmbient]⟩ |
| 40 | stereographic' 2 m60SpherePole |
| 41 | |
| 42 | /-- The inverse chart is defined on the entire parameter plane. -/ |
| 43 | noncomputable def m60SphereParameter : LoopPlane → UnitTwoSphere := |
| 44 | m60SphereChart.symm |
| 45 | |
| 46 | section Carrier |
| 47 | |
| 48 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 49 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 50 | |
| 51 | /-- The actual two-by-two pullback Gram matrix in the plane coordinate basis. -/ |
| 52 | noncomputable def m60AreaGram (g : RiemannianMetric n M) |
| 53 | (f : LoopPlane → M) (z : LoopPlane) : Matrix (Fin 2) (Fin 2) ℝ := |
| 54 | let d := mfderiv (𝓡 2) (𝓡 n) f z |
| 55 | let e : Fin 2 → TangentSpace (𝓡 n) (f z) := |
| 56 | fun i => d (EuclideanSpace.basisFun (Fin 2) ℝ i) |
| 57 | fun i j => g.inner (f z) (e i) (e j) |
| 58 | |
| 59 | /-- The metric Jacobian of a parametrized two-dimensional map. -/ |
| 60 | noncomputable def m60AreaDensity (g : RiemannianMetric n M) |
| 61 | (f : LoopPlane → M) (z : LoopPlane) : ℝ := |
| 62 | Real.sqrt (max 0 (Matrix.det (m60AreaGram g f z))) |
| 63 | |
| 64 | /-- The Dirichlet energy density, with the one-half normalization. -/ |
| 65 | noncomputable def m60EnergyDensity (g : RiemannianMetric n M) |
| 66 | (f : LoopPlane → M) (z : LoopPlane) : ℝ := |
| 67 | (1 / 2 : ℝ) * Matrix.trace (m60AreaGram g f z) |
| 68 | |
| 69 | /-- Sphere area density pulled back by the fixed stereographic parameter. -/ |
| 70 | noncomputable def m60SphereAreaDensity (g : RiemannianMetric n M) |
| 71 | (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := |
| 72 | m60AreaDensity g (f ∘ m60SphereParameter) z |
| 73 | |
| 74 | /-- Sphere energy density in the same conformal plane coordinate. -/ |
| 75 | noncomputable def m60SphereEnergyDensity (g : RiemannianMetric n M) |
| 76 | (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := |
| 77 | m60EnergyDensity g (f ∘ m60SphereParameter) z |
| 78 | |
| 79 | /-- The actual parametrized sphere area, including multiplicity. -/ |
| 80 | noncomputable def m60SphereArea (g : RiemannianMetric n M) |
| 81 | (f : UnitTwoSphere → M) : ℝ := |
| 82 | ∫ z : LoopPlane, m60SphereAreaDensity g f z ∂volume |
| 83 | |
| 84 | /-- The actual conformally invariant energy, normalized by one half. -/ |
| 85 | noncomputable def m60SphereEnergy (g : RiemannianMetric n M) |
| 86 | (f : UnitTwoSphere → M) : ℝ := |
| 87 | ∫ z : LoopPlane, m60SphereEnergyDensity g f z ∂volume |
| 88 | |
| 89 | /-- The tangent-plane Ricci trace times area density. The rank-deficient |
| 90 | locus contributes zero to the fixed-map area variation. -/ |
| 91 | noncomputable def m60SphereRicciTraceDensity {g : RiemannianMetric n M} |
| 92 | (D : LeviCivitaData g) (f : UnitTwoSphere → M) (z : LoopPlane) : ℝ := |
| 93 | let F := f ∘ m60SphereParameter |
| 94 | let d := mfderiv (𝓡 2) (𝓡 n) F z |
| 95 | let e : Fin 2 → TangentSpace (𝓡 n) (F z) := |
| 96 | fun i => d (EuclideanSpace.basisFun (Fin 2) ℝ i) |
| 97 | let G := m60AreaGram g F z |
| 98 | if Matrix.det G = 0 then 0 |
| 99 | else (∑ i : Fin 2, ∑ j : Fin 2, (G⁻¹) i j * D.ricci (F z) (e j) (e i)) * |
| 100 | m60AreaDensity g F z |
| 101 | |
| 102 | /-- The scalar-curvature infimum; compact nonempty regularity supplies |
| 103 | attainment in the milestone conclusion. -/ |
| 104 | noncomputable def m60ScalarMinimum {g : RiemannianMetric n M} |
| 105 | (D : LeviCivitaData g) : ℝ := |
| 106 | sInf (Set.range D.scalarCurvature) |
| 107 | |
| 108 | end Carrier |
| 109 | |
| 110 | /-- The general-dimensional density agrees exactly with the earlier disk |
| 111 | Jacobian in target dimension three. -/ |
| 112 | theorem m60AreaDensity_eq_parametrizedAreaDensity |
| 113 | {M : Type u} [TopologicalSpace M] |
| 114 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 115 | (g : RiemannianMetric 3 M) (f : LoopPlane → M) (z : LoopPlane) : |
| 116 | m60AreaDensity g f z = parametrizedAreaDensity g f z := rfl |
| 117 | |
| 118 | end PoincareMT |