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.Paths.SquareRoot.Families.SquareFamilyAction |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Action.SquareCurveAction |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Action.VariationActionComparison |
| 4 | |
| 5 | /-! |
| 6 | # Variation actions equal actual family square integrals |
| 7 | |
| 8 | Morgan-Tian equation (6.2) and Lemma 6.22, pp. 106, 115-116. |
| 9 | The equality concerns an actual valid parameter and the retained |
| 10 | closed square interval. A constructed square path identifies both |
| 11 | integrals without conditions on the totalized outside values. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff |
| 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 | {P : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 26 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 27 | {R : M14SquareRootPath G p} |
| 28 | |
| 29 | /-- A genuine variation slice equal to a valid family slice has the |
| 30 | same actual action, even when its square velocity was computed on a |
| 31 | larger retained time set, equation (6.2), p. 106. -/ |
| 32 | theorem variationAction_eq_squareFamilyAction (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 33 | (V : M14LVariationData G p R) (γ : ℝ × P → G.Point) {C : Set ℝ} {U : Set P} |
| 34 | (hγ : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, P))) (spacetimeModel n) ∞ γ (C ×ˢ U)) |
| 35 | (hsub : M14SqrtParameterInterval a b ⊆ C) |
| 36 | (hclock : ∀ s ∈ C, ∀ z ∈ U, G.spacetime.timeFunction (γ (s, z)) = T - s ^ 2) |
| 37 | {u : ℝ} (hu : u ∈ V.parameterDomain) {z : P} (hz : z ∈ U) |
| 38 | (hV : ∀ s ∈ M14SqrtParameterInterval a b, V.squareFamily s u = γ (s, z)) : |
| 39 | M14VariationAction V u = squareFamilyAction G γ C (Real.sqrt a) (Real.sqrt b) z := by |
| 40 | let α := fun s => γ (s, z) |
| 41 | have hα : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ α C := |
| 42 | hγ.comp (contMDiff_id.prodMk contMDiff_const).contMDiffOn (fun _ hs => ⟨hs, hz⟩) |
| 43 | have htime (s : ℝ) (hs : s ∈ M14SqrtParameterInterval a b) : |
| 44 | G.spacetime.timeFunction (α s) = T - s ^ 2 := hclock s (hsub hs) z hz |
| 45 | let S := squareRootPathOfSquareCurve hM12 p.tau_nonneg p.tau_lt α (hα.mono hsub) htime |
| 46 | have haction := variationAction_eq_of_squareFamily V S hu (fun s hs => |
| 47 | (hV s hs).trans (squareRootPathOfSquareCurve_curve hM12 p.tau_nonneg p.tau_lt |
| 48 | α (hα.mono hsub) htime hs).symm) |
| 49 | exact haction.trans |
| 50 | (integral_squareCurveDensity_eq_action hM12 p.tau_nonneg p.tau_lt α hα hsub htime).symm |
| 51 | |
| 52 | end PoincareMT.M14 |