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.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AreaComparison.Polar.AnnulusMap |
| 3 | import PoincareLib.Geometry.Riemannian.LoopSpace.Area.Polar.Derivatives |
| 4 | import Mathlib.Analysis.Calculus.FDeriv.WithLp |
| 5 | |
| 6 | /-! |
| 7 | # Smooth coordinates from the rectangle to the polar collar |
| 8 | |
| 9 | The forward map has explicit angular and radial differential columns. Its |
| 10 | composition with the polar collar recovers the original periodic rectangle |
| 11 | map wherever the radius is positive, independent of the angular branch cut. |
| 12 | |
| 13 | Morgan--Tian context: Section 19.6, Lemmas 19.30-19.31, printed pp. 461-466. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff Manifold |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | open Proofs.M58 |
| 25 | |
| 26 | /-- Map the rectangle to the half-disk collar by its literal angle and affine positive |
| 27 | radius. Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar in |
| 28 | `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 29 | noncomputable def m64PolarForwardMap (p : LoopPlane) : LoopPlane := |
| 30 | ((1 / 2 : ℝ) * (p 1 + 1)) • angularPoint (p 0) |
| 31 | |
| 32 | /-- Compute the forward polar map's actual angular and radial differential columns. Source: |
| 33 | Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar in |
| 34 | `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 35 | theorem m64PolarForwardMap_hasFDerivAt (p : LoopPlane) : |
| 36 | HasFDerivAt (𝕜 := ℝ) m64PolarForwardMap |
| 37 | ((PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 0).smulRight |
| 38 | (((1 / 2 : ℝ) * (p 1 + 1)) • angularVector (p 0)) + |
| 39 | (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 1).smulRight |
| 40 | ((1 / 2 : ℝ) • angularPoint (p 0))) p := by |
| 41 | have h0 := PiLp.hasFDerivAt_apply (𝕜 := ℝ) 2 p (0 : Fin 2) |
| 42 | have h1 := PiLp.hasFDerivAt_apply (𝕜 := ℝ) 2 p (1 : Fin 2) |
| 43 | have hs := (h1.add_const 1).const_mul (1 / 2 : ℝ) |
| 44 | have ha := (hasDerivAt_angularPoint (p 0)).hasFDerivAt.comp p h0 |
| 45 | convert! hs.smul ha using 1 |
| 46 | ext w i |
| 47 | change w 0 * (((1 / 2 : ℝ) * (p 1 + 1)) * angularVector (p 0) i) + |
| 48 | w 1 * ((1 / 2 : ℝ) * angularPoint (p 0) i) = |
| 49 | ((1 / 2 : ℝ) * (p 1 + 1)) * (w 0 * angularVector (p 0) i) + |
| 50 | ((1 / 2 : ℝ) * w 1) * angularPoint (p 0) i |
| 51 | ring |
| 52 | |
| 53 | /-- The descended collar composed with positive-radius forward coordinates equals the |
| 54 | original periodic map. Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual |
| 55 | half-disk collar in `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 56 | theorem m64PolarAnnulusMap_comp_forward |
| 57 | {Y : Type*} {f : LoopPlane → Y} |
| 58 | (hperiodic : ∀ x s : ℝ, |
| 59 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) |
| 60 | {p : LoopPlane} (hp : -1 < p 1) : |
| 61 | m64PolarAnnulusMap f (m64PolarForwardMap p) = f p := by |
| 62 | have hr : 0 < (1 / 2 : ℝ) * (p 1 + 1) := by linarith |
| 63 | have h := m64PolarAnnulusMap_polar hperiodic hr (p 0) |
| 64 | have harg : 2 * ((1 / 2 : ℝ) * (p 1 + 1)) - 1 = p 1 := by ring |
| 65 | rw [harg] at h |
| 66 | have hpoint : annulusPoint (p 0) (p 1) = p := by ext i; fin_cases i <;> rfl |
| 67 | simpa only [m64PolarForwardMap, hpoint] using h |
| 68 | |
| 69 | /-- The collar-to-rectangle identity holds on a full neighborhood wherever the radius is |
| 70 | positive. Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar in |
| 71 | `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 72 | theorem m64PolarAnnulusMap_comp_forward_eventually |
| 73 | {Y : Type*} {f : LoopPlane → Y} |
| 74 | (hperiodic : ∀ x s : ℝ, |
| 75 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) |
| 76 | {p : LoopPlane} (hp : -1 < p 1) : |
| 77 | (m64PolarAnnulusMap f ∘ m64PolarForwardMap) =ᶠ[𝓝 p] f := by |
| 78 | have hopen : IsOpen {q : LoopPlane | -1 < q 1} := |
| 79 | isOpen_lt continuous_const (PiLp.continuous_apply 2 (fun _ : Fin 2 => ℝ) 1) |
| 80 | filter_upwards [hopen.mem_nhds hp] with q hq |
| 81 | exact m64PolarAnnulusMap_comp_forward hperiodic hq |
| 82 | |
| 83 | end PoincareMT |