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.Dense |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Statements/M28BoundedDistance.lean` at |
| 5 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are retained; |
| 6 | see `references/ricci-flow/mapher/surgery-adapters-port.json`. |
| 7 | -/ |
| 8 | |
| 9 | /-! |
| 10 | # M28 bounded-distance curvature statement |
| 11 | |
| 12 | The constants are chosen in the order used by Theorem 10.2, before the flow, |
| 13 | time and basepoint are supplied. Its proof supports same-time canonical control; |
| 14 | a compact-path continuity argument gives the dense-time version. Both use one |
| 15 | universal accuracy threshold. The printed earlier-time statement is a checked |
| 16 | corollary. See the regular-time boundary review dated 2026-09-18. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | /-- Theorem 10.2's proof uses canonical neighborhoods on the tested slice; |
| 28 | their strong necks already contain the required backward cylinders. -/ |
| 29 | def M28SameTimeEstimateStatement (epsilon₀ : ℝ) : Prop := |
| 30 | ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 31 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 32 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 33 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 34 | generalizedWeakHamiltonIveyPinched F → |
| 35 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 36 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 37 | generalizedSliceStrongCanonicalNeighborhoods F epsilon C |
| 38 | (4 * F.scalar ⟨t, x⟩) t → |
| 39 | RepairedBoundedDistanceEstimate F A D t x |
| 40 | |
| 41 | /-- Scalar and length continuity extend the estimate to times approached by |
| 42 | whole controlled slices; no canonical carrier is asserted at an excluded time. -/ |
| 43 | def M28DenseTimeEstimateStatement (epsilon₀ : ℝ) : Prop := |
| 44 | ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 45 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 46 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 47 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 48 | generalizedWeakHamiltonIveyPinched F → |
| 49 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 50 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 51 | generalizedEarlierDenseStrongCanonicalNeighborhoods F epsilon C t x → |
| 52 | RepairedBoundedDistanceEstimate F A D t x |
| 53 | |
| 54 | structure DenseBoundedDistanceTheory : Prop where |
| 55 | bounds : ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 56 | M28SameTimeEstimateStatement.{u} epsilon₀ ∧ M28DenseTimeEstimateStatement.{u} epsilon₀ |
| 57 | |
| 58 | namespace DenseBoundedDistanceTheory |
| 59 | |
| 60 | theorem same_time_constants (P : DenseBoundedDistanceTheory.{u}) : |
| 61 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 62 | M28SameTimeEstimateStatement.{u} epsilon₀ := by |
| 63 | obtain ⟨epsilon₀, hpos, hsmall, hsame, _⟩ := P.bounds |
| 64 | exact ⟨epsilon₀, hpos, hsmall, hsame⟩ |
| 65 | |
| 66 | theorem dense_constants (P : DenseBoundedDistanceTheory.{u}) : |
| 67 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 68 | M28DenseTimeEstimateStatement.{u} epsilon₀ := by |
| 69 | obtain ⟨epsilon₀, hpos, hsmall, _, hdense⟩ := P.bounds |
| 70 | exact ⟨epsilon₀, hpos, hsmall, hdense⟩ |
| 71 | |
| 72 | /-- The printed earlier-time hypothesis includes its tested time slice. -/ |
| 73 | theorem constants (P : DenseBoundedDistanceTheory.{u}) : |
| 74 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 75 | ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 76 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 77 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 78 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 79 | generalizedWeakHamiltonIveyPinched F → |
| 80 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 81 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 82 | generalizedEarlierStrongCanonicalNeighborhoods F epsilon C t x → |
| 83 | RepairedBoundedDistanceEstimate F A D t x := by |
| 84 | obtain ⟨epsilon₀, hpos, hsmall, estimate⟩ := P.same_time_constants |
| 85 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 86 | intro epsilon hepsilon hle C hC A hA |
| 87 | obtain ⟨D₀, D, hD₀, hD, bound⟩ := estimate epsilon hepsilon hle C hC A hA |
| 88 | refine ⟨D₀, D, hD₀, hD, ?_⟩ |
| 89 | intro F hpinched t ht x hx hcanonical |
| 90 | exact bound F hpinched t ht x hx (hcanonical t ht le_rfl) |
| 91 | |
| 92 | end DenseBoundedDistanceTheory |
| 93 | |
| 94 | end PoincareMT |