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 Mathlib.Topology.Instances.ENNReal.Lemmas |
| 2 | import Mathlib.Analysis.SpecialFunctions.Pow.Real |
| 3 | |
| 4 | /-! |
| 5 | # Squeezing volume between nearby radii |
| 6 | |
| 7 | Multiplicative volume distortion tending to one and continuity in radius imply |
| 8 | convergence of ball volumes. This analytic step supports Kleiner--Lott, |
| 9 | Corollary 44.1, pp. 2682--2683, and Appendix E, pp. 2848--2849. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Topology ENNReal |
| 17 | |
| 18 | namespace Poincare |
| 19 | |
| 20 | /-- Two-sided volume comparison at radii `C * r` and `r / C`, for every |
| 21 | distortion `C > 1`, implies convergence at radius `r`. -/ |
| 22 | theorem tendsto_of_ball_volume_radius_squeeze |
| 23 | {f : ℕ → ℝ≥0∞} {V : ℝ → ℝ≥0∞} {r : ℝ} (n : ℕ) |
| 24 | (hV : ContinuousAt V r) |
| 25 | (hupper : ∀ C : ℝ, 1 < C → ∀ᶠ k in atTop, |
| 26 | f k ≤ ENNReal.ofReal C ^ n * V (C * r)) |
| 27 | (hlower : ∀ C : ℝ, 1 < C → ∀ᶠ k in atTop, |
| 28 | V (r / C) ≤ ENNReal.ofReal C ^ n * f k) : |
| 29 | Tendsto f atTop (𝓝 (V r)) := by |
| 30 | have hpower : Tendsto (fun C : ℝ => ENNReal.ofReal C ^ n) (𝓝 1) (𝓝 1) := by |
| 31 | simpa only [Function.comp_def, ENNReal.ofReal_one, one_pow] using |
| 32 | ((ENNReal.continuous_pow n).comp ENNReal.continuous_ofReal).tendsto 1 |
| 33 | have hmul : Tendsto (fun C : ℝ => C * r) (𝓝 1) (𝓝 r) := by |
| 34 | have h : ContinuousAt (fun C : ℝ => C * r) 1 := by fun_prop |
| 35 | simpa only [one_mul] using h.tendsto |
| 36 | have hdiv : Tendsto (fun C : ℝ => r / C) (𝓝 1) (𝓝 r) := by |
| 37 | have h : ContinuousAt (fun C : ℝ => r / C) 1 := by fun_prop (disch := norm_num) |
| 38 | simpa only [div_one] using h.tendsto |
| 39 | have hU : Tendsto (fun C : ℝ => ENNReal.ofReal C ^ n * V (C * r)) |
| 40 | (𝓝 1) (𝓝 (V r)) := by |
| 41 | simpa using ENNReal.Tendsto.mul hpower (Or.inl one_ne_zero) |
| 42 | (hV.tendsto.comp hmul) (Or.inr ENNReal.one_ne_top) |
| 43 | have hL : Tendsto (fun C : ℝ => V (r / C) / ENNReal.ofReal C ^ n) |
| 44 | (𝓝 1) (𝓝 (V r)) := by |
| 45 | simpa using ENNReal.Tendsto.div (hV.tendsto.comp hdiv) (Or.inr one_ne_zero) |
| 46 | hpower (Or.inl ENNReal.one_ne_top) |
| 47 | have hCevent : ∀ᶠ C : ℝ in 𝓝[>] 1, 1 < C := self_mem_nhdsWithin |
| 48 | apply tendsto_order.2 |
| 49 | constructor |
| 50 | · intro a ha |
| 51 | obtain ⟨C, hC, haC⟩ := (hCevent.and |
| 52 | ((hL.eventually_const_lt ha).filter_mono nhdsWithin_le_nhds)).exists |
| 53 | filter_upwards [hlower C hC] with k hk |
| 54 | apply haC.trans_le |
| 55 | exact (ENNReal.div_le_iff' |
| 56 | (pow_ne_zero n (ENNReal.ofReal_ne_zero_iff.mpr (zero_lt_one.trans hC))) |
| 57 | (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)).mpr hk |
| 58 | · intro b hb |
| 59 | obtain ⟨C, hC, hCb⟩ := (hCevent.and |
| 60 | ((hU.eventually_lt_const hb).filter_mono nhdsWithin_le_nhds)).exists |
| 61 | filter_upwards [hupper C hC] with k hk |
| 62 | exact hk.trans_lt hCb |
| 63 | |
| 64 | end Poincare |