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.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.NeckGeometry.NeckCoverCompactness |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.CompactGeometry.CompactHeightTail |
| 4 | |
| 5 | /-! |
| 6 | # Uniform scalar divergence on a proper neck-covered end |
| 7 | |
| 8 | Finite volume makes bounded-scalar centers compactly contained. An |
| 9 | actual continuous height on the containing cylinder then excludes that |
| 10 | compact set from a late end tail. Source: Morgan--Tian Claim 10.8, |
| 11 | p. 254; M28 derivations 94 and 128. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff ENNReal |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M28 |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | /-- A proper high-height side in the actual neck cover has uniform |
| 29 | scalar divergence. Heights are used only on their displayed domain; |
| 30 | every real scalar threshold is allowed. Source: Claim 10.8; derivation 128. -/ |
| 31 | theorem scalar_diverges_on_proper_neck_cover_end |
| 32 | (K : NeckOnlyCover g) (D : LeviCivitaData g) |
| 33 | (hD : ∀ N ∈ K.necks, N.connection = D) |
| 34 | (hfinite : g.volumeMeasure univ ≠ ⊤) {U P : Set M} |
| 35 | (height : U → ℝ) (hh : Continuous height) (hupper : ∀ x, height x < 1) |
| 36 | (hPK : P ⊆ K.X) (hclosure : closure P ⊆ U) |
| 37 | (hside : ∀ x : U, (1 / 2 : ℝ) < height x → x.val ∈ P) : |
| 38 | ∀ B : ℝ, ∃ a : ℝ, 1 / 2 < a ∧ a < 1 ∧ |
| 39 | ∀ x : U, a < height x → B < D.scalarCurvature x.val := by |
| 40 | intro B |
| 41 | obtain ⟨C, hC, hcapture⟩ := exists_compact_bounded_scalar_neck_cover K D hD hfinite |
| 42 | (show 0 < max B 1 from lt_of_lt_of_le zero_lt_one (le_max_right _ _)) |
| 43 | obtain ⟨a, ha, ha1, havoid⟩ := Poincare.exists_height_tail_disjoint_compact |
| 44 | height hh hupper hclosure hside hC |
| 45 | refine ⟨a, ha, ha1, ?_⟩ |
| 46 | intro x hx |
| 47 | by_contra! hscalar |
| 48 | exact havoid x hx (hcapture |
| 49 | ⟨hPK (hside x (ha.trans hx)), hscalar.trans (le_max_left _ _)⟩) |
| 50 | |
| 51 | end PoincareMT.M28 |