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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import Mathlib.Topology.EMetricSpace.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Completeness transfer for comparable metrics |
| 6 | |
| 7 | The Cauchy-sequence argument used in Morgan-Tian, Lemma 12.6, printed |
| 8 | p. 297. Separating it from the induced Riemannian metrics keeps the |
| 9 | uniform-space constructions out of the sequence argument. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Filter |
| 15 | open scoped ENNReal Topology |
| 16 | |
| 17 | /-- Lemma 12.6, p. 297: domination transfers Cauchy sequences, |
| 18 | and equality of the topologies transfers their limits. -/ |
| 19 | theorem EMetricSpace.completeSpace_of_topology_eq_edist_le |
| 20 | {X : Type*} (d₀ d₁ : EMetricSpace X) |
| 21 | (hcomplete : @CompleteSpace X d₀.toUniformSpace) |
| 22 | (htop : d₀.toUniformSpace.toTopologicalSpace = d₁.toUniformSpace.toTopologicalSpace) |
| 23 | {C : ℝ} |
| 24 | (hbound : ∀ x y, d₀.edist x y ≤ ENNReal.ofReal C * d₁.edist x y) : |
| 25 | @CompleteSpace X d₁.toUniformSpace := by |
| 26 | let : EMetricSpace X := d₁ |
| 27 | apply EMetric.complete_of_cauchySeq_tendsto |
| 28 | intro u hu |
| 29 | have hucauchy := EMetric.cauchySeq_iff.mp hu |
| 30 | have hlimit : ∃ x, Tendsto u atTop (@nhds X d₀.toUniformSpace.toTopologicalSpace x) := by |
| 31 | let : EMetricSpace X := d₀ |
| 32 | let : CompleteSpace X := hcomplete |
| 33 | apply cauchySeq_tendsto_of_complete |
| 34 | rw [EMetric.cauchySeq_iff] |
| 35 | intro ε hε |
| 36 | obtain ⟨N, hN⟩ := hucauchy (ε / ENNReal.ofReal C) |
| 37 | (ENNReal.div_pos hε.ne' ENNReal.ofReal_ne_top) |
| 38 | refine ⟨N, ?_⟩ |
| 39 | intro m hm k hk |
| 40 | exact (hbound (u m) (u k)).trans_lt |
| 41 | (ENNReal.mul_lt_of_lt_div' (hN m hm k hk)) |
| 42 | change ∃ x, Tendsto u atTop (@nhds X d₁.toUniformSpace.toTopologicalSpace x) |
| 43 | rw [← htop] |
| 44 | exact hlimit |