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.Action.VariationAction |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Action.SquareDensity |
| 3 | |
| 4 | /-! |
| 5 | # Comparing a variation action with an actual square path |
| 6 | |
| 7 | Morgan-Tian equation (6.2) and Lemma 6.4, pp. 106-108. |
| 8 | Agreement of the actual closed square curves identifies their actual |
| 9 | within velocities and hence their scalar and metric action densities. |
| 10 | The square substitution then identifies the original actions. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T a b : ℝ} {x y x' y' : G.Point} |
| 25 | {p : M14BackwardPath G T a b x y} {R : M14SquareRootPath G p} |
| 26 | {q : M14BackwardPath G T a b x' y'} |
| 27 | |
| 28 | private theorem inner_heq {x y : G.Point} (h : x = y) |
| 29 | {v : G.Horizontal x} {w : G.Horizontal y} (hv : HEq v w) : |
| 30 | G.spacetime.horizontalMetric.inner x v v = G.spacetime.horizontalMetric.inner y w w := by |
| 31 | cases h |
| 32 | cases hv |
| 33 | rfl |
| 34 | |
| 35 | /-- Agreement on the closed square interval identifies a variation's |
| 36 | actual action with that of a supplied path, independently of outside |
| 37 | values and endpoint labels, equation (6.2), p. 106. -/ |
| 38 | theorem variationAction_eq_of_squareFamily (V : M14LVariationData G p R) |
| 39 | (S : M14SquareRootPath G q) {u : ℝ} (hu : u ∈ V.parameterDomain) |
| 40 | (heq : EqOn (fun r => V.squareFamily r u) S.curve (M14SqrtParameterInterval a b)) : |
| 41 | M14VariationAction V u = M14BackwardLAction G q := by |
| 42 | rw [variationAction_eq_squareIntegral V hu, ← integral_squareRootLIntegrand_eq_action S] |
| 43 | apply intervalIntegral.integral_congr_Ioo_of_le (Real.sqrt_le_sqrt p.tau_lt.le) |
| 44 | intro r hr |
| 45 | have hrC : r ∈ M14SqrtParameterInterval a b := Ioo_subset_Icc_self hr |
| 46 | have hv := projectedCurveVelocityWithin_congrOn (G := G) heq hrC |
| 47 | rw [squareRoot_projectedVelocityWithin_subset S Subset.rfl hrC |
| 48 | (uniqueDiffOn_Icc (Real.sqrt_lt_sqrt q.tau_nonneg q.tau_lt) r hrC)] at hv |
| 49 | have hi := inner_heq (heq hrC) hv |
| 50 | have hpoint : V.squareFamily r u = S.curve r := heq hrC |
| 51 | change variationActionDensity V (r, u) = squareRootLIntegrand S r |
| 52 | unfold variationActionDensity squareRootLIntegrand |
| 53 | change 2 * r ^ 2 * horizontalScalarCurvature G.leafwise (V.squareFamily r u) + |
| 54 | (1 / 2 : ℝ) * G.spacetime.horizontalMetric.inner (V.squareFamily r u) |
| 55 | (projectedCurveVelocityWithin G (fun t => V.squareFamily t u) |
| 56 | (M14SqrtParameterInterval a b) r) |
| 57 | (projectedCurveVelocityWithin G (fun t => V.squareFamily t u) |
| 58 | (M14SqrtParameterInterval a b) r) = _ |
| 59 | rw [hi, hpoint] |
| 60 | |
| 61 | end PoincareMT.M14 |