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.Curvature.Integral.Reduction.Connected |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Reduction.Small |
| 3 | |
| 4 | /-! # Reduction to small connected manifolds -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | open Set MeasureTheory |
| 10 | open scoped Manifold ContDiff Bundle ENNReal |
| 11 | |
| 12 | namespace PoincareMT.RiemannianMetric |
| 13 | |
| 14 | /-- A bound uniform over connected universe-zero manifolds gives the same |
| 15 | bound on all manifolds, with no connectedness or size assumption. -/ |
| 16 | theorem scalar_integral_le_of_small_connected_bound |
| 17 | {n : ℕ} {M : Type*} [TopologicalSpace M] [T3Space M] |
| 18 | [MeasurableSpace M] [BorelSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 20 | (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 21 | (hcomplete : MetricComplete g) |
| 22 | (hsec : ∀ x (v w : TangentSpace (𝓡 n) x), -1 ≤ D.sectionalCurvature x v w) |
| 23 | (C : ℝ) |
| 24 | (hbound : ∀ (N : Type) [TopologicalSpace N] [T3Space N] |
| 25 | [MeasurableSpace N] [BorelSpace N] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) N] [IsManifold (𝓡 n) ∞ N] |
| 27 | [PreconnectedSpace N] (h : RiemannianMetric n N) (E : LeviCivitaData h), |
| 28 | MetricComplete h → |
| 29 | (∀ x (v w : TangentSpace (𝓡 n) x), -1 ≤ E.sectionalCurvature x v w) → |
| 30 | ∀ q, (∫ x in h.ball q 1, E.scalarCurvature x ∂h.volumeMeasure) ≤ C) |
| 31 | (p : M) : |
| 32 | (∫ x in g.ball p 1, D.scalarCurvature x ∂g.volumeMeasure) ≤ C := by |
| 33 | apply g.scalar_integral_le_of_connected_bound D hcomplete hsec C ?_ p |
| 34 | intro N _ _ _ _ _ _ _ h E hcompleteN hsecN q |
| 35 | let : SecondCountableTopology N := h.secondCountableTopology |
| 36 | let : Small.{0} N := Poincare.Topology.SecondCountable.small N |
| 37 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) (Shrink.{0} N) := |
| 38 | Poincare.Manifold.shrinkChartedSpace _ N |
| 39 | let : IsManifold (𝓡 n) ∞ (Shrink.{0} N) := |
| 40 | Poincare.Manifold.shrinkIsManifold (𝓡 n) N |
| 41 | let : T3Space (Shrink.{0} N) := |
| 42 | (Poincare.Topology.SecondCountable.homeomorphShrink N).t3Space |
| 43 | let : MeasurableSpace (Shrink.{0} N) := borel (Shrink.{0} N) |
| 44 | let : BorelSpace (Shrink.{0} N) := ⟨rfl⟩ |
| 45 | let : PreconnectedSpace (Shrink.{0} N) := shrink_preconnectedSpace |
| 46 | have hb := hbound (Shrink.{0} N) h.shrink h.shrink.leviCivitaData |
| 47 | (h.shrink_metricComplete_iff.mpr hcompleteN) |
| 48 | (h.shrink_sectionalCurvature_lower_bound E hsecN) ((equivShrink N) q) |
| 49 | simpa only [h.shrink_integral_scalarCurvature_ball E, Equiv.symm_apply_apply] using hb |
| 50 | |
| 51 | end PoincareMT.RiemannianMetric |