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.RicciFlow.Generalized.BoundedDistance.GeometryImports |
| 2 | import Mathlib.Topology.MetricSpace.Completion |
| 3 | import Mathlib.Analysis.Real.Sqrt |
| 4 | import Mathlib.Tactic.Linarith |
| 5 | |
| 6 | /-! |
| 7 | # Uniform completion-radius buffers at the curvature scale |
| 8 | |
| 9 | The original completion radius transfers the center normalization to |
| 10 | every point in one uniformly short source family. |
| 11 | Source: Morgan--Tian Sections 10.5-10.6, pp. 263-265; |
| 12 | M28 derivations 159 and 159b. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Topology |
| 20 | |
| 21 | namespace PoincareMT.M28 |
| 22 | |
| 23 | /-- The original completion-radius inequality transfers a center buffer |
| 24 | to every point in the same uniformly short source family. The divisor |
| 25 | is exactly the curvature length scale. Source: derivations 159 and 159b. -/ |
| 26 | theorem eventually_curvatureScale_radius_mem_Icc |
| 27 | {S X : Type*} [MetricSpace X] |
| 28 | (E : UniformSpace.Completion X) (x : ℕ → S → X) (q : ℕ → X) (R : ℕ → ℝ) |
| 29 | (hRpos : ∀ i, 0 < R i) {a m : ℝ} (hm : 0 < m) (ham : a ≤ m) |
| 30 | (hcenter : Tendsto |
| 31 | (fun i => Real.sqrt (R i) * dist (q i : UniformSpace.Completion X) E) |
| 32 | atTop (𝓝 m)) |
| 33 | (hshort : ∀ᶠ i in atTop, ∀ u : S, |
| 34 | Real.sqrt (R i) * dist (x i u) (q i) ≤ 3 * a / 64) : |
| 35 | ∀ᶠ i in atTop, ∀ u : S, |
| 36 | dist (x i u : UniformSpace.Completion X) E / (Real.sqrt (R i))⁻¹ ∈ |
| 37 | Icc (3 * m / 4) (5 * m / 4) := by |
| 38 | have hcenterLower : ∀ᶠ i in atTop, |
| 39 | 7 * m / 8 < Real.sqrt (R i) * dist (q i : UniformSpace.Completion X) E := |
| 40 | (tendsto_order.mp hcenter).1 (7 * m / 8) (by linarith only [hm]) |
| 41 | have hcenterUpper : ∀ᶠ i in atTop, |
| 42 | Real.sqrt (R i) * dist (q i : UniformSpace.Completion X) E < 9 * m / 8 := |
| 43 | (tendsto_order.mp hcenter).2 (9 * m / 8) (by linarith only [hm]) |
| 44 | filter_upwards [hcenterLower, hcenterUpper, hshort] with i hlow hhigh hshort |
| 45 | intro u |
| 46 | have hradius : |
| 47 | |dist (x i u : UniformSpace.Completion X) E - |
| 48 | dist (q i : UniformSpace.Completion X) E| ≤ dist (x i u) (q i) := by |
| 49 | simpa only [UniformSpace.Completion.dist_eq] using |
| 50 | abs_dist_sub_le (x i u : UniformSpace.Completion X) |
| 51 | (q i : UniformSpace.Completion X) E |
| 52 | have hsqrt : 0 ≤ Real.sqrt (R i) := (Real.sqrt_pos.mpr (hRpos i)).le |
| 53 | have hlowRadius := mul_le_mul_of_nonneg_left (abs_le.mp hradius).1 hsqrt |
| 54 | have hhighRadius := mul_le_mul_of_nonneg_left (abs_le.mp hradius).2 hsqrt |
| 55 | have hcost : Real.sqrt (R i) * dist (x i u) (q i) ≤ m / 8 := |
| 56 | (hshort u).trans (by linarith only [ham, hm]) |
| 57 | rw [div_inv_eq_mul] |
| 58 | constructor <;> nlinarith only [hlow, hhigh, hlowRadius, hhighRadius, hcost] |
| 59 | |
| 60 | end PoincareMT.M28 |