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.Triangle.CornerCaps |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Finite.CornerCapGeometry |
| 3 | |
| 4 | /-! Each genuine triangle cap avoids the complete nonincident original arc. |
| 5 | Source: MT Claim 19.40; normal-collision-transversality derivation, Sections 4-5. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | set_option autoImplicit false |
| 9 | |
| 10 | open Set |
| 11 | |
| 12 | namespace PoincareMT |
| 13 | |
| 14 | /-- Exact frontier contacts and the original sole-contact conditions separate each actual |
| 15 | cap from the opposite closed arc. Source: MT Claim 19.40; normal-collision-transversality |
| 16 | derivation, Sections 4-5. Project construction: |
| 17 | `proof-work/tasks/M64/derivations/2026-09-27-normal-collision-transversality.md`, Sections |
| 18 | 4-5. -/ |
| 19 | theorem m64Intrinsic_triangle_caps_avoid_opposite_arcs |
| 20 | {base alpha beta : ℝ → AnnulusCoordinates} {D A B : ℝ} |
| 21 | {U : Set AnnulusCoordinates} (C : M64IntrinsicTriangleCaps base alpha beta D A B U) |
| 22 | (hbaseA : ∀ s ∈ Icc 0 D, ∀ t ∈ Icc 0 A, base s = alpha t → s = 0 ∧ t = 0) |
| 23 | (hbaseB : ∀ s ∈ Icc 0 D, ∀ t ∈ Icc 0 B, base s = beta t → s = D ∧ t = 0) |
| 24 | (hsides : ∀ s ∈ Icc 0 A, ∀ t ∈ Icc 0 B, alpha s = beta t → s = A ∧ t = B) |
| 25 | (hfront : frontier U = base '' Icc 0 D ∪ (alpha '' Icc 0 A ∪ beta '' Icc 0 B)) : |
| 26 | Disjoint (C.carrier 0) (beta '' Icc 0 B) ∧ |
| 27 | Disjoint (C.carrier 1) (alpha '' Icc 0 A) ∧ |
| 28 | Disjoint (C.carrier 2) (base '' Icc 0 D) := by |
| 29 | have h0D : C.radius 0 < D := C.radius_lt_left 0 |
| 30 | have h0A : C.radius 0 < A := C.radius_lt_right 0 |
| 31 | have h1D : C.radius 1 < D := C.radius_lt_left 1 |
| 32 | have h1B : C.radius 1 < B := C.radius_lt_right 1 |
| 33 | have h2A : C.radius 2 < A := C.radius_lt_left 2 |
| 34 | have h2B : C.radius 2 < B := C.radius_lt_right 2 |
| 35 | refine ⟨disjoint_left.mpr ?_, disjoint_left.mpr ?_, disjoint_left.mpr ?_⟩ |
| 36 | · rintro _ hp ⟨t, ht, rfl⟩ |
| 37 | have hpf : beta t ∈ frontier U := hfront ▸ Or.inr (Or.inr ⟨t, ht, rfl⟩) |
| 38 | rcases (C.frontier_contact 0).subset ⟨hp, hpf⟩ with h | h |
| 39 | · obtain ⟨s, hs, heq⟩ := h |
| 40 | have he := (hbaseB s ⟨hs.1, hs.2.trans h0D.le⟩ t ht heq).1 |
| 41 | linarith only [he, hs.2, h0D] |
| 42 | · obtain ⟨s, hs, heq⟩ := h |
| 43 | have he := (hsides s ⟨hs.1, hs.2.trans h0A.le⟩ t ht heq).1 |
| 44 | linarith only [he, hs.2, h0A] |
| 45 | · rintro _ hp ⟨t, ht, rfl⟩ |
| 46 | have hpf : alpha t ∈ frontier U := hfront ▸ Or.inr (Or.inl ⟨t, ht, rfl⟩) |
| 47 | rcases (C.frontier_contact 1).subset ⟨hp, hpf⟩ with h | h |
| 48 | · obtain ⟨s, hs, heq⟩ := h |
| 49 | have hDs : D - s ∈ Icc 0 D := |
| 50 | ⟨by linarith only [hs.2, h1D], by linarith only [hs.1]⟩ |
| 51 | have he := (hbaseA (D - s) hDs t ht heq).1 |
| 52 | linarith only [he, hs.2, h1D] |
| 53 | · obtain ⟨s, hs, heq⟩ := h |
| 54 | have he := (hsides t ht s ⟨hs.1, hs.2.trans h1B.le⟩ heq.symm).2 |
| 55 | linarith only [he, hs.2, h1B] |
| 56 | · rintro _ hp ⟨t, ht, rfl⟩ |
| 57 | have hpf : base t ∈ frontier U := hfront ▸ Or.inl ⟨t, ht, rfl⟩ |
| 58 | rcases (C.frontier_contact 2).subset ⟨hp, hpf⟩ with h | h |
| 59 | · obtain ⟨s, hs, heq⟩ := h |
| 60 | have hAs : A - s ∈ Icc 0 A := |
| 61 | ⟨by linarith only [hs.2, h2A], by linarith only [hs.1]⟩ |
| 62 | have he := (hbaseA t ht (A - s) hAs heq.symm).2 |
| 63 | linarith only [he, hs.2, h2A] |
| 64 | · obtain ⟨s, hs, heq⟩ := h |
| 65 | have hBs : B - s ∈ Icc 0 B := |
| 66 | ⟨by linarith only [hs.2, h2B], by linarith only [hs.1]⟩ |
| 67 | have he := (hbaseB t ht (B - s) hBs heq.symm).2 |
| 68 | linarith only [he, hs.2, h2B] |
| 69 | |
| 70 | end PoincareMT |