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.Analysis.Parabolic.PointPicking |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Theory |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.MetricMonotonicity |
| 4 | import PoincareLib.Geometry.Riemannian.Distance.CompleteBalls |
| 5 | |
| 6 | /-! |
| 7 | # Thresholded scalar-curvature point selection |
| 8 | |
| 9 | This is the threshold form of the point-selection step used in the proof of |
| 10 | Kleiner--Lott, corrected Corollary I.11.6(a), Appendix E, and Perelman |
| 11 | Corollary 11.6(a). Selection is made only among points satisfying |
| 12 | `α ≤ R (t-a)`. Consequently the points outside the selected set have |
| 13 | curvature at most `2Q` on the shortened backward interval, while the doubling |
| 14 | bound gives `4Q` on the selected set. No uniform spacetime curvature bound is |
| 15 | assumed. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Bundle ENNReal |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.RicciFlow |
| 27 | |
| 28 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 30 | {J : Set ℝ} |
| 31 | |
| 32 | /-- Select a point at a thresholded scalar-curvature scale. The selected |
| 33 | point has `α ≤ Q * (τ-a)`, and all points in the backward cylinder of time |
| 34 | length `α/(2Q)` and the selected reciprocal-curvature spatial budget have |
| 35 | scalar curvature at most `4Q`. |
| 36 | |
| 37 | This is the point-selection input for the local curvature estimate in |
| 38 | Kleiner--Lott, corrected Corollary I.11.6(a), Appendix E, and Perelman |
| 39 | Corollary 11.6(a). -/ |
| 40 | theorem exists_scalarCurvature_threshold_point_with_radius_control |
| 41 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 42 | {a t₀ : ℝ} (hJ : Icc a t₀ ⊆ interior J) |
| 43 | (hcomplete : MetricComplete (F.metric t₀)) |
| 44 | (hRic : ∀ t ∈ Icc a t₀, ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 45 | 0 ≤ (F.connection t).ricci x v v) |
| 46 | (p : M) (r : ℝ) {L α : ℝ} (hL : 0 ≤ L) (hα : 0 < α) |
| 47 | {t₁ : ℝ} (ht₁ : t₁ ∈ Icc a t₀) {x₁ : M} |
| 48 | (hx₁ : x₁ ∈ (F.metric t₁).ball p r) |
| 49 | (hthreshold : α ≤ (F.connection t₁).scalarCurvature x₁ * (t₁ - a)) : |
| 50 | ∃ τ ∈ Icc a t₁, ∃ y ∈ (F.metric τ).ball p r, |
| 51 | ∃ Q : ℝ, Q = (F.connection τ).scalarCurvature y ∧ |
| 52 | 0 < Q ∧ (F.connection t₁).scalarCurvature x₁ ≤ Q ∧ |
| 53 | α ≤ Q * (τ - a) ∧ |
| 54 | ((F.metric τ).edist p y).toReal + 2 * L / Real.sqrt Q ≤ |
| 55 | ((F.metric t₁).edist p x₁).toReal + |
| 56 | 2 * L / Real.sqrt ((F.connection t₁).scalarCurvature x₁) ∧ |
| 57 | ∀ s ∈ Icc (τ - α / (2 * Q)) τ, ∀ z ∈ (F.metric s).ball p r, |
| 58 | ((F.metric s).edist p z).toReal ≤ |
| 59 | ((F.metric τ).edist p y).toReal + L / Real.sqrt Q → |
| 60 | (F.connection s).scalarCurvature z ≤ 4 * Q := by |
| 61 | let S : Set (ℝ × M) := {z | z.1 ∈ Icc a t₀ ∧ |
| 62 | z.2 ∈ (F.metric z.1).ball p r ∧ |
| 63 | α ≤ (F.connection z.1).scalarCurvature z.2 * (z.1 - a)} |
| 64 | let K : Set (ℝ × M) := Icc a t₀ ×ˢ |
| 65 | {x | (F.metric t₀).edist p x ≤ ENNReal.ofReal r} |
| 66 | let q : ℝ × M → ℝ := fun z => |
| 67 | Real.sqrt ((F.connection z.1).scalarCurvature z.2) |
| 68 | let radius : ℝ × M → ℝ := fun z => |
| 69 | ((F.metric z.1).edist p z.2).toReal |
| 70 | have htop : t₀ ∈ Icc a t₀ := ⟨ht₁.1.trans ht₁.2, le_rfl⟩ |
| 71 | have hSK : S ⊆ K := by |
| 72 | rintro ⟨s, z⟩ ⟨hs, hz, _⟩ |
| 73 | refine ⟨hs, ?_⟩ |
| 74 | have hball := F.ball_subset_ball_of_ricci_nonneg hJ p r hs htop hs.2 |
| 75 | (fun t ht x _ v => hRic t ht x v) hz |
| 76 | exact (show (F.metric t₀).edist p z < ENNReal.ofReal r from hball).le |
| 77 | have hK : IsCompact K := isCompact_Icc.prod |
| 78 | ((F.metric t₀).isCompact_closedBall_of_metricComplete hcomplete p r) |
| 79 | have hq : ContinuousOn q K := Real.continuous_sqrt.comp_continuousOn |
| 80 | ((hC.scalar_regular n M J F).continuousOn.mono (fun z hz => |
| 81 | ⟨interior_subset (hJ hz.1), mem_univ _⟩)) |
| 82 | have hbound : BddAbove (q '' S) := |
| 83 | (hK.bddAbove_image hq).mono (image_mono hSK) |
| 84 | have hR (s : ℝ) (hs : s ∈ Icc a t₀) (z : M) : |
| 85 | 0 ≤ (F.connection s).scalarCurvature z := |
| 86 | Finset.sum_nonneg (fun i _ => hRic s hs z _) |
| 87 | have hR₁ : 0 < (F.connection t₁).scalarCurvature x₁ := by |
| 88 | have hta : 0 < t₁ - a := by |
| 89 | have hta0 : 0 ≤ t₁ - a := sub_nonneg.mpr ht₁.1 |
| 90 | by_contra h |
| 91 | have : t₁ - a = 0 := le_antisymm (le_of_not_gt h) hta0 |
| 92 | rw [this, mul_zero] at hthreshold |
| 93 | linarith |
| 94 | have hnonneg := hR t₁ ht₁ x₁ |
| 95 | nlinarith |
| 96 | obtain ⟨⟨τ, y⟩, hτy, htime, hqxy, hrad, hlocal⟩ := |
| 97 | Poincare.Parabolic.exists_point_with_doubling_bound S q radius Prod.fst |
| 98 | hbound hL |
| 99 | (show (t₁, x₁) ∈ S from ⟨ht₁, hx₁, hthreshold⟩) |
| 100 | (Real.sqrt_pos.mpr hR₁) |
| 101 | have hτ : τ ∈ Icc a t₁ := ⟨hτy.1.1, htime⟩ |
| 102 | have hτ₀ : τ ∈ Icc a t₀ := hτy.1 |
| 103 | have hy : y ∈ (F.metric τ).ball p r := hτy.2.1 |
| 104 | have hτthreshold : α ≤ |
| 105 | (F.connection τ).scalarCurvature y * (τ - a) := hτy.2.2 |
| 106 | let Q : ℝ := (F.connection τ).scalarCurvature y |
| 107 | have hq₁ : 0 < q (t₁, x₁) := by |
| 108 | dsimp only [q] |
| 109 | exact Real.sqrt_pos.mpr hR₁ |
| 110 | have hqτ : 0 < q (τ, y) := lt_of_lt_of_le hq₁ hqxy |
| 111 | have hQ : 0 < Q := by |
| 112 | dsimp only [Q] |
| 113 | exact Real.sqrt_pos.mp hqτ |
| 114 | have hQthreshold : α ≤ Q * (τ - a) := by |
| 115 | simpa only [Q] using hτthreshold |
| 116 | have hτa : a < τ := by |
| 117 | have hprod : 0 < Q * (τ - a) := hα.trans_le hQthreshold |
| 118 | nlinarith [hprod] |
| 119 | have hfrac : α / (2 * Q) ≤ (τ - a) / 2 := by |
| 120 | apply (div_le_iff₀ (by positivity : 0 < (2 : ℝ) * Q)).2 |
| 121 | nlinarith [hQthreshold] |
| 122 | have hbase : a ≤ τ - α / (2 * Q) := by linarith |
| 123 | have hQ₁ : (F.connection t₁).scalarCurvature x₁ ≤ Q := by |
| 124 | have hsquare := mul_self_le_mul_self (Real.sqrt_nonneg |
| 125 | ((F.connection t₁).scalarCurvature x₁)) hqxy |
| 126 | dsimp only [q] at hsquare |
| 127 | nlinarith [Real.sq_sqrt hR₁.le, Real.sq_sqrt hQ.le] |
| 128 | refine ⟨τ, hτ, y, hy, Q, rfl, hQ, hQ₁, hQthreshold, hrad, ?_⟩ |
| 129 | intro s hs z hz hdist |
| 130 | have hsτ : s ≤ τ := hs.2 |
| 131 | have hsa : a ≤ s := hbase.trans hs.1 |
| 132 | have hsall : s ∈ Icc a t₀ := |
| 133 | ⟨hsa, hsτ.trans hτ₀.2⟩ |
| 134 | have hthreshold_or : |
| 135 | α ≤ (F.connection s).scalarCurvature z * (s - a) ∨ |
| 136 | (F.connection s).scalarCurvature z * (s - a) < α := |
| 137 | by |
| 138 | rcases lt_or_ge ((F.connection s).scalarCurvature z * (s - a)) α with h | h |
| 139 | · exact Or.inr h |
| 140 | · exact Or.inl h |
| 141 | rcases hthreshold_or with hthreshold_z | hbelow |
| 142 | · have hdist' : radius (s, z) ≤ radius (τ, y) + L / q (τ, y) := by |
| 143 | simpa only [radius, q, Q] using hdist |
| 144 | have hlocal' := hlocal (s, z) ⟨hsall, hz, hthreshold_z⟩ hsτ hdist' |
| 145 | have hsq := mul_self_le_mul_self (Real.sqrt_nonneg |
| 146 | ((F.connection s).scalarCurvature z)) hlocal' |
| 147 | dsimp only [q, Q] at hsq ⊢ |
| 148 | nlinarith [Real.sq_sqrt (hR s hsall z), Real.sq_sqrt (hR τ hτy.1 y)] |
| 149 | · have hsa_pos : 0 < s - a := by |
| 150 | have hbound_s : α / (2 * Q) ≤ s - a := by linarith [hs.1] |
| 151 | have : 0 < α / (2 * Q) := by positivity |
| 152 | exact this.trans_le hbound_s |
| 153 | have hαupper : α ≤ 2 * Q * (s - a) := by |
| 154 | have hbound_s : α / (2 * Q) ≤ s - a := by linarith [hs.1] |
| 155 | have hmul := (div_le_iff₀ (by positivity : 0 < (2 : ℝ) * Q)).mp hbound_s |
| 156 | nlinarith [hmul] |
| 157 | have hlt : (F.connection s).scalarCurvature z * (s - a) < |
| 158 | (2 * Q) * (s - a) := hbelow.trans_le hαupper |
| 159 | have hRlt : (F.connection s).scalarCurvature z < 2 * Q := by |
| 160 | by_contra hnot |
| 161 | have hle : 2 * Q ≤ (F.connection s).scalarCurvature z := le_of_not_gt hnot |
| 162 | have hmul := mul_le_mul_of_nonneg_right hle hsa_pos.le |
| 163 | linarith |
| 164 | linarith |
| 165 | |
| 166 | /-- Threshold point selection with its backward moving-ball curvature bound. -/ |
| 167 | theorem exists_scalarCurvature_threshold_point |
| 168 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 169 | {a t₀ : ℝ} (hJ : Icc a t₀ ⊆ interior J) |
| 170 | (hcomplete : MetricComplete (F.metric t₀)) |
| 171 | (hRic : ∀ t ∈ Icc a t₀, ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 172 | 0 ≤ (F.connection t).ricci x v v) |
| 173 | (p : M) (r : ℝ) {L α : ℝ} (hL : 0 ≤ L) (hα : 0 < α) |
| 174 | {t₁ : ℝ} (ht₁ : t₁ ∈ Icc a t₀) {x₁ : M} |
| 175 | (hx₁ : x₁ ∈ (F.metric t₁).ball p r) |
| 176 | (hthreshold : α ≤ (F.connection t₁).scalarCurvature x₁ * (t₁ - a)) : |
| 177 | ∃ τ ∈ Icc a t₁, ∃ y ∈ (F.metric τ).ball p r, |
| 178 | ∃ Q : ℝ, Q = (F.connection τ).scalarCurvature y ∧ |
| 179 | 0 < Q ∧ α ≤ Q * (τ - a) ∧ |
| 180 | ∀ s ∈ Icc (τ - α / (2 * Q)) τ, ∀ z ∈ (F.metric s).ball p r, |
| 181 | ((F.metric s).edist p z).toReal ≤ |
| 182 | ((F.metric τ).edist p y).toReal + L / Real.sqrt Q → |
| 183 | (F.connection s).scalarCurvature z ≤ 4 * Q := by |
| 184 | obtain ⟨τ, hτ, y, hy, Q, heq, hQ, _, hthreshold, _, hbound⟩ := |
| 185 | exists_scalarCurvature_threshold_point_with_radius_control hC F hJ hcomplete |
| 186 | hRic p r hL hα ht₁ hx₁ hthreshold |
| 187 | exact ⟨τ, hτ, y, hy, Q, heq, hQ, hthreshold, hbound⟩ |
| 188 | |
| 189 | end PoincareMT.RicciFlow |