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.Regularity.PositiveStart.PositiveStartTimeDerivative |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.PositiveStart.PositiveStartGradient |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.PositiveStart.PositiveStartBoundary |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.PositiveStart.PositiveStartAlgebra |
| 5 | |
| 6 | /-! |
| 7 | # The exact positive-start time and gradient identities |
| 8 | |
| 9 | The actual first derivatives and the initial Harnack boundary are |
| 10 | combined for one supplied minimizing path and one actual square path. |
| 11 | Morgan-Tian Lemmas 6.48-6.49 and the positive-start variant, pp. 130-131. |
| 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 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 26 | |
| 27 | /-- The frozen positive-start time and gradient identities hold for |
| 28 | every actual minimizing path with the supplied initial derivative and |
| 29 | smooth raw reduced length, Lemma 6.49 and its positive-start variant, |
| 30 | p. 131. -/ |
| 31 | theorem positiveStart_time_gradient_identities |
| 32 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 33 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (ha : 0 < a) (hp : M14IsMinimizing p) |
| 34 | (R : M14SquareRootPath G p) |
| 35 | (U : Set G.Point) (hU : IsOpen U) (hy : y ∈ U) |
| 36 | (hf : ContMDiffOn (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 37 | (M14ReducedLengthAt G T a x) U) |
| 38 | (hstart : MDifferentiableWithinAt (𝓘(ℝ, ℝ)) (spacetimeModel n) |
| 39 | p.curve (Icc a b) a) |
| 40 | (hderiv : mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) p.curve (Icc a b) a 1 = |
| 41 | -G.spacetime.timeVector (p.curve a) + (p.horizontal_velocity a).val) |
| 42 | (B : Module.Basis (Fin n) ℝ (G.Horizontal y)) |
| 43 | (hB : ∀ i j, G.spacetime.horizontalMetric.inner y (B i) (B j) = |
| 44 | if i = j then 1 else 0) : |
| 45 | let K := M14GeneralizedKIntegral G p |
| 46 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) (p.curve t)) |
| 47 | let C := Real.rpow (a / b) (3 / 2 : ℝ) * |
| 48 | (horizontalScalarCurvature G.leafwise (p.curve a) + |
| 49 | G.spacetime.horizontalMetric.inner (p.curve a) |
| 50 | (p.horizontal_velocity a) (p.horizontal_velocity a)) |
| 51 | M14BackwardTimeDerivative G (M14ReducedLengthAt G T a x) y = |
| 52 | horizontalScalarCurvature G.leafwise y - M14ReducedLengthValue G T a b x y / b + |
| 53 | K / (2 * b * Real.sqrt b) - C / 2 ∧ |
| 54 | M14ReducedLengthGradientNormSq (T := T) (τ₁ := a) G x y B = |
| 55 | M14ReducedLengthValue G T a b x y / b - K / (b * Real.sqrt b) - |
| 56 | horizontalScalarCurvature G.leafwise y + C := by |
| 57 | have hb := ha.trans p.tau_lt |
| 58 | have hpoint : R.curve (Real.sqrt b) = y := by |
| 59 | rw [R.agrees _ ⟨Real.sqrt_le_sqrt p.tau_lt.le, le_rfl⟩, |
| 60 | Real.sq_sqrt hb.le, p.curve_end] |
| 61 | have hS := congrArg (horizontalScalarCurvature G.leafwise) hpoint |
| 62 | have ht := positiveStart_time_derivative_square hCoordinates hM12 hp R U hU hy hf |
| 63 | rw [congrArg (M14BackwardTimeDerivative G (M14ReducedLengthAt G T a x)) hpoint, hS] at ht |
| 64 | have hK := positiveStart_harnackIntegral_eq hCoordinates hM12 hp R hstart hderiv |
| 65 | rw [hS] at hK |
| 66 | have hg := positiveStart_gradient_norm_square hCoordinates hM12 hp R U hU hy hf B hB |
| 67 | have h := positiveStart_correction_algebra ha hb (M14BackwardLAction G p) |
| 68 | (G.spacetime.horizontalMetric.inner (R.curve (Real.sqrt b)) |
| 69 | (R.horizontal_velocity (Real.sqrt b)) (R.horizontal_velocity (Real.sqrt b))) |
| 70 | (horizontalScalarCurvature G.leafwise y) |
| 71 | (horizontalScalarCurvature G.leafwise (p.curve a) + |
| 72 | G.spacetime.horizontalMetric.inner (p.curve a) |
| 73 | (p.horizontal_velocity a) (p.horizontal_velocity a)) |
| 74 | _ _ _ hK ht hg |
| 75 | rw [← reducedLengthValue_eq_of_minimizing p hp] at h |
| 76 | exact h |
| 77 | |
| 78 | end PoincareMT.M14 |