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.CoordinateParents |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Triangle.CollarConstruction |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Marked.RegionTriangulation |
| 4 | |
| 5 | /-! The original three genuine corners are retained in an actual |
| 6 | triangulation of the collision region. Source: MT Claim 19.40; |
| 7 | normal-collision-transversality derivation, Section 8. -/ |
| 8 | |
| 9 | noncomputable section |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set |
| 14 | open scoped Topology ContDiff Matrix |
| 15 | open PoincareMT.Topology.Surface |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | namespace M64IntrinsicTriangleCollar |
| 20 | |
| 21 | /-- The constructed collar supplies a complete smooth triangulation with all three original |
| 22 | corner points retained as actual vertices. Source: MT Claim 19.40; |
| 23 | normal-collision-transversality derivation, Section 8. Project construction: |
| 24 | `proof-work/tasks/M64/derivations/2026-09-27-normal-collision-transversality.md`, Section 8. -/ |
| 25 | theorem exists_triangulation |
| 26 | {base alpha beta : ℝ → AnnulusCoordinates} {D A B : ℝ} {U : Set AnnulusCoordinates} |
| 27 | {C : M64IntrinsicTriangleCaps base alpha beta D A B U} (P : M64IntrinsicTriangleCollar C) |
| 28 | (hU : IsOpen U) (hcompact : IsCompact (closure U)) |
| 29 | (hfront : frontier U = base '' Icc 0 D ∪ (alpha '' Icc 0 A ∪ beta '' Icc 0 B)) : |
| 30 | ∃ R : M64IntrinsicCoordinateTriangulation (closure U), |
| 31 | ∃ v0 v1 vT : Euler.CoordinateVertex R.coordinates R.basis, |
| 32 | v0.1 = base 0 ∧ v1.1 = base D ∧ vT.1 = alpha A := by |
| 33 | classical |
| 34 | obtain ⟨_, F, basis, hF, hFi, hsource, hparents, hcover⟩ := |
| 35 | P.exists_coordinate_parents hU hcompact hfront |
| 36 | let marks : Finset AnnulusCoordinates := {base 0, base D, alpha A} |
| 37 | have hD : 0 < D := (C.radius_pos 0).trans (C.radius_lt_left 0) |
| 38 | have hA : 0 < A := (C.radius_pos 0).trans (C.radius_lt_right 0) |
| 39 | have hmarks : (marks : Set AnnulusCoordinates) ⊆ closure U := by |
| 40 | intro p hp |
| 41 | apply frontier_subset_closure |
| 42 | rw [hfront] |
| 43 | simp only [marks, Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton] at hp |
| 44 | rcases hp with rfl | rfl | rfl |
| 45 | · exact Or.inl ⟨0, ⟨le_rfl, hD.le⟩, rfl⟩ |
| 46 | · exact Or.inl ⟨D, ⟨hD.le, le_rfl⟩, rfl⟩ |
| 47 | · exact Or.inr (Or.inl ⟨A, ⟨hA.le, le_rfl⟩, rfl⟩) |
| 48 | obtain ⟨R, hvertices⟩ := m64Intrinsic_exists_marked_region_triangulation |
| 49 | F basis hF hFi hsource hparents hcover marks hmarks |
| 50 | obtain ⟨v0, hv0⟩ := hvertices (base 0) (by simp [marks]) |
| 51 | obtain ⟨v1, hv1⟩ := hvertices (base D) (by simp [marks]) |
| 52 | obtain ⟨vT, hvT⟩ := hvertices (alpha A) (by simp [marks]) |
| 53 | exact ⟨R, v0, v1, vT, hv0, hv1, hvT⟩ |
| 54 | |
| 55 | end M64IntrinsicTriangleCollar |
| 56 | |
| 57 | /-- The original three embedded arcs with three genuine corner tangents construct their |
| 58 | actual marked region triangulation. Convex and reflex terminal sectors are both permitted; |
| 59 | no occupied-angle bound is assumed. Source: MT Claim 19.40; normal-collision-transversality |
| 60 | derivation, Sections 4-8. Project construction: |
| 61 | `proof-work/tasks/M64/derivations/2026-09-27-normal-collision-transversality.md`, Sections |
| 62 | 4-8. -/ |
| 63 | theorem m64Intrinsic_exists_triangle_region_triangulation |
| 64 | {base alpha beta : ℝ → AnnulusCoordinates} |
| 65 | (hc : ContDiff ℝ ∞ base) (ha : ContDiff ℝ ∞ alpha) (hb : ContDiff ℝ ∞ beta) |
| 66 | {D A B : ℝ} (hD : 0 < D) (hA : 0 < A) (hB : 0 < B) |
| 67 | (hci : InjOn base (Icc 0 D)) (hai : InjOn alpha (Icc 0 A)) |
| 68 | (hbi : InjOn beta (Icc 0 B)) |
| 69 | (hcreg : ∀ t ∈ Ioo 0 D, deriv base t ≠ 0) |
| 70 | (hareg : ∀ t ∈ Ioo 0 A, deriv alpha t ≠ 0) |
| 71 | (hbreg : ∀ t ∈ Ioo 0 B, deriv beta t ≠ 0) |
| 72 | (hstartA : base 0 = alpha 0) (hstartB : base D = beta 0) |
| 73 | (hmeet : alpha A = beta B) |
| 74 | (hbaseA : ∀ s ∈ Icc 0 D, ∀ t ∈ Icc 0 A, base s = alpha t → s = 0 ∧ t = 0) |
| 75 | (hbaseB : ∀ s ∈ Icc 0 D, ∀ t ∈ Icc 0 B, base s = beta t → s = D ∧ t = 0) |
| 76 | (hsides : ∀ s ∈ Icc 0 A, ∀ t ∈ Icc 0 B, alpha s = beta t → s = A ∧ t = B) |
| 77 | (hindA : LinearIndependent ℝ |
| 78 | (![deriv base 0, deriv alpha 0] : Fin 2 → AnnulusCoordinates)) |
| 79 | (hindB : LinearIndependent ℝ |
| 80 | (![-deriv base D, deriv beta 0] : Fin 2 → AnnulusCoordinates)) |
| 81 | (hindT : LinearIndependent ℝ |
| 82 | (![-deriv alpha A, -deriv beta B] : Fin 2 → AnnulusCoordinates)) |
| 83 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 84 | (hUV : Disjoint U V) |
| 85 | (hfront : frontier U = base '' Icc 0 D ∪ (alpha '' Icc 0 A ∪ beta '' Icc 0 B)) |
| 86 | (hfV : frontier V = frontier U) (hcompact : IsCompact (closure U)) : |
| 87 | ∃ R : M64IntrinsicCoordinateTriangulation (closure U), |
| 88 | ∃ v0 v1 vT : Euler.CoordinateVertex R.coordinates R.basis, |
| 89 | v0.1 = base 0 ∧ v1.1 = base D ∧ vT.1 = alpha A := by |
| 90 | obtain ⟨C⟩ := m64Intrinsic_exists_triangle_corner_caps hc ha hb hD hA hB hci hai hbi |
| 91 | hstartA hstartB hmeet hbaseA hbaseB hindA hindB hindT hU hV hUV hfront hfV |
| 92 | obtain ⟨P⟩ := m64Intrinsic_exists_triangle_collar hc ha hb hci hai hbi hcreg hareg hbreg |
| 93 | hbaseA hbaseB hsides hU hV hUV hfront hfV C |
| 94 | exact P.exists_triangulation hU hcompact hfront |
| 95 | |
| 96 | end PoincareMT |