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.Ramp.LocalFlow.Fixed.LabelSpatialSmoothness |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Embedded.NormalSmoothness |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Initial.ArclengthGauge |
| 4 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.Locality |
| 5 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Compact.EmbeddedRetraction |
| 6 | import Mathlib.Geometry.Manifold.WhitneyEmbedding |
| 7 | |
| 8 | /-! |
| 9 | # One actual fixed smooth relabeling on each positive closed slab |
| 10 | |
| 11 | Compact geometry supplies the embedding and retraction, and the actual |
| 12 | anchor arclength supplies one fixed C2 inverse label. Spatial smoothing |
| 13 | and the actual normal equation give the required smooth representative. |
| 14 | MT2007 Claim 19.1, p. 437, and Lemma 19.6, pp. 441-442; |
| 15 | `2026-09-22-fixed-relabeling-compact-assembly.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff intervalIntegral |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M63 |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {a b : ℝ} |
| 30 | |
| 31 | /-- The actual intrinsic fields and one positive anchor arclength |
| 32 | give a fixed C2 relabeling with smooth spatial endpoint slices and |
| 33 | joint interior smoothness. MT2007 Claim 19.1, p. 437; compact |
| 34 | fixed-relabeling assembly derivation. -/ |
| 35 | theorem exists_fixed_smooth_relabeling [T2Space M] |
| 36 | (F : RicciFlow n M (Icc a b)) (hcompact : IsCompact (univ : Set M)) |
| 37 | {c : ℝ → ℝ → M} {J : Set ℝ} |
| 38 | (hc : M63C2ShrinkingCurveOn F c J) (hi : M63IntrinsicRegularityOn F c J) |
| 39 | {tau s : ℝ} (hat : a < tau) (hts : tau < s) (hslab : Icc tau s ⊆ J) : |
| 40 | ∃ (phi : ℝ → ℝ) (d : ℝ → ℝ → M), |
| 41 | ContDiff ℝ 2 phi ∧ Function.Bijective phi ∧ |
| 42 | (∀ x, 0 < deriv phi x) ∧ |
| 43 | (∀ x, phi (x + curvePeriod) = phi x + curvePeriod) ∧ |
| 44 | M63SmoothShrinkingCurveOn F d (Icc tau s) ∧ |
| 45 | (∀ t ∈ Icc tau s, ContMDiff 𝓘(ℝ, ℝ) (𝓡 n) ∞ (fun x => d x t)) ∧ |
| 46 | ∀ t ∈ Icc tau s, ∀ x, c x t = d (phi x) t := by |
| 47 | let : CompactSpace M := isCompact_univ_iff.mp hcompact |
| 48 | let : Nonempty M := ⟨c 0 tau⟩ |
| 49 | obtain ⟨N, e, he, hemb, hinj⟩ := exists_embedding_euclidean_of_compact (I := 𝓡 n) (M := M) |
| 50 | obtain ⟨U, ρ, hU, heU, hρ, hρe, _hmin, _huniq⟩ := |
| 51 | exists_smooth_compact_embedded_retraction e hemb he hinj |
| 52 | have htau : tau ∈ J := hslab ⟨le_rfl, hts.le⟩ |
| 53 | obtain ⟨_hell, phi, _hformula, hphi, hpsi, _hzero, hpos, hpsipos, |
| 54 | hshift, hpsishift, _hperiod, _hregular, _himm, hanchor, _hprincipal⟩ := |
| 55 | exists_c2_constant_speed_relabeling F (fun x => c x tau) tau |
| 56 | (hc.periodic tau htau) (hc.spatial_regular tau htau) (hc.immersed tau htau) |
| 57 | let d := fun x t => c (phi.symm x) t |
| 58 | change ∀ x, curveSpeed F d tau x = _ at hanchor |
| 59 | obtain ⟨_Q, _hQvalue, _hQ, hslice, hjets⟩ := |
| 60 | fixedLabel_embedded_path_smooth_of_constant_speed F hc hi hat hts hslab |
| 61 | hpsi hpsipos hpsishift hanchor he hU heU hρ hρe |
| 62 | have hd : M63C2ShrinkingCurveOn F d (Icc tau s) := |
| 63 | c2_restrict (c2ShrinkingCurve_fixedLabel_comp F hc hpsi hpsipos hpsishift) hslab |
| 64 | have hsmooth : M63SmoothShrinkingCurveOn F d (Icc tau s) := |
| 65 | c2ShrinkingCurve_smooth_of_embedded_spatial_jets F hts hd he hU heU hρ hρe |
| 66 | (fun t ht => (he.comp (hslice t (Ioo_subset_Icc_self ht))).contDiff) |
| 67 | (fun k => (hjets k).mono (prod_mono Subset.rfl Ioo_subset_Icc_self)) |
| 68 | refine ⟨phi, d, hphi, phi.bijective, hpos, hshift, hsmooth, hslice, ?_⟩ |
| 69 | intro t _ht x |
| 70 | change c x t = c (phi.symm (phi x)) t |
| 71 | rw [phi.symm_apply_apply] |
| 72 | |
| 73 | end PoincareMT.M63 |