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.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseFiniteDistanceSlab |
| 2 | import Mathlib.Analysis.SpecificLimits.Basic |
| 3 | |
| 4 | /-! |
| 5 | # A finite dyadic budget for backward distance |
| 6 | |
| 7 | Only finitely many slabs are used for each tested time. The uniform budget |
| 8 | is 80 times the finite horizon times the square root of the terminal ceiling. |
| 9 | Source: MT Proposition 17.1; reviewed limit-tail-finite-harnack-distance F1. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter Finset |
| 15 | open scoped Manifold ContDiff Bundle ENNReal Topology BigOperators |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | private theorem dyadic_increment_eq {Q T : ℝ} (hQ : 0 < Q) (m : ℕ) : |
| 22 | (12 * (Real.sqrt Q * (3 / 2) ^ m) + |
| 23 | 8 * (Q * 2 ^ m) / (Real.sqrt Q * (3 / 2) ^ m)) * (T * (1 / 2) ^ m) = |
| 24 | 12 * T * Real.sqrt Q * (3 / 4) ^ m + |
| 25 | 8 * T * Real.sqrt Q * (2 / 3) ^ m := by |
| 26 | have hroot : Real.sqrt Q ≠ 0 := (Real.sqrt_pos.mpr hQ).ne' |
| 27 | have hp : (3 / 2 : ℝ) ^ m ≠ 0 := pow_ne_zero _ (by norm_num) |
| 28 | have hdiv : Q * 2 ^ m / (Real.sqrt Q * (3 / 2) ^ m) = |
| 29 | Real.sqrt Q * (4 / 3) ^ m := by |
| 30 | calc |
| 31 | _ = (Real.sqrt Q * Real.sqrt Q) * 2 ^ m / |
| 32 | (Real.sqrt Q * (3 / 2) ^ m) := by rw [Real.mul_self_sqrt hQ.le] |
| 33 | _ = Real.sqrt Q * (2 ^ m / (3 / 2) ^ m) := by field_simp |
| 34 | _ = Real.sqrt Q * (4 / 3) ^ m := by rw [← div_pow]; norm_num |
| 35 | rw [show 8 * (Q * 2 ^ m) / (Real.sqrt Q * (3 / 2) ^ m) = |
| 36 | 8 * (Q * 2 ^ m / (Real.sqrt Q * (3 / 2) ^ m)) by ring, hdiv] |
| 37 | calc |
| 38 | _ = 12 * T * Real.sqrt Q * ((3 / 2) ^ m * (1 / 2) ^ m) + |
| 39 | 8 * T * Real.sqrt Q * ((4 / 3) ^ m * (1 / 2) ^ m) := by ring |
| 40 | _ = _ := by rw [← mul_pow, ← mul_pow]; norm_num |
| 41 | |
| 42 | private theorem dyadic_increment_le {Q T : ℝ} (hQ : 0 < Q) (hT : 0 < T) (j : ℕ) : |
| 43 | (12 * (Real.sqrt Q * (3 / 2) ^ (j + 1)) + |
| 44 | 8 * (Q * 2 ^ (j + 1)) / (Real.sqrt Q * (3 / 2) ^ (j + 1))) * |
| 45 | (T * (1 / 2) ^ (j + 1)) ≤ 20 * T * Real.sqrt Q * (3 / 4) ^ j := by |
| 46 | rw [dyadic_increment_eq hQ] |
| 47 | have hp : (2 / 3 : ℝ) ^ (j + 1) ≤ (3 / 4 : ℝ) ^ (j + 1) := |
| 48 | pow_le_pow_left₀ (by norm_num) (by norm_num) _ |
| 49 | have hlast : (3 / 4 : ℝ) ^ (j + 1) ≤ (3 / 4 : ℝ) ^ j := by |
| 50 | rw [pow_succ] |
| 51 | nlinarith [pow_nonneg (by norm_num : (0 : ℝ) ≤ 3 / 4) j] |
| 52 | calc |
| 53 | _ ≤ 12 * T * Real.sqrt Q * (3 / 4) ^ (j + 1) + |
| 54 | 8 * T * Real.sqrt Q * (3 / 4) ^ (j + 1) := |
| 55 | add_le_add le_rfl (mul_le_mul_of_nonneg_left hp (by positivity)) |
| 56 | _ = 20 * T * Real.sqrt Q * (3 / 4) ^ (j + 1) := by ring |
| 57 | _ ≤ _ := mul_le_mul_of_nonneg_left hlast (by positivity) |
| 58 | |
| 59 | private theorem finite_dyadic_budget {T Q : ℝ} (hT : 0 < T) (hQ : 0 < Q) |
| 60 | (f : ℝ → ℝ) (hmono : AntitoneOn f (Ioc (-T) 0)) |
| 61 | (hslab : ∀ a b scale : ℝ, -T < a → a ≤ b → b ≤ 0 → 0 < scale → |
| 62 | f a ≤ f b + (12 * scale + 8 * (Q * T / (a + T)) / scale) * (b - a)) |
| 63 | {t : ℝ} (ht : t ∈ Ioc (-T) 0) : f t ≤ f 0 + 80 * T * Real.sqrt Q := by |
| 64 | let a : ℕ → ℝ := fun j => -T + T * (1 / 2) ^ j |
| 65 | have ha (j : ℕ) : a j ∈ Ioc (-T) 0 := by |
| 66 | dsimp only [a] |
| 67 | constructor |
| 68 | · have := mul_pos hT (pow_pos (by norm_num : (0 : ℝ) < 1 / 2) j) |
| 69 | linarith |
| 70 | · have := mul_le_mul_of_nonneg_left |
| 71 | (pow_le_one₀ (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num) (n := j)) hT.le |
| 72 | linarith |
| 73 | have hstep (j : ℕ) : f (a (j + 1)) ≤ f (a j) + |
| 74 | 20 * T * Real.sqrt Q * (3 / 4) ^ j := by |
| 75 | have hgap : a j - a (j + 1) = T * (1 / 2) ^ (j + 1) := by |
| 76 | dsimp only [a] |
| 77 | rw [pow_succ] |
| 78 | ring |
| 79 | have htime : a (j + 1) ≤ a j := by |
| 80 | have : 0 ≤ T * (1 / 2) ^ (j + 1) := by positivity |
| 81 | linarith |
| 82 | have hcoef : Q * T / (a (j + 1) + T) = Q * 2 ^ (j + 1) := by |
| 83 | have hp : (1 / 2 : ℝ) ^ (j + 1) ≠ 0 := pow_ne_zero _ (by norm_num) |
| 84 | have hden : a (j + 1) + T = T * (1 / 2) ^ (j + 1) := by dsimp [a]; ring |
| 85 | rw [hden] |
| 86 | apply (div_eq_iff (mul_ne_zero hT.ne' hp)).mpr |
| 87 | have hcancel : (2 : ℝ) ^ (j + 1) * (1 / 2) ^ (j + 1) = 1 := by |
| 88 | rw [← mul_pow] |
| 89 | norm_num |
| 90 | calc |
| 91 | Q * T = Q * T * (2 ^ (j + 1) * (1 / 2) ^ (j + 1)) := by rw [hcancel, mul_one] |
| 92 | _ = _ := by ring |
| 93 | have h := hslab (a (j + 1)) (a j) (Real.sqrt Q * (3 / 2) ^ (j + 1)) |
| 94 | (ha _).1 htime (ha _).2 (by positivity) |
| 95 | rw [hcoef, hgap] at h |
| 96 | exact h.trans (add_le_add le_rfl (dyadic_increment_le hQ hT j)) |
| 97 | have hchain (N : ℕ) : f (a N) ≤ f 0 + |
| 98 | 20 * T * Real.sqrt Q * ∑ j ∈ range N, (3 / 4 : ℝ) ^ j := by |
| 99 | induction N with |
| 100 | | zero => simp [a] |
| 101 | | succ N ih => |
| 102 | have h := (hstep N).trans (add_le_add ih le_rfl) |
| 103 | simpa only [sum_range_succ, mul_add, add_assoc] using h |
| 104 | have hsum (N : ℕ) : (∑ j ∈ range N, (3 / 4 : ℝ) ^ j) ≤ 4 := by |
| 105 | have h := geom_sum_mul_neg (3 / 4 : ℝ) N |
| 106 | have hp := pow_nonneg (by norm_num : (0 : ℝ) ≤ 3 / 4) N |
| 107 | nlinarith |
| 108 | have hlim : Tendsto a atTop (𝓝 (-T)) := by |
| 109 | have hp := tendsto_pow_atTop_nhds_zero_of_lt_one |
| 110 | (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) < 1) |
| 111 | simpa only [mul_zero, add_zero] using tendsto_const_nhds.add (hp.const_mul T) |
| 112 | obtain ⟨N, hN⟩ := (hlim.eventually (eventually_lt_nhds ht.1)).exists |
| 113 | calc |
| 114 | f t ≤ f (a N) := hmono (ha N) ht hN.le |
| 115 | _ ≤ f 0 + 20 * T * Real.sqrt Q * ∑ j ∈ range N, (3 / 4 : ℝ) ^ j := hchain N |
| 116 | _ ≤ f 0 + 20 * T * Real.sqrt Q * 4 := |
| 117 | add_le_add le_rfl (mul_le_mul_of_nonneg_left (hsum N) (by positivity)) |
| 118 | _ = _ := by ring |
| 119 | |
| 120 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 121 | TopologicalSpace L.carrier.carrier := L.carrier.topologicalSpace |
| 122 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 123 | ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.carrier.carrier := L.carrier.chartedSpace |
| 124 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 125 | IsManifold (𝓡 3) ∞ L.carrier.carrier := L.carrier.isManifold |
| 126 | |
| 127 | /-- One explicit distance budget works for every actual valid time and pair. -/ |
| 128 | theorem limitFinite_distance_budget (h04 : RicciFlowCurvatureTheory.{u}) |
| 129 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 130 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {Q : ℝ} (hQ : 0 < Q) |
| 131 | (hQ0 : ∀ x : L.carrier.carrier, (L.flow.connection 0).scalarCurvature x ≤ Q) |
| 132 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) (x y : L.carrier.carrier) : |
| 133 | ((L.flow.metric 0).edist x y).toReal ≤ ((L.flow.metric t).edist x y).toReal ∧ |
| 134 | ((L.flow.metric t).edist x y).toReal ≤ ((L.flow.metric 0).edist x y).toReal + |
| 135 | 80 * H.toReal * Real.sqrt Q := by |
| 136 | refine ⟨limitFinite_distance_antitone h04 hH hfinite L hQ hQ0 ht L.zero_mem ht.1 x y, ?_⟩ |
| 137 | apply finite_dyadic_budget (limitFinite_horizon_pos hH hfinite) hQ |
| 138 | (fun τ => ((L.flow.metric τ).edist x y).toReal) ?_ ?_ |
| 139 | (by rwa [← limitFinite_domain_eq hfinite]) |
| 140 | · intro a ha b hb hab |
| 141 | exact limitFinite_distance_antitone h04 hH hfinite L hQ hQ0 |
| 142 | (by rwa [limitFinite_domain_eq hfinite]) |
| 143 | (by rwa [limitFinite_domain_eq hfinite]) hab x y |
| 144 | · intro a b scale ha hab hb hscale |
| 145 | exact limitFinite_distance_slab h04 hH hfinite L hQ hQ0 ha hab hb hscale x y |
| 146 | |
| 147 | /-- C6's actual terminal norm ceiling supplies the reviewed uniform budget. -/ |
| 148 | theorem limitFinite_additive_distance (h04 : RicciFlowCurvatureTheory.{u}) |
| 149 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 150 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {B0 : ℝ} |
| 151 | (hterminal : ∀ x : L.carrier.carrier, |
| 152 | (L.flow.connection 0).curvatureTensorNorm x ≤ B0) |
| 153 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) (x y : L.carrier.carrier) : |
| 154 | ((L.flow.metric 0).edist x y).toReal ≤ ((L.flow.metric t).edist x y).toReal ∧ |
| 155 | ((L.flow.metric t).edist x y).toReal ≤ ((L.flow.metric 0).edist x y).toReal + |
| 156 | 80 * H.toReal * Real.sqrt (max 1 (3 * B0)) := by |
| 157 | apply limitFinite_distance_budget h04 hH hfinite L |
| 158 | (lt_of_lt_of_le zero_lt_one (le_max_left _ _)) ?_ t ht x y |
| 159 | intro z |
| 160 | exact ((L.flow.connection 0).scalarCurvature_le_curvatureTensorNorm_sharp z).trans |
| 161 | ((mul_le_mul_of_nonneg_left (hterminal z) (by norm_num)).trans (le_max_right _ _)) |
| 162 | |
| 163 | end PoincareMT.M47 |