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.DenseTime |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.BoundedDistance |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.BoundsTheory |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Pinching.Basic |
| 5 | |
| 6 | /-! |
| 7 | # Dense-time bounded-distance control on generalized blowup sequences |
| 8 | |
| 9 | Adapted from Mapher commit `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`, |
| 10 | Definitions/Statements M29GeneralizedDistance and Proofs/M29. The current |
| 11 | source interfaces use `PoincareMT.DenseTime` to preserve the accepted earlier |
| 12 | theorem. Morgan--Tian, opening of the proof of Theorem 11.1, p. 269, applying |
| 13 | Theorem 10.2, pp. 245--246. See |
| 14 | `references/ricci-flow/mapher/dense-time-bounded-distance.md`. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Filter |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | namespace DenseTime |
| 26 | |
| 27 | abbrev GeneralizedBoundedDistanceHypotheses |
| 28 | (S : GeneralizedBlowupSequence.{u}) (epsilon C : ℝ) : Prop := |
| 29 | DenseGeneralizedBoundedDistanceHypotheses S epsilon C |
| 30 | |
| 31 | abbrev GeneralizedBoundedDistanceTheory : Prop := |
| 32 | DenseGeneralizedBoundedDistanceTheory.{u} |
| 33 | |
| 34 | end DenseTime |
| 35 | |
| 36 | theorem GeneralizedBoundedDistanceHypotheses.toDenseTime |
| 37 | {S : GeneralizedBlowupSequence.{u}} {epsilon C : ℝ} |
| 38 | (H : GeneralizedBoundedDistanceHypotheses S epsilon C) : |
| 39 | DenseTime.GeneralizedBoundedDistanceHypotheses S epsilon C := |
| 40 | ⟨H.branch, fun k ↦ (H.canonical k).left_dense⟩ |
| 41 | |
| 42 | namespace DenseTime |
| 43 | |
| 44 | /-- The source M29 implication with left-dense whole-slice canonical control. -/ |
| 45 | theorem generalizedBoundedDistance |
| 46 | (P : BoundedDistanceTheory.{u}) : |
| 47 | GeneralizedBoundedDistanceTheory.{u} := by |
| 48 | rcases P.dense_constants with ⟨epsilon0, hepsilon0, hsmall, estimate⟩ |
| 49 | refine ⟨epsilon0, hepsilon0, hsmall, ?_⟩ |
| 50 | intro epsilon hepsilon hle C hC S H A hA |
| 51 | obtain ⟨D0, D, _hD0, hD, bound⟩ := estimate epsilon hepsilon hle C hC A hA.le |
| 52 | refine ⟨D, hD, ?_⟩ |
| 53 | filter_upwards [S.scalar_diverges.eventually_ge_atTop D0] with k hk |
| 54 | have hbranch : generalizedWeakHamiltonIveyPinched (S.flow k) := by |
| 55 | rcases H.branch k with hpinched | hnonnegative |
| 56 | · exact hpinched.2.weak |
| 57 | · exact hnonnegative.2 |
| 58 | have htime : (S.base k).1 ∈ (S.flow k).interval := |
| 59 | ((S.flow k).slice_nonempty_iff _).mp ⟨(S.base k).2⟩ |
| 60 | have hscale : 0 ≤ S.scale k := (S.base_scalar_pos k).le |
| 61 | have hradius : A / Real.sqrt (S.scale k) = A * S.scale k ^ (-1 / 2 : ℝ) := by |
| 62 | rw [neg_div, Real.rpow_neg hscale, ← Real.sqrt_eq_rpow, |
| 63 | div_eq_mul_inv] |
| 64 | intro x hx |
| 65 | apply bound (S.flow k) hbranch (S.base k).1 htime |
| 66 | (S.base k).2 hk (H.canonical k) x |
| 67 | change x ∈ ((S.flow k).metric (S.base k).1).ball (S.base k).2 |
| 68 | (A * S.scale k ^ (-1 / 2 : ℝ)) |
| 69 | rw [← hradius] |
| 70 | exact hx |
| 71 | |
| 72 | /-- The dense-time conclusion also supplies the accepted earlier-time conclusion. -/ |
| 73 | theorem GeneralizedBoundedDistanceTheory.toEarlierTime |
| 74 | (P : GeneralizedBoundedDistanceTheory.{u}) : |
| 75 | PoincareMT.RepairedGeneralizedBoundedDistanceTheory.{u} := by |
| 76 | obtain ⟨epsilon₀, hpos, hsmall, bound⟩ := P.constants |
| 77 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 78 | intro epsilon hepsilon hle C hC S H |
| 79 | exact bound epsilon hepsilon hle C hC S H.toDenseTime |
| 80 | |
| 81 | end DenseTime |
| 82 | |
| 83 | end PoincareMT |