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.Cap.BandGluing |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Relative.BoundaryCover |
| 3 | |
| 4 | /-! |
| 5 | # Relative coverage along a retained cap's radial boundary |
| 6 | |
| 7 | The other two actual triangle edges are compact and avoid an interior |
| 8 | point of the chosen edge. The Jordan side is then filled locally. |
| 9 | |
| 10 | Morgan--Tian context: Proposition 19.35, printed pp. 467-481, including Claim 19.40, |
| 11 | pp. 470-471. These project constructions supply actual occupied boundary collars |
| 12 | and attachment coverage for the regional Gauss--Bonnet argument. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff Manifold |
| 21 | open PoincareMT.Topology.Surface |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | /-- A chosen coordinate face fills the Jordan region near every interior point of an actual |
| 26 | edge lying on the loop. Source: |
| 27 | `proof-work/tasks/M64/reports/2026-09-24-end-join-coverage.md`. -/ |
| 28 | theorem m64Intrinsic_coordinate_face_covers_loop_near_edge |
| 29 | {gamma : ℝ → AnnulusCoordinates} (hg : ContDiff ℝ ∞ gamma) {T p : ℝ} |
| 30 | (hend : gamma 0 = gamma T) (hinj : InjOn gamma (Ico 0 T)) |
| 31 | (hregular : ∀ t ∈ Ioo (0 : ℝ) T, deriv gamma t ≠ 0) (hp : p ∈ Ioo (0 : ℝ) T) |
| 32 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 33 | (hdisj : Disjoint U V) (hfU : frontier U = gamma '' Icc 0 T) |
| 34 | (hfV : frontier V = gamma '' Icc 0 T) |
| 35 | (face : SmoothFace AnnulusCoordinates) |
| 36 | (C : OpenPartialHomeomorph AnnulusCoordinates AnnulusCoordinates) |
| 37 | (basis : AffineBasis (Fin 3) ℝ AnnulusCoordinates) |
| 38 | (hsource : convexHull ℝ (range basis) ⊆ C.source) |
| 39 | (hcarrier : face.carrier = C '' convexHull ℝ (range basis)) |
| 40 | (hboundary : ∀ k : Fin 3, (face.boundary k).map = C ∘ |
| 41 | affineChartSegment (basis (k.succAbove 0)) (basis (k.succAbove 1))) |
| 42 | (hsub : face.carrier ⊆ closure U) (k : Fin 3) |
| 43 | (hedge : (face.boundary k).map '' Icc (0 : ℝ) 1 ⊆ gamma '' Icc 0 T) |
| 44 | {t : ℝ} (ht : t ∈ Ioo (0 : ℝ) 1) (htp : (face.boundary k).map t = gamma p) : |
| 45 | ∃ W : Set AnnulusCoordinates, IsOpen W ∧ gamma p ∈ W ∧ W ∩ closure U ⊆ face.carrier := by |
| 46 | let other := ⋃ j : {j : Fin 3 // j ≠ k}, (face.boundary j).map '' Icc (0 : ℝ) 1 |
| 47 | have hcompact : IsCompact other := isCompact_iUnion (fun j => |
| 48 | isCompact_Icc.image_of_continuousOn (face.boundary j).smooth.continuousOn) |
| 49 | have hpOther : gamma p ∉ other := by |
| 50 | intro h |
| 51 | obtain ⟨j, hj⟩ := mem_iUnion.mp h |
| 52 | exact coordinate_triangle_boundary_avoids_other_edges face C basis hsource hboundary |
| 53 | (Ne.symm j.property) ht (htp.symm ▸ hj) |
| 54 | have hregularFace : closure (interior face.carrier) = face.carrier := by |
| 55 | rw [hcarrier] |
| 56 | exact coordinate_triangle_closure_interior C basis hsource |
| 57 | have hpFace : gamma p ∈ face.carrier := face.isClosed_carrier.frontier_subset |
| 58 | (face.boundary_image_subset_frontier k ⟨t, Ioo_subset_Icc_self ht, htp⟩) |
| 59 | apply m64Intrinsic_exists_relative_cover_of_local_frontier hg hend hinj hregular hp |
| 60 | hU hV hdisj hfU hfV face.isClosed_carrier hregularFace hsub hpFace |
| 61 | (hcompact.isClosed.isOpen_compl.mem_nhds hpOther) |
| 62 | rintro z ⟨hzOther, hzFront⟩ |
| 63 | rw [face.boundary_carrier] at hzFront |
| 64 | obtain ⟨j, hj⟩ := mem_iUnion.mp hzFront |
| 65 | by_cases hjk : j = k |
| 66 | · exact hedge (hjk ▸ hj) |
| 67 | · exact False.elim (hzOther (mem_iUnion.mpr ⟨⟨j, hjk⟩, hj⟩)) |
| 68 | |
| 69 | end PoincareMT |