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.Riemannian.Comparison.Volume.Model |
| 2 | import Mathlib.Topology.Compactness.Compact |
| 3 | |
| 4 | /-! |
| 5 | # Uniform model-volume ratios under small radius changes |
| 6 | |
| 7 | On a compact interval of positive radii, the hyperbolic model-volume ratio |
| 8 | converges uniformly to one as the radius factor tends to one. The explicit |
| 9 | margin pays for both metric-volume and radius comparison in terminal cap balls. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.SingularRegularLimit |
| 18 | |
| 19 | open RiemannianMetric |
| 20 | |
| 21 | /-- One radius factor controls every model-volume ratio on the entire compact |
| 22 | range of old calibrated radii. -/ |
| 23 | theorem exists_modelVolume_ratio_margin {κ ρ L : ℝ} (hκ : 0 ≤ κ) (hρ : 0 < ρ) : |
| 24 | ∃ cmax : ℝ, 1 < cmax ∧ ∀ c : ℝ, 1 < c → c < cmax → |
| 25 | ∀ r ∈ Icc ρ L, |
| 26 | (3 / 4 : ℝ) * c ^ 6 < modelVolume 3 κ (r / c ^ 2) / modelVolume 3 κ r := by |
| 27 | have hevent : ∀ᶠ c : ℝ in 𝓝 1, ∀ r ∈ Icc ρ L, |
| 28 | (3 / 4 : ℝ) * c ^ 6 < modelVolume 3 κ (r / c ^ 2) / modelVolume 3 κ r := by |
| 29 | apply isCompact_Icc.eventually_forall_of_forall_eventually |
| 30 | intro r hr |
| 31 | have hrpos : 0 < r := hρ.trans_le hr.1 |
| 32 | have hnum : ContinuousAt (fun p : ℝ × ℝ => modelVolume 3 κ (p.2 / p.1 ^ 2)) (1, r) := |
| 33 | (continuous_modelVolume 3 κ).continuousAt.comp |
| 34 | (continuousAt_snd.div (continuousAt_fst.pow 2) (by norm_num)) |
| 35 | have hden : ContinuousAt (fun p : ℝ × ℝ => modelVolume 3 κ p.2) (1, r) := |
| 36 | (continuous_modelVolume 3 κ).continuousAt.comp continuousAt_snd |
| 37 | have hcont := hnum.div hden (modelVolume_pos (by norm_num) hκ hrpos).ne' |
| 38 | have hleft : ContinuousAt (fun p : ℝ × ℝ => (3 / 4 : ℝ) * p.1 ^ 6) (1, r) := |
| 39 | continuousAt_const.mul (continuousAt_fst.pow 6) |
| 40 | have hvalue : (3 / 4 : ℝ) * (1 : ℝ) ^ 6 - |
| 41 | modelVolume 3 κ (r / (1 : ℝ) ^ 2) / modelVolume 3 κ r < 0 := by |
| 42 | simp only [one_pow, mul_one, div_one, div_self |
| 43 | (modelVolume_pos (n := 3) (by norm_num) hκ hrpos).ne'] |
| 44 | norm_num |
| 45 | simpa only [Pi.sub_apply, Pi.div_apply, sub_lt_zero] using |
| 46 | (hleft.sub hcont).eventually (Iio_mem_nhds hvalue) |
| 47 | obtain ⟨δ, hδ, hclose⟩ := Metric.eventually_nhds_iff.mp hevent |
| 48 | refine ⟨1 + δ / 2, by linarith, ?_⟩ |
| 49 | intro c hc hcmax |
| 50 | apply hclose |
| 51 | rw [Real.dist_eq, abs_of_pos (sub_pos.mpr hc)] |
| 52 | linarith |
| 53 | |
| 54 | end PoincareMT.SingularRegularLimit |