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.SourceNames.ParabolicRescaling |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Rescaling.Geometry.RescalingPullback |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Rescaling.Paths.RescalingPaths |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Action.SquarePullback |
| 5 | |
| 6 | /-! |
| 7 | # Actual Euler equations under parabolic rescaling |
| 8 | |
| 9 | Morgan-Tian Lemma 6.72 and Remark 6.73, p. 141. The actual original-time |
| 10 | pullback extension is reparameterized and scaled with the path velocity. |
| 11 | Every paired Euler term then has the same inverse metric scale. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- The actual target retains the ambient manifold and transported horizontal fibers. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 26 | {time : X → ℝ} {I : SpacetimeInterval} |
| 27 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 28 | (hM13 : GeneralizedParabolicRescalingTheory.{u} n) |
| 29 | (G : GeneralizedLGeometryTransport n X time I) (Q : ℝ) (hQ : 0 < Q) (a : ℝ) |
| 30 | |
| 31 | include hQ in |
| 32 | /-- The genuine strict backward interval maps to the old one under |
| 33 | division by the scale. Lemma 6.72, p. 141. -/ |
| 34 | theorem rescalingParameter_mapsTo (τ₁ τ₂ : ℝ) : |
| 35 | MapsTo (fun s : ℝ => s / Q) (Ioo (Q * τ₁) (Q * τ₂)) (Ioo τ₁ τ₂) := by |
| 36 | intro s hs |
| 37 | exact ⟨(lt_div_iff₀ hQ).mpr (by simpa only [mul_comm] using hs.1), |
| 38 | (div_lt_iff₀ hQ).mpr (by simpa only [mul_comm] using hs.2)⟩ |
| 39 | |
| 40 | /-- The actual original-time velocity extension is transported and |
| 41 | reparameterized with its inverse scale. Lemma 6.72, p. 141. -/ |
| 42 | noncomputable def rescalingPathExtension |
| 43 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 44 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) : |
| 45 | M14PullbackExtension (rescalingTransport hM12 hM13 G Q hQ a) |
| 46 | (rescalingPath hM12 hM13 G Q hQ a p).curve (Ioo (Q * τ₁) (Q * τ₂)) |
| 47 | (rescalingPath hM12 hM13 G Q hQ a p).horizontal_velocity := |
| 48 | pullbackExtensionSmulComp (rescalingPullbackExtension hM12 hM13 G Q hQ a E) |
| 49 | (fun s => s / Q) (fun _ => Q⁻¹) (contDiff_id.div_const Q) contDiff_const |
| 50 | (rescalingParameter_mapsTo Q hQ τ₁ τ₂) |
| 51 | |
| 52 | /-- Covariant acceleration has inverse-square scale along the actual |
| 53 | rescaled original-time path. Lemma 6.72, p. 141. -/ |
| 54 | theorem rescalingPath_covariantDerivative |
| 55 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 56 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 57 | {s : ℝ} (hs : s ∈ Ioo (Q * τ₁) (Q * τ₂)) : |
| 58 | M14HorizontalCovariantDerivative (rescalingTransport hM12 hM13 G Q hQ a) |
| 59 | (rescalingPath hM12 hM13 G Q hQ a p).curve (Ioo (Q * τ₁) (Q * τ₂)) |
| 60 | (rescalingPath hM12 hM13 G Q hQ a p).horizontal_velocity |
| 61 | (rescalingPathExtension hM12 hM13 G Q hQ a p E) s = |
| 62 | (Q⁻¹ * Q⁻¹) • M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (s / Q)) |
| 63 | (M14HorizontalCovariantDerivative G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity |
| 64 | E (s / Q)) := by |
| 65 | have hm := rescalingParameter_mapsTo Q hQ τ₁ τ₂ |
| 66 | have hderiv : deriv (fun r : ℝ => r / Q) s = Q⁻¹ := by |
| 67 | simpa only [id_eq, one_div] using ((hasDerivAt_id s).div_const Q).deriv |
| 68 | have hγ := (p.curve_regular.contMDiffAt (isOpen_Ioo.mem_nhds (hm hs))).mdifferentiableAt |
| 69 | (by simp) |
| 70 | have h := horizontalCovariantDerivative_smul_comp |
| 71 | (rescalingPullbackExtension hM12 hM13 G Q hQ a E) |
| 72 | (fun r => r / Q) (fun _ => Q⁻¹) (contDiff_id.div_const Q) contDiff_const hm |
| 73 | hs (isOpen_Ioo.mem_nhds hs) (isOpen_Ioo.mem_nhds (hm hs)) hγ |
| 74 | simp only [deriv_const, zero_smul, zero_add, hderiv, |
| 75 | rescalingPullbackDerivative hM12 hM13 G Q hQ a E (hm hs)] at h |
| 76 | exact h |
| 77 | |
| 78 | /-- Each paired original-time Euler term has the same inverse scale. |
| 79 | Lemma 6.72 and Remark 6.73, p. 141. -/ |
| 80 | theorem rescalingEulerResidual |
| 81 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 82 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 83 | {s : ℝ} (hs : s ∈ Ioo (Q * τ₁) (Q * τ₂)) |
| 84 | (W : G.Horizontal (p.curve (s / Q))) : |
| 85 | M14EulerResidual (rescalingTransport hM12 hM13 G Q hQ a) |
| 86 | (rescalingPath hM12 hM13 G Q hQ a p) |
| 87 | (rescalingPathExtension hM12 hM13 G Q hQ a p E) s |
| 88 | (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (s / Q)) W) = |
| 89 | Q⁻¹ * M14EulerResidual G p E (s / Q) W := by |
| 90 | unfold M14EulerResidual |
| 91 | rw [rescalingPath_covariantDerivative hM12 hM13 G Q hQ a p E hs] |
| 92 | change (M13.parabolicSpacetime G.spacetime Q hQ a).horizontalMetric.inner |
| 93 | (p.curve (s / Q)) |
| 94 | ((Q⁻¹ * Q⁻¹) • M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a |
| 95 | (p.curve (s / Q)) |
| 96 | (M14HorizontalCovariantDerivative G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity E (s / Q))) |
| 97 | (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (s / Q)) W) - |
| 98 | (1 / 2 : ℝ) * M14HorizontalScalarDifferential (rescalingTransport hM12 hM13 G Q hQ a) |
| 99 | (p.curve (s / Q)) W.val + |
| 100 | (1 / (2 * s) : ℝ) * (M13.parabolicSpacetime G.spacetime Q hQ a).horizontalMetric.inner |
| 101 | (p.curve (s / Q)) |
| 102 | (Q⁻¹ • M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a |
| 103 | (p.curve (s / Q)) (p.horizontal_velocity (s / Q))) |
| 104 | (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (s / Q)) W) + |
| 105 | 2 * horizontalRicci (rescalingLeafwise G Q hQ a) (p.curve (s / Q)) |
| 106 | (Q⁻¹ • M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a |
| 107 | (p.curve (s / Q)) (p.horizontal_velocity (s / Q))) |
| 108 | (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (s / Q)) W) = _ |
| 109 | erw [horizontalRicci_smul_left (G := rescalingTransport hM12 hM13 G Q hQ a) hM12] |
| 110 | erw [rescalingHorizontalRicci G.spacetime G.slices Q hQ a G.leafwise |
| 111 | (rescalingLeafwise G Q hQ a) hM13] |
| 112 | simp only [map_smul, smul_apply, smul_eq_mul, M13.parabolicSpacetime_metric, |
| 113 | rescalingScalarDifferential hM12 hM13 G Q hQ a] |
| 114 | field_simp [hQ.ne'] |
| 115 | |
| 116 | /-- Every actual original-time Euler path transports to an Euler path. |
| 117 | Lemma 6.72 and Remark 6.73, p. 141. -/ |
| 118 | theorem rescalingEulerEquation |
| 119 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 120 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 121 | (he : M14EulerEquation G p E) : |
| 122 | M14EulerEquation (rescalingTransport hM12 hM13 G Q hQ a) |
| 123 | (rescalingPath hM12 hM13 G Q hQ a p) |
| 124 | (rescalingPathExtension hM12 hM13 G Q hQ a p E) := by |
| 125 | intro s hs W |
| 126 | obtain ⟨W, rfl⟩ := (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a |
| 127 | (p.curve (s / Q))).surjective W |
| 128 | rw [rescalingEulerResidual hM12 hM13 G Q hQ a p E hs W, |
| 129 | he _ (rescalingParameter_mapsTo Q hQ τ₁ τ₂ hs) W, mul_zero] |
| 130 | |
| 131 | /-- Actual original-time Euler residuals do not depend on the |
| 132 | extension witness along a regular backward path. Lemma 6.8, pp. 108-109, |
| 133 | as used in Lemma 6.72, p. 141. -/ |
| 134 | theorem rescalingEuler_extension_independent |
| 135 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 136 | (E F : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 137 | {s : ℝ} (hs : s ∈ Ioo τ₁ τ₂) (W : G.Horizontal (p.curve s)) : |
| 138 | M14EulerResidual G p E s W = M14EulerResidual G p F s W := by |
| 139 | have hd := horizontalCovariantDerivative_extension_independent E F hs |
| 140 | (isOpen_Ioo.uniqueDiffOn s hs) ((p.curve_regular s hs).mdifferentiableWithinAt (by simp)) |
| 141 | simp only [M14EulerResidual, hd] |
| 142 | |
| 143 | /-- The Euler equation of a linked target path implies the source |
| 144 | equation for any actual extension witness. Lemma 6.72, p. 141. -/ |
| 145 | theorem eulerEquation_of_rescaling |
| 146 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 147 | (E : M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) |
| 148 | (F : M14PullbackExtension (rescalingTransport hM12 hM13 G Q hQ a) |
| 149 | (rescalingPath hM12 hM13 G Q hQ a p).curve (Ioo (Q * τ₁) (Q * τ₂)) |
| 150 | (rescalingPath hM12 hM13 G Q hQ a p).horizontal_velocity) |
| 151 | (he : M14EulerEquation (rescalingTransport hM12 hM13 G Q hQ a) |
| 152 | (rescalingPath hM12 hM13 G Q hQ a p) F) : M14EulerEquation G p E := by |
| 153 | intro s hs W |
| 154 | have hs' : Q * s ∈ Ioo (Q * τ₁) (Q * τ₂) := |
| 155 | ⟨mul_lt_mul_of_pos_left hs.1 hQ, mul_lt_mul_of_pos_left hs.2 hQ⟩ |
| 156 | have hz : ∀ V : G.Horizontal (p.curve (Q * s / Q)), |
| 157 | M14EulerResidual G p E (Q * s / Q) V = 0 := by |
| 158 | intro V |
| 159 | have hzero := he (Q * s) hs' |
| 160 | (M13.parabolicSpacetimeHorizontal G.spacetime Q hQ a (p.curve (Q * s / Q)) V) |
| 161 | rw [rescalingEuler_extension_independent (rescalingTransport hM12 hM13 G Q hQ a) |
| 162 | (rescalingPath hM12 hM13 G Q hQ a p) F |
| 163 | (rescalingPathExtension hM12 hM13 G Q hQ a p E) hs', |
| 164 | rescalingEulerResidual hM12 hM13 G Q hQ a p E hs' V] at hzero |
| 165 | exact (mul_eq_zero.mp hzero).resolve_left (inv_ne_zero hQ.ne') |
| 166 | rw [mul_div_cancel_left₀ _ hQ.ne'] at hz |
| 167 | exact hz W |
| 168 | |
| 169 | end PoincareMT.M14 |