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.Blowup.Construction.ShortTime.WorldlineControl |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.Generalized.Gluing |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.CurvatureDefect.CurvatureNorm |
| 4 | |
| 5 | /-! |
| 6 | # Radius-dependent controlled blowup cylinders |
| 7 | |
| 8 | Morgan--Tian Lemma 11.2 and Corollary 11.3, pp. 268--269, with Theorem 5.33, |
| 9 | pp. 99--100. Uniformly controlled singleton lines on a larger terminal ball |
| 10 | glue on the requested smaller ball. The lifetime and curvature coefficient |
| 11 | may depend on its radius; the coefficient is independent of the negative |
| 12 | curvature tolerance. Claims 11.5--11.7 supply the later uniform-in-radius step. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M30 |
| 23 | |
| 24 | /-- Glue scalar-controlled singleton lines on a larger ball into an actual |
| 25 | controlled cylinder on the smaller ball (Corollary 11.3, p. 269). The |
| 26 | curvature coefficient is independent of the negative-defect tolerance. -/ |
| 27 | theorem eventually_controlled_cylinders_of_scalar_worldlines |
| 28 | (hC : RicciFlowCurvatureTheory.{u}) {S : GeneralizedBlowupSequence.{u}} |
| 29 | {epsilon canonicalConstant kappa r₀ mu : ℝ} |
| 30 | (H : M30CommonBlowupControls S epsilon canonicalConstant kappa r₀ mu) |
| 31 | (A : ℝ) (hA : 0 < A) {D tau : ℝ} (hD : 0 ≤ D) (htau : 0 < tau) |
| 32 | (hworld : ∀ᶠ k : ℕ in atTop, ∀ x ∈ S.baseBall k (A + 1), |
| 33 | ∃ e : GeneralizedFlowCylinder (S.flow k) ((S.flow k).slice (S.base k).1) |
| 34 | (S.base k).1 (S.scale k) (Icc (-tau) 0) ({x} : Set _), |
| 35 | (∀ h₀, e.pointMap 0 h₀ x = (⟨(S.base k).1, x⟩ : (S.flow k).point)) ∧ |
| 36 | ∀ s (hs : s ∈ Icc (-tau) 0), |
| 37 | (S.flow k).scalar (e.pointMap s hs x) ≤ D * S.scale k) : |
| 38 | ∀ eta : ℝ, 0 < eta → ∀ᶠ k : ℕ in atTop, |
| 39 | Nonempty (ControlledBlowupCylinder S k A tau (13 * max D 1) eta) := by |
| 40 | classical |
| 41 | have hA' : 0 < A + 1 := by linarith |
| 42 | intro eta heta |
| 43 | filter_upwards [hworld, H.balls_compact A hA, |
| 44 | eventually_curvatureNorm_and_negativeDefect_le hC S H.branch D hD eta heta] |
| 45 | with k hworldk hcompact hcurvature |
| 46 | let C := (S.flow k).slice (S.base k).1 |
| 47 | let g : RiemannianMetric 3 C.carrier := (S.flow k).metric (S.base k).1 |
| 48 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : C.carrier → Type _) := |
| 49 | ⟨g.toRiemannianMetric⟩ |
| 50 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 51 | (TangentSpace (𝓡 3) : C.carrier → Type _) := |
| 52 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 53 | let : EMetricSpace C.carrier := EMetricSpace.ofRiemannianMetric (𝓡 3) C.carrier |
| 54 | have hsqrt : 0 < Real.sqrt (S.scale k) := Real.sqrt_pos.mpr (S.base_scalar_pos k) |
| 55 | have hopen (R : ℝ) : IsOpen (S.baseBall k R) := by |
| 56 | change IsOpen {x : C.carrier | |
| 57 | edist (S.base k).2 x < ENNReal.ofReal (R / Real.sqrt (S.scale k))} |
| 58 | exact isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 59 | have hbase (R : ℝ) (hR : 0 < R) : (S.base k).2 ∈ S.baseBall k R := by |
| 60 | change edist (S.base k).2 (S.base k).2 < ENNReal.ofReal (R / Real.sqrt (S.scale k)) |
| 61 | rw [edist_self] |
| 62 | exact ENNReal.ofReal_pos.mpr (div_pos hR hsqrt) |
| 63 | let V : TopologicalSpace.Opens C.carrier := ⟨S.baseBall k (A + 1), hopen (A + 1)⟩ |
| 64 | have hbuffer : closure (S.baseBall k A) ⊆ V := by |
| 65 | have hclosed : IsClosed {x : C.carrier | |
| 66 | edist (S.base k).2 x ≤ ENNReal.ofReal (A / Real.sqrt (S.scale k))} := |
| 67 | isClosed_le (continuous_const.edist continuous_id) continuous_const |
| 68 | have hsub : S.baseBall k A ⊆ {x : C.carrier | |
| 69 | edist (S.base k).2 x ≤ ENNReal.ofReal (A / Real.sqrt (S.scale k))} := by |
| 70 | intro x hx |
| 71 | change edist (S.base k).2 x < ENNReal.ofReal (A / Real.sqrt (S.scale k)) at hx |
| 72 | exact hx.le |
| 73 | intro x hx |
| 74 | exact (closure_minimal hsub hclosed hx).trans_lt |
| 75 | ((ENNReal.ofReal_lt_ofReal_iff (div_pos hA' hsqrt)).mpr |
| 76 | (div_lt_div_of_pos_right (by linarith) hsqrt)) |
| 77 | choose ev hzero hscalar using hworldk |
| 78 | let r : C.carrier → V := fun x => |
| 79 | if hx : x ∈ V then ⟨x, hx⟩ else ⟨(S.base k).2, hbase (A + 1) hA'⟩ |
| 80 | let p : C.carrier → C.carrier := fun x => (r x).1 |
| 81 | let e (x : C.carrier) : GeneralizedFlowCylinder (S.flow k) C |
| 82 | (S.base k).1 (S.scale k) (Icc (-tau) 0) {p x} := ev (r x).1 (r x).2 |
| 83 | have hp (x : C.carrier) (hx : x ∈ V) : p x = x := by |
| 84 | simp only [p, r, dif_pos hx] |
| 85 | have hzero' (h₀ : (0 : ℝ) ∈ Icc (-tau) 0) (x : C.carrier) : |
| 86 | (e x).pointMap 0 h₀ (p x) = (⟨(S.base k).1, p x⟩ : (S.flow k).point) := |
| 87 | hzero (r x).1 (r x).2 h₀ |
| 88 | have hs₀ : (0 : ℝ) ∈ Icc (-tau) 0 := ⟨neg_nonpos.mpr htau.le, le_rfl⟩ |
| 89 | have hregular (x : C.carrier) (hx : x ∈ V) : |
| 90 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ (fun z => (e z).forward 0 hs₀ (p z)) x ∧ |
| 91 | Function.Bijective |
| 92 | (mfderiv (𝓡 3) (𝓡 3) (fun z => (e z).forward 0 hs₀ (p z)) x) := by |
| 93 | apply regularAt_of_slice_identity (S.flow k) (by simp) |
| 94 | filter_upwards [V.isOpen.mem_nhds hx] with z hz |
| 95 | change (e z).pointMap 0 hs₀ (p z) = (⟨(S.base k).1, z⟩ : (S.flow k).point) |
| 96 | rw [hzero', hp z hz] |
| 97 | have hinitial : InjOn (fun z => (e z).forward 0 hs₀ (p z)) V := by |
| 98 | intro x hx y hy hxy |
| 99 | have hpoints := congrArg |
| 100 | (fun z => (⟨(S.base k).1 + 0 / S.scale k, z⟩ : (S.flow k).point)) hxy |
| 101 | change (e x).pointMap 0 hs₀ (p x) = (e y).pointMap 0 hs₀ (p y) at hpoints |
| 102 | rw [hzero', hzero', hp x hx, hp y hy] at hpoints |
| 103 | exact eq_of_heq (Sigma.mk.inj_iff.mp hpoints).2 |
| 104 | obtain ⟨E, hE⟩ := Cylinder.exists_of_singleton_family ordConnected_Icc isCompact_Icc |
| 105 | V (hopen A) ⟨(S.base k).2, hbase A hA⟩ hcompact hbuffer p e hs₀ hregular hinitial |
| 106 | have hscalarE (s : ℝ) (hs : s ∈ Icc (-tau) 0) (x : C.carrier) : |
| 107 | (S.flow k).scalar (E.pointMap s hs x) ≤ D * S.scale k := by |
| 108 | rw [hE] |
| 109 | exact hscalar (r x).1 (r x).2 s hs |
| 110 | have hbounds (s : ℝ) (hs : s ∈ Icc (-tau) 0) (x : C.carrier) : |
| 111 | |(S.flow k).curvatureNorm (E.pointMap s hs x)| ≤ |
| 112 | (13 * max D 1) * S.scale k ∧ |
| 113 | ((S.flow k).connection (E.pointMap s hs x).1).negativeCurvaturePart |
| 114 | (E.pointMap s hs x).2 ≤ eta * S.scale k := by |
| 115 | exact hcurvature (E.pointMap s hs x).1 |
| 116 | (((S.flow k).slice_nonempty_iff _).mp ⟨(E.pointMap s hs x).2⟩) |
| 117 | (E.pointMap s hs x).2 (hscalarE s hs x) |
| 118 | refine ⟨{ |
| 119 | embedding := E |
| 120 | zero_identity := ?_ |
| 121 | curvature_bound := fun s hs x _ => (hbounds s hs x).1 |
| 122 | negative_curvature_bound := fun s hs x _ => (hbounds s hs x).2 }⟩ |
| 123 | intro h₀ x hx |
| 124 | rw [hE, hzero', hp x (hbuffer (subset_closure hx))] |
| 125 | |
| 126 | /-- Every fixed terminal ball admits actual backward controlled cylinders. |
| 127 | The duration and full-curvature coefficient precede the defect tolerance, |
| 128 | but may depend on the radius (Corollary 11.3, p. 269). -/ |
| 129 | theorem exists_radius_dependent_controlled_cylinders |
| 130 | (hC : RicciFlowCurvatureTheory.{u}) {S : GeneralizedBlowupSequence.{u}} |
| 131 | {epsilon canonicalConstant kappa r₀ mu : ℝ} |
| 132 | (H : M30CommonBlowupControls S epsilon canonicalConstant kappa r₀ mu) |
| 133 | (hbound : GeneralizedBlowupBoundedDistance S) (A : ℝ) (hA : 0 < A) : |
| 134 | ∃ tau : ℝ, 0 < tau ∧ ∃ B : ℝ, 0 ≤ B ∧ |
| 135 | ∀ eta : ℝ, 0 < eta → ∀ᶠ k : ℕ in atTop, |
| 136 | Nonempty (ControlledBlowupCylinder S k A tau B eta) := by |
| 137 | obtain ⟨D, hD, tau, htau, hworld⟩ := |
| 138 | exists_uniform_scalar_controlled_worldlines hC H hbound (A + 1) (by linarith) |
| 139 | refine ⟨tau, htau, 13 * max (2 * D) 1, |
| 140 | mul_nonneg (by norm_num) (zero_le_one.trans (le_max_right _ _)), ?_⟩ |
| 141 | exact eventually_controlled_cylinders_of_scalar_worldlines hC H A hA |
| 142 | (by linarith) htau hworld |
| 143 | |
| 144 | /-- A uniform terminal scalar bound supplies a common short slab on every |
| 145 | fixed ball, as used after Claim 11.7 in Theorem 11.1, p. 271. -/ |
| 146 | theorem shortControlledBlowupHypotheses_of_terminal_scalar_bound |
| 147 | (hC : RicciFlowCurvatureTheory.{u}) {S : GeneralizedBlowupSequence.{u}} |
| 148 | {epsilon canonicalConstant kappa r₀ mu : ℝ} |
| 149 | (H : M30CommonBlowupControls S epsilon canonicalConstant kappa r₀ mu) |
| 150 | {D : ℝ} (hD : 4 ≤ D) |
| 151 | (hterminal : ∀ A : ℝ, 0 < A → ∀ᶠ k : ℕ in atTop, |
| 152 | ∀ x ∈ S.baseBall k A, |
| 153 | (S.flow k).scalar ⟨(S.base k).1, x⟩ ≤ D * S.scale k) : |
| 154 | Nonempty (ShortControlledBlowupHypotheses S kappa r₀) := by |
| 155 | obtain ⟨tau, htau, hworld⟩ := |
| 156 | exists_common_scalar_controlled_worldlines hC H hD hterminal |
| 157 | refine ⟨{ |
| 158 | kappa_pos := H.kappa_pos |
| 159 | radius_pos := H.radius_pos |
| 160 | balls_compact := H.balls_compact |
| 161 | backward_time := tau |
| 162 | backward_time_pos := htau |
| 163 | curvature_bound := 13 * max (2 * D) 1 |
| 164 | curvature_bound_nonneg := |
| 165 | mul_nonneg (by norm_num) (zero_le_one.trans (le_max_right _ _)) |
| 166 | cylinders := ?_ |
| 167 | noncollapsed_at_zero := H.noncollapsed_at_zero }⟩ |
| 168 | intro A hA |
| 169 | exact eventually_controlled_cylinders_of_scalar_worldlines hC H A hA |
| 170 | (by linarith) htau (hworld (A + 1) (by linarith)) |
| 171 | |
| 172 | end PoincareMT.M30 |