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 PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Limits.SelectedInteriorWall |
| 3 | import Mathlib.Analysis.SpecificLimits.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Selected necks chosen before every finite ray family |
| 7 | |
| 8 | The actual scalar barrier selects a whole neck above each prescribed |
| 9 | height. The fixed cofinal height sequence is independent of all later |
| 10 | finite ray families and chord-separation parameters. |
| 11 | Source: Morgan--Tian Lemma 10.27, p. 261; M28 derivation 155. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M28 |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] [T2Space M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 26 | {g : RiemannianMetric 3 M} {X : Set M} |
| 27 | |
| 28 | /-- The retained scalar geometry selects an entire cofinal neck |
| 29 | sequence before any rays are tested. No ordering of the original chain |
| 30 | indices is presumed. Source: Lemma 10.27, p. 261; derivation 155. -/ |
| 31 | theorem exists_cofinal_selected_neck_sequence |
| 32 | (T : EpsilonTubeCertificate g X) (A : OpenCylinderModel T.carrier) |
| 33 | (R : M → ℝ) (hR : ContinuousOn R T.carrier) |
| 34 | (hratio : ∀ i ∈ T.chain.shape.active, |
| 35 | ∀ y ∈ (T.chain.neck i).carrier, ∀ z ∈ (T.chain.neck i).carrier, |
| 36 | R y ≤ 2 * R z) |
| 37 | (hdiverge : ∀ B : ℝ, ∃ d : ℝ, 1 / 2 < d ∧ d < 1 ∧ |
| 38 | ∀ x ∈ T.carrier, d < (A.inverse x).2 → B < R x) : |
| 39 | ∃ (c : ℕ → ℝ) (i : ℕ → ℤ), |
| 40 | (∀ n, 1 / 2 < c n ∧ c n < 1) ∧ Tendsto c atTop (𝓝 1) ∧ |
| 41 | (∀ n, i n ∈ T.chain.shape.active) ∧ |
| 42 | ∀ n, (T.chain.neck (i n)).carrier ⊆ A.tail true (c n) := by |
| 43 | classical |
| 44 | let c : ℕ → ℝ := fun n => 1 - 1 / ((n : ℝ) + 4) |
| 45 | have hc (n : ℕ) : 1 / 2 < c n ∧ c n < 1 := by |
| 46 | have hden : 0 < (n : ℝ) + 4 := by positivity |
| 47 | have hinv : 1 / ((n : ℝ) + 4) ≤ (1 / 4 : ℝ) := by |
| 48 | apply (div_le_div_iff₀ hden (by norm_num)).mpr |
| 49 | nlinarith only [Nat.cast_nonneg (α := ℝ) n] |
| 50 | have hpos : 0 < 1 / ((n : ℝ) + 4) := one_div_pos.mpr hden |
| 51 | dsimp only [c] |
| 52 | constructor <;> linarith only [hinv, hpos] |
| 53 | have hinvLimit : Tendsto (fun n : ℕ => 1 / ((n : ℝ) + 4)) atTop (𝓝 (0 : ℝ)) := by |
| 54 | simpa only [Nat.cast_add, Nat.cast_ofNat] using |
| 55 | ((tendsto_add_atTop_iff_nat 4).2 |
| 56 | (tendsto_one_div_atTop_nhds_zero_nat (𝕜 := ℝ))) |
| 57 | have hcLimit : Tendsto c atTop (𝓝 1) := by |
| 58 | simpa only [sub_zero] using (tendsto_const_nhds (x := (1 : ℝ))).sub hinvLimit |
| 59 | choose i hi hwhole using fun n => |
| 60 | exists_selected_chain_neck_above_cylinder_level T A R hR hratio hdiverge |
| 61 | (hc n).1 (hc n).2 |
| 62 | exact ⟨c, i, hc, hcLimit, hi, hwhole⟩ |
| 63 | |
| 64 | end PoincareMT.M28 |