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.NormalCuts |
| 2 | import PoincareLib.Topology.Plane.Curves.Graphs.DisjointStrips |
| 3 | |
| 4 | /-! |
| 5 | # Separation of the constructed normal-cut strips |
| 6 | |
| 7 | Original-arc injectivity identifies all possible adjacent collisions with |
| 8 | the shared original parameter. The actual common normal and tangent then |
| 9 | give a positive strip width with exactly the shared endpoint cut retained. |
| 10 | |
| 11 | Morgan--Tian context: Proposition 19.35, printed pp. 467-481. These project |
| 12 | Jordan-region constructions supply the actual domains, boundary charts and finite |
| 13 | faces used in its regional Gauss--Bonnet arguments. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff |
| 21 | open Poincare.Topology.Plane.Curves |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | /-- The axis of an actual oblique strip is precisely its original closed arc, with the |
| 26 | scalar graph reparametrization eliminated from the image. Source: |
| 27 | `proof-work/tasks/M64/reports/2026-09-24-arc-band-chain.md`. -/ |
| 28 | theorem m64Intrinsic_graph_strip_axis_image |
| 29 | {gamma : ℝ → AnnulusCoordinates} |
| 30 | (L : AnnulusCoordinates ≃L[ℝ] (ℝ × ℝ)) |
| 31 | (G : OpenPartialHomeomorph ℝ ℝ) {f : ℝ → ℝ} |
| 32 | (hf : ContDiffOn ℝ ∞ f G.target) {a b : ℝ} |
| 33 | (hI : Icc a b ⊆ G.source) (hab : G a ≤ G b) |
| 34 | (hgraph : ∀ t ∈ G.source, L (gamma t) = (G t, f (G t))) |
| 35 | (himage : G '' Icc a b = Icc (G a) (G b)) |
| 36 | {ua wa ub wb : ℝ} (P : TransverseGraphCuts f (G a) (G b) ua wa ub wb) : |
| 37 | (fun t => P.linearCoordinates L.symm G.open_target hf (t, 0)) '' Icc (0 : ℝ) 1 = |
| 38 | gamma '' Icc a b := by |
| 39 | have hparam : (fun t : ℝ => G a + t * (G b - G a)) '' Icc (0 : ℝ) 1 = |
| 40 | Icc (G a) (G b) := by |
| 41 | have heq : (fun t : ℝ => G a + t * (G b - G a)) = |
| 42 | AffineMap.lineMap (G a) (G b) := by |
| 43 | funext t |
| 44 | simp only [AffineMap.lineMap_apply, vsub_eq_sub, vadd_eq_add, smul_eq_mul] |
| 45 | ring |
| 46 | rw [heq, ← segment_eq_image_lineMap, segment_eq_Icc hab] |
| 47 | calc |
| 48 | _ = (fun x => L.symm (x, f x)) '' |
| 49 | ((fun t : ℝ => G a + t * (G b - G a)) '' Icc (0 : ℝ) 1) := by |
| 50 | rw [image_image] |
| 51 | exact image_congr (fun t _ => P.linearCoordinates_axis L.symm G.open_target hf t) |
| 52 | _ = (fun t => L.symm (G t, f (G t))) '' Icc a b := by |
| 53 | rw [hparam, ← himage, image_image] |
| 54 | _ = _ := image_congr (fun t ht => by rw [← hgraph t (hI ht), L.symm_apply_apply]) |
| 55 | |
| 56 | /-- Two consecutive pieces of an actual embedded arc have a positive normal-strip width in |
| 57 | which only their common cut can meet. Source: |
| 58 | `proof-work/tasks/M64/reports/2026-09-24-arc-band-chain.md`. -/ |
| 59 | theorem m64Intrinsic_adjacent_normal_strip_width |
| 60 | {gamma : ℝ → AnnulusCoordinates} {a b c : ℝ} |
| 61 | (hab : a < b) (hbc : b < c) (hinj : InjOn gamma (Icc a c)) |
| 62 | (L R : AnnulusCoordinates ≃L[ℝ] (ℝ × ℝ)) |
| 63 | (G H : OpenPartialHomeomorph ℝ ℝ) {f g : ℝ → ℝ} |
| 64 | (hf : ContDiffOn ℝ ∞ f G.target) (hg : ContDiffOn ℝ ∞ g H.target) |
| 65 | (hI : Icc a b ⊆ G.source) (hJ : Icc b c ⊆ H.source) |
| 66 | (hG : StrictMonoOn G G.source) (hH : StrictMonoOn H H.source) |
| 67 | (hgraph : ∀ t ∈ G.source, L (gamma t) = (G t, f (G t))) |
| 68 | (hgraph' : ∀ t ∈ H.source, R (gamma t) = (H t, g (H t))) |
| 69 | (himage : G '' Icc a b = Icc (G a) (G b)) |
| 70 | (himage' : H '' Icc b c = Icc (H b) (H c)) |
| 71 | (htarget : Icc (G a) (G b) ⊆ G.target) |
| 72 | (htarget' : Icc (H b) (H c) ⊆ H.target) |
| 73 | (hsep : 0 < inner ℝ (deriv gamma b) (L.symm (1, deriv f (G b)))) |
| 74 | (hsep' : 0 < inner ℝ (deriv gamma b) (R.symm (1, deriv g (H b)))) |
| 75 | (P : TransverseGraphCuts f (G a) (G b) |
| 76 | (L (quarterTurn (deriv gamma a))).1 (L (quarterTurn (deriv gamma a))).2 |
| 77 | (L (quarterTurn (deriv gamma b))).1 (L (quarterTurn (deriv gamma b))).2) |
| 78 | (Q : TransverseGraphCuts g (H b) (H c) |
| 79 | (R (quarterTurn (deriv gamma b))).1 (R (quarterTurn (deriv gamma b))).2 |
| 80 | (R (quarterTurn (deriv gamma c))).1 (R (quarterTurn (deriv gamma c))).2) : |
| 81 | ∃ delta > 0, ∀ t ∈ Icc (0 : ℝ) 1, ∀ s ∈ Icc (0 : ℝ) 1, |
| 82 | ∀ z w : ℝ, |z| < delta → |w| < delta → |
| 83 | (t, z) ∈ (P.linearCoordinates L.symm G.open_target hf).source ∧ |
| 84 | (s, w) ∈ (Q.linearCoordinates R.symm H.open_target hg).source ∧ |
| 85 | (P.linearCoordinates L.symm G.open_target hf (t, z) = |
| 86 | Q.linearCoordinates R.symm H.open_target hg (s, w) → t = 1 ∧ s = 0) := by |
| 87 | have haG := hI (left_mem_Icc.mpr hab.le) |
| 88 | have hbG := hI (right_mem_Icc.mpr hab.le) |
| 89 | have hbH := hJ (left_mem_Icc.mpr hbc.le) |
| 90 | have hcH := hJ (right_mem_Icc.mpr hbc.le) |
| 91 | apply exists_adjacent_linear_oblique_width P Q L.symm R.symm G.open_target hf |
| 92 | H.open_target hg (hG haG hbG hab) htarget (hH hbH hcH hbc) htarget' |
| 93 | (by rw [← hgraph b hbG, ← hgraph' b hbH, L.symm_apply_apply, R.symm_apply_apply]) |
| 94 | (by simp only [Prod.eta, L.symm_apply_apply, R.symm_apply_apply]) ?_ |
| 95 | (innerSL ℝ (deriv gamma b)) ?_ hsep hsep' |
| 96 | · intro x hx y hy heq |
| 97 | obtain ⟨u, hu, rfl⟩ := (himage ▸ hx : x ∈ G '' Icc a b) |
| 98 | obtain ⟨v, hv, rfl⟩ := (himage' ▸ hy : y ∈ H '' Icc b c) |
| 99 | rw [← hgraph u (hI hu), ← hgraph' v (hJ hv), |
| 100 | L.symm_apply_apply, R.symm_apply_apply] at heq |
| 101 | have huv := hinj ⟨hu.1, hu.2.trans hbc.le⟩ ⟨hab.le.trans hv.1, hv.2⟩ heq |
| 102 | have hub : u = b := le_antisymm hu.2 (huv ▸ hv.1) |
| 103 | have hvb : v = b := huv.symm.trans hub |
| 104 | simp only [hub, hvb, and_self] |
| 105 | · simp only [Prod.eta, L.symm_apply_apply] |
| 106 | exact inner_quarterTurn_self (deriv gamma b) |
| 107 | |
| 108 | end PoincareMT |