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.Singular.RegularLimit.CurvatureControl |
| 2 | import PoincareLib.Geometry.RicciFlow.MetricComparison.LocalCurvature |
| 3 | import Mathlib.Analysis.Calculus.MeanValue |
| 4 | import Mathlib.Topology.MetricSpace.Lipschitz |
| 5 | |
| 6 | /-! |
| 7 | # Pointwise terminal metric limits |
| 8 | |
| 9 | Bounded curvature on a final time interval bounds the Ricci-flow time derivative |
| 10 | and compares the evolving metric to one fixed metric. The resulting limits are |
| 11 | finite and retain a strictly positive lower bound on every nonzero vector. |
| 12 | This is the pointwise metric-convergence step in Morgan--Tian, Theorem 11.19 |
| 13 | and Lemma 11.21, pp. 279--280. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle ENNReal NNReal Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | namespace RicciFlowAnalysis |
| 28 | |
| 29 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | {a s T K : ℝ} (F : RicciFlow n M (Ico a T)) |
| 32 | |
| 33 | /-- A time-independent comparison on a bounded-curvature final interval. -/ |
| 34 | theorem metric_diagonal_bounds_on_tail (has : a ≤ s) (hsT : s < T) |
| 35 | (hK : 0 ≤ K) (x : M) |
| 36 | (hRm : ∀ t ∈ Ico s T, (F.connection t).curvatureTensorNorm x ≤ K) |
| 37 | (v : TangentSpace (𝓡 n) x) {t : ℝ} (ht : t ∈ Ico s T) : |
| 38 | Real.exp (-2 * (n : ℝ) * K * (T - s)) * (F.metric s).inner x v v ≤ |
| 39 | (F.metric t).inner x v v ∧ |
| 40 | (F.metric t).inner x v v ≤ |
| 41 | Real.exp (2 * (n : ℝ) * K * (T - s)) * (F.metric s).inner x v v := by |
| 42 | have h := metric_comparison_at_of_curvature_bound F ⟨has, hsT⟩ |
| 43 | ⟨has.trans ht.1, ht.2⟩ ht.1 hK x |
| 44 | (fun τ hτ => hRm τ ⟨hτ.1, hτ.2.trans_lt ht.2⟩) v |
| 45 | have hq : 0 ≤ (F.metric s).inner x v v := by |
| 46 | by_cases hv : v = 0 |
| 47 | · simp [hv] |
| 48 | · exact ((F.metric s).pos x v hv).le |
| 49 | have hc : 0 ≤ 2 * (n : ℝ) * K := by positivity |
| 50 | constructor |
| 51 | · apply le_trans (mul_le_mul_of_nonneg_right (Real.exp_le_exp.mpr ?_) hq) h.1 |
| 52 | nlinarith [mul_le_mul_of_nonneg_left ht.2.le hc] |
| 53 | · apply le_trans h.2 (mul_le_mul_of_nonneg_right (Real.exp_le_exp.mpr ?_) hq) |
| 54 | nlinarith [mul_le_mul_of_nonneg_left ht.2.le hc] |
| 55 | |
| 56 | /-- Every diagonal metric coefficient has a finite left limit. The explicit |
| 57 | lower comparison survives at the terminal time. -/ |
| 58 | theorem exists_terminal_metric_diagonal (has : a ≤ s) (hsT : s < T) |
| 59 | (hK : 0 ≤ K) (x : M) |
| 60 | (hRm : ∀ t ∈ Ico s T, (F.connection t).curvatureTensorNorm x ≤ K) |
| 61 | (v : TangentSpace (𝓡 n) x) : |
| 62 | ∃ l : ℝ, Tendsto (fun t => (F.metric t).inner x v v) (𝓝[<] T) (𝓝 l) ∧ |
| 63 | Real.exp (-2 * (n : ℝ) * K * (T - s)) * (F.metric s).inner x v v ≤ l := by |
| 64 | let q : ℝ → ℝ := fun t => (F.metric t).inner x v v |
| 65 | let B := Real.exp (2 * (n : ℝ) * K * (T - s)) * q s |
| 66 | have hq (t : ℝ) : 0 ≤ q t := by |
| 67 | by_cases hv : v = 0 |
| 68 | · simp [q, hv] |
| 69 | · exact ((F.metric t).pos x v hv).le |
| 70 | have hB : 0 ≤ B := mul_nonneg (Real.exp_pos _).le (hq s) |
| 71 | let L : ℝ≥0 := ⟨2 * (n : ℝ) * K * B, by positivity⟩ |
| 72 | have hbound (t : ℝ) (ht : t ∈ Ico s T) : |
| 73 | ‖-2 * (F.connection t).ricci x v v‖₊ ≤ L := by |
| 74 | change |(-2 : ℝ) * (F.connection t).ricci x v v| ≤ 2 * (n : ℝ) * K * B |
| 75 | rw [abs_mul] |
| 76 | norm_num only [abs_neg, abs_of_nonneg (show (0 : ℝ) ≤ 2 by norm_num)] |
| 77 | have h := abs_ricci_le_curvatureTensorNorm (F.connection t) x v |
| 78 | have hupper := (metric_diagonal_bounds_on_tail F has hsT hK x hRm v ht).2 |
| 79 | have hcurv := mul_le_mul_of_nonneg_right |
| 80 | (mul_le_mul_of_nonneg_left (hRm t ht) (Nat.cast_nonneg n)) (hq t) |
| 81 | have htime := mul_le_mul_of_nonneg_left hupper |
| 82 | (mul_nonneg (Nat.cast_nonneg n) hK) |
| 83 | dsimp only [B, q] at * |
| 84 | nlinarith |
| 85 | have hderiv (t : ℝ) (ht : t ∈ Ico s T) : |
| 86 | HasDerivWithinAt q (-2 * (F.connection t).ricci x v v) (Ico s T) t := |
| 87 | (F.equation t ⟨has.trans ht.1, ht.2⟩ x v v).mono |
| 88 | (fun _ hτ => ⟨has.trans hτ.1, hτ.2⟩) |
| 89 | have hLip : LipschitzOnWith L q (Ico s T) := |
| 90 | (convex_Ico s T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le hderiv hbound |
| 91 | obtain ⟨qbar, hqbar, heq⟩ := hLip.extend_real |
| 92 | have hlimit : Tendsto q (𝓝[<] T) (𝓝 (qbar T)) := |
| 93 | (hqbar.continuous.tendsto T).mono_left nhdsWithin_le_nhds |>.congr' |
| 94 | (by filter_upwards [Ico_mem_nhdsLT hsT] with t ht using (heq ht).symm) |
| 95 | refine ⟨qbar T, hlimit, le_of_tendsto_of_tendsto tendsto_const_nhds hlimit ?_⟩ |
| 96 | filter_upwards [Ico_mem_nhdsLT hsT] with t ht |
| 97 | exact (metric_diagonal_bounds_on_tail F has hsT hK x hRm v ht).1 |
| 98 | |
| 99 | /-- Polarization gives a finite limit for every metric coefficient. -/ |
| 100 | theorem exists_terminal_metric_coefficient (has : a ≤ s) (hsT : s < T) |
| 101 | (hK : 0 ≤ K) (x : M) |
| 102 | (hRm : ∀ t ∈ Ico s T, (F.connection t).curvatureTensorNorm x ≤ K) |
| 103 | (v w : TangentSpace (𝓡 n) x) : |
| 104 | ∃ l : ℝ, Tendsto (fun t => (F.metric t).inner x v w) (𝓝[<] T) (𝓝 l) := by |
| 105 | obtain ⟨ladd, hadd, _⟩ := exists_terminal_metric_diagonal F has hsT hK x hRm (v + w) |
| 106 | obtain ⟨lv, hv, _⟩ := exists_terminal_metric_diagonal F has hsT hK x hRm v |
| 107 | obtain ⟨lw, hw, _⟩ := exists_terminal_metric_diagonal F has hsT hK x hRm w |
| 108 | refine ⟨(ladd - lv - lw) / 2, ?_⟩ |
| 109 | convert ((hadd.sub hv).sub hw).div_const 2 using 1 |
| 110 | ext t |
| 111 | simp only [map_add, add_apply] |
| 112 | rw [(F.metric t).symm x w v] |
| 113 | ring |
| 114 | |
| 115 | end RicciFlowAnalysis |
| 116 | |
| 117 | namespace SingularTimeAssumptions |
| 118 | |
| 119 | variable {M : Type u} [TopologicalSpace M] |
| 120 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 121 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 122 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 123 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 124 | |
| 125 | /-- Actual reference metric coefficients converge at every regular point. -/ |
| 126 | theorem exists_terminal_metric_coefficient (H : SingularTimeAssumptions F T M) |
| 127 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 128 | (v w : TangentSpace (𝓡 3) x) : |
| 129 | ∃ l : ℝ, Tendsto (fun t => (H.reference.flow.metric t).inner x v w) |
| 130 | (𝓝[<] T) (𝓝 l) := by |
| 131 | obtain ⟨s, K, U, hs, hsT, hK, _, hxU, _, hbound⟩ := |
| 132 | H.exists_open_uniform_curvature_tail P04 hx |
| 133 | exact RicciFlowAnalysis.exists_terminal_metric_coefficient H.reference.flow hs.le hsT hK.le x |
| 134 | (fun t ht => hbound t ht x hxU) v w |
| 135 | |
| 136 | /-- The diagonal terminal coefficient is positive for every nonzero vector. -/ |
| 137 | theorem exists_positive_terminal_metric_diagonal (H : SingularTimeAssumptions F T M) |
| 138 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 139 | (v : TangentSpace (𝓡 3) x) (hv : v ≠ 0) : |
| 140 | ∃ l : ℝ, 0 < l ∧ Tendsto (fun t => (H.reference.flow.metric t).inner x v v) |
| 141 | (𝓝[<] T) (𝓝 l) := by |
| 142 | obtain ⟨s, K, U, hs, hsT, hK, _, hxU, _, hbound⟩ := |
| 143 | H.exists_open_uniform_curvature_tail P04 hx |
| 144 | obtain ⟨l, hl, hlower⟩ := RicciFlowAnalysis.exists_terminal_metric_diagonal H.reference.flow |
| 145 | hs.le hsT hK.le x (fun t ht => hbound t ht x hxU) v |
| 146 | exact ⟨l, lt_of_lt_of_le (mul_pos (Real.exp_pos _) |
| 147 | ((H.reference.flow.metric s).pos x v hv)) hlower, hl⟩ |
| 148 | |
| 149 | /-- The unique terminal value of a reference metric coefficient. -/ |
| 150 | noncomputable def terminalMetricCoefficient (H : SingularTimeAssumptions F T M) |
| 151 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 152 | (v w : TangentSpace (𝓡 3) x) : ℝ := |
| 153 | Classical.choose (H.exists_terminal_metric_coefficient P04 hx v w) |
| 154 | |
| 155 | theorem tendsto_terminalMetricCoefficient (H : SingularTimeAssumptions F T M) |
| 156 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 157 | (v w : TangentSpace (𝓡 3) x) : |
| 158 | Tendsto (fun t => (H.reference.flow.metric t).inner x v w) (𝓝[<] T) |
| 159 | (𝓝 (H.terminalMetricCoefficient P04 hx v w)) := |
| 160 | Classical.choose_spec (H.exists_terminal_metric_coefficient P04 hx v w) |
| 161 | |
| 162 | theorem terminalMetricCoefficient_add_left (H : SingularTimeAssumptions F T M) |
| 163 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 164 | (u v w : TangentSpace (𝓡 3) x) : |
| 165 | H.terminalMetricCoefficient P04 hx (u + v) w = |
| 166 | H.terminalMetricCoefficient P04 hx u w + H.terminalMetricCoefficient P04 hx v w := by |
| 167 | apply tendsto_nhds_unique (H.tendsto_terminalMetricCoefficient P04 hx (u + v) w) |
| 168 | simpa only [map_add, add_apply] using |
| 169 | (H.tendsto_terminalMetricCoefficient P04 hx u w).add |
| 170 | (H.tendsto_terminalMetricCoefficient P04 hx v w) |
| 171 | |
| 172 | theorem terminalMetricCoefficient_smul_left (H : SingularTimeAssumptions F T M) |
| 173 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 174 | (c : ℝ) (v w : TangentSpace (𝓡 3) x) : |
| 175 | H.terminalMetricCoefficient P04 hx (c • v) w = |
| 176 | c * H.terminalMetricCoefficient P04 hx v w := by |
| 177 | apply tendsto_nhds_unique (H.tendsto_terminalMetricCoefficient P04 hx (c • v) w) |
| 178 | simpa only [map_smul, smul_apply, smul_eq_mul] using |
| 179 | (H.tendsto_terminalMetricCoefficient P04 hx v w).const_mul c |
| 180 | |
| 181 | theorem terminalMetricCoefficient_symm (H : SingularTimeAssumptions F T M) |
| 182 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 183 | (v w : TangentSpace (𝓡 3) x) : |
| 184 | H.terminalMetricCoefficient P04 hx v w = H.terminalMetricCoefficient P04 hx w v := by |
| 185 | apply tendsto_nhds_unique (H.tendsto_terminalMetricCoefficient P04 hx v w) |
| 186 | simpa only [(H.reference.flow.metric _).symm x w v] using |
| 187 | H.tendsto_terminalMetricCoefficient P04 hx w v |
| 188 | |
| 189 | /-- The terminal metric as a continuous bilinear form on each regular tangent |
| 190 | space. Spatial smoothness is a separate assertion. -/ |
| 191 | noncomputable def terminalMetricBilinear (H : SingularTimeAssumptions F T M) |
| 192 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) : |
| 193 | TangentSpace (𝓡 3) x →L[ℝ] TangentSpace (𝓡 3) x →L[ℝ] ℝ := by |
| 194 | letI : NormedAddCommGroup (TangentSpace (𝓡 3) x) := |
| 195 | inferInstanceAs (NormedAddCommGroup (EuclideanSpace ℝ (Fin 3))) |
| 196 | letI : NormedSpace ℝ (TangentSpace (𝓡 3) x) := |
| 197 | inferInstanceAs (NormedSpace ℝ (EuclideanSpace ℝ (Fin 3))) |
| 198 | letI : FiniteDimensional ℝ (TangentSpace (𝓡 3) x) := |
| 199 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin 3))) |
| 200 | exact LinearMap.toContinuousLinearMap { |
| 201 | toFun := fun v => LinearMap.toContinuousLinearMap { |
| 202 | toFun := fun w => H.terminalMetricCoefficient P04 hx v w |
| 203 | map_add' := fun u w => by |
| 204 | rw [H.terminalMetricCoefficient_symm P04 hx v (u + w), |
| 205 | H.terminalMetricCoefficient_add_left, |
| 206 | H.terminalMetricCoefficient_symm P04 hx u v, |
| 207 | H.terminalMetricCoefficient_symm P04 hx w v] |
| 208 | map_smul' := fun c w => by |
| 209 | rw [H.terminalMetricCoefficient_symm P04 hx v (c • w), |
| 210 | H.terminalMetricCoefficient_smul_left, |
| 211 | H.terminalMetricCoefficient_symm P04 hx w v] |
| 212 | rfl } |
| 213 | map_add' := fun u v => by |
| 214 | apply ContinuousLinearMap.ext |
| 215 | intro w |
| 216 | exact H.terminalMetricCoefficient_add_left P04 hx u v w |
| 217 | map_smul' := fun c v => by |
| 218 | apply ContinuousLinearMap.ext |
| 219 | intro w |
| 220 | exact H.terminalMetricCoefficient_smul_left P04 hx c v w } |
| 221 | |
| 222 | theorem terminalMetricBilinear_symm (H : SingularTimeAssumptions F T M) |
| 223 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 224 | (v w : TangentSpace (𝓡 3) x) : |
| 225 | H.terminalMetricBilinear P04 hx v w = H.terminalMetricBilinear P04 hx w v := |
| 226 | H.terminalMetricCoefficient_symm P04 hx v w |
| 227 | |
| 228 | theorem terminalMetricBilinear_pos (H : SingularTimeAssumptions F T M) |
| 229 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 230 | (v : TangentSpace (𝓡 3) x) (hv : v ≠ 0) : |
| 231 | 0 < H.terminalMetricBilinear P04 hx v v := by |
| 232 | obtain ⟨l, hl, hlimit⟩ := H.exists_positive_terminal_metric_diagonal P04 hx v hv |
| 233 | change 0 < H.terminalMetricCoefficient P04 hx v v |
| 234 | rw [tendsto_nhds_unique (H.tendsto_terminalMetricCoefficient P04 hx v v) hlimit] |
| 235 | exact hl |
| 236 | |
| 237 | theorem tendsto_terminalMetricBilinear_apply (H : SingularTimeAssumptions F T M) |
| 238 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 239 | (v w : TangentSpace (𝓡 3) x) : |
| 240 | Tendsto (fun t => (H.reference.flow.metric t).inner x v w) (𝓝[<] T) |
| 241 | (𝓝 (H.terminalMetricBilinear P04 hx v w)) := |
| 242 | H.tendsto_terminalMetricCoefficient P04 hx v w |
| 243 | |
| 244 | /-- The same curvature comparison controls the terminal bilinear form. -/ |
| 245 | theorem terminalMetricBilinear_bounds (H : SingularTimeAssumptions F T M) |
| 246 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) |
| 247 | {s K : ℝ} (hs : H.reference.tMinus ≤ s) (hsT : s < T) (hK : 0 ≤ K) |
| 248 | (hRm : ∀ t ∈ Ico s T, (H.reference.flow.connection t).curvatureTensorNorm x ≤ K) |
| 249 | (v : TangentSpace (𝓡 3) x) : |
| 250 | Real.exp (-2 * (3 : ℝ) * K * (T - s)) * (H.reference.flow.metric s).inner x v v ≤ |
| 251 | H.terminalMetricBilinear P04 hx v v ∧ |
| 252 | H.terminalMetricBilinear P04 hx v v ≤ |
| 253 | Real.exp (2 * (3 : ℝ) * K * (T - s)) * |
| 254 | (H.reference.flow.metric s).inner x v v := by |
| 255 | have hlimit := H.tendsto_terminalMetricBilinear_apply P04 hx v v |
| 256 | constructor |
| 257 | · apply le_of_tendsto_of_tendsto tendsto_const_nhds hlimit |
| 258 | filter_upwards [Ico_mem_nhdsLT hsT] with t ht |
| 259 | exact (RicciFlowAnalysis.metric_diagonal_bounds_on_tail |
| 260 | H.reference.flow hs hsT hK x hRm v ht).1 |
| 261 | · apply le_of_tendsto hlimit |
| 262 | filter_upwards [Ico_mem_nhdsLT hsT] with t ht |
| 263 | exact (RicciFlowAnalysis.metric_diagonal_bounds_on_tail |
| 264 | H.reference.flow hs hsT hK x hRm v ht).2 |
| 265 | |
| 266 | /-- Pointwise convergence upgrades to convergence of continuous bilinear forms |
| 267 | because each tangent space is finite dimensional. -/ |
| 268 | theorem tendsto_terminalMetricBilinear (H : SingularTimeAssumptions F T M) |
| 269 | (P04 : RicciFlowCurvatureTheory.{u}) {x : M} (hx : x ∈ H.reference.regularLimitSet) : |
| 270 | Tendsto (fun t => (H.reference.flow.metric t).inner x) (𝓝[<] T) |
| 271 | (𝓝 (H.terminalMetricBilinear P04 hx)) := by |
| 272 | let : NormedAddCommGroup (TangentSpace (𝓡 3) x) := |
| 273 | inferInstanceAs (NormedAddCommGroup (EuclideanSpace ℝ (Fin 3))) |
| 274 | let : NormedSpace ℝ (TangentSpace (𝓡 3) x) := |
| 275 | inferInstanceAs (NormedSpace ℝ (EuclideanSpace ℝ (Fin 3))) |
| 276 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) x) := |
| 277 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin 3))) |
| 278 | let G : ℝ → TangentSpace (𝓡 3) x →L[ℝ] TangentSpace (𝓡 3) x →L[ℝ] ℝ := |
| 279 | fun t => if t < T then (H.reference.flow.metric t).inner x |
| 280 | else H.terminalMetricBilinear P04 hx |
| 281 | have hG : ContinuousWithinAt G (Iio T) T := by |
| 282 | apply continuousWithinAt_clm_apply.mpr |
| 283 | intro v |
| 284 | apply continuousWithinAt_clm_apply.mpr |
| 285 | intro w |
| 286 | change Tendsto (fun t => G t v w) (𝓝[<] T) (𝓝 (G T v w)) |
| 287 | have hGT : G T = H.terminalMetricBilinear P04 hx := by simp [G] |
| 288 | rw [hGT] |
| 289 | apply (H.tendsto_terminalMetricBilinear_apply P04 hx v w).congr' |
| 290 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 291 | simp only [G, mem_Iio.mp ht, ↓reduceIte] |
| 292 | have hGT : G T = H.terminalMetricBilinear P04 hx := by simp [G] |
| 293 | rw [ContinuousWithinAt, hGT] at hG |
| 294 | apply hG.congr' |
| 295 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 296 | simp only [G, mem_Iio.mp ht, ↓reduceIte] |
| 297 | |
| 298 | end SingularTimeAssumptions |
| 299 | |
| 300 | end PoincareMT |