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.SubsetSpireCenters |
| 2 | import PoincareLib.Topology.MetricSpace.GromovHausdorff.Pointed.Convergence.SuppliedRebase |
| 3 | |
| 4 | /-! |
| 5 | # Selected centers in expanding realizations of a subset |
| 6 | |
| 7 | Vanishing ambient bad-ascent radii and a spire inequality on the compact limit |
| 8 | subset force selected centers to converge to their supplied reference lifts. |
| 9 | The subset approximation and reference marking use the same expanding pointed |
| 10 | realizations throughout. |
| 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 |
| 18 | namespace Poincare.CurvatureIntegral |
| 19 | private theorem base_ascent_of_bad_radius_zero |
| 20 | {X : ℕ → BasedMetricSpaceBundle.{0}} {Y : BasedMetricSpaceBundle.{0}} |
| 21 | [∀ j, ProperSpace (X j).carrier] [ProperSpace Y.carrier] |
| 22 | (hconv : PointedGHConvergesUnbounded X Y) |
| 23 | {b c c' : ℝ} (hb : 0 < b) (hc : 0 ≤ c) (hcc' : c' < c) |
| 24 | (ha : Tendsto (fun j => badAscentRadius c b (X j).base) atTop (𝓝 0)) : |
| 25 | ∀ y : Y.carrier, 0 < dist Y.base y → dist Y.base y < b → |
| 26 | HasLocalDistanceAscent c' Y.base y := by |
| 27 | let L := 2 * b + 1 |
| 28 | have hL : 0 < L := by dsimp [L]; positivity |
| 29 | obtain ⟨δ, hδ, hpos, hball⟩ := hconv L hL |
| 30 | let S := realizationSequenceOfPointedGHConverges |
| 31 | (fun j => ballModel (X j) (L + δ j) (hpos j)) (ballModel Y L hL) hball |
| 32 | have hbase : S.PointConverges |
| 33 | (fun j => (ballModel (X j) (L + δ j) (hpos j)).base) |
| 34 | (ballModel Y L hL).base := by |
| 35 | unfold VaryingRealizationSequence.PointConverges |
| 36 | have heq : (fun j => dist |
| 37 | (S.left j (ballModel (X j) (L + δ j) (hpos j)).base) |
| 38 | (S.right j (ballModel Y L hL).base)) = fun _ => (0 : ℝ) := by |
| 39 | funext j |
| 40 | exact dist_eq_zero.mpr (S.base_agree j) |
| 41 | rw [heq] |
| 42 | exact tendsto_const_nhds |
| 43 | exact local_distance_ascent_of_tendsto_badAscentRadius_zero |
| 44 | hL δ hδ hpos S _ _ hbase hc hcc' |
| 45 | (by change dist Y.base Y.base + b < L; simp only [dist_self, zero_add]; dsimp [L]; linarith) ha |
| 46 | |
| 47 | /-- Whole-sequence convergence of selected centers to supplied lifts of a spire |
| 48 | of the compact subset represented in the same expanding realizations. -/ |
| 49 | theorem tendsto_dist_zero_of_badAscentRadius_zero_at_scaled_spire_in_expanding_subset |
| 50 | {X : ℕ → BasedMetricSpaceBundle.{0}} {Y : BasedMetricSpaceBundle.{0}} |
| 51 | [∀ j, ProperSpace (X j).carrier] [ProperSpace Y.carrier] |
| 52 | (hXgeo : ∀ j, ∀ x y : (X j).carrier, |
| 53 | ∃ γ : ℝ → (X j).carrier, γ 0 = x ∧ γ 1 = y ∧ |
| 54 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 55 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 56 | (hYgeo : ∀ x y : Y.carrier, ∃ γ : ℝ → Y.carrier, |
| 57 | γ 0 = x ∧ γ 1 = y ∧ |
| 58 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 59 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 60 | {R : ℝ} (hR : 0 ≤ R) (E : ∀ j, Set (X j).carrier) |
| 61 | (hE : ∀ j x, x ∈ E j → dist (X j).base x ≤ R) |
| 62 | {s t : ℕ → ℝ} (hs : ∀ j, R < s j) (ht : ∀ j, R < t j) |
| 63 | (hsTop : Tendsto s atTop atTop) (htTop : Tendsto t atTop atTop) |
| 64 | (Q : ∀ j, PointedGHRealization |
| 65 | (ballModel (X j) (s j) (lt_of_le_of_lt hR (hs j))) |
| 66 | (ballModel Y (t j) (lt_of_le_of_lt hR (ht j)))) |
| 67 | (hQ : Tendsto (fun j => pointedHausdorffDist (Q j)) atTop (𝓝 0)) |
| 68 | (K : Set Y.carrier) (hK : IsCompact K) |
| 69 | (hKR : K ⊆ Metric.closedBall Y.base R) |
| 70 | {ε : ℕ → ℝ} (hε : Tendsto ε atTop (𝓝 0)) |
| 71 | (hforward : ∀ j (x : E j), ∃ z : K, |
| 72 | dist ((Q j).left ⟨x.val, Metric.mem_ball'.mpr ((hE j x.val x.property).trans_lt (hs j))⟩) |
| 73 | ((Q j).right ⟨z.val, Metric.mem_ball'.mpr |
| 74 | ((Metric.mem_closedBall'.mp (hKR z.property)).trans_lt (ht j))⟩) < ε j) |
| 75 | (y₀ : K) (v u : ∀ j, E j) |
| 76 | (href : ∀ j, |
| 77 | dist ((Q j).left ⟨(v j).val, Metric.mem_ball'.mpr |
| 78 | ((hE j (v j).val (v j).property).trans_lt (hs j))⟩) |
| 79 | ((Q j).right ⟨y₀.val, Metric.mem_ball'.mpr |
| 80 | ((Metric.mem_closedBall'.mp (hKR y₀.property)).trans_lt (ht j))⟩) < ε j) |
| 81 | {κ ρ b cap c c' : ℝ} (hκ : 0 < κ) (_hρ : 0 < ρ) (hb : 0 < b) |
| 82 | (hρb : ρ < κ * b / 2) (hbcap : b ≤ cap) |
| 83 | (hnear : ∀ j, dist (v j).val (u j).val ≤ ρ) |
| 84 | (hc : 0 ≤ c) (hcc' : c' < c) (B : Y.carrier → ℝ) |
| 85 | (hmax : ∀ p : Y.carrier, ∀ a : ℝ, 0 ≤ a → 2 * a ≤ cap → |
| 86 | (∀ y : Y.carrier, 0 < dist p y → dist p y < 2 * a → |
| 87 | HasLocalDistanceAscent c' p y) → a ≤ B p) |
| 88 | (hspire : ∀ y ∈ K, y ≠ y₀.val → κ * B y ≤ dist y y₀.val) |
| 89 | (ha : Tendsto (fun j => badAscentRadius c b (u j).val) atTop (𝓝 0)) : |
| 90 | Tendsto (fun j => dist (v j).val (u j).val) atTop (𝓝 0) := by |
| 91 | classical |
| 92 | let e (j : ℕ) (x : E j) : |
| 93 | (ballModel (X j) (s j) (lt_of_le_of_lt hR (hs j))).carrier := |
| 94 | ⟨x.val, Metric.mem_ball'.mpr ((hE j x.val x.property).trans_lt (hs j))⟩ |
| 95 | let k (j : ℕ) (z : K) : |
| 96 | (ballModel Y (t j) (lt_of_le_of_lt hR (ht j))).carrier := |
| 97 | ⟨z.val, Metric.mem_ball'.mpr |
| 98 | ((Metric.mem_closedBall'.mp (hKR z.property)).trans_lt (ht j))⟩ |
| 99 | choose z hz using fun j => hforward j (u j) |
| 100 | have hcross (j : ℕ) : dist ((Q j).left (e j (u j))) ((Q j).right (k j (z j))) < ε j := |
| 101 | hz j |
| 102 | apply Metric.tendsto_nhds.mpr |
| 103 | intro η hη |
| 104 | by_contra hnot |
| 105 | have hnot' : ¬ ∀ᶠ j in atTop, dist (v j).val (u j).val < η := by |
| 106 | intro hevent |
| 107 | apply hnot |
| 108 | filter_upwards [hevent] with j hj |
| 109 | simpa only [Real.dist_eq, sub_zero, abs_of_nonneg dist_nonneg] using hj |
| 110 | obtain ⟨φ, hφ, hbad⟩ := Filter.extraction_of_frequently_atTop |
| 111 | (Filter.not_eventually.mp hnot') |
| 112 | obtain ⟨z₀, hz₀, ψ, hψ, hzlim⟩ := |
| 113 | hK.isSeqCompact (fun j => (z (φ j)).property) |
| 114 | let θ := fun j => φ (ψ j) |
| 115 | have hθ : Tendsto θ atTop atTop := hφ.tendsto_atTop.comp hψ.tendsto_atTop |
| 116 | let zK : K := ⟨z₀, hz₀⟩ |
| 117 | have hzdist : Tendsto (fun j => dist (z (θ j)).val z₀) atTop (𝓝 0) := by |
| 118 | simpa only [Function.comp_def, dist_self, θ] using hzlim.dist (tendsto_const_nhds (x := z₀)) |
| 119 | have huCross : Tendsto |
| 120 | (fun j => dist ((Q (θ j)).left (e (θ j) (u (θ j)))) |
| 121 | ((Q (θ j)).right (k (θ j) zK))) atTop (𝓝 0) := by |
| 122 | apply squeeze_zero (g := fun j => ε (θ j) + dist (z (θ j)).val z₀) (fun _ => dist_nonneg) |
| 123 | · intro j |
| 124 | have htri := dist_triangle |
| 125 | ((Q (θ j)).left (e (θ j) (u (θ j)))) |
| 126 | ((Q (θ j)).right (k (θ j) (z (θ j)))) |
| 127 | ((Q (θ j)).right (k (θ j) zK)) |
| 128 | have hiso := (Q (θ j)).right_isometry.dist_eq |
| 129 | (k (θ j) (z (θ j))) (k (θ j) zK) |
| 130 | change dist ((Q (θ j)).right (k (θ j) (z (θ j)))) |
| 131 | ((Q (θ j)).right (k (θ j) zK)) = dist (z (θ j)).val z₀ at hiso |
| 132 | rw [hiso] at htri |
| 133 | exact htri.trans (add_le_add (hcross (θ j)).le le_rfl) |
| 134 | · simpa only [Function.comp_def, add_zero] using (hε.comp hθ).add hzdist |
| 135 | have hvCross : Tendsto |
| 136 | (fun j => dist ((Q (θ j)).left (e (θ j) (v (θ j)))) |
| 137 | ((Q (θ j)).right (k (θ j) y₀))) atTop (𝓝 0) := by |
| 138 | exact squeeze_zero (fun _ => dist_nonneg) (fun j => (href (θ j)).le) (hε.comp hθ) |
| 139 | have hdistlim : Tendsto (fun j => dist (v (θ j)).val (u (θ j)).val) |
| 140 | atTop (𝓝 (dist y₀.val z₀)) := by |
| 141 | rw [tendsto_iff_dist_tendsto_zero] |
| 142 | apply squeeze_zero (g := fun j => |
| 143 | dist ((Q (θ j)).left (e (θ j) (v (θ j)))) ((Q (θ j)).right (k (θ j) y₀)) + |
| 144 | dist ((Q (θ j)).left (e (θ j) (u (θ j)))) ((Q (θ j)).right (k (θ j) zK))) |
| 145 | (fun _ => dist_nonneg) |
| 146 | · intro j |
| 147 | have h := dist_dist_dist_le |
| 148 | ((Q (θ j)).left (e (θ j) (v (θ j)))) |
| 149 | ((Q (θ j)).left (e (θ j) (u (θ j)))) |
| 150 | ((Q (θ j)).right (k (θ j) y₀)) |
| 151 | ((Q (θ j)).right (k (θ j) zK)) |
| 152 | have hleft := (Q (θ j)).left_isometry.dist_eq |
| 153 | (e (θ j) (v (θ j))) (e (θ j) (u (θ j))) |
| 154 | have hright := (Q (θ j)).right_isometry.dist_eq (k (θ j) y₀) (k (θ j) zK) |
| 155 | change dist ((Q (θ j)).left (e (θ j) (v (θ j)))) |
| 156 | ((Q (θ j)).left (e (θ j) (u (θ j)))) = |
| 157 | dist (v (θ j)).val (u (θ j)).val at hleft |
| 158 | change dist ((Q (θ j)).right (k (θ j) y₀)) |
| 159 | ((Q (θ j)).right (k (θ j) zK)) = dist y₀.val z₀ at hright |
| 160 | rwa [hleft, hright] at h |
| 161 | · simpa only [add_zero] using hvCross.add huCross |
| 162 | have hnearLimit : dist y₀.val z₀ ≤ ρ := |
| 163 | le_of_tendsto hdistlim (Eventually.of_forall (fun j => hnear (θ j))) |
| 164 | have hconv := pointedGHConvergesUnbounded_rebase_of_expanding_realizations |
| 165 | (fun j => hXgeo (θ j)) hYgeo |
| 166 | (fun j => lt_of_le_of_lt hR (hs (θ j))) |
| 167 | (fun j => lt_of_le_of_lt hR (ht (θ j))) |
| 168 | (hsTop.comp hθ) (htTop.comp hθ) |
| 169 | (fun j => Q (θ j)) (hQ.comp hθ) |
| 170 | (fun j => e (θ j) (u (θ j))) (fun j => k (θ j) zK) z₀ |
| 171 | (Eventually.of_forall (fun _ => rfl)) huCross |
| 172 | let : ∀ j, ProperSpace ((X (θ j)).rebase (e (θ j) (u (θ j))).val).carrier := |
| 173 | fun j => show ProperSpace (X (θ j)).carrier from inferInstance |
| 174 | let : ProperSpace (Y.rebase z₀).carrier := |
| 175 | show ProperSpace Y.carrier from inferInstance |
| 176 | have hascent : ∀ y : Y.carrier, 0 < dist z₀ y → dist z₀ y < b → |
| 177 | HasLocalDistanceAscent c' z₀ y := |
| 178 | base_ascent_of_bad_radius_zero hconv hb hc hcc' (ha.comp hθ) |
| 179 | have hhalf : b / 2 ≤ B z₀ := by |
| 180 | apply hmax z₀ (b / 2) (by positivity) (by linarith) |
| 181 | intro y hy hyb |
| 182 | exact hascent y hy (by linarith) |
| 183 | have heq : z₀ = y₀.val := by |
| 184 | by_contra hne |
| 185 | have hs' := hspire z₀ hz₀ hne |
| 186 | rw [dist_comm] at hs' |
| 187 | have hscale := mul_le_mul_of_nonneg_left hhalf hκ.le |
| 188 | linarith only [hscale, hs', hnearLimit, hρb, _hρ] |
| 189 | have hzero : Tendsto (fun j => dist (v (θ j)).val (u (θ j)).val) atTop (𝓝 0) := by |
| 190 | simpa only [heq, dist_self] using hdistlim |
| 191 | have hηle : η ≤ (0 : ℝ) := |
| 192 | ge_of_tendsto hzero (Eventually.of_forall (fun j => le_of_not_gt (hbad (ψ j)))) |
| 193 | exact (not_le_of_gt hη) hηle |
| 194 | |
| 195 | |
| 196 | end Poincare.CurvatureIntegral |
| 197 |