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.Two.ArcRegionTriangulation |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Marked.RegionTriangulation |
| 3 | |
| 4 | /-! The original transverse digon's actual marked triangulation. |
| 5 | Source: MT Claim 19.41; short-geodesic-digons derivation, Section 1. |
| 6 | Both occupied sectors are retained without convexity assumptions. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set |
| 13 | open scoped Topology ContDiff Manifold Matrix |
| 14 | open PoincareMT.Topology.Surface |
| 15 | |
| 16 | namespace PoincareMT |
| 17 | |
| 18 | /-- Two original transverse arcs construct a triangulation of exactly their Jordan closure, |
| 19 | retaining both original endpoints as vertices. Source: MT Claim 19.41; short-geodesic-digons |
| 20 | derivation, Section 1. Source/construction: |
| 21 | proof-work/tasks/M64/derivations/2026-09-27-short-geodesic-digons.md, Section 1. -/ |
| 22 | theorem m64Intrinsic_exists_digon_triangulation |
| 23 | {alpha beta : ℝ → AnnulusCoordinates} (ha : ContDiff ℝ ∞ alpha) |
| 24 | (hb : ContDiff ℝ ∞ beta) {A B : ℝ} (hA : 0 < A) (hB : 0 < B) |
| 25 | (hai : InjOn alpha (Icc 0 A)) (hbi : InjOn beta (Icc 0 B)) |
| 26 | (hareg : ∀ t ∈ Ioo 0 A, deriv alpha t ≠ 0) |
| 27 | (hbreg : ∀ t ∈ Ioo 0 B, deriv beta t ≠ 0) |
| 28 | (hbase : beta 0 = alpha 0) (hend : beta B = alpha A) |
| 29 | (hmeet : ∀ s ∈ Icc 0 A, ∀ t ∈ Icc 0 B, |
| 30 | alpha s = beta t → (s = 0 ∧ t = 0) ∨ (s = A ∧ t = B)) |
| 31 | (hind0 : LinearIndependent ℝ |
| 32 | (![deriv alpha 0, deriv beta 0] : Fin 2 → AnnulusCoordinates)) |
| 33 | (hind1 : LinearIndependent ℝ |
| 34 | (![-deriv alpha A, -deriv beta B] : Fin 2 → AnnulusCoordinates)) |
| 35 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 36 | (hUV : Disjoint U V) (hfront : frontier U = alpha '' Icc 0 A ∪ beta '' Icc 0 B) |
| 37 | (hfV : frontier V = frontier U) (hcompact : IsCompact (closure U)) : |
| 38 | ∃ R : M64IntrinsicCoordinateTriangulation (closure U), |
| 39 | ∃ v0 v1 : Euler.CoordinateVertex R.coordinates R.basis, |
| 40 | v0.1 = alpha 0 ∧ v1.1 = alpha A := by |
| 41 | have hinter : alpha '' Icc 0 A ∩ beta '' Icc 0 B ⊆ {alpha 0, alpha A} := by |
| 42 | rintro p ⟨⟨s, hs, hsp⟩, ⟨t, ht, htp⟩⟩ |
| 43 | rcases hmeet s hs t ht (hsp.trans htp.symm) with h | h |
| 44 | · exact Or.inl (hsp.symm.trans (congrArg alpha h.1)) |
| 45 | · exact Or.inr (hsp.symm.trans (congrArg alpha h.1)) |
| 46 | obtain ⟨m, face, C, b, hC, hCi, hsource, hcarrier, hboundary, hfrontier, |
| 47 | hcontacts, hcover, v0, v1, hv0, hv1⟩ := |
| 48 | m64Intrinsic_exists_two_arc_region_triangulation ha hb hA hB hai hbi hareg hbreg |
| 49 | hinter hbase hend hind0 hind1 hU hV hUV hfront hfV hcompact |
| 50 | exact ⟨⟨m, face, C, b, hC, hCi, hsource, hcarrier, hboundary, |
| 51 | hfrontier, hcontacts, hcover⟩, v0, v1, hv0, hv1⟩ |
| 52 | |
| 53 | end PoincareMT |