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.Compactness.Ancient.Curvature |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Cylinders.CurvatureLimit |
| 3 | |
| 4 | /-! |
| 5 | # One scalar buffer for every expanding-cylinder time window |
| 6 | |
| 7 | The shift is chosen before the finite time window. Tails of an expanding |
| 8 | cylinder sequence then give actual M07 limits on every such window, with a |
| 9 | common quantitative nonflatness estimate, completeness and curvature sign. |
| 10 | Compatibility of the spatial carriers is not asserted here. |
| 11 | |
| 12 | Reference: Kleiner--Lott, Corollary 44.1, pp. 2682--2683; Appendix E, |
| 13 | Theorem E.1 and Corollary E.2, 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.RicciFlow |
| 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 | /-- The same interior shift and nonflatness lower bound work on every bounded |
| 29 | window of an expanding sequence. Each window uses a tail of the original flows. -/ |
| 30 | theorem exists_common_buffer_pointed_limits_of_expanding_cylinders |
| 31 | {m : ℕ} (hC : RicciFlowCurvatureTheory.{0}) (hm : 0 < m) |
| 32 | (C : ℕ → FlowCarrier.{0} (m + 1)) (J : ℕ → Set ℝ) |
| 33 | (F : ∀ k, RicciFlow (m + 1) (C k).carrier (J k)) |
| 34 | (p : ∀ k, (C k).carrier) (A L : ℕ → ℝ) |
| 35 | (hA : Tendsto A atTop atTop) (hL : Tendsto L atTop atTop) |
| 36 | (hJ : ∀ k, Icc (-A k) 0 ⊆ interior (J k)) |
| 37 | (hcomplete : ∀ k, ∀ t ∈ Icc (-A k) 0, MetricComplete ((F k).metric t)) |
| 38 | (hoperator : ∀ k, ∀ t ∈ Icc (-A k) 0, ∀ x : (C k).carrier, |
| 39 | ((F k).connection t).NonnegativeCurvatureOperator x) |
| 40 | (hscalar : ∀ k, ∀ t ∈ Icc (-A k) 0, |
| 41 | ∀ x ∈ ((F k).metric 0).ball (p k) (L k), |
| 42 | ((F k).connection t).scalarCurvature x ≤ 4) |
| 43 | (hnormalize : ∀ k, ((F k).connection 0).scalarCurvature (p k) = 1) |
| 44 | {ν : ℝ} (hν : 0 < ν) |
| 45 | (hvolume : ∀ᶠ k in atTop, ENNReal.ofReal ν ≤ |
| 46 | ((F k).metric 0).volumeMeasure (((F k).metric 0).ball (p k) 1)) : |
| 47 | ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ ∀ a : ℝ, ∀ ha : a ≤ -2, |
| 48 | ∃ N : ℕ, ∃ hJN : ∀ k, Icc a 0 ⊆ interior (J (k + N)), |
| 49 | ∃ G : PointedGeometricConvergence |
| 50 | (bufferedCylinderSequence (fun k => C (k + N)) (fun k => J (k + N)) |
| 51 | (fun k => F (k + N)) (fun k => p (k + N)) a δ (by linarith) hJN), |
| 52 | (∀ t ∈ Ioo (a + δ) δ, |
| 53 | G.limitCarrier.metricComplete (G.limitFlow.metricAt t)) ∧ |
| 54 | (1 : ℝ) / 2 ≤ ((m + 1 : ℕ) : ℝ) ^ 2 * |
| 55 | (G.limitFlow.flow.connection 0).curvatureTensorNorm G.limitFlow.base ∧ |
| 56 | (∀ t ∈ Ioo (a + δ) δ, ∀ x : G.limitCarrier.carrier, |
| 57 | (G.limitFlow.flow.connection t).curvatureTensorNorm x ≤ |
| 58 | ((m + 1 : ℕ) : ℝ) ^ 2 * 4) ∧ |
| 59 | (∀ t ∈ Ioo (a + δ) δ, ∀ x : G.limitCarrier.carrier, |
| 60 | (G.limitFlow.flow.connection t).NonnegativeCurvatureOperator x) := by |
| 61 | obtain ⟨ε, hε, hεone, hbuffer⟩ := exists_terminal_scalar_positive_time_buffer hC hm |
| 62 | let δ := ε / 2 |
| 63 | have hδ : 0 < δ := by dsimp only [δ]; positivity |
| 64 | have hδone : δ < 1 := by dsimp only [δ]; linarith |
| 65 | refine ⟨δ, hδ, hδone, ?_⟩ |
| 66 | intro a ha |
| 67 | obtain ⟨N, hN⟩ := eventually_atTop.mp (hA.eventually_ge_atTop (-a)) |
| 68 | have hsub (k : ℕ) : Icc a 0 ⊆ Icc (-A (k + N)) 0 := |
| 69 | Icc_subset_Icc (by linarith [hN (k + N) (Nat.le_add_left N k)]) le_rfl |
| 70 | have hJN : ∀ k, Icc a 0 ⊆ interior (J (k + N)) := |
| 71 | fun k _ ht => hJ (k + N) (hsub k ht) |
| 72 | have hshift {t : ℝ} (ht : t ∈ Ioo (a + δ) δ) : t - δ ∈ Icc a 0 := |
| 73 | ⟨by linarith [ht.1], by linarith [ht.2]⟩ |
| 74 | have htail : Tendsto (fun k : ℕ => k + N) atTop atTop := |
| 75 | (strictMono_nat_of_lt_succ (fun k => by omega)).tendsto_atTop |
| 76 | have hLN : Tendsto (fun k => L (k + N)) atTop atTop := hL.comp htail |
| 77 | let S := bufferedCylinderSequence (fun k => C (k + N)) (fun k => J (k + N)) |
| 78 | (fun k => F (k + N)) (fun k => p (k + N)) a δ (by linarith) hJN |
| 79 | obtain ⟨H, hHS⟩ := exists_pointedCompactnessHypotheses_of_terminal_cylinders |
| 80 | hC hm (fun k => C (k + N)) (fun k => J (k + N)) |
| 81 | (fun k => F (k + N)) (fun k => p (k + N)) (by linarith : a ≤ -1) |
| 82 | hδ hδone.le (by linarith) hJN |
| 83 | (fun k t ht => hcomplete (k + N) t (hsub k ht)) |
| 84 | (fun k t ht x => hoperator (k + N) t (hsub k ht) x) |
| 85 | (fun k => L (k + N)) hLN |
| 86 | (fun k t ht x hx => hscalar (k + N) t (hsub k ht) x hx) |
| 87 | hν (htail.eventually hvolume) |
| 88 | obtain ⟨P⟩ := pointedRicciFlowCompactness H hC |
| 89 | have hlimit : ∃ G : PointedGeometricConvergence S, |
| 90 | ∀ t ∈ Ioo (a + δ) δ, |
| 91 | G.limitCarrier.metricComplete (G.limitFlow.metricAt t) := by |
| 92 | rcases H with ⟨hT, seq, hvol, hcompact, hspace, hall, hnoncollapse⟩ |
| 93 | dsimp only at hHS |
| 94 | subst seq |
| 95 | exact ⟨P.geometric_limit, P.complete_interior⟩ |
| 96 | obtain ⟨G, hGcomplete⟩ := hlimit |
| 97 | refine ⟨N, hJN, G, hGcomplete, ?_, ?_, ?_⟩ |
| 98 | · apply G.scalar_lower_bound_le_mul_base_curvatureTensorNorm ⟨by linarith, hδ⟩ |
| 99 | filter_upwards [hLN.eventually_ge_atTop (64 * (((m + 1 : ℕ) : ℝ) + 8))] with k hk |
| 100 | have htwo : Icc (-2 : ℝ) 0 ⊆ Icc a 0 := Icc_subset_Icc ha le_rfl |
| 101 | have hb := hbuffer (C (k + N)).carrier (J (k + N)) (F (k + N)) |
| 102 | (fun _ ht => hJN k (htwo ht)) |
| 103 | (fun t ht => hcomplete (k + N) t (hsub k (htwo ht))) |
| 104 | (fun t ht => hoperator (k + N) t (hsub k (htwo ht))) (p (k + N)) |
| 105 | (fun t ht x hx => hscalar (k + N) t (hsub k (htwo ht)) x |
| 106 | (hx.trans_le (ENNReal.ofReal_le_ofReal hk))) (hnormalize (k + N)) |
| 107 | (-δ) ⟨by dsimp only [δ]; linarith, by linarith⟩ |
| 108 | change (1 : ℝ) / 2 ≤ ((F (k + N)).connection (0 + -δ)).scalarCurvature (p (k + N)) |
| 109 | rw [zero_add] |
| 110 | exact hb |
| 111 | · apply G.curvatureTensorNorm_le_of_uniform_ball_bound ⟨by linarith, hδ⟩ |
| 112 | intro R _ |
| 113 | filter_upwards [hLN.eventually_ge_atTop R] with k hk |
| 114 | intro t ht x hx |
| 115 | exact (F (k + N)).curvatureTensorNorm_le_on_two_time_ball_of_terminal_cylinder hC |
| 116 | (hJN k) (fun s hs => hoperator (k + N) s (hsub k hs)) (p (k + N)) |
| 117 | (fun s hs => hscalar (k + N) s (hsub k hs)) (hshift ht) (hshift ht) hk x hx |
| 118 | · exact nonnegativeCurvatureOperator_of_bufferedCylinderSequence |
| 119 | (fun k => C (k + N)) (fun k => J (k + N)) (fun k => F (k + N)) |
| 120 | (fun k => p (k + N)) a δ (by linarith) hJN |
| 121 | (fun k t ht => hoperator (k + N) t (hsub k ht)) G |
| 122 | |
| 123 | end PoincareMT.RicciFlow |