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.Pullback.PullbackReparametrization |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Euler.EulerResidual |
| 3 | |
| 4 | /-! |
| 5 | # Square-time transport of the actual Euler expression |
| 6 | |
| 7 | Morgan-Tian equation (6.2), Definition 6.7 and Lemma 6.8, |
| 8 | pp. 106, 108-109. Reparameterizing an actual horizontal extension |
| 9 | gives the regularized equation on the strict square interval for |
| 10 | every Euler path, without minimality or endpoint smoothness. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 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 τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 25 | |
| 26 | /-- The actual velocity extension transported by `t = s²`, retaining |
| 27 | the original common spatial domain, Lemma 6.8, pp. 108-109. -/ |
| 28 | noncomputable def squarePullbackExtension |
| 29 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) : |
| 30 | M14PullbackExtension G (fun s => p.curve (s ^ 2)) |
| 31 | (Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 32 | (fun s => (2 * s) • p.horizontal_velocity (s ^ 2)) := |
| 33 | pullbackExtensionSmulComp E (fun s => s ^ 2) (fun s => 2 * s) |
| 34 | (contDiff_id.pow 2) (contDiff_const.mul contDiff_id) |
| 35 | (fun _ hs => ⟨Real.lt_sq_of_sqrt_lt hs.1, |
| 36 | (Real.lt_sqrt ((Real.sqrt_nonneg τ₁).trans_lt hs.1).le).mp hs.2⟩) |
| 37 | |
| 38 | /-- The actual square-time covariant derivative is `2 X + 4s² D X`, |
| 39 | the transport calculation of Lemma 6.8, pp. 108-109. -/ |
| 40 | theorem horizontalCovariantDerivative_square |
| 41 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 42 | {s : ℝ} (hs : s ∈ Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) : |
| 43 | M14HorizontalCovariantDerivative G (fun r => p.curve (r ^ 2)) |
| 44 | (Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 45 | (fun r => (2 * r) • p.horizontal_velocity (r ^ 2)) (squarePullbackExtension p E) s = |
| 46 | (2 : ℝ) • p.horizontal_velocity (s ^ 2) + (4 * s ^ 2) • |
| 47 | M14HorizontalCovariantDerivative G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity E |
| 48 | (s ^ 2) := by |
| 49 | have hmap : MapsTo (fun r : ℝ => r ^ 2) (Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 50 | (Ioo τ₁ τ₂) := fun r hr => ⟨Real.lt_sq_of_sqrt_lt hr.1, |
| 51 | (Real.lt_sqrt ((Real.sqrt_nonneg τ₁).trans_lt hr.1).le).mp hr.2⟩ |
| 52 | have hγ := ((p.curve_regular _ (hmap hs)).contMDiffAt |
| 53 | (isOpen_Ioo.mem_nhds (hmap hs))).mdifferentiableAt (by simp) |
| 54 | have hsq : HasDerivAt (fun r : ℝ => r ^ 2) (2 * s) s := by |
| 55 | simpa using hasDerivAt_pow 2 s |
| 56 | have hscale : HasDerivAt (fun r : ℝ => 2 * r) 2 s := by |
| 57 | simpa using (hasDerivAt_id s).const_mul 2 |
| 58 | have h := horizontalCovariantDerivative_smul_comp E (fun r => r ^ 2) (fun r => 2 * r) |
| 59 | (contDiff_id.pow 2) (contDiff_const.mul contDiff_id) hmap hs |
| 60 | (isOpen_Ioo.mem_nhds hs) (isOpen_Ioo.mem_nhds (hmap hs)) hγ |
| 61 | simpa only [squarePullbackExtension, Function.comp_def, hsq.deriv, hscale.deriv, |
| 62 | show 2 * s * (2 * s) = 4 * s ^ 2 by ring] using h |
| 63 | |
| 64 | /-- M12's actual Ricci tensor scales in its velocity slot, as required |
| 65 | in the square-time Euler calculation, Lemma 6.8, pp. 108-109. -/ |
| 66 | theorem horizontalRicci_smul_left (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 67 | (q : G.Point) (v w : G.Horizontal q) (c : ℝ) : |
| 68 | horizontalRicci G.leafwise q (c • v) w = c * horizontalRicci G.leafwise q v w := by |
| 69 | have H := (hM12.leafwise_calculus X time I G.spacetime G.slices |
| 70 | G.timeIntervals G.gaugeCover).2 G.leafwise |
| 71 | rw [H.ricci_symmetric q (c • v) w, horizontalRicci_smul_right hM12, |
| 72 | H.ricci_symmetric q w v] |
| 73 | |
| 74 | /-- The actual regularized expression is `4s²` times the original |
| 75 | paired Euler residual on the strict positive interval, Lemma 6.8, |
| 76 | pp. 108-109. No endpoint value of the original velocity is used. -/ |
| 77 | theorem squarePullback_eulerResidual (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 78 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 79 | {s : ℝ} (hs : s ∈ Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 80 | (W : G.Horizontal (p.curve (s ^ 2))) : |
| 81 | G.spacetime.horizontalMetric.inner (p.curve (s ^ 2)) |
| 82 | (M14HorizontalCovariantDerivative G (fun r => p.curve (r ^ 2)) |
| 83 | (Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 84 | (fun r => (2 * r) • p.horizontal_velocity (r ^ 2)) (squarePullbackExtension p E) s) W - |
| 85 | 2 * s ^ 2 * M14HorizontalScalarDifferential G (p.curve (s ^ 2)) W.val + |
| 86 | 4 * s * horizontalRicci G.leafwise (p.curve (s ^ 2)) |
| 87 | ((2 * s) • p.horizontal_velocity (s ^ 2)) W = |
| 88 | (4 * s ^ 2) * M14EulerResidual G p E (s ^ 2) W := by |
| 89 | have hs0 : s ≠ 0 := ((Real.sqrt_nonneg τ₁).trans_lt hs.1).ne' |
| 90 | rw [horizontalCovariantDerivative_square p E hs, horizontalRicci_smul_left hM12] |
| 91 | simp only [M14EulerResidual, map_add, map_smul, add_apply, smul_apply, smul_eq_mul] |
| 92 | field_simp [hs0] |
| 93 | ring |
| 94 | |
| 95 | end PoincareMT.M14 |