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.Algebra.Module.Basic |
| 2 | import Mathlib.Topology.Compactness.Compact |
| 3 | import Mathlib.Topology.Instances.Real.Lemmas |
| 4 | |
| 5 | /-! An open neighborhood of a compact radial segment extends past its tip. |
| 6 | Source: MT Claim 19.41; short-geodesic-digons derivation, Section 10. -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | |
| 10 | open Set Filter Metric |
| 11 | open scoped Topology |
| 12 | |
| 13 | namespace PoincareMT |
| 14 | |
| 15 | /-- One neighborhood controls all nearby radial segments, including a small extension beyond |
| 16 | their original tips. Source: MT Claim 19.41; digon derivation, Section 10. |
| 17 | Source/construction: proof-work/tasks/M64/derivations/2026-09-27-short-geodesic-digons.md, |
| 18 | Section 10. -/ |
| 19 | theorem m64_exists_extended_radial_tube |
| 20 | {E : Type*} [TopologicalSpace E] [SMul ℝ E] [ContinuousSMul ℝ E] |
| 21 | {O : Set E} (hO : IsOpen O) {v : E} |
| 22 | (hsegment : ∀ t ∈ Icc (0 : ℝ) 1, t • v ∈ O) : |
| 23 | ∃ A > (1 : ℝ), ∃ W ∈ 𝓝 v, ∀ w ∈ W, ∀ t ∈ Icc (0 : ℝ) A, t • w ∈ O := by |
| 24 | have hpre : IsOpen {p : ℝ × E | p.1 • p.2 ∈ O} := |
| 25 | hO.preimage (continuous_fst.smul continuous_snd) |
| 26 | have hsub : Icc (0 : ℝ) 1 ×ˢ ({v} : Set E) ⊆ {p : ℝ × E | p.1 • p.2 ∈ O} := by |
| 27 | rintro ⟨t, w⟩ ⟨ht, hw⟩ |
| 28 | have hwv : w = v := hw |
| 29 | change t • w ∈ O |
| 30 | simpa only [hwv] using hsegment t ht |
| 31 | obtain ⟨X, W, hX, hW, hIX, hvW, hXW⟩ := |
| 32 | generalized_tube_lemma isCompact_Icc isCompact_singleton hpre hsub |
| 33 | obtain ⟨delta, hdelta, hball⟩ := Metric.mem_nhds_iff.mp |
| 34 | (hX.mem_nhds (hIX (show (1 : ℝ) ∈ Icc 0 1 from ⟨zero_le_one, le_rfl⟩))) |
| 35 | refine ⟨1 + delta / 2, by linarith, W, hW.mem_nhds (hvW (mem_singleton v)), ?_⟩ |
| 36 | intro w hw t ht |
| 37 | change (t, w) ∈ {p : ℝ × E | p.1 • p.2 ∈ O} |
| 38 | apply hXW |
| 39 | refine ⟨?_, hw⟩ |
| 40 | by_cases ht1 : t ≤ 1 |
| 41 | · exact hIX ⟨ht.1, ht1⟩ |
| 42 | · apply hball |
| 43 | rw [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.mpr (lt_of_not_ge ht1))] |
| 44 | linarith [ht.2] |
| 45 | |
| 46 | end PoincareMT |