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.RicciFlow.Generalized.ReducedGeometry.Calculus.Manifold.OpenSubsetShift |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Supported gauge translation of a parameterized family |
| 6 | |
| 7 | Morgan-Tian Proposition 6.30, pp. 118-119. A smooth spatial translation |
| 8 | depending on arbitrary parameters preserves the actual inverse gauge |
| 9 | time. Within smoothness suffices at both closed time endpoints. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | -- The compatible cylinder's product model is the selected spacetime model. |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u v |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {P : Type v} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 26 | (f : ℝ × P → G.Point) (j : G.gaugeCover.index) |
| 27 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 28 | G.gaugeCover.spatial j) (χ : ℝ → ℝ) (d : P → EuclideanSpace ℝ (Fin n)) |
| 29 | |
| 30 | /-- The actual inverse gauge time is retained while the spatial point |
| 31 | is translated by the supported parameter displacement, |
| 32 | Proposition 6.30, pp. 118-119. -/ |
| 33 | noncomputable def gaugeTranslateFamily (z : ℝ × P) : G.Point := |
| 34 | (G.gaugeCover.cylinder j).toSpacetime ((lift (f z)).1, |
| 35 | (G.gaugeCover.spatial j).affineShift (lift (f z)).2 (χ z.1 • d z.2)) |
| 36 | |
| 37 | /-- Patch the translated family to the original one off the closed |
| 38 | time support, Proposition 6.30, pp. 118-119. -/ |
| 39 | noncomputable def supportedGaugeTranslateFamily (z : ℝ × P) : G.Point := by |
| 40 | classical |
| 41 | exact if z.1 ∈ tsupport χ then gaugeTranslateFamily f j lift χ d z else f z |
| 42 | |
| 43 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 44 | /-- Reconstruction makes the supported and unpatched formulas equal |
| 45 | even where the cutoff vanishes, Proposition 6.30, pp. 118-119. -/ |
| 46 | theorem supportedGaugeTranslateFamily_eq_gauge {z : ℝ × P} |
| 47 | (hz : (G.gaugeCover.cylinder j).toSpacetime (lift (f z)) = f z) : |
| 48 | supportedGaugeTranslateFamily f j lift χ d z = gaugeTranslateFamily f j lift χ d z := by |
| 49 | by_cases hs : z.1 ∈ tsupport χ |
| 50 | · simp only [supportedGaugeTranslateFamily, if_pos hs] |
| 51 | · simp only [supportedGaugeTranslateFamily, if_neg hs, gaugeTranslateFamily, |
| 52 | image_eq_zero_of_notMem_tsupport hs, zero_smul, |
| 53 | TopologicalSpace.Opens.affineShift_zero, Prod.mk.eta, hz] |
| 54 | |
| 55 | /-- The supported translated family is jointly smooth on the actual |
| 56 | time and parameter rectangle wherever all shifts are admissible, |
| 57 | Proposition 6.30, pp. 118-119. -/ |
| 58 | theorem supportedGaugeTranslateFamily_contMDiffOn {C : Set ℝ} {U : Set P} {V : Set G.Point} |
| 59 | (hf : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, P))) (spacetimeModel n) ∞ f (C ×ˢ U)) |
| 60 | (hV : IsOpen V) (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift V) |
| 61 | (hright : ∀ q ∈ V, (G.gaugeCover.cylinder j).toSpacetime (lift q) = q) |
| 62 | (hχ : ContDiff ℝ ∞ χ) (hd : ContDiffOn ℝ ∞ d U) |
| 63 | (hsrc : ∀ z ∈ C ×ˢ U, z.1 ∈ tsupport χ → f z ∈ V) |
| 64 | (hshift : ∀ z ∈ C ×ˢ U, z.1 ∈ tsupport χ → |
| 65 | (lift (f z)).2.val + χ z.1 • d z.2 ∈ G.gaugeCover.spatial j) : |
| 66 | ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, P))) (spacetimeModel n) ∞ |
| 67 | (supportedGaugeTranslateFamily f j lift χ d) (C ×ˢ U) := by |
| 68 | intro z hz |
| 69 | by_cases hs : z.1 ∈ tsupport χ |
| 70 | · have hzV := hsrc z hz hs |
| 71 | have hL := ((hlift _ hzV).contMDiffAt (hV.mem_nhds hzV)).comp_contMDiffWithinAt z (hf z hz) |
| 72 | have hd' : ContMDiffWithinAt ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, P))) |
| 73 | (𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (fun w : ℝ × P => χ w.1 • d w.2) (C ×ˢ U) z := |
| 74 | (hχ.contMDiff.contMDiffAt.comp_contMDiffWithinAt z contMDiffWithinAt_fst).smul |
| 75 | ((hd.contMDiffOn z.2 hz.2).comp z contMDiffWithinAt_snd (fun _ hw => hw.2)) |
| 76 | have hS := (((G.gaugeCover.spatial j).affineShift_contMDiffOn _ (hshift z hz hs)).contMDiffAt |
| 77 | ((G.gaugeCover.spatial j).affineShift_domain_isOpen.mem_nhds |
| 78 | (hshift z hz hs))).comp_contMDiffWithinAt z (hL.snd.prodMk hd') |
| 79 | have hG := (G.gaugeCover.cylinder j).smooth.contMDiffAt.comp_contMDiffWithinAt z |
| 80 | (hL.fst.prodMk hS) |
| 81 | have heq : supportedGaugeTranslateFamily f j lift χ d |
| 82 | =ᶠ[𝓝[C ×ˢ U] z] gaugeTranslateFamily f j lift χ d := by |
| 83 | filter_upwards [(hf z hz).continuousWithinAt.preimage_mem_nhdsWithin |
| 84 | (hV.mem_nhds hzV)] with w hw |
| 85 | exact supportedGaugeTranslateFamily_eq_gauge f j lift χ d (hright _ hw) |
| 86 | exact hG.congr_of_eventuallyEq heq |
| 87 | (supportedGaugeTranslateFamily_eq_gauge f j lift χ d (hright _ hzV)) |
| 88 | · have heq : supportedGaugeTranslateFamily f j lift χ d =ᶠ[𝓝 z] f := by |
| 89 | filter_upwards [((isClosed_tsupport χ).isOpen_compl.preimage continuous_fst).mem_nhds hs] |
| 90 | with w hw |
| 91 | simp only [supportedGaugeTranslateFamily, if_neg hw] |
| 92 | exact (hf z hz).congr_of_eventuallyEq (heq.filter_mono nhdsWithin_le_nhds) heq.eq_of_nhds |
| 93 | |
| 94 | end PoincareMT.M14 |