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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Neck.Jets.NeckFiniteMetricJets |
| 3 | |
| 4 | /-! |
| 5 | # Actual finite metric error jets on the initial cylinder slab |
| 6 | |
| 7 | Morgan-Tian Definition 2.16 and Theorem 12.32, pp. 326-327. |
| 8 | The prescribed comparison controls every retained covariant error |
| 9 | component. The actual Christoffel recursion recovers ordinary jets at |
| 10 | moving preferred centers, including positive model times below one. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 18 | |
| 19 | namespace PoincareMT.M35 |
| 20 | |
| 21 | private theorem tendsto_coordinate_jet_of_components {r : ℕ} |
| 22 | {F : ℕ → RoundCylinderCoordinates [×r]→L[ℝ] ℝ} |
| 23 | (h : ∀ a : Fin r → Fin 3, |
| 24 | Tendsto (fun k => F k (fun j => roundCylinderCoordinateBasis (a j))) |
| 25 | atTop (𝓝 0)) : Tendsto F atTop (𝓝 0) := by |
| 26 | let ev : (RoundCylinderCoordinates [×r]→L[ℝ] ℝ) →ₗ[ℝ] |
| 27 | ((Fin r → Fin 3) → ℝ) := |
| 28 | { toFun := fun T a => T (fun j => roundCylinderCoordinateBasis (a j)) |
| 29 | map_add' := fun _ _ => rfl |
| 30 | map_smul' := fun _ _ => rfl } |
| 31 | let b := (EuclideanSpace.basisFun (Fin 3) ℝ).toBasis.map cylinderCoordinateEquiv.toLinearEquiv |
| 32 | have hb (i : Fin 3) : b i = roundCylinderCoordinateBasis i := cylinderCoordinateEquiv_basis i |
| 33 | have hinj : Function.Injective ev := by |
| 34 | intro T S hTS |
| 35 | apply ContinuousMultilinearMap.toMultilinearMap_injective |
| 36 | apply Module.Basis.ext_multilinear (fun _ => b) |
| 37 | intro a |
| 38 | change T (fun j => b (a j)) = S (fun j => b (a j)) |
| 39 | simp only [hb] |
| 40 | exact congrFun hTS a |
| 41 | let : FiniteDimensional ℝ (RoundCylinderCoordinates [×r]→L[ℝ] ℝ) := |
| 42 | FiniteDimensional.of_injective ev hinj |
| 43 | have hev := ev.isClosedEmbedding_of_injective (LinearMap.ker_eq_bot.mpr hinj) |
| 44 | apply hev.isInducing.tendsto_nhds_iff.mpr |
| 45 | change Tendsto (fun (k : ℕ) (a : Fin r → Fin 3) => |
| 46 | F k (fun j => roundCylinderCoordinateBasis (a j))) |
| 47 | atTop (𝓝 (fun _ : Fin r → Fin 3 => (0 : ℝ))) |
| 48 | exact tendsto_pi_nhds.mpr h |
| 49 | |
| 50 | /-- The initial-neck comparison implies convergence to zero of |
| 51 | all retained ordinary derivatives of its actual covariant error. |
| 52 | No endpoint extension of the spatial patch is assumed. -/ |
| 53 | theorem cylinder_covariant_error_jets_tendsto_zero |
| 54 | (epsilon u s : ℕ → ℝ) (B : ℕ → RoundCylinderTwoTensor) |
| 55 | (q : ℕ → UnitTwoSphere) (s₀ : ℝ) (M : ℕ) |
| 56 | (he : ∀ k, 0 < epsilon k) (hlo : ∀ k, -1 ≤ u k) (hu : ∀ k, u k < 1) |
| 57 | (hs : ∀ k, s k ∈ Ioo (-(epsilon k)⁻¹) (epsilon k)⁻¹) |
| 58 | (hclose : ∀ k, RoundCylinderClose (epsilon k) (u k) (B k)) |
| 59 | (hdegree : ∀ k, M ≤ ⌊(epsilon k)⁻¹⌋₊) |
| 60 | (hezero : Tendsto epsilon atTop (𝓝 0)) (hslim : Tendsto s atTop (𝓝 s₀)) |
| 61 | (r n : ℕ) (hnr : n + r ≤ M) (a : Fin (2 + n) → Fin 3) : |
| 62 | Tendsto (fun k => iteratedFDeriv ℝ r (fun y : RoundCylinderCoordinates => |
| 63 | roundCylinderIteratedDerivative (u k) (chartAt (EuclideanSpace ℝ (Fin 2)) (q k)) |
| 64 | (B k) n y a) (0, s k)) atTop (𝓝 0) := by |
| 65 | let T (n k : ℕ) (a : Fin (2 + n) → Fin 3) (y : RoundCylinderCoordinates) := |
| 66 | roundCylinderIteratedDerivative (u k) (chartAt (EuclideanSpace ℝ (Fin 2)) (q k)) |
| 67 | (B k) n y a |
| 68 | let G (i j l : Fin 3) (y : RoundCylinderCoordinates) := |
| 69 | roundCylinderChristoffel 0 (chartAt (EuclideanSpace ℝ (Fin 2)) (q 0)) y i j l |
| 70 | have hG (i j l : Fin 3) : ContDiff ℝ ∞ (G i j l) := |
| 71 | contDiff_roundCylinderChristoffel zero_lt_one (q 0) i j l |
| 72 | have hGeq (k : ℕ) (y : RoundCylinderCoordinates) (i j l : Fin 3) : |
| 73 | roundCylinderChristoffel (u k) (chartAt (EuclideanSpace ℝ (Fin 2)) (q k)) y i j l = |
| 74 | G i j l y := by |
| 75 | change _ = roundCylinderChristoffel 0 (chartAt (EuclideanSpace ℝ (Fin 2)) (q 0)) y i j l |
| 76 | rw [roundCylinderChristoffel_eq (hu k), roundCylinderChristoffel_eq zero_lt_one] |
| 77 | have hp : Tendsto (fun k => ((0, s k) : RoundCylinderCoordinates)) atTop (𝓝 (0, s₀)) := |
| 78 | tendsto_const_nhds.prodMk_nhds hslim |
| 79 | have hT (n k : ℕ) (a : Fin (2 + n) → Fin 3) : ContDiffAt ℝ ∞ (T n k a) (0, s k) := |
| 80 | contDiffAt_roundCylinderIteratedDerivative (hu k) (q k) (B k) (0, s k) |
| 81 | (fun i j => (hclose k).contDiffAt_coefficient (q k) (0, s k) (hs k) i j) n a |
| 82 | change Tendsto (fun k => iteratedFDeriv ℝ r (T n k a) (0, s k)) atTop (𝓝 0) |
| 83 | induction r using Nat.strong_induction_on generalizing n with |
| 84 | | h r ih => |
| 85 | cases r with |
| 86 | | zero => |
| 87 | apply squeeze_zero_norm |
| 88 | (fun k => ?_) (by simpa only [mul_zero] using hezero.const_mul ((2 : ℝ) ^ (2 + n))) |
| 89 | have hn : n ≤ ⌊(epsilon k)⁻¹⌋₊ := (by omega : n ≤ M).trans (hdegree k) |
| 90 | have h := (hclose k).component_abs_lt (he k) (hlo k) (hu k) |
| 91 | (z := (q k, s k)) (hs k) hn a |
| 92 | simpa only [norm_iteratedFDeriv_zero, Real.norm_eq_abs, T, sphere_chart_center] using h.le |
| 93 | | succ r => |
| 94 | apply tendsto_coordinate_jet_of_components |
| 95 | intro v |
| 96 | let d := v (Fin.last r) |
| 97 | let aa : Fin (2 + (n + 1)) → Fin 3 := Fin.cons d a |
| 98 | let J (k : ℕ) (i : Fin (2 + n)) (j : Fin 3) (y : RoundCylinderCoordinates) := |
| 99 | G j d (a i) y * T n k (Function.update a i j) y |
| 100 | have hJ (k : ℕ) (i : Fin (2 + n)) (j : Fin 3) : |
| 101 | ContDiffAt ℝ ∞ (J k i j) (0, s k) := |
| 102 | (hG j d (a i)).contDiffAt.mul (hT n k (Function.update a i j)) |
| 103 | have hJlim (i : Fin (2 + n)) (j : Fin 3) : |
| 104 | Tendsto (fun k => iteratedFDeriv ℝ r (J k i j) (0, s k)) atTop (𝓝 0) := by |
| 105 | have h := tendsto_iteratedFDeriv_mul_of_jets |
| 106 | (f := fun _ => G j d (a i)) (f₀ := G j d (a i)) |
| 107 | (g := fun k => T n k (Function.update a i j)) (g₀ := fun _ => (0 : ℝ)) |
| 108 | (p₀ := (0, s₀)) r (hG j d (a i)).contDiffAt contDiffAt_const |
| 109 | (Eventually.of_forall fun _ => (hG j d (a i)).contDiffAt) |
| 110 | (Eventually.of_forall fun k => hT n k (Function.update a i j)) |
| 111 | (fun m _ => ((hG j d (a i)).contDiffAt.continuousAt_iteratedFDeriv |
| 112 | (by exact_mod_cast le_top (a := (m : ℕ∞)))).tendsto.comp hp) |
| 113 | (fun m hm => by |
| 114 | simpa only [iteratedFDeriv_fun_zero, Pi.zero_apply] using |
| 115 | ih m (by omega) n (by omega) (Function.update a i j)) |
| 116 | simpa only [mul_zero, iteratedFDeriv_fun_zero, Pi.zero_apply] using h |
| 117 | have hrec (k : ℕ) : (fun y => fderiv ℝ (T n k a) y (roundCylinderCoordinateBasis d)) = |
| 118 | fun y => T (n + 1) k aa y + ∑ i : Fin (2 + n), ∑ j : Fin 3, J k i j y := by |
| 119 | funext y |
| 120 | simp only [T, aa, roundCylinderIteratedDerivative, roundCylinderTensorDerivative, |
| 121 | Fin.cons_zero, Fin.cons_succ, J, hGeq] |
| 122 | exact (sub_add_cancel _ _).symm |
| 123 | have hderiv : Tendsto (fun k => iteratedFDeriv ℝ r |
| 124 | (fun y => fderiv ℝ (T n k a) y (roundCylinderCoordinateBasis d)) (0, s k)) |
| 125 | atTop (𝓝 0) := by |
| 126 | have hsum : Tendsto (fun k => ∑ i : Fin (2 + n), ∑ j : Fin 3, |
| 127 | iteratedFDeriv ℝ r (J k i j) (0, s k)) atTop |
| 128 | (𝓝 (∑ _i : Fin (2 + n), ∑ _j : Fin 3, |
| 129 | (0 : RoundCylinderCoordinates [×r]→L[ℝ] ℝ))) := |
| 130 | tendsto_finsetSum _ (fun i _ => tendsto_finsetSum _ (fun j _ => hJlim i j)) |
| 131 | simp only [Finset.sum_const_zero] at hsum |
| 132 | have hlim := (ih r (Nat.lt_succ_self r) (n + 1) (by omega) aa).add hsum |
| 133 | simp only [add_zero] at hlim |
| 134 | apply hlim.congr' |
| 135 | apply Eventually.of_forall |
| 136 | intro k |
| 137 | have hr : (r : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top (a := (r : ℕ∞)) |
| 138 | change iteratedFDeriv ℝ r (T (n + 1) k aa) (0, s k) + |
| 139 | ∑ i : Fin (2 + n), ∑ j : Fin 3, iteratedFDeriv ℝ r (J k i j) (0, s k) = |
| 140 | iteratedFDeriv ℝ r |
| 141 | (fun y => fderiv ℝ (T n k a) y (roundCylinderCoordinateBasis d)) (0, s k) |
| 142 | rw [hrec k, fun_iteratedFDeriv_add_apply ((hT (n + 1) k aa).of_le hr) |
| 143 | ((ContDiffAt.sum fun i _ => ContDiffAt.sum fun j _ => hJ k i j).of_le hr), |
| 144 | iteratedFDeriv_fun_sum_apply (fun i _ => |
| 145 | (ContDiffAt.sum fun j _ => hJ k i j).of_le hr)] |
| 146 | congr 1 |
| 147 | apply Finset.sum_congr rfl |
| 148 | intro i _ |
| 149 | rw [iteratedFDeriv_fun_sum_apply (fun j _ => (hJ k i j).of_le hr)] |
| 150 | apply squeeze_zero_norm (fun k => ?_) (by simpa only [norm_zero] using hderiv.norm) |
| 151 | rw [iteratedFDeriv_directional_apply r (hT n k a)] |
| 152 | have h := (iteratedFDeriv ℝ r |
| 153 | (fun y => fderiv ℝ (T n k a) y (roundCylinderCoordinateBasis d)) (0, s k)).le_opNorm |
| 154 | (Fin.init (fun j => roundCylinderCoordinateBasis (v j))) |
| 155 | have hb (i : Fin 3) : ‖roundCylinderCoordinateBasis i‖ = 1 := by |
| 156 | fin_cases i <;> simp [roundCylinderCoordinateBasis, Prod.norm_def] |
| 157 | simpa only [Fin.init_def, hb, Finset.prod_const_one, mul_one] using h |
| 158 | |
| 159 | /-- All retained actual ordinary metric-error jets vanish under |
| 160 | the fine initial-cylinder comparison at moving axial points. -/ |
| 161 | theorem cylinder_metric_error_jets_tendsto_zero |
| 162 | (epsilon u s : ℕ → ℝ) (B : ℕ → RoundCylinderTwoTensor) |
| 163 | (q : ℕ → UnitTwoSphere) (s₀ : ℝ) (M : ℕ) |
| 164 | (he : ∀ k, 0 < epsilon k) (hlo : ∀ k, -1 ≤ u k) (hu : ∀ k, u k < 1) |
| 165 | (hs : ∀ k, s k ∈ Ioo (-(epsilon k)⁻¹) (epsilon k)⁻¹) |
| 166 | (hclose : ∀ k, RoundCylinderClose (epsilon k) (u k) (B k)) |
| 167 | (hdegree : ∀ k, M ≤ ⌊(epsilon k)⁻¹⌋₊) |
| 168 | (hezero : Tendsto epsilon atTop (𝓝 0)) (hslim : Tendsto s atTop (𝓝 s₀)) |
| 169 | (r : ℕ) (hr : r ≤ M) (i j : Fin 3) : |
| 170 | Tendsto (fun k => iteratedFDeriv ℝ r (fun y : RoundCylinderCoordinates => |
| 171 | roundCylinderTensorCoefficient (B k) (chartAt (EuclideanSpace ℝ (Fin 2)) (q k)) y i j - |
| 172 | roundCylinderGram (u k) (chartAt (EuclideanSpace ℝ (Fin 2)) (q k)) y i j) |
| 173 | (0, s k)) atTop (𝓝 0) := by |
| 174 | exact cylinder_covariant_error_jets_tendsto_zero epsilon u s B q s₀ M he hlo hu hs |
| 175 | hclose hdegree hezero hslim r 0 (by omega) ![i, j] |
| 176 | |
| 177 | end PoincareMT.M35 |