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 | |
| 3 | /-! # Removing a multiplicative distortion arbitrarily close to one -/ |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open Set Filter |
| 8 | open scoped ENNReal Topology |
| 9 | |
| 10 | namespace Poincare.Analysis |
| 11 | |
| 12 | theorem ennreal_le_of_forall_one_lt_pow_mul_add (n : ℕ) {x y z : ℝ≥0∞} |
| 13 | (h : ∀ C : ℝ, 1 < C → x ≤ ENNReal.ofReal C ^ n * y + z) : x ≤ y + z := by |
| 14 | have hp : Tendsto (fun C : ℝ => ENNReal.ofReal C ^ n) (𝓝 1) (𝓝 1) := by |
| 15 | simpa only [Function.comp_def, ENNReal.ofReal_one, one_pow] using |
| 16 | ((ENNReal.continuous_pow n).comp ENNReal.continuous_ofReal).tendsto 1 |
| 17 | have hm : Tendsto (fun C : ℝ => ENNReal.ofReal C ^ n * y + z) |
| 18 | (𝓝 1) (𝓝 (y + z)) := by |
| 19 | simpa only [one_mul] using |
| 20 | (ENNReal.Tendsto.mul hp (Or.inl one_ne_zero) tendsto_const_nhds |
| 21 | (Or.inr ENNReal.one_ne_top)).add tendsto_const_nhds |
| 22 | apply ge_of_tendsto (hm.mono_left (show 𝓝[>] (1 : ℝ) ≤ 𝓝 1 from nhdsWithin_le_nhds)) |
| 23 | exact (show ∀ᶠ C : ℝ in 𝓝[>] 1, 1 < C from self_mem_nhdsWithin).mono fun C hC => h C hC |
| 24 | |
| 25 | theorem ennreal_le_of_forall_one_lt_pow_mul (n : ℕ) {x y : ℝ≥0∞} |
| 26 | (h : ∀ C : ℝ, 1 < C → x ≤ ENNReal.ofReal C ^ n * y) : x ≤ y := by |
| 27 | simpa only [add_zero] using ennreal_le_of_forall_one_lt_pow_mul_add n |
| 28 | (z := 0) (fun C hC => by simpa only [add_zero] using h C hC) |
| 29 | |
| 30 | end Poincare.Analysis |