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.Arc.CapRadialCoverage |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Chosen.CapGeometry |
| 3 | |
| 4 | /-! |
| 5 | # Actual cap coverage along either incident boundary arc |
| 6 | |
| 7 | The literal radial map supplies the original smooth boundary edge. |
| 8 | Incoming versus outgoing parametrization and the two cap axes are |
| 9 | independent, as required at the four attachments of a two-arc region. |
| 10 | |
| 11 | Morgan--Tian context: Proposition 19.35, printed pp. 467-481, including Claim 19.40, |
| 12 | pp. 470-471. These project constructions supply actual occupied boundary collars |
| 13 | and attachment coverage for the regional Gauss--Bonnet argument. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Topology ContDiff Manifold |
| 22 | open PoincareMT.Topology.Surface |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | /-- An actual retained cap covers the Jordan closure near every interior point of its |
| 27 | incident original boundary arc. Source: |
| 28 | `proof-work/tasks/M64/reports/2026-09-24-short-cap-band-join.md`. -/ |
| 29 | theorem m64Intrinsic_arc_chosen_cap_covers_original_axis |
| 30 | {gamma : ℝ → AnnulusCoordinates} (hg : ContDiff ℝ ∞ gamma) {T r : ℝ} |
| 31 | (hr : 0 < r) (hrT : r < T) (hinj : InjOn gamma (Icc 0 T)) |
| 32 | (hregular : ∀ t ∈ Ioo (0 : ℝ) T, deriv gamma t ≠ 0) |
| 33 | {K U V : Set AnnulusCoordinates} (hK : IsCompact K) |
| 34 | (havoid : ∀ t ∈ Ioo (0 : ℝ) T, gamma t ∉ K) |
| 35 | (hU : IsOpen U) (hV : IsOpen V) (hdisj : Disjoint U V) |
| 36 | (hfU : frontier U = gamma '' Icc 0 T ∪ K) |
| 37 | (hfV : frontier V = gamma '' Icc 0 T ∪ K) |
| 38 | (F : OpenPartialHomeomorph (ℝ × ℝ) AnnulusCoordinates) |
| 39 | (hsource : {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} ⊆ F.source) |
| 40 | (hF : ContDiffOn ℝ ∞ F F.source) (hFi : ContDiffOn ℝ ∞ F.symm F.target) |
| 41 | (hsub : F '' {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} ⊆ closure U) |
| 42 | (terminal vertical : Bool) |
| 43 | (haxis : ∀ s ∈ Icc (0 : ℝ) r, |
| 44 | F (if vertical then (0, s) else (s, 0)) = gamma (if terminal then T - s else s)) : |
| 45 | ∀ s ∈ Ioo (0 : ℝ) r, ∃ W : Set AnnulusCoordinates, |
| 46 | IsOpen W ∧ gamma (if terminal then T - s else s) ∈ W ∧ |
| 47 | W ∩ closure U ⊆ F '' {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} := by |
| 48 | obtain ⟨face, hc, _, hone, htwo, C, basis, _, _, hs, hcarrier, hboundary⟩ := |
| 49 | m64Intrinsic_exists_coordinate_face_of_chosen_cap F hr hsource hF hFi |
| 50 | let k : Fin 3 := if vertical then 1 else 2 |
| 51 | have hedge (t : ℝ) : (face.boundary k).map t = |
| 52 | F (if vertical then (0, t * r) else (t * r, 0)) := by |
| 53 | cases vertical |
| 54 | · exact htwo t |
| 55 | · exact hone t |
| 56 | have hedgeArc : (face.boundary k).map '' Icc (0 : ℝ) 1 ⊆ gamma '' Icc 0 T := by |
| 57 | rintro z ⟨t, ht, rfl⟩ |
| 58 | have htr : t * r ∈ Icc (0 : ℝ) r := |
| 59 | ⟨mul_nonneg ht.1 hr.le, by nlinarith [ht.2]⟩ |
| 60 | rw [hedge, haxis _ htr] |
| 61 | refine ⟨if terminal then T - t * r else t * r, ?_, rfl⟩ |
| 62 | cases terminal |
| 63 | · exact ⟨htr.1, htr.2.trans hrT.le⟩ |
| 64 | · change T - t * r ∈ Icc (0 : ℝ) T |
| 65 | exact ⟨by linarith [htr.2], by linarith [htr.1]⟩ |
| 66 | intro s hsr |
| 67 | have hp : (if terminal then T - s else s) ∈ Ioo (0 : ℝ) T := by |
| 68 | cases terminal |
| 69 | · exact ⟨hsr.1, hsr.2.trans hrT⟩ |
| 70 | · change T - s ∈ Ioo (0 : ℝ) T |
| 71 | exact ⟨by linarith [hsr.2], by linarith [hsr.1]⟩ |
| 72 | have hparam : s / r ∈ Ioo (0 : ℝ) 1 := |
| 73 | ⟨div_pos hsr.1 hr, (div_lt_one hr).mpr hsr.2⟩ |
| 74 | have hpoint : (face.boundary k).map (s / r) = gamma (if terminal then T - s else s) := by |
| 75 | rw [hedge, div_mul_cancel₀ _ hr.ne', haxis s (Ioo_subset_Icc_self hsr)] |
| 76 | obtain ⟨W, hW, hpW, hcover⟩ := m64Intrinsic_coordinate_face_covers_arc_near_edge |
| 77 | hg hinj hregular hp hK (havoid _ hp) hU hV hdisj hfU hfV |
| 78 | face C basis hs hcarrier hboundary (hc ▸ hsub) k hedgeArc hparam hpoint |
| 79 | exact ⟨W, hW, hpW, hc ▸ hcover⟩ |
| 80 | |
| 81 | end PoincareMT |