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.RadialCoverage |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Chosen.CapGeometry |
| 3 | |
| 4 | /-! |
| 5 | # Coverage along the original axes of a chosen cap |
| 6 | |
| 7 | The literal radial boundary identities supply the original loop edge and |
| 8 | its interior parameter. The cap is realized without changing its map. |
| 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 |
| 20 | open scoped Topology ContDiff Manifold |
| 21 | open PoincareMT.Topology.Surface |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | /-- The retained coordinate cap covers the actual Jordan closure near every strict interior |
| 26 | point of either original radial loop arc. Source: |
| 27 | `proof-work/tasks/M64/reports/2026-09-24-short-cap-band-join.md`. -/ |
| 28 | theorem m64Intrinsic_chosen_cap_covers_original_axis |
| 29 | {gamma : ℝ → AnnulusCoordinates} (hg : ContDiff ℝ ∞ gamma) {T r : ℝ} |
| 30 | (hr : 0 < r) (hrT : r < T) |
| 31 | (hend : gamma 0 = gamma T) (hinj : InjOn gamma (Ico 0 T)) |
| 32 | (hregular : ∀ t ∈ Ioo (0 : ℝ) T, deriv gamma t ≠ 0) |
| 33 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 34 | (hdisj : Disjoint U V) (hfU : frontier U = gamma '' Icc 0 T) |
| 35 | (hfV : frontier V = gamma '' Icc 0 T) |
| 36 | (F : OpenPartialHomeomorph (ℝ × ℝ) AnnulusCoordinates) |
| 37 | (hsource : {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} ⊆ F.source) |
| 38 | (hF : ContDiffOn ℝ ∞ F F.source) (hFi : ContDiffOn ℝ ∞ F.symm F.target) |
| 39 | (hsub : F '' {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} ⊆ closure U) |
| 40 | (terminal : Bool) |
| 41 | (haxis : ∀ s ∈ Icc (0 : ℝ) r, |
| 42 | F (if terminal then (0, s) else (s, 0)) = gamma (if terminal then T - s else s)) : |
| 43 | ∀ s ∈ Ioo (0 : ℝ) r, ∃ W : Set AnnulusCoordinates, |
| 44 | IsOpen W ∧ gamma (if terminal then T - s else s) ∈ W ∧ |
| 45 | W ∩ closure U ⊆ F '' {q : ℝ × ℝ | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ q.1 + q.2 ≤ r} := by |
| 46 | obtain ⟨face, hc, _, hone, htwo, C, basis, _, _, hs, hcarrier, hboundary⟩ := |
| 47 | m64Intrinsic_exists_coordinate_face_of_chosen_cap F hr hsource hF hFi |
| 48 | let k : Fin 3 := if terminal then 1 else 2 |
| 49 | have hedge (t : ℝ) : (face.boundary k).map t = |
| 50 | F (if terminal then (0, t * r) else (t * r, 0)) := by |
| 51 | cases terminal |
| 52 | · exact htwo t |
| 53 | · exact hone t |
| 54 | have hedgeLoop : (face.boundary k).map '' Icc (0 : ℝ) 1 ⊆ gamma '' Icc 0 T := by |
| 55 | rintro z ⟨t, ht, rfl⟩ |
| 56 | have htr : t * r ∈ Icc (0 : ℝ) r := |
| 57 | ⟨mul_nonneg ht.1 hr.le, by nlinarith [ht.2]⟩ |
| 58 | rw [hedge, haxis _ htr] |
| 59 | refine ⟨if terminal then T - t * r else t * r, ?_, rfl⟩ |
| 60 | cases terminal |
| 61 | · exact ⟨htr.1, htr.2.trans hrT.le⟩ |
| 62 | · change T - t * r ∈ Icc (0 : ℝ) T |
| 63 | exact ⟨by linarith [htr.2], by linarith [htr.1]⟩ |
| 64 | intro s hsr |
| 65 | have hp : (if terminal then T - s else s) ∈ Ioo (0 : ℝ) T := by |
| 66 | cases terminal |
| 67 | · exact ⟨hsr.1, hsr.2.trans hrT⟩ |
| 68 | · change T - s ∈ Ioo (0 : ℝ) T |
| 69 | exact ⟨by linarith [hsr.2], by linarith [hsr.1]⟩ |
| 70 | have hparam : s / r ∈ Ioo (0 : ℝ) 1 := |
| 71 | ⟨div_pos hsr.1 hr, (div_lt_one hr).mpr hsr.2⟩ |
| 72 | have hpoint : (face.boundary k).map (s / r) = gamma (if terminal then T - s else s) := by |
| 73 | rw [hedge, div_mul_cancel₀ _ hr.ne', haxis s (Ioo_subset_Icc_self hsr)] |
| 74 | obtain ⟨W, hW, hpW, hcover⟩ := m64Intrinsic_coordinate_face_covers_loop_near_edge |
| 75 | hg hend hinj hregular hp hU hV hdisj hfU hfV face C basis hs hcarrier hboundary |
| 76 | (hc ▸ hsub) k hedgeLoop hparam hpoint |
| 77 | exact ⟨W, hW, hpW, hc ▸ hcover⟩ |
| 78 | |
| 79 | end PoincareMT |