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.Coordinates.GaugeLift |
| 2 | import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension |
| 3 | |
| 4 | /-! |
| 5 | # Supported gauge tests through original-time horizontal vectors |
| 6 | |
| 7 | Morgan-Tian Lemma 6.4 and Definition 6.7, pp. 107-108. A smooth |
| 8 | scalar bump confines a prescribed spatial gauge vector to a compact |
| 9 | interior source neighborhood of the actual backward path. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 24 | |
| 25 | /-- Every horizontal vector at an original interior time is the value |
| 26 | of a supported smooth spatial gauge test, Lemma 6.4 and Definition 6.7, |
| 27 | pp. 107-108. -/ |
| 28 | theorem exists_supportedBackwardGaugeTest_at {s : ℝ} (hs : s ∈ Ioo τ₁ τ₂) |
| 29 | (W : G.Horizontal (p.curve s)) : |
| 30 | ∃ b : G.gaugeCover.index, ∃ U : Set G.Point, |
| 31 | ∃ lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 32 | G.gaugeCover.spatial b, |
| 33 | IsOpen U ∧ p.curve s ∈ U ∧ |
| 34 | ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U ∧ |
| 35 | (∀ q ∈ U, (G.gaugeCover.cylinder b).toSpacetime (lift q) = q) ∧ |
| 36 | ∃ η : ℝ → EuclideanSpace ℝ (Fin n), ContDiff ℝ ∞ η ∧ |
| 37 | tsupport η ⊆ Ioo τ₁ τ₂ ∧ (∀ r ∈ tsupport η, p.curve r ∈ U) ∧ |
| 38 | ((G.gaugeCover.metric b).spatialTangentEquiv |
| 39 | (lift (p.curve s)).1 (lift (p.curve s)).2 (η s)).val = W.val := by |
| 40 | obtain ⟨b, U, lift, hU, hsU, hlift, hright, _⟩ := exists_smooth_gauge_lift G (p.curve s) |
| 41 | let J := Ioo τ₁ τ₂ ∩ p.curve ⁻¹' U |
| 42 | have hJ : IsOpen J := p.curve_regular.continuousOn.isOpen_inter_preimage isOpen_Ioo hU |
| 43 | obtain ⟨ζ, hζs, _, hζ, _, hζone⟩ := |
| 44 | exists_contDiff_tsupport_subset (n := (⊤ : ℕ∞)) (hJ.mem_nhds ⟨hs, hsU⟩) |
| 45 | have hW : ∃ v : G.Horizontal ((G.gaugeCover.cylinder b).toSpacetime (lift (p.curve s))), |
| 46 | v.val = W.val := by |
| 47 | rw [hright _ hsU] |
| 48 | exact ⟨W, rfl⟩ |
| 49 | obtain ⟨v, hv⟩ := hW |
| 50 | obtain ⟨w, hw⟩ := ((G.gaugeCover.metric b).spatialTangentEquiv |
| 51 | (lift (p.curve s)).1 (lift (p.curve s)).2).surjective v |
| 52 | refine ⟨b, U, lift, hU, hsU, hlift, hright, fun r => ζ r • w, |
| 53 | hζ.smul contDiff_const, ?_, ?_, ?_⟩ |
| 54 | · intro r hr |
| 55 | exact (hζs (tsupport_smul_subset_left ζ (fun _ => w) hr)).1 |
| 56 | · intro r hr |
| 57 | exact (hζs (tsupport_smul_subset_left ζ (fun _ => w) hr)).2 |
| 58 | · have hvalue : (G.gaugeCover.metric b).spatialTangentEquiv |
| 59 | (lift (p.curve s)).1 (lift (p.curve s)).2 (ζ s • w) = v := by |
| 60 | rw [hζone, one_smul, hw] |
| 61 | exact (congrArg Subtype.val hvalue).trans hv |
| 62 | |
| 63 | end PoincareMT.M14 |