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.Harnack.Noncompact.CurvatureControl.Cylinders.Compactness |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Compactness |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Curvature |
| 5 | |
| 6 | /-! |
| 7 | # Curvature in pointed limits of terminal cylinders |
| 8 | |
| 9 | The interior scalar buffer preserves nonflatness through convergence of the |
| 10 | full curvature norm. Uniform source bounds on expanding balls give a global |
| 11 | bound on the connected pointed limit. |
| 12 | Reference: Kleiner--Lott, Corollary 44.1, pp. 2682--2683, and Appendix E, |
| 13 | pp. 2848--2849. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.measurableSpace |
| 25 | FlowCarrier.borelSpace FlowCarrier.chartedSpace FlowCarrier.isManifold |
| 26 | FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 27 | |
| 28 | namespace PointedGeometricConvergence |
| 29 | |
| 30 | /-- A positive source scalar lower bound at the base time prevents the pointed |
| 31 | limit from being flat. Only curvature-norm convergence is needed. -/ |
| 32 | theorem curvatureTensorNorm_base_pos_of_scalar_lower_bound |
| 33 | {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 34 | (G : PointedGeometricConvergence S) (hzero : 0 ∈ Ioo T' T) |
| 35 | {c : ℝ} (hc : 0 < c) |
| 36 | (hscalar : ∀ᶠ k in atTop, |
| 37 | c ≤ ((S.flow k).flow.connection 0).scalarCurvature (S.flow k).base) : |
| 38 | 0 < (G.limitFlow.flow.connection 0).curvatureTensorNorm G.limitFlow.base := by |
| 39 | have hlimit := tendsto_const_nhds.mul (G.tendsto_curvatureTensorNorm 0 hzero |
| 40 | G.limitFlow.base) (a := (n : ℝ) ^ 2) |
| 41 | have hbound : c ≤ (n : ℝ) ^ 2 * |
| 42 | (G.limitFlow.flow.connection 0).curvatureTensorNorm G.limitFlow.base := by |
| 43 | apply ge_of_tendsto hlimit |
| 44 | filter_upwards [G.subsequence_strictMono.tendsto_atTop.eventually hscalar] with k hk |
| 45 | rw [congrArg Prod.snd (G.base_preserving k)] |
| 46 | exact hk.trans ((le_abs_self _).trans |
| 47 | (((S.flow (G.subsequence k)).flow.connection 0).abs_scalarCurvature_le_curvatureTensorNorm |
| 48 | (S.flow (G.subsequence k)).base)) |
| 49 | by_contra! h |
| 50 | have := mul_nonpos_of_nonneg_of_nonpos (sq_nonneg (n : ℝ)) h |
| 51 | linarith |
| 52 | |
| 53 | /-- A single curvature bound on every fixed source ball passes to every point |
| 54 | of a connected pointed limit, with the same constant. -/ |
| 55 | theorem curvatureTensorNorm_le_of_uniform_ball_bound |
| 56 | {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 57 | (G : PointedGeometricConvergence S) (hT : T' < 0 ∧ 0 < T) {K : ℝ} |
| 58 | (hbound : ∀ A : ℝ, 0 < A → ∀ᶠ k in atTop, |
| 59 | ∀ t ∈ Ioo T' T, ∀ x ∈ (S.flow k).ballAt t A, |
| 60 | ((S.flow k).flow.connection t).curvatureTensorNorm x ≤ K) : |
| 61 | ∀ t ∈ Ioo T' T, ∀ x : G.limitCarrier.carrier, |
| 62 | (G.limitFlow.flow.connection t).curvatureTensorNorm x ≤ K := by |
| 63 | let : PreconnectedSpace G.limitCarrier.carrier := |
| 64 | ⟨G.limitCarrier.connected.isPreconnected⟩ |
| 65 | intro t ht x |
| 66 | let g := G.limitFlow.metricAt t |
| 67 | let A := (g.edist G.limitFlow.base x).toReal + 1 |
| 68 | have hA : 0 < A := by dsimp only [A]; positivity |
| 69 | have hx : x ∈ G.limitFlow.ballAt t A := by |
| 70 | change g.edist G.limitFlow.base x < ENNReal.ofReal A |
| 71 | rw [← ENNReal.ofReal_toReal (g.edist_ne_top G.limitFlow.base x)] |
| 72 | exact ENNReal.ofReal_lt_ofReal_iff hA |>.mpr (by dsimp only [A]; linarith) |
| 73 | apply le_of_tendsto (G.tendsto_curvatureTensorNorm t ht x) |
| 74 | filter_upwards [G.subsequence_strictMono.tendsto_atTop.eventually |
| 75 | (hbound (2 * A) (by positivity)), G.eventually_mem_ballAt hT ht hx] with k hk hxk |
| 76 | exact hk t ht _ hxk |
| 77 | |
| 78 | end PointedGeometricConvergence |
| 79 | |
| 80 | namespace RicciFlow |
| 81 | |
| 82 | /-- A normalized complete cylinder sequence has a nonflat, globally bounded |
| 83 | pointed limit on a common interior time interval, with complete slices. -/ |
| 84 | theorem exists_nonflat_pointed_limit_of_terminal_cylinders |
| 85 | {m : ℕ} (hC : RicciFlowCurvatureTheory.{0}) (hm : 0 < m) |
| 86 | (C : ℕ → FlowCarrier.{0} (m + 1)) (J : ℕ → Set ℝ) |
| 87 | (F : ∀ k, RicciFlow (m + 1) (C k).carrier (J k)) |
| 88 | (p : ∀ k, (C k).carrier) {a ν : ℝ} (ha : a ≤ -2) |
| 89 | (hJ : ∀ k, Icc a 0 ⊆ interior (J k)) |
| 90 | (hcomplete : ∀ k, ∀ t ∈ Icc a 0, MetricComplete ((F k).metric t)) |
| 91 | (hoperator : ∀ k, ∀ t ∈ Icc a 0, ∀ x : (C k).carrier, |
| 92 | ((F k).connection t).NonnegativeCurvatureOperator x) |
| 93 | (L : ℕ → ℝ) (hL : Tendsto L atTop atTop) |
| 94 | (hscalar : ∀ k, ∀ t ∈ Icc a 0, |
| 95 | ∀ x ∈ ((F k).metric 0).ball (p k) (L k), |
| 96 | ((F k).connection t).scalarCurvature x ≤ 4) |
| 97 | (hnormalize : ∀ k, ((F k).connection 0).scalarCurvature (p k) = 1) |
| 98 | (hν : 0 < ν) |
| 99 | (hvolume : ∀ᶠ k in atTop, ENNReal.ofReal ν ≤ |
| 100 | ((F k).metric 0).volumeMeasure (((F k).metric 0).ball (p k) 1)) : |
| 101 | ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ |
| 102 | ∃ G : PointedGeometricConvergence |
| 103 | (bufferedCylinderSequence C J F p a δ (by linarith) hJ), |
| 104 | (∀ t ∈ Ioo (a + δ) δ, |
| 105 | G.limitCarrier.metricComplete (G.limitFlow.metricAt t)) ∧ |
| 106 | 0 < (G.limitFlow.flow.connection 0).curvatureTensorNorm G.limitFlow.base ∧ |
| 107 | ∀ t ∈ Ioo (a + δ) δ, ∀ x : G.limitCarrier.carrier, |
| 108 | (G.limitFlow.flow.connection t).curvatureTensorNorm x ≤ |
| 109 | ((m + 1 : ℕ) : ℝ) ^ 2 * 4 := by |
| 110 | obtain ⟨ε, hε, hεone, hbuffer⟩ := exists_terminal_scalar_positive_time_buffer hC hm |
| 111 | let δ := ε / 2 |
| 112 | have hδ : 0 < δ := by dsimp only [δ]; positivity |
| 113 | have hδone : δ < 1 := by dsimp only [δ]; linarith |
| 114 | have hatime : a + δ < 0 := by linarith |
| 115 | let S := bufferedCylinderSequence C J F p a δ (by linarith) hJ |
| 116 | obtain ⟨H, hHS⟩ := exists_pointedCompactnessHypotheses_of_terminal_cylinders |
| 117 | hC hm C J F p (by linarith : a ≤ -1) hδ hδone.le hatime hJ hcomplete hoperator |
| 118 | L hL hscalar hν hvolume |
| 119 | obtain ⟨P⟩ := pointedRicciFlowCompactness H hC |
| 120 | have hlimit : ∃ G : PointedGeometricConvergence S, |
| 121 | ∀ t ∈ Ioo (a + δ) δ, |
| 122 | G.limitCarrier.metricComplete (G.limitFlow.metricAt t) := by |
| 123 | rcases H with ⟨hT, seq, hvol, hcompact, hspace, hall, hnoncollapse⟩ |
| 124 | dsimp only at hHS |
| 125 | subst seq |
| 126 | exact ⟨P.geometric_limit, P.complete_interior⟩ |
| 127 | obtain ⟨G, hGcomplete⟩ := hlimit |
| 128 | refine ⟨δ, hδ, hδone, G, hGcomplete, ?_, ?_⟩ |
| 129 | · apply G.curvatureTensorNorm_base_pos_of_scalar_lower_bound |
| 130 | ⟨hatime, hδ⟩ (by norm_num : 0 < (1 : ℝ) / 2) |
| 131 | filter_upwards [hL.eventually_ge_atTop (64 * (((m + 1 : ℕ) : ℝ) + 8))] with k hk |
| 132 | have hsub : Icc (-2 : ℝ) 0 ⊆ Icc a 0 := Icc_subset_Icc ha le_rfl |
| 133 | have h := hbuffer (C k).carrier (J k) (F k) |
| 134 | (fun _ ht => hJ k (hsub ht)) (fun t ht => hcomplete k t (hsub ht)) |
| 135 | (fun t ht => hoperator k t (hsub ht)) (p k) |
| 136 | (fun t ht x hx => hscalar k t (hsub ht) x |
| 137 | (hx.trans_le (ENNReal.ofReal_le_ofReal hk))) (hnormalize k) |
| 138 | (-δ) ⟨by dsimp only [δ]; linarith, by linarith⟩ |
| 139 | dsimp only [S, bufferedCylinderSequence, RicciFlow.translate] |
| 140 | change (1 : ℝ) / 2 ≤ ((F k).connection (0 + -δ)).scalarCurvature (p k) |
| 141 | rw [zero_add] |
| 142 | exact h |
| 143 | · apply G.curvatureTensorNorm_le_of_uniform_ball_bound ⟨hatime, hδ⟩ |
| 144 | intro A _ |
| 145 | filter_upwards [hL.eventually_ge_atTop A] with k hk |
| 146 | intro t ht x hx |
| 147 | have hshift : t - δ ∈ Icc a 0 := ⟨by linarith [ht.1], by linarith [ht.2]⟩ |
| 148 | exact (F k).curvatureTensorNorm_le_on_two_time_ball_of_terminal_cylinder hC |
| 149 | (hJ k) (hoperator k) (p k) (hscalar k) hshift hshift hk x hx |
| 150 | |
| 151 | end RicciFlow |
| 152 | |
| 153 | end PoincareMT |