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.PositiveStartDifferential |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.GradientNorm |
| 3 | |
| 4 | /-! |
| 5 | # The actual positive-start gradient norm |
| 6 | |
| 7 | Transport of the genuine endpoint momentum and Parseval compute the |
| 8 | frozen gradient sum in any supplied orthonormal horizontal basis. |
| 9 | Morgan-Tian Corollary 6.29 and Lemma 6.49, pp. 118, 131. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 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 a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 24 | |
| 25 | private theorem differential_transport {q r : G.Point} (h : q = r) |
| 26 | (f : G.Point → ℝ) (A : G.Horizontal q) (c : ℝ) |
| 27 | (hd : ∀ V : G.Horizontal q, mvfderiv (spacetimeModel n) f q V.val = |
| 28 | G.spacetime.horizontalMetric.inner q A V / c) : |
| 29 | ∀ V : G.Horizontal r, mvfderiv (spacetimeModel n) f r V.val = |
| 30 | G.spacetime.horizontalMetric.inner r (h ▸ A) V / c := by |
| 31 | cases h |
| 32 | exact hd |
| 33 | |
| 34 | private theorem inner_transport {q r : G.Point} (h : q = r) (A : G.Horizontal q) : |
| 35 | G.spacetime.horizontalMetric.inner r (h ▸ A) (h ▸ A) = |
| 36 | G.spacetime.horizontalMetric.inner q A A := by |
| 37 | cases h |
| 38 | rfl |
| 39 | |
| 40 | /-- The frozen gradient sum at an actual smooth minimizing endpoint |
| 41 | is its terminal square kinetic energy divided by four times absolute |
| 42 | backward time, Lemma 6.49, p. 131. -/ |
| 43 | theorem positiveStart_gradient_norm_square |
| 44 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 45 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (hp : M14IsMinimizing p) |
| 46 | (R : M14SquareRootPath G p) |
| 47 | (U : Set G.Point) (hU : IsOpen U) (hy : y ∈ U) |
| 48 | (hf : ContMDiffOn (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 49 | (M14ReducedLengthAt G T a x) U) |
| 50 | (B : Module.Basis (Fin n) ℝ (G.Horizontal y)) |
| 51 | (hB : ∀ i j, G.spacetime.horizontalMetric.inner y (B i) (B j) = |
| 52 | if i = j then 1 else 0) : |
| 53 | M14ReducedLengthGradientNormSq (T := T) (τ₁ := a) G x y B = |
| 54 | G.spacetime.horizontalMetric.inner (R.curve (Real.sqrt b)) |
| 55 | (R.horizontal_velocity (Real.sqrt b)) (R.horizontal_velocity (Real.sqrt b)) / |
| 56 | (4 * (Real.sqrt b) ^ 2) := by |
| 57 | have hpoint : R.curve (Real.sqrt b) = y := by |
| 58 | rw [R.agrees _ ⟨Real.sqrt_le_sqrt p.tau_lt.le, le_rfl⟩, |
| 59 | Real.sq_sqrt (p.tau_nonneg.trans p.tau_lt.le), p.curve_end] |
| 60 | have hd := differential_transport hpoint (M14ReducedLengthAt G T a x) |
| 61 | (R.horizontal_velocity (Real.sqrt b)) (2 * Real.sqrt b) |
| 62 | (positiveStart_horizontal_differential hCoordinates hM12 hp U hU hy hf) |
| 63 | rw [reducedLengthGradientNormSq_eq_of_differential x y B hB |
| 64 | (hpoint ▸ R.horizontal_velocity (Real.sqrt b)) (2 * Real.sqrt b) hd, |
| 65 | inner_transport hpoint] |
| 66 | congr 1 |
| 67 | ring |
| 68 | |
| 69 | end PoincareMT.M14 |