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.Action.SquareCurveAction |
| 2 | |
| 3 | /-! |
| 4 | # Prescribed endpoints for actual square-curve paths |
| 5 | |
| 6 | Morgan-Tian Definition 6.7 and Proposition 6.30, pp. 108, 118-119. |
| 7 | The square-curve constructor retains its actual curve and velocity |
| 8 | while recording the proved identities of its two endpoint values. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set |
| 14 | open scoped Manifold ContDiff intervalIntegral |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M14 |
| 19 | |
| 20 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 21 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 22 | |
| 23 | /-- The actual square-curve path with its prescribed equal endpoints, |
| 24 | retaining the same curve and velocity, Definition 6.7, p. 108. -/ |
| 25 | noncomputable def backwardPathOfSquareCurveBetween |
| 26 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) {T a b : ℝ} (ha : 0 ≤ a) (hab : a < b) |
| 27 | (α : ℝ → G.Point) |
| 28 | (hα : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ α (M14SqrtParameterInterval a b)) |
| 29 | (hclock : ∀ s ∈ M14SqrtParameterInterval a b, |
| 30 | G.spacetime.timeFunction (α s) = T - s ^ 2) |
| 31 | {x y : G.Point} (hx : α (Real.sqrt a) = x) (hy : α (Real.sqrt b) = y) : |
| 32 | M14BackwardPath G T a b x y := |
| 33 | { backwardPathOfSquareCurve hM12 ha hab α hα hclock with |
| 34 | base_time := hx ▸ (backwardPathOfSquareCurve hM12 ha hab α hα hclock).base_time |
| 35 | endpoint_time := hy ▸ (backwardPathOfSquareCurve hM12 ha hab α hα hclock).endpoint_time |
| 36 | curve_start := hx |
| 37 | curve_end := hy } |
| 38 | |
| 39 | /-- Endpoint identification does not alter the actual square action, |
| 40 | including for a path restricted from a larger closed time domain, |
| 41 | equation (6.2) and Proposition 6.30, pp. 106, 118-119. -/ |
| 42 | theorem integral_squareCurveDensity_eq_action_between |
| 43 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) {T a b : ℝ} (ha : 0 ≤ a) (hab : a < b) |
| 44 | (α : ℝ → G.Point) {C : Set ℝ} |
| 45 | (hα : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ α C) |
| 46 | (hsub : M14SqrtParameterInterval a b ⊆ C) |
| 47 | (hclock : ∀ s ∈ M14SqrtParameterInterval a b, |
| 48 | G.spacetime.timeFunction (α s) = T - s ^ 2) |
| 49 | {x y : G.Point} (hx : α (Real.sqrt a) = x) (hy : α (Real.sqrt b) = y) : |
| 50 | (∫ s in Real.sqrt a..Real.sqrt b, squareCurveDensity G α C s) = |
| 51 | M14BackwardLAction G |
| 52 | (backwardPathOfSquareCurveBetween hM12 ha hab α (hα.mono hsub) hclock hx hy) := |
| 53 | integral_squareCurveDensity_eq_action hM12 ha hab α hα hsub hclock |
| 54 | |
| 55 | end PoincareMT.M14 |