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.Curvature.Integral.Concentration.RankGrowth |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Concentration.SubsetRank |
| 3 | import PoincareLib.Topology.MetricSpace.GromovHausdorff.Pointed.Convergence.SuppliedRebase |
| 4 | /-! |
| 5 | # Angular rank growth through expanding subset realizations |
| 6 | |
| 7 | Backward approximation in the supplied expanding realizations constructs the |
| 8 | subset lifts used for near-minimality. Rebasing at those lifts preserves their |
| 9 | ambient limit and gives strict growth of the minimum angular rank on the |
| 10 | selected limit subsets. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | open Set Filter Topology |
| 17 | open Poincare.GromovHausdorff Poincare.Alexandrov Poincare.CurvatureIntegral |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | namespace PoincareMT.RiemannianMetric |
| 20 | private theorem pointConverges_base_of_radial_zero |
| 21 | {X : ℕ → BasedMetricSpaceBundle.{0}} {Y : BasedMetricSpaceBundle.{0}} |
| 22 | (S : VaryingRealizationSequence X Y) (u : ∀ j, (X j).carrier) |
| 23 | (hu : Tendsto (fun j => dist (X j).base (u j)) atTop (𝓝 0)) : |
| 24 | S.PointConverges u Y.base := by |
| 25 | change Tendsto (fun j => dist (S.left j (u j)) (S.right j Y.base)) atTop (𝓝 0) |
| 26 | have heq : (fun j => dist (S.left j (u j)) (S.right j Y.base)) = |
| 27 | fun j => dist (X j).base (u j) := by |
| 28 | funext j |
| 29 | rw [← S.base_agree j, (S.left_isometry j).dist_eq, dist_comm] |
| 30 | rw [heq] |
| 31 | exact hu |
| 32 | |
| 33 | private theorem growth_at_rebased_subset_lift |
| 34 | {n : ℕ} {M : ℕ → Type} [∀ j, TopologicalSpace (M j)] |
| 35 | [∀ j, T3Space (M j)] [∀ j, PreconnectedSpace (M j)] |
| 36 | [∀ j, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M j)] |
| 37 | [∀ j, IsManifold (𝓡 n) ∞ (M j)] |
| 38 | (g : ∀ j, PoincareMT.RiemannianMetric n (M j)) |
| 39 | (D : ∀ j, PoincareMT.LeviCivitaData (g j)) |
| 40 | (hcomplete : ∀ j, PoincareMT.MetricComplete (g j)) |
| 41 | (hsec : ∀ j (x : M j) (v w : TangentSpace (𝓡 n) x), |
| 42 | -1 ≤ (D j).sectionalCurvature x v w) |
| 43 | (p q z : ∀ j, M j) |
| 44 | {V Y : BasedMetricSpaceBundle.{0}} [ProperSpace V.carrier] [ProperSpace Y.carrier] |
| 45 | (holdconv : PointedGHConvergesUnbounded (fun j => (g j).toBasedMetricSpace (p j)) V) |
| 46 | {θ c cplus b ρ : ℝ} |
| 47 | (hθ : 0 < θ) (hθpi : θ < Real.pi / 2) |
| 48 | (hc : 0 ≤ c) (hcθ : c < Real.cos (2 * θ)) |
| 49 | (hplus : c < cplus) (hb : 0 < b) (hρ : 0 < ρ) |
| 50 | (hascent : ∀ y : V.carrier, 0 < dist V.base y → dist V.base y ≤ b → |
| 51 | HasLocalDistanceAscent cplus V.base y) |
| 52 | (hpq : Tendsto (fun j => ((g j).edist (p j) (q j)).toReal) atTop (𝓝 0)) |
| 53 | (hqz : Tendsto (fun j => ((g j).edist (q j) (z j)).toReal) atTop (𝓝 0)) |
| 54 | (E : ∀ j, Set (M j)) (hzE : ∀ j, z j ∈ E j) |
| 55 | (hqmin : ∀ j, letI := (g j).toMetricSpace |
| 56 | ∀ w ∈ E j, dist (p j) w ≤ ρ → |
| 57 | badAscentRadius c b (q j) ≤ 2 * badAscentRadius c b w) |
| 58 | (κ : ℝ) (hκ : 0 < κ) |
| 59 | (a : ℕ → ℝ) (ha : ∀ j, 0 < a j) (hazero : Tendsto a atTop (𝓝 0)) |
| 60 | (hactual : ∀ j, a j = κ * (letI := (g j).toMetricSpace; badAscentRadius c b (q j))) |
| 61 | {Z : ℕ → BasedMetricSpaceBundle.{0}} |
| 62 | (F : ∀ j, M j ≃ (Z j).carrier) |
| 63 | (hFz : ∀ j, F j (z j) = (Z j).base) |
| 64 | (hscale : ∀ j (x y : M j), |
| 65 | ((g j).edist x y).toReal = a j * dist (F j x) (F j y)) |
| 66 | (hnewconv : PointedGHConvergesUnbounded Z Y) |
| 67 | {k : ℕ} (hold : HasSmallAngleConfiguration θ V.base k) : |
| 68 | HasSmallAngleConfiguration θ Y.base (k+1) := by |
| 69 | classical |
| 70 | let (j : ℕ) : MetricSpace (M j) := (g j).toMetricSpace |
| 71 | let (j : ℕ) : ProperSpace (M j) := (g j).properSpace_toMetricSpace (hcomplete j) |
| 72 | let L₀ : ℝ := ρ + 2*b + 1 |
| 73 | have hL₀ : 0 < L₀ := by dsimp [L₀]; positivity |
| 74 | obtain ⟨δ₀, hδ₀, hpos₀, hconv₀⟩ := holdconv L₀ hL₀ |
| 75 | let A₀ := fun j => ballModel ((g j).toBasedMetricSpace (p j)) (L₀ + δ₀ j) (hpos₀ j) |
| 76 | let V₀ := ballModel V L₀ hL₀ |
| 77 | let S₀ := realizationSequenceOfPointedGHConverges A₀ V₀ hconv₀ |
| 78 | have hroom₀ : dist V.base V₀.base.val + 2*b < L₀ := by |
| 79 | change dist V.base V.base + 2*b < L₀ |
| 80 | simp only [dist_self, zero_add] |
| 81 | dsimp [L₀] |
| 82 | linarith only [hρ] |
| 83 | change Tendsto (fun j => dist (p j) (q j)) atTop (𝓝 0) at hpq |
| 84 | change Tendsto (fun j => dist (q j) (z j)) atTop (𝓝 0) at hqz |
| 85 | have hpz : Tendsto (fun j => dist (p j) (z j)) atTop (𝓝 0) := |
| 86 | squeeze_zero (fun _ => dist_nonneg) (fun j => dist_triangle (p j) (q j) (z j)) |
| 87 | (by simpa only [add_zero] using hpq.add hqz) |
| 88 | have hzselect : ∀ᶠ j in atTop, z j ∈ Metric.closedBall (p j) ρ := |
| 89 | eventually_mem_closedBall_of_tendsto_dist_zero p q z hρ hpq hqz |
| 90 | have hzold : ∀ᶠ j in atTop, dist (z j) (p j) < L₀ + δ₀ j := by |
| 91 | filter_upwards [hpz.eventually_lt_const (half_pos hL₀), |
| 92 | hδ₀.eventually_const_lt (show -L₀/2 < 0 by linarith)] with j hj hk |
| 93 | rw [dist_comm] |
| 94 | linarith only [hj, hk] |
| 95 | obtain ⟨φ, hφ, hφold⟩ := Filter.extraction_of_frequently_atTop hzold.frequently |
| 96 | have hφtop : Tendsto φ atTop atTop := hφ.tendsto_atTop |
| 97 | let v : ∀ j, (A₀ (φ j)).carrier := fun j => ⟨z (φ j), hφold j⟩ |
| 98 | have hv : (S₀.comp φ hφtop).PointConverges v V₀.base := |
| 99 | pointConverges_base_of_radial_zero (S₀.comp φ hφtop) v (hpz.comp hφtop) |
| 100 | have hradzero : Tendsto (fun j => badAscentRadius c b (z (φ j))) atTop (𝓝 0) := |
| 101 | tendsto_badAscentRadius_zero_of_moving_centers |
| 102 | (fun j => g (φ j)) (fun j => D (φ j)) (fun j => hcomplete (φ j)) |
| 103 | (fun j => hsec (φ j)) (fun j => p (φ j)) |
| 104 | hL₀ (fun j => δ₀ (φ j)) (hδ₀.comp hφtop) (fun j => hpos₀ (φ j)) |
| 105 | (S₀.comp φ hφtop) v V₀.base hv hb hplus hroom₀ hascent |
| 106 | have hnear : ∀ᶠ j in atTop, |
| 107 | badAscentRadius c b (q (φ j)) ≤ 2 * badAscentRadius c b (z (φ j)) := by |
| 108 | filter_upwards [hφtop.eventually hzselect] with j hj |
| 109 | exact hqmin (φ j) (z (φ j)) (hzE (φ j)) |
| 110 | (by simpa only [Metric.mem_closedBall, dist_comm] using hj) |
| 111 | obtain ⟨w, _, hw, hwzero⟩ := exists_bad_points_of_near_min_badAscentRadius c b |
| 112 | (fun j => q (φ j)) (fun j => z (φ j)) |
| 113 | (Eventually.of_forall (fun j => (mul_pos_iff_of_pos_left hκ).mp |
| 114 | (by rw [← hactual]; exact ha (φ j)))) hnear hradzero |
| 115 | obtain ⟨δ, hδ, hpos, hnew⟩ := hnewconv 1 (by norm_num) |
| 116 | let S := realizationSequenceOfPointedGHConverges |
| 117 | (fun j => ballModel (Z j) (1 + δ j) (hpos j)) (ballModel Y 1 (by norm_num)) hnew |
| 118 | let u := fun j => (ballModel (Z j) (1 + δ j) (hpos j)).base |
| 119 | let u₀ := (ballModel Y 1 (by norm_num)).base |
| 120 | have hu : S.PointConverges u u₀ := |
| 121 | pointConverges_base_of_radial_zero S u |
| 122 | (by |
| 123 | change Tendsto (fun j => dist (Z j).base (Z j).base) atTop (𝓝 0) |
| 124 | simpa only [dist_self] using |
| 125 | (tendsto_const_nhds : Tendsto (fun _ : ℕ => (0 : ℝ)) atTop (𝓝 0))) |
| 126 | let X := fun j => (g (φ j)).toBasedMetricSpace (z (φ j)) |
| 127 | have hX (j : ℕ) : CurvatureGEnegOne (X j).carrier := |
| 128 | (g (φ j)).curvatureGEnegOne_of_sectional_lower_bound |
| 129 | (D (φ j)) (hcomplete (φ j)) (hsec (φ j)) |
| 130 | have hgeo (j : ℕ) (x y : (X j).carrier) : |
| 131 | ∃ γ : ℝ → (X j).carrier, γ 0 = x ∧ γ 1 = y ∧ |
| 132 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 133 | dist (γ s) (γ t) = |s-t| * dist x y := by |
| 134 | obtain ⟨_, _, γ, _, h0, h1, hmin⟩ := |
| 135 | (g (φ j)).exists_minimizing_geodesic_of_metricComplete (hcomplete (φ j)) x y |
| 136 | refine ⟨γ, h0, h1, ?_⟩ |
| 137 | intro s hs t ht |
| 138 | change ((g (φ j)).edist (γ s) (γ t)).toReal = |
| 139 | |s-t| * ((g (φ j)).edist x y).toReal |
| 140 | rw [hmin s hs t ht, ENNReal.toReal_mul, ENNReal.toReal_ofReal (abs_nonneg _)] |
| 141 | apply hasSmallAngleConfiguration_succ_of_old_limit (X := X) |
| 142 | (Z := fun j => Z (φ j)) hL₀ (S₀.comp φ hφtop) |
| 143 | (fun _ x => x.val) (fun _ => by intro x y; rfl) |
| 144 | v V₀.base hv (fun _ => rfl) |
| 145 | (show (0 : ℝ) < 1 by norm_num) (fun j => δ (φ j)) (hδ.comp hφtop) |
| 146 | (fun j => hpos (φ j)) (S.comp φ hφtop) (fun j => u (φ j)) u₀ |
| 147 | (hu.comp φ hφtop) hX hgeo (fun j => a (φ j)) (fun j => ha (φ j)) |
| 148 | (hazero.comp hφtop) (fun j => F (φ j)) (fun j => hFz (φ j)) |
| 149 | (fun j x y => hscale (φ j) x y) |
| 150 | hθ hθpi hc hcθ (show 0 < 1 / (4*κ) by positivity) hold w hwzero |
| 151 | · filter_upwards [hw] with j hj |
| 152 | change 1/(4*κ) * a (φ j) ≤ dist (z (φ j)) (w j) |
| 153 | rw [hactual] |
| 154 | have heq : 1/(4*κ) * (κ * badAscentRadius c b (q (φ j))) = |
| 155 | badAscentRadius c b (q (φ j))/4 := by field_simp |
| 156 | rw [heq] |
| 157 | exact hj.1.le |
| 158 | · filter_upwards [hw] with j hj |
| 159 | exact hj.2.2 |
| 160 | |
| 161 | /-- Backward approximation in the same expanding realizations supplies the |
| 162 | actual subset lifts needed for strict growth of the ambient angular rank. -/ |
| 163 | theorem minLocalAnglePackingRankOn_lt_of_expanding_subset_near_min_badAscentRadius |
| 164 | {n : ℕ} {M : ℕ → Type} [∀ j, TopologicalSpace (M j)] |
| 165 | [∀ j, T3Space (M j)] [∀ j, PreconnectedSpace (M j)] |
| 166 | [∀ j, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M j)] |
| 167 | [∀ j, IsManifold (𝓡 n) ∞ (M j)] |
| 168 | (g : ∀ j, PoincareMT.RiemannianMetric n (M j)) |
| 169 | (D : ∀ j, PoincareMT.LeviCivitaData (g j)) |
| 170 | (hcomplete : ∀ j, PoincareMT.MetricComplete (g j)) |
| 171 | (hsec : ∀ j (x : M j) (v w : TangentSpace (𝓡 n) x), |
| 172 | -1 ≤ (D j).sectionalCurvature x v w) |
| 173 | (p q : ∀ j, M j) |
| 174 | {V Y : BasedMetricSpaceBundle.{0}} [ProperSpace V.carrier] [ProperSpace Y.carrier] |
| 175 | (holdconv : PointedGHConvergesUnbounded (fun j => (g j).toBasedMetricSpace (p j)) V) |
| 176 | {θ c cplus b ρ : ℝ} |
| 177 | (hθ : 0 < θ) (hθpi : θ < Real.pi / 2) |
| 178 | (hc : 0 ≤ c) (hcθ : c < Real.cos (2 * θ)) |
| 179 | (hplus : c < cplus) (hb : 0 < b) (hρ : 0 < ρ) |
| 180 | (hascent : ∀ y : V.carrier, 0 < dist V.base y → dist V.base y ≤ b → |
| 181 | HasLocalDistanceAscent cplus V.base y) |
| 182 | (hpq : Tendsto (fun j => ((g j).edist (p j) (q j)).toReal) atTop (𝓝 0)) |
| 183 | (E : ∀ j, Set (M j)) |
| 184 | (hqmin : ∀ j, letI := (g j).toMetricSpace |
| 185 | ∀ z ∈ E j, dist (p j) z ≤ ρ → |
| 186 | badAscentRadius c b (q j) ≤ 2 * badAscentRadius c b z) |
| 187 | (κ : ℝ) (hκ : 0 < κ) |
| 188 | (a : ℕ → ℝ) (ha : ∀ j, 0 < a j) (hazero : Tendsto a atTop (𝓝 0)) |
| 189 | (hactual : ∀ j, a j = κ * (letI := (g j).toMetricSpace; badAscentRadius c b (q j))) |
| 190 | {Z : ℕ → BasedMetricSpaceBundle.{0}} [∀ j, ProperSpace (Z j).carrier] |
| 191 | (F : ∀ j, M j ≃ (Z j).carrier) |
| 192 | (hFcenter : ∀ j, F j (q j) = (Z j).base) |
| 193 | (hscale : ∀ j (x y : M j), |
| 194 | ((g j).edist x y).toReal = a j * dist (F j x) (F j y)) |
| 195 | (hZgeo : ∀ j, ∀ x y : (Z j).carrier, |
| 196 | ∃ γ : ℝ → (Z j).carrier, γ 0 = x ∧ γ 1 = y ∧ |
| 197 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 198 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 199 | (hYgeo : ∀ x y : Y.carrier, ∃ γ : ℝ → Y.carrier, |
| 200 | γ 0 = x ∧ γ 1 = y ∧ |
| 201 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 202 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 203 | {R : ℝ} (hR : 0 ≤ R) |
| 204 | {s t : ℕ → ℝ} (hs : ∀ j, 0 < s j) (ht : ∀ j, R < t j) |
| 205 | (hsTop : Tendsto s atTop atTop) (htTop : Tendsto t atTop atTop) |
| 206 | (Q : ∀ j, PointedGHRealization (ballModel (Z j) (s j) (hs j)) |
| 207 | (ballModel Y (t j) (hR.trans_lt (ht j)))) |
| 208 | (hQ : Tendsto (fun j => pointedHausdorffDist (Q j)) atTop (𝓝 0)) |
| 209 | (K : Set Y.carrier) (hK : K.Nonempty) |
| 210 | (hKR : K ⊆ Metric.closedBall Y.base R) |
| 211 | {ε : ℕ → ℝ} (hε : Tendsto ε atTop (𝓝 0)) |
| 212 | (hback : ∀ j (y : K), ∃ x : (ballModel (Z j) (s j) (hs j)).carrier, |
| 213 | (F j).symm x.val ∈ E j ∧ |
| 214 | dist ((Q j).left x) |
| 215 | ((Q j).right ⟨y.val, Metric.mem_ball'.mpr |
| 216 | ((Metric.mem_closedBall'.mp (hKR y.property)).trans_lt (ht j))⟩) < ε j) |
| 217 | (Kold : Set V.carrier) (hbase : V.base ∈ Kold) |
| 218 | {NV NY : ℕ} |
| 219 | (hpackV : ComparisonAnglePackingBound V.carrier θ NV) |
| 220 | (hpackY : ComparisonAnglePackingBound Y.carrier θ NY) : |
| 221 | minLocalAnglePackingRankOn θ Kold < minLocalAnglePackingRankOn θ K := by |
| 222 | classical |
| 223 | apply lt_minLocalAnglePackingRankOn_of_pointwise_growth hbase hK hpackV hpackY |
| 224 | intro l hold y hy |
| 225 | let yK : K := ⟨y, hy⟩ |
| 226 | choose x hxE hxy using fun j => hback j yK |
| 227 | let yB (j : ℕ) : (ballModel Y (t j) (hR.trans_lt (ht j))).carrier := |
| 228 | ⟨y, Metric.mem_ball'.mpr |
| 229 | ((Metric.mem_closedBall'.mp (hKR hy)).trans_lt (ht j))⟩ |
| 230 | have hcross : Tendsto (fun j => dist ((Q j).left (x j)) ((Q j).right (yB j))) |
| 231 | atTop (𝓝 0) := |
| 232 | squeeze_zero (fun _ => dist_nonneg) (fun j => (hxy j).le) hε |
| 233 | have hrad : Tendsto (fun j => dist (Z j).base (x j).val) |
| 234 | atTop (𝓝 (dist Y.base y)) := by |
| 235 | apply Metric.tendsto_nhds.mpr |
| 236 | intro η hη |
| 237 | filter_upwards [hε.eventually_lt_const hη] with j hj |
| 238 | have h := abs_dist_base_sub_dist_base_lt_of_corresponding (Q j) (x j) (yB j) (hxy j) |
| 239 | change |dist (Z j).base (x j).val - dist Y.base y| < ε j at h |
| 240 | simpa only [Real.dist_eq] using h.trans hj |
| 241 | let z : ∀ j, M j := fun j => (F j).symm (x j).val |
| 242 | have hFz (j : ℕ) : F j (z j) = (x j).val := (F j).apply_symm_apply _ |
| 243 | have hqz : Tendsto (fun j => ((g j).edist (q j) (z j)).toReal) atTop (𝓝 0) := by |
| 244 | have hprod := hazero.mul hrad |
| 245 | simp only [zero_mul] at hprod |
| 246 | convert hprod using 1 |
| 247 | funext j |
| 248 | rw [hscale, hFcenter, hFz] |
| 249 | have hrebased := pointedGHConvergesUnbounded_rebase_of_expanding_realizations |
| 250 | hZgeo hYgeo hs (fun j => hR.trans_lt (ht j)) hsTop htTop Q hQ x yB y |
| 251 | (Eventually.of_forall (fun _ => rfl)) hcross |
| 252 | let : ProperSpace (Y.rebase y).carrier := |
| 253 | show ProperSpace Y.carrier from inferInstance |
| 254 | exact growth_at_rebased_subset_lift |
| 255 | (Z := fun j => (Z j).rebase (x j).val) (Y := Y.rebase y) |
| 256 | g D hcomplete hsec p q z holdconv hθ hθpi hc hcθ hplus hb hρ hascent hpq hqz |
| 257 | E hxE hqmin κ hκ a ha hazero hactual (fun j => F j) hFz hscale hrebased hold |
| 258 | |
| 259 | |
| 260 | end PoincareMT.RiemannianMetric |
| 261 |