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.AncientKappa.Compactness.Statement |
| 2 | import PoincareLib.Geometry.RicciFlow.TimeTranslation |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.LocalGeometry |
| 4 | import PoincareLib.Geometry.Riemannian.Curvature.NormBounds |
| 5 | |
| 6 | /-! |
| 7 | # Three-dimensional compactness derivative control |
| 8 | |
| 9 | The local derivative estimate in the frozen M23 predecessors concerns dimension |
| 10 | three. Translating a short interval ending at an interior time gives uniform |
| 11 | derivative bounds there without requiring curvature theory in other dimensions. |
| 12 | |
| 13 | These estimates support Morgan--Tian, Theorem 9.64, pp. 225/229, through the |
| 14 | finite-window compactness inputs of Theorem 3.28, p. 51. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option maxHeartbeats 800000 |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 23 | |
| 24 | open Set |
| 25 | |
| 26 | /-- The dimension-three M23 Shi estimate is uniform over compact interior |
| 27 | intervals on balls measured at the time being estimated. -/ |
| 28 | theorem eventually_interior_curvatureDerivativeNorm_le_of_m23_predecessors |
| 29 | {T' T : ℝ} |
| 30 | (H : PointedRicciFlowCompactnessHypotheses 3 T' T) |
| 31 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 32 | (a b : ℝ) (ha : T' < a) (hb : b < T) |
| 33 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 34 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 35 | let C := H.sequence.carrier k |
| 36 | let F := H.sequence.flow k |
| 37 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 38 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier := C.chartedSpace |
| 39 | letI : IsManifold (𝓡 3) ∞ C.carrier := C.isManifold |
| 40 | ∀ t ∈ Icc a b, ∀ x ∈ F.ballAt t A, |
| 41 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ D := by |
| 42 | obtain ⟨KA, hKA, hAevent⟩ := H.all_time_curvature_control A hA |
| 43 | obtain ⟨K4, hK4, h4event⟩ := H.all_time_curvature_control (4 * A) (by positivity) |
| 44 | let L : ℝ := (3 : ℝ) ^ 3 * KA |
| 45 | let K0 : ℝ := K4 + 1 |
| 46 | let l2 : ℝ := Real.log 2 |
| 47 | let q : ℝ := min (a - T') (min (1 / K0) (l2 / (L + 1))) |
| 48 | let δ : ℝ := q / 2 |
| 49 | have hK0 : 0 < K0 := by dsimp [K0]; linarith |
| 50 | have hl2 : 0 < l2 := Real.log_pos (by norm_num) |
| 51 | have hL : 0 ≤ L := by dsimp [L]; positivity |
| 52 | have hq : 0 < q := by |
| 53 | dsimp [q] |
| 54 | exact lt_min (by linarith) (lt_min (by positivity) (by positivity)) |
| 55 | have hδ : 0 < δ := by dsimp [δ]; linarith |
| 56 | have hδa : δ < a - T' := by |
| 57 | have hq' : q ≤ a - T' := min_le_left _ _ |
| 58 | dsimp [δ] |
| 59 | linarith |
| 60 | have hδK : δ ≤ 1 / K0 := by |
| 61 | have hq' : q ≤ 1 / K0 := |
| 62 | le_trans (min_le_right _ _) (min_le_left _ _) |
| 63 | dsimp [δ] |
| 64 | linarith |
| 65 | have hδL : L * δ ≤ l2 := by |
| 66 | have hq' : q ≤ l2 / (L + 1) := |
| 67 | le_trans (min_le_right _ _) (min_le_right _ _) |
| 68 | have hqbound : L * q ≤ l2 := by |
| 69 | calc |
| 70 | L * q ≤ L * (l2 / (L + 1)) := mul_le_mul_of_nonneg_left hq' hL |
| 71 | _ ≤ (L + 1) * (l2 / (L + 1)) := by |
| 72 | gcongr |
| 73 | linarith |
| 74 | _ = l2 := by field_simp |
| 75 | dsimp [δ] |
| 76 | nlinarith |
| 77 | obtain ⟨Cderiv, hCderiv, hShi⟩ := |
| 78 | P.local_derivative_estimates m K0 1 (4 * A) |
| 79 | hK0 (by norm_num) (by positivity) |
| 80 | refine ⟨Cderiv / δ ^ ((m : ℝ) / 2), by positivity, ?_⟩ |
| 81 | filter_upwards [hAevent, h4event, |
| 82 | H.eventually_all_time_ball_compact (4 * A) (by positivity)] with k hkA hk4 hkcompact |
| 83 | let C := H.sequence.carrier k |
| 84 | let F := H.sequence.flow k |
| 85 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 86 | let : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier := C.chartedSpace |
| 87 | let : IsManifold (𝓡 3) ∞ C.carrier := C.isManifold |
| 88 | let : T2Space C.carrier := C.t2Space |
| 89 | let : SecondCountableTopology C.carrier := C.secondCountable |
| 90 | change ∀ t ∈ Icc a b, ∀ x ∈ F.ballAt t A, |
| 91 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ Cderiv / δ ^ ((m : ℝ) / 2) |
| 92 | intro t ht x hx |
| 93 | have htI : t ∈ Ioo T' T := ⟨by linarith [ht.1], by linarith [ht.2]⟩ |
| 94 | have hearly : t - δ ∈ Ioo T' T := ⟨by linarith [ht.1], by linarith [ht.2]⟩ |
| 95 | have hshift : (fun u : ℝ ↦ u + (t - δ)) '' Icc 0 δ ⊆ Ioo T' T := by |
| 96 | rintro _ ⟨u, hu, rfl⟩ |
| 97 | constructor <;> dsimp <;> linarith [hu.1, hu.2, hearly.1, htI.2] |
| 98 | have hneIcc : (Icc (0 : ℝ) δ).Nontrivial := |
| 99 | ⟨0, ⟨le_rfl, hδ.le⟩, δ, ⟨hδ.le, le_rfl⟩, (ne_of_gt hδ).symm⟩ |
| 100 | let Ft := PoincareMT.RicciFlow.translate F.flow (t - δ) hshift |
| 101 | Set.ordConnected_Icc hneIcc |
| 102 | have hcompact : IsCompact (closure ((Ft.metric 0).ball F.base (4 * A))) := by |
| 103 | rw [PoincareMT.RicciFlow.translate_metric F.flow (t - δ) hshift |
| 104 | Set.ordConnected_Icc hneIcc 0] |
| 105 | simpa only [BasedFlow.ballAt, FlowCarrier.metricBall, zero_add] using |
| 106 | hkcompact (t - δ) hearly |
| 107 | have hcurv : ∀ u ∈ Icc 0 δ, ∀ y ∈ (Ft.metric 0).ball F.base (4 * A), |
| 108 | (Ft.connection u).curvatureTensorNorm y ≤ K0 := by |
| 109 | intro u hu y hy |
| 110 | have hty : y ∈ F.ballAt (t - δ) (4 * A) := by |
| 111 | change y ∈ (F.flow.metric (t - δ)).ball F.base (4 * A) |
| 112 | simpa [Ft, PoincareMT.RicciFlow.translate] using hy |
| 113 | exact le_trans (hk4 (t - δ) hearly (u + (t - δ)) |
| 114 | (hshift ⟨u, hu, rfl⟩) y hty) (by dsimp [K0]; linarith) |
| 115 | have hderiv := hShi C.carrier δ hδ hδK Ft F.base hcompact hcurv |
| 116 | δ ⟨hδ, le_rfl⟩ |
| 117 | have hRic : ∀ u ∈ Ioo T' T, ∀ y ∈ F.ballAt t A, |
| 118 | ∀ v : C.tangent y, |
| 119 | |(F.flow.connection u).ricci y v v| ≤ L * (F.flow.metric u).inner y v v := by |
| 120 | intro u hu y hy v |
| 121 | have hQ : 0 ≤ (F.flow.metric u).inner y v v := by |
| 122 | by_cases hv : v = 0 |
| 123 | · subst v; simp |
| 124 | · exact ((F.flow.metric u).pos y v hv).le |
| 125 | have hnorm := (F.flow.connection u).abs_ricci_quadratic_le_curvatureTensorNorm y v |
| 126 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 3) y) = 3 := finrank_euclideanSpace_fin |
| 127 | simp only [Fintype.card_fin, hdim] at hnorm |
| 128 | exact hnorm.trans (mul_le_mul_of_nonneg_right |
| 129 | (mul_le_mul_of_nonneg_left (hkA t htI u hu y hy) (by positivity)) hQ) |
| 130 | have hball := F.flow.ball_subset_ball_of_ricci_bound (convex_Ioo T' T) |
| 131 | (Set.Subset.refl _) F.base A L (s := t) (t := t - δ) htI hearly hRic |
| 132 | have hx2 : x ∈ (F.flow.metric (t - δ)).ball F.base (2 * A) := by |
| 133 | have hx' := hball hx |
| 134 | change (F.flow.metric (t - δ)).edist F.base x < ENNReal.ofReal (2 * A) |
| 135 | have hexp : Real.exp (L * δ) ≤ 2 := by |
| 136 | rw [← Real.exp_log (by norm_num : (0 : ℝ) < 2)] |
| 137 | exact Real.exp_le_exp.mpr hδL |
| 138 | have hrad : Real.exp (L * δ) * A ≤ 2 * A := by nlinarith |
| 139 | have habs : |t - δ - t| = δ := by |
| 140 | rw [show t - δ - t = -δ by ring, abs_neg, abs_of_pos hδ] |
| 141 | rw [habs] at hx' |
| 142 | exact lt_of_lt_of_le hx' (ENNReal.ofReal_le_ofReal hrad) |
| 143 | have hx2' : x ∈ (Ft.metric 0).ball F.base (4 * A / 2) := by |
| 144 | rw [PoincareMT.RicciFlow.translate_metric F.flow (t - δ) hshift |
| 145 | Set.ordConnected_Icc hneIcc 0, zero_add] |
| 146 | simpa only [show 4 * A / 2 = 2 * A by ring] using hx2 |
| 147 | have h := hderiv x hx2' |
| 148 | change (F.flow.connection (δ + (t - δ))).curvatureDerivativeNorm m x ≤ _ at h |
| 149 | rwa [show δ + (t - δ) = t by ring] at h |
| 150 | |
| 151 | /-- All derivative orders have uniform two-time bounds on compact interior |
| 152 | intervals, using only the dimension-three M23 predecessors. -/ |
| 153 | theorem eventually_two_time_curvatureDerivativeNorm_le_of_m23_predecessors |
| 154 | {T' T : ℝ} |
| 155 | (H : PointedRicciFlowCompactnessHypotheses 3 T' T) |
| 156 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 157 | (a b : ℝ) (ha : T' < a) (hb : b < T) |
| 158 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 159 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 160 | let C := H.sequence.carrier k |
| 161 | let F := H.sequence.flow k |
| 162 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 163 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier := C.chartedSpace |
| 164 | letI : IsManifold (𝓡 3) ∞ C.carrier := C.isManifold |
| 165 | ∀ s ∈ Ioo T' T, ∀ t ∈ Icc a b, ∀ x ∈ F.ballAt s A, |
| 166 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ D := by |
| 167 | obtain ⟨B, hB, hcontain⟩ := H.exists_uniform_ball_containment A hA |
| 168 | obtain ⟨D, hD, hbound⟩ := |
| 169 | H.eventually_interior_curvatureDerivativeNorm_le_of_m23_predecessors |
| 170 | P a b ha hb B hB m |
| 171 | refine ⟨D, hD, ?_⟩ |
| 172 | filter_upwards [hcontain, hbound] with k hkcontain hkbound |
| 173 | dsimp only at hkbound ⊢ |
| 174 | intro s hs t ht x hx |
| 175 | exact hkbound t ht x (hkcontain s hs t ⟨by linarith [ht.1], by linarith [ht.2]⟩ hx) |
| 176 | |
| 177 | /-- Uniform derivative bounds on compact interior time sets, measured on a |
| 178 | fixed zero-time ball. -/ |
| 179 | theorem eventually_compact_curvatureDerivativeNorm_le_of_m23_predecessors |
| 180 | {T' T : ℝ} |
| 181 | (H : PointedRicciFlowCompactnessHypotheses 3 T' T) |
| 182 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 183 | {I : Set ℝ} (hIcompact : IsCompact I) (hI : I ⊆ Ioo T' T) |
| 184 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 185 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 186 | let C := H.sequence.carrier k |
| 187 | let F := H.sequence.flow k |
| 188 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 189 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier := C.chartedSpace |
| 190 | letI : IsManifold (𝓡 3) ∞ C.carrier := C.isManifold |
| 191 | ∀ t ∈ I, ∀ x ∈ F.zeroBall A, |
| 192 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ D := by |
| 193 | rcases eq_empty_or_nonempty I with rfl | hInonempty |
| 194 | · refine ⟨1, by norm_num, Filter.Eventually.of_forall ?_⟩ |
| 195 | intro k |
| 196 | dsimp |
| 197 | intro t ht |
| 198 | exact False.elim ht |
| 199 | obtain ⟨tmin, htmin, hmin⟩ := |
| 200 | hIcompact.exists_isMinOn hInonempty continuousOn_id |
| 201 | obtain ⟨tmax, htmax, hmax⟩ := |
| 202 | hIcompact.exists_isMaxOn hInonempty continuousOn_id |
| 203 | let a : ℝ := (T' + tmin) / 2 |
| 204 | let b : ℝ := (T + tmax) / 2 |
| 205 | have ha : T' < a := by |
| 206 | dsimp [a] |
| 207 | linarith [(hI htmin).1, H.time_bounds.1] |
| 208 | have hb : b < T := by |
| 209 | dsimp [b] |
| 210 | linarith [(hI htmax).2, H.time_bounds.2] |
| 211 | have hIcc : I ⊆ Icc a b := by |
| 212 | intro t ht |
| 213 | have hleft : tmin ≤ t := by simpa using hmin ht |
| 214 | have hright : t ≤ tmax := by simpa using hmax ht |
| 215 | dsimp [a, b] |
| 216 | constructor <;> linarith [(hI ht).1, (hI ht).2, (hI htmin).1, (hI htmax).2] |
| 217 | obtain ⟨D, hD, hbound⟩ := |
| 218 | H.eventually_two_time_curvatureDerivativeNorm_le_of_m23_predecessors |
| 219 | P a b ha hb A hA m |
| 220 | refine ⟨D, hD, ?_⟩ |
| 221 | filter_upwards [hbound] with k hk |
| 222 | dsimp only at hk ⊢ |
| 223 | intro t ht x hx |
| 224 | exact hk 0 ⟨H.time_bounds.1, H.time_bounds.2⟩ t (hIcc ht) x hx |
| 225 | |
| 226 | /-- The dimension-three M23 predecessors also give derivative control at the |
| 227 | distinguished zero-time slice. -/ |
| 228 | theorem eventually_zero_time_curvatureDerivativeNorm_le_of_m23_predecessors |
| 229 | {T' T : ℝ} |
| 230 | (H : PointedRicciFlowCompactnessHypotheses 3 T' T) |
| 231 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 232 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 233 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 234 | let C := H.sequence.carrier k |
| 235 | let F := H.sequence.flow k |
| 236 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 237 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier := C.chartedSpace |
| 238 | letI : IsManifold (𝓡 3) ∞ C.carrier := C.isManifold |
| 239 | ∀ x ∈ F.zeroBall A, |
| 240 | (F.flow.connection 0).curvatureDerivativeNorm m x ≤ D := by |
| 241 | obtain ⟨D, hD, hbound⟩ := |
| 242 | H.eventually_interior_curvatureDerivativeNorm_le_of_m23_predecessors |
| 243 | P 0 0 H.time_bounds.1 H.time_bounds.2 A hA m |
| 244 | refine ⟨D, hD, ?_⟩ |
| 245 | filter_upwards [hbound] with k hk |
| 246 | exact hk 0 ⟨le_rfl, le_rfl⟩ |
| 247 | |
| 248 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |