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.Variation.Surface.ClosedGaugeVariation |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Extension.ClosedGaugeField |
| 3 | |
| 4 | /-! |
| 5 | # An actual spatial variation at a marked closed time |
| 6 | |
| 7 | Morgan-Tian Lemma 6.4 and Proposition 6.30, pp. 107-108, 118-119. |
| 8 | A relative gauge neighborhood and a smooth cutoff realize every spatial |
| 9 | test vector while fixing the curve outside a prescribed open time set. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | -- The compatible cylinder uses the selected spacetime product model. |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 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 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 26 | |
| 27 | /-- Prescribe an actual gauge shift at any closed time point and retain |
| 28 | the curve outside the chosen open time neighborhood. The resulting field |
| 29 | is the genuine spatial tangent map, Proposition 6.30, pp. 118-119. -/ |
| 30 | theorem exists_markedGauge_variation (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 31 | (R : M14SquareRootPath G p) (j : G.gaugeCover.index) |
| 32 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 33 | G.gaugeCover.spatial j) {U : Set G.Point} (hU : IsOpen U) |
| 34 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 35 | (hright : ∀ q ∈ U, (G.gaugeCover.cylinder j).toSpacetime (lift q) = q) |
| 36 | {s : ℝ} (hs : s ∈ M14SqrtParameterInterval a b) (hsU : R.curve s ∈ U) |
| 37 | {J : Set ℝ} (hJ : IsOpen J) (hsJ : s ∈ J) (w : EuclideanSpace ℝ (Fin n)) : |
| 38 | ∃ V : M14LVariationData G p R, |
| 39 | (∀ r ∈ M14SqrtParameterInterval a b, r ∉ J → ∀ v, V.squareFamily r v = R.curve r) ∧ |
| 40 | (∀ v, V.squareFamily s v = (G.gaugeCover.cylinder j).toSpacetime |
| 41 | ((lift (R.curve s)).1, |
| 42 | (G.gaugeCover.spatial j).affineShift (lift (R.curve s)).2 (v • w))) ∧ |
| 43 | (M14VariationField V s).val = ((G.gaugeCover.metric j).spatialTangentEquiv |
| 44 | (lift (R.curve s)).1 (lift (R.curve s)).2 w).val := by |
| 45 | have hpre : R.curve ⁻¹' U ∈ 𝓝[M14SqrtParameterInterval a b] s := |
| 46 | (R.smooth.continuousOn.mono R.interval_subset s hs).preimage_mem_nhdsWithin |
| 47 | (hU.mem_nhds hsU) |
| 48 | obtain ⟨K, hK, hsK, hKsub⟩ := mem_nhdsWithin.mp hpre |
| 49 | obtain ⟨ζ, hζsupport, _, hζ, _, hζone⟩ := |
| 50 | exists_contDiff_tsupport_subset (n := (⊤ : ℕ∞)) ((hK.inter hJ).mem_nhds ⟨hsK, hsJ⟩) |
| 51 | let η := fun r => ζ r • w |
| 52 | have hη : ContDiff ℝ ∞ η := hζ.smul contDiff_const |
| 53 | have hηsupport : tsupport η ⊆ K ∩ J := |
| 54 | (tsupport_smul_subset_left ζ (fun _ => w)).trans hζsupport |
| 55 | have hsrc : ∀ r ∈ M14SqrtParameterInterval a b ∩ tsupport η, R.curve r ∈ U := |
| 56 | fun _ hr => hKsub ⟨(hηsupport hr.2).1, hr.1⟩ |
| 57 | obtain ⟨V, hV⟩ := exists_supportedGauge_variation_closed R j lift η hM12 hU hlift |
| 58 | hright hη hsrc |
| 59 | refine ⟨V, ?_, ?_, ?_⟩ |
| 60 | · intro r hr hnot v |
| 61 | rw [hV r hr v] |
| 62 | exact supportedGaugeFamily_eq_of_not_tsupport R j lift η |
| 63 | (fun ht => hnot (hηsupport ht).2) |
| 64 | · intro v |
| 65 | rw [hV s hs v, supportedGaugeFamily_eq_gauge R j lift η (hright _ hsU)] |
| 66 | simp only [gaugeShiftFamily, η, hζone, one_smul] |
| 67 | · simpa only [η, hζone, one_smul] using |
| 68 | variationField_supportedGauge_val_at R j lift η V hs (hV s hs) (hright _ hsU) |
| 69 | |
| 70 | end PoincareMT.M14 |