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.CurveShortening.Comparison.IntrinsicComparison.Jordan.Region |
| 2 | import Mathlib.Topology.Piecewise |
| 3 | |
| 4 | /-! |
| 5 | # The Jordan region between two embedded arcs |
| 6 | |
| 7 | Two embedded arcs with the same endpoints and no other intersections form |
| 8 | a simple closed curve. The concatenation is constructed explicitly, so its |
| 9 | bounded region has precisely the union of the original arcs as frontier. |
| 10 | |
| 11 | Morgan--Tian context: Proposition 19.35, printed pp. 467-481. These project |
| 12 | Jordan-region constructions supply the actual domains, boundary charts and finite |
| 13 | faces used in its regional Gauss--Bonnet arguments. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Function Metric |
| 20 | open scoped Topology |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | /-- Two embedded arcs meeting exactly at their common endpoints bound a compact Jordan |
| 25 | region. The frontier is the exact union of the arc images. Source: |
| 26 | `proof-work/tasks/M64/reports/2026-09-24-intrinsic-radial-scalar.md`, Constructed compact |
| 27 | regions from boundary arcs. -/ |
| 28 | theorem m64Intrinsic_exists_region_between_arcs |
| 29 | {α β : ℝ → AnnulusCoordinates} |
| 30 | (hαc : ContinuousOn α (Icc 0 1)) (hβc : ContinuousOn β (Icc 0 1)) |
| 31 | (hαinj : InjOn α (Icc 0 1)) (hβinj : InjOn β (Icc 0 1)) |
| 32 | (h0 : α 0 = β 0) (h1 : α 1 = β 1) |
| 33 | (hmeet : ∀ s ∈ Icc 0 1, ∀ t ∈ Icc 0 1, |
| 34 | α s = β t → (s = 0 ∧ t = 0) ∨ (s = 1 ∧ t = 1)) : |
| 35 | ∃ U V : Set AnnulusCoordinates, |
| 36 | IsOpen U ∧ IsOpen V ∧ IsPathConnected U ∧ IsPathConnected V ∧ |
| 37 | Bornology.IsBounded U ∧ ¬ Bornology.IsBounded V ∧ Disjoint U V ∧ |
| 38 | U ∪ V = (α '' Icc 0 1 ∪ β '' Icc 0 1)ᶜ ∧ |
| 39 | frontier U = α '' Icc 0 1 ∪ β '' Icc 0 1 ∧ |
| 40 | frontier V = α '' Icc 0 1 ∪ β '' Icc 0 1 ∧ IsCompact (closure U) := by |
| 41 | classical |
| 42 | let γ : ℝ → AnnulusCoordinates := fun t => if t ≤ 1 then α t else β (2 - t) |
| 43 | have hγc : ContinuousOn γ (Icc 0 2) := by |
| 44 | apply ContinuousOn.if |
| 45 | · intro t ht |
| 46 | have ht' : t = 1 := by |
| 47 | have h := ht.2 |
| 48 | change t ∈ frontier (Iic (1 : ℝ)) at h |
| 49 | simpa only [frontier_Iic, mem_singleton_iff] using h |
| 50 | subst t |
| 51 | convert h1 using 1 |
| 52 | norm_num |
| 53 | · apply hαc.mono |
| 54 | intro t ht |
| 55 | exact ⟨ht.1.1, by simpa only [show {a : ℝ | a ≤ 1} = Iic 1 from rfl, |
| 56 | isClosed_Iic.closure_eq, mem_Iic] using ht.2⟩ |
| 57 | · apply hβc.comp (continuous_const.sub continuous_id).continuousOn |
| 58 | intro t ht |
| 59 | have ht1 : 1 ≤ t := by |
| 60 | have h := ht.2 |
| 61 | simp only [not_le] at h |
| 62 | change t ∈ closure (Ioi (1 : ℝ)) at h |
| 63 | simpa only [closure_Ioi, mem_Ici] using h |
| 64 | change 2 - t ∈ Icc 0 1 |
| 65 | exact ⟨by linarith [ht.1.2], by linarith⟩ |
| 66 | have hγ0 : γ 0 = α 0 := by norm_num [γ] |
| 67 | have hγ2 : γ 2 = β 0 := by norm_num [γ] |
| 68 | have hγend : γ 0 = γ 2 := hγ0.trans (h0.trans hγ2.symm) |
| 69 | have hγinj : InjOn γ (Ico 0 2) := by |
| 70 | intro s hs t ht heq |
| 71 | wlog hst : s ≤ t generalizing s t |
| 72 | · exact (this ht hs heq.symm (le_of_not_ge hst)).symm |
| 73 | by_cases ht1 : t ≤ 1 |
| 74 | · have hs1 : s ≤ 1 := hst.trans ht1 |
| 75 | apply hαinj ⟨hs.1, hs1⟩ ⟨ht.1, ht1⟩ |
| 76 | simpa only [γ, if_pos hs1, if_pos ht1] using heq |
| 77 | · by_cases hs1 : s ≤ 1 |
| 78 | · have h := hmeet s ⟨hs.1, hs1⟩ (2 - t) |
| 79 | ⟨by linarith [ht.2], by linarith⟩ |
| 80 | (by simpa only [γ, if_pos hs1, if_neg ht1] using heq) |
| 81 | rcases h with ⟨_, ht0⟩ | ⟨_, ht'⟩ |
| 82 | · linarith [ht.2] |
| 83 | · linarith |
| 84 | · have h := hβinj (x₁ := 2 - s) (x₂ := 2 - t) |
| 85 | ⟨by linarith [hs.2], by linarith⟩ |
| 86 | ⟨by linarith [ht.2], by linarith⟩ |
| 87 | (by simpa only [γ, if_neg hs1, if_neg ht1] using heq) |
| 88 | linarith |
| 89 | have hγimage : γ '' Icc 0 2 = α '' Icc 0 1 ∪ β '' Icc 0 1 := by |
| 90 | apply Subset.antisymm |
| 91 | · rintro p ⟨t, ht, rfl⟩ |
| 92 | by_cases ht1 : t ≤ 1 |
| 93 | · exact Or.inl ⟨t, ⟨ht.1, ht1⟩, (if_pos ht1).symm⟩ |
| 94 | · exact Or.inr ⟨2 - t, ⟨by linarith [ht.2], by linarith⟩, (if_neg ht1).symm⟩ |
| 95 | · rintro p (⟨t, ht, rfl⟩ | ⟨t, ht, rfl⟩) |
| 96 | · exact ⟨t, ⟨ht.1, by linarith [ht.2]⟩, if_pos ht.2⟩ |
| 97 | · refine ⟨2 - t, ⟨by linarith [ht.2], by linarith [ht.1]⟩, ?_⟩ |
| 98 | by_cases ht1 : t = 1 |
| 99 | · subst t |
| 100 | norm_num [γ] |
| 101 | exact h1 |
| 102 | · have htlt : t < 1 := lt_of_le_of_ne ht.2 ht1 |
| 103 | rw [show γ (2 - t) = β (2 - (2 - t)) from if_neg (by linarith)] |
| 104 | congr 1 |
| 105 | ring |
| 106 | obtain ⟨U, V, hU, hV, hpU, hpV, hbU, hbV, hdisj, hunion, hfU, hfV, hcompact⟩ := |
| 107 | m64Intrinsic_exists_jordan_region (by norm_num : (0 : ℝ) < 2) hγc hγend hγinj |
| 108 | rw [hγimage] at hunion hfU hfV |
| 109 | exact ⟨U, V, hU, hV, hpU, hpV, hbU, hbV, hdisj, hunion, hfU, hfV, hcompact⟩ |
| 110 | |
| 111 | end PoincareMT |