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.Geometry.Manifold.Riemannian.PathELength |
| 2 | import Mathlib.Topology.UnitInterval |
| 3 | import Mathlib.Topology.EMetricSpace.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Local path bounds give global Riemannian distance bounds |
| 7 | |
| 8 | The path subdivision used in Morgan--Tian Proposition 15.12, p. 365, and |
| 9 | Claim 18.22, p. 433. The target map need not be differentiable: only its |
| 10 | endpoint estimates on members of an open cover are used. The source |
| 11 | distance uses exactly Mathlib's C1 path class. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ENNReal ContDiff Topology |
| 18 | |
| 19 | namespace Manifold |
| 20 | |
| 21 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 22 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 23 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] |
| 24 | [∀ x : M, ENorm (TangentSpace I x)] |
| 25 | {Y : Type*} [PseudoEMetricSpace Y] |
| 26 | |
| 27 | /-- Subdivide a C1 path along an open cover and add the local endpoint |
| 28 | bounds. This is the path argument in the repaired Proposition 15.12, |
| 29 | Morgan--Tian p. 365; see the SurgeryComparison local-to-global derivation of 2026-09-20. -/ |
| 30 | theorem edist_le_mul_pathELength_of_open_cover |
| 31 | {ι : Sort*} (U : ι → Set M) (hU : ∀ i, IsOpen (U i)) |
| 32 | (hcover : ∀ x, ∃ i, x ∈ U i) (f : M → Y) (C : ℝ≥0∞) |
| 33 | (hlocal : ∀ i, ∀ (γ : ℝ → M) (a b : ℝ), a ≤ b → |
| 34 | ContMDiffOn 𝓘(ℝ, ℝ) I 1 γ (Icc a b) → |
| 35 | MapsTo γ (Icc a b) (U i) → |
| 36 | edist (f (γ a)) (f (γ b)) ≤ C * pathELength I γ a b) |
| 37 | {γ : ℝ → M} (hγ : ContMDiffOn 𝓘(ℝ, ℝ) I 1 γ (Icc 0 1)) : |
| 38 | edist (f (γ 0)) (f (γ 1)) ≤ C * pathELength I γ 0 1 := by |
| 39 | let V : ι → Set unitInterval := fun i => (fun t => γ t) ⁻¹' U i |
| 40 | have hV (i : ι) : IsOpen (V i) := |
| 41 | (hU i).preimage hγ.continuousOn.domRestrict |
| 42 | have hVcover : univ ⊆ ⋃ i, V i := by |
| 43 | intro t _ |
| 44 | obtain ⟨i, hi⟩ := hcover (γ t) |
| 45 | exact mem_iUnion.mpr ⟨i, hi⟩ |
| 46 | obtain ⟨t, ht0, hmono, ⟨n, hn⟩, hpiece⟩ := |
| 47 | exists_monotone_Icc_subset_open_cover_unitInterval hV hVcover |
| 48 | have hbound : ∀ k, edist (f (γ 0)) (f (γ (t k))) ≤ |
| 49 | C * pathELength I γ 0 (t k) := by |
| 50 | intro k |
| 51 | induction k with |
| 52 | | zero => simp [ht0] |
| 53 | | succ k ih => |
| 54 | obtain ⟨i, hi⟩ := hpiece k |
| 55 | have hstep : (t k : ℝ) ≤ t (k + 1) := hmono (Nat.le_succ k) |
| 56 | have hsub : Icc (t k : ℝ) (t (k + 1)) ⊆ Icc (0 : ℝ) 1 := |
| 57 | Icc_subset_Icc (t k).property.1 (t (k + 1)).property.2 |
| 58 | have himage : MapsTo γ (Icc (t k : ℝ) (t (k + 1))) (U i) := by |
| 59 | intro s hs |
| 60 | exact hi (show (⟨s, hsub hs⟩ : unitInterval) ∈ Icc (t k) (t (k + 1)) |
| 61 | from hs) |
| 62 | calc |
| 63 | edist (f (γ 0)) (f (γ (t (k + 1)))) ≤ |
| 64 | edist (f (γ 0)) (f (γ (t k))) + |
| 65 | edist (f (γ (t k))) (f (γ (t (k + 1)))) := edist_triangle _ _ _ |
| 66 | _ ≤ C * pathELength I γ 0 (t k) + |
| 67 | C * pathELength I γ (t k) (t (k + 1)) := |
| 68 | add_le_add ih (hlocal i γ _ _ hstep (hγ.mono hsub) himage) |
| 69 | _ = C * pathELength I γ 0 (t (k + 1)) := by |
| 70 | rw [← mul_add, pathELength_add (t k).property.1 hstep] |
| 71 | simpa [hn n le_rfl] using hbound n |
| 72 | |
| 73 | /-- A uniform local endpoint bound on an open cover controls the actual |
| 74 | Riemannian distance. This includes the nonsmooth collapse of Proposition |
| 75 | 15.12 and its near-unit bound used in Claim 18.22, Morgan--Tian p. 433. -/ |
| 76 | theorem edist_le_mul_riemannianEDist_of_open_cover |
| 77 | {ι : Sort*} (U : ι → Set M) (hU : ∀ i, IsOpen (U i)) |
| 78 | (hcover : ∀ x, ∃ i, x ∈ U i) (f : M → Y) |
| 79 | {C : ℝ≥0∞} (hC0 : C ≠ 0) (hCtop : C ≠ ⊤) |
| 80 | (hlocal : ∀ i, ∀ (γ : ℝ → M) (a b : ℝ), a ≤ b → |
| 81 | ContMDiffOn 𝓘(ℝ, ℝ) I 1 γ (Icc a b) → |
| 82 | MapsTo γ (Icc a b) (U i) → |
| 83 | edist (f (γ a)) (f (γ b)) ≤ C * pathELength I γ a b) |
| 84 | (x y : M) : edist (f x) (f y) ≤ C * riemannianEDist I x y := by |
| 85 | by_contra h |
| 86 | have hlt : riemannianEDist I x y < edist (f x) (f y) / C := |
| 87 | (ENNReal.lt_div_iff_mul_lt (.inl hC0) (.inl hCtop)).mpr |
| 88 | (by simpa [mul_comm] using lt_of_not_ge h) |
| 89 | obtain ⟨γ, hx, hy, hγ, hlength⟩ := exists_lt_of_riemannianEDist_lt hlt |
| 90 | have hb := edist_le_mul_pathELength_of_open_cover U hU hcover f C hlocal hγ |
| 91 | rw [hx, hy] at hb |
| 92 | exact (not_lt_of_ge hb) (ENNReal.mul_lt_of_lt_div' hlength) |
| 93 | |
| 94 | end Manifold |