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.CanonicalNeighborhood |
| 2 | |
| 3 | /-! |
| 4 | # Uniform bounded-distance estimates for generalized flows |
| 5 | |
| 6 | Adapted without changing declaration bodies from Mapher commit |
| 7 | `4a6b36794e04c3fac86663910a73a924fed43f23`. |
| 8 | Morgan--Tian, Theorem 10.2, pp. 245--246, and the opening of the proof of |
| 9 | Theorem 11.1, p. 269. The uniform estimate remains an explicit premise. |
| 10 | See `references/ricci-flow/mapher/reviewed-bounded-distance.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Filter |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | def generalizedEarlierStrongCanonicalNeighborhoods |
| 23 | (F : GeneralizedRicciFlowData.{u}) |
| 24 | (epsilon C t : ℝ) (x : (F.slice t).carrier) : Prop := |
| 25 | ∀ s, s ∈ F.interval → s ≤ t → |
| 26 | ∀ y : (F.slice s).carrier, |
| 27 | 4 * F.scalar ⟨t, x⟩ ≤ F.scalar ⟨s, y⟩ → |
| 28 | Nonempty (GeneralizedCanonicalControl (F := F) s y epsilon C) |
| 29 | |
| 30 | def generalizedHamiltonIveyPinchedAt |
| 31 | (F : GeneralizedRicciFlowData.{u}) (t : ℝ) : Prop := |
| 32 | t ∈ F.interval ∧ 0 ≤ t ∧ |
| 33 | (∀ x : (F.slice t).carrier, |
| 34 | -6 / (1 + 4 * t) ≤ F.scalar ⟨t, x⟩) ∧ |
| 35 | (∀ x : (F.slice t).carrier, |
| 36 | 0 < (F.connection t).negativeCurvaturePart x → |
| 37 | F.scalar ⟨t, x⟩ ≥ |
| 38 | 2 * (F.connection t).negativeCurvaturePart x * |
| 39 | (Real.log ((F.connection t).negativeCurvaturePart x) + |
| 40 | Real.log (1 + t) - 3)) |
| 41 | |
| 42 | def generalizedHamiltonIveyPinched |
| 43 | (F : GeneralizedRicciFlowData.{u}) : Prop := |
| 44 | ∀ t, t ∈ F.interval → generalizedHamiltonIveyPinchedAt F t |
| 45 | |
| 46 | def generalizedWeakHamiltonIveyPinched |
| 47 | (F : GeneralizedRicciFlowData.{u}) : Prop := |
| 48 | ∀ t ∈ F.interval, ∀ x : (F.slice t).carrier, |
| 49 | -6 ≤ F.scalar ⟨t, x⟩ ∧ |
| 50 | (0 < (F.connection t).negativeCurvaturePart x → |
| 51 | F.scalar ⟨t, x⟩ ≥ |
| 52 | 2 * (F.connection t).negativeCurvaturePart x * |
| 53 | (Real.log ((F.connection t).negativeCurvaturePart x) - 3)) |
| 54 | |
| 55 | /-- Discarding the nonnegative absolute clock gives equation (10.1) of |
| 56 | Morgan--Tian, printed p. 247. -/ |
| 57 | theorem generalizedHamiltonIveyPinched.weak |
| 58 | {F : GeneralizedRicciFlowData.{u}} (h : generalizedHamiltonIveyPinched F) : |
| 59 | generalizedWeakHamiltonIveyPinched F := by |
| 60 | intro t ht x |
| 61 | obtain ⟨_, ht0, hscalar, hpinch⟩ := h t ht |
| 62 | constructor |
| 63 | · have hden : 0 < 1 + 4 * t := by positivity |
| 64 | have hlower : (-6 : ℝ) ≤ -6 / (1 + 4 * t) := |
| 65 | (le_div_iff₀ hden).mpr (by nlinarith) |
| 66 | exact hlower.trans (hscalar x) |
| 67 | · intro hv |
| 68 | have hlog : 0 ≤ Real.log (1 + t) := Real.log_nonneg (by linarith) |
| 69 | have hmul := mul_nonneg (le_of_lt (mul_pos (by norm_num : (0 : ℝ) < 2) hv)) hlog |
| 70 | have hfull := hpinch x hv |
| 71 | nlinarith |
| 72 | |
| 73 | def generalizedNonnegativeCurvature |
| 74 | (F : GeneralizedRicciFlowData.{u}) : Prop := |
| 75 | (∀ t ∈ F.interval, ∀ x : (F.slice t).carrier, |
| 76 | 0 ≤ F.scalar ⟨t, x⟩ ∧ |
| 77 | (F.connection t).negativeCurvaturePart x = 0) ∧ |
| 78 | generalizedWeakHamiltonIveyPinched F |
| 79 | |
| 80 | def generalizedPinchedOrNonnegative |
| 81 | (F : GeneralizedRicciFlowData.{u}) : Prop := |
| 82 | (F.interval ⊆ Set.Ici 0 ∧ generalizedHamiltonIveyPinched F) ∨ |
| 83 | generalizedNonnegativeCurvature F |
| 84 | |
| 85 | /-- A nonnegative-curvature flow on a nonnegative time interval also satisfies |
| 86 | the normalized Hamilton--Ivey predicate used by the bounded-distance service. |
| 87 | The time normalization is proved at this adapter boundary; it is not part of |
| 88 | `generalizedNonnegativeCurvature` itself. -/ |
| 89 | theorem generalizedHamiltonIveyPinched_of_nonnegative |
| 90 | {F : GeneralizedRicciFlowData.{u}} |
| 91 | (hinterval : F.interval ⊆ Set.Ici 0) |
| 92 | (hnonnegative : generalizedNonnegativeCurvature F) : |
| 93 | generalizedHamiltonIveyPinched F := by |
| 94 | intro t ht |
| 95 | have ht0 : 0 ≤ t := hinterval ht |
| 96 | refine ⟨ht, ht0, ?_, ?_⟩ |
| 97 | · intro x |
| 98 | exact le_trans (div_nonpos_of_nonpos_of_nonneg (by norm_num) (by linarith)) |
| 99 | (hnonnegative.1 t ht x).1 |
| 100 | · intro x hx |
| 101 | rw [(hnonnegative.1 t ht x).2] at hx |
| 102 | exact (lt_irrefl 0 hx).elim |
| 103 | |
| 104 | def RepairedBoundedDistanceEstimate |
| 105 | (F : GeneralizedRicciFlowData.{u}) (A D t : ℝ) |
| 106 | (x : (F.slice t).carrier) : Prop := |
| 107 | ∀ y : (F.slice t).carrier, |
| 108 | y ∈ (F.metric t).ball x |
| 109 | (A * F.scalar ⟨t, x⟩ ^ (-1 / 2 : ℝ)) → |
| 110 | F.scalar ⟨t, y⟩ ≤ D * F.scalar ⟨t, x⟩ |
| 111 | |
| 112 | structure RepairedBoundedDistanceTheory : Prop where |
| 113 | constants : ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 114 | ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 115 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 116 | ∃ D₀ D : ℝ, 0 < D₀ ∧ 0 < D ∧ |
| 117 | ∀ F : GeneralizedRicciFlowData.{u}, |
| 118 | generalizedWeakHamiltonIveyPinched F → |
| 119 | ∀ t, t ∈ F.interval → ∀ x : (F.slice t).carrier, |
| 120 | D₀ ≤ F.scalar ⟨t, x⟩ → |
| 121 | generalizedEarlierStrongCanonicalNeighborhoods F epsilon C t x → |
| 122 | RepairedBoundedDistanceEstimate F A D t x |
| 123 | |
| 124 | end PoincareMT |