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.CapGeometry.VanishingMetricErrorJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Neck.Jets.NeckPullbackJets |
| 4 | |
| 5 | /-! |
| 6 | # Actual pullback errors with bounded full-end coordinates |
| 7 | |
| 8 | Morgan-Tian Theorem 12.28, pp. 323-324. Every differentiated coordinate |
| 9 | contraction contains a vanishing ambient metric-error factor. Bounded |
| 10 | coordinate jets suffice at the moving preferred centers. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | namespace PoincareMT.M35 |
| 19 | |
| 20 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 21 | |
| 22 | /-- Theorem 12.28: bounded actual coordinate jets preserve every |
| 23 | retained coefficient-error jet through the two metric differential slots. -/ |
| 24 | theorem cylinder_pullback_jet_difference_tendsto_zero_of_bounded |
| 25 | (f : ℕ → RoundCylinderCoordinates → V) (p : ℕ → RoundCylinderCoordinates) |
| 26 | (v w : RoundCylinderCoordinates) (A : ℕ → V → Fin 3 → Fin 3 → ℝ) (r : ℕ) |
| 27 | (hf : ∀ k, ContDiffAt ℝ ∞ (f k) (p k)) |
| 28 | (hfjet : HasUniformJetBoundsAt (r + 1) f p) |
| 29 | (hA : ∀ a b : Fin 3, ∀ᶠ k in atTop, |
| 30 | ContDiffAt ℝ ∞ (fun y => A k y a b) (f k (p k))) |
| 31 | (hAjet : ∀ m ≤ r, ∀ a b : Fin 3, |
| 32 | Tendsto (fun k => iteratedFDeriv ℝ m (fun y => A k y a b) (f k (p k))) atTop (𝓝 0)) : |
| 33 | Tendsto (fun k => iteratedFDeriv ℝ r (fun y : RoundCylinderCoordinates => |
| 34 | ∑ a : Fin 3, ∑ b : Fin 3, |
| 35 | A k (f k y) a b * (fderiv ℝ (f k) y v) a * (fderiv ℝ (f k) y w) b) (p k)) |
| 36 | atTop (𝓝 0) := by |
| 37 | let C (v : RoundCylinderCoordinates) (a : Fin 3) (k : ℕ) |
| 38 | (y : RoundCylinderCoordinates) := (fderiv ℝ (f k) y v) a |
| 39 | have hC (v : RoundCylinderCoordinates) (a : Fin 3) (k : ℕ) : |
| 40 | ContDiffAt ℝ ∞ (C v a k) (p k) := |
| 41 | (EuclideanSpace.proj a).contDiff.contDiffAt.comp (p k) |
| 42 | (((hf k).fderiv_right (by simp)).clm_apply contDiffAt_const) |
| 43 | have hCjet (v : RoundCylinderCoordinates) (a : Fin 3) : |
| 44 | HasUniformJetBoundsAt r (C v a) p := |
| 45 | hfjet.fderiv.clm (fun k => (hf k).fderiv_right (by simp)) |
| 46 | ((EuclideanSpace.proj a).comp (ContinuousLinearMap.apply ℝ V v)) |
| 47 | let H (k : ℕ) (a b : Fin 3) (y : RoundCylinderCoordinates) := |
| 48 | A k (f k y) a b * C v a k y * C w b k y |
| 49 | have hH (a b : Fin 3) : ∀ᶠ k in atTop, ContDiffAt ℝ ∞ (H k a b) (p k) := |
| 50 | (hA a b).mono fun k hk => |
| 51 | ((hk.comp (p k) (hf k)).mul (hC v a k)).mul (hC w b k) |
| 52 | have hlim (a b : Fin 3) : |
| 53 | Tendsto (fun k => iteratedFDeriv ℝ r (H k a b) (p k)) atTop (𝓝 0) := by |
| 54 | have hcomp (m : ℕ) (hm : m ≤ r) : |
| 55 | Tendsto (fun k => iteratedFDeriv ℝ m (fun y => A k (f k y) a b) (p k)) |
| 56 | atTop (𝓝 0) := |
| 57 | jet_comp_tendsto_zero_of_bounded (hfjet.mono_order (by omega)) |
| 58 | (Eventually.of_forall hf) (hA a b) (fun j hj => hAjet j (hj.trans hm) a b) |
| 59 | have hfirst (m : ℕ) (hm : m ≤ r) : |
| 60 | Tendsto (fun k => iteratedFDeriv ℝ m |
| 61 | (fun y => A k (f k y) a b * C v a k y) (p k)) atTop (𝓝 0) := |
| 62 | jet_bilinear_tendsto_zero_of_bounded (ContinuousLinearMap.mul ℝ ℝ) |
| 63 | (fun j hj => hcomp j (hj.trans hm)) ((hCjet v a).mono_order hm) |
| 64 | ((hA a b).mono fun k hk => hk.comp (p k) (hf k)) |
| 65 | (Eventually.of_forall (hC v a)) |
| 66 | exact jet_bilinear_tendsto_zero_of_bounded (ContinuousLinearMap.mul ℝ ℝ) |
| 67 | hfirst (hCjet w b) |
| 68 | ((hA a b).mono fun k hk => (hk.comp (p k) (hf k)).mul (hC v a k)) |
| 69 | (Eventually.of_forall (hC w b)) |
| 70 | have hsum := tendsto_finsetSum Finset.univ (fun a _ => |
| 71 | tendsto_finsetSum Finset.univ (fun b _ => hlim a b)) |
| 72 | simp only [Finset.sum_const_zero] at hsum |
| 73 | apply hsum.congr' |
| 74 | have hAll : ∀ᶠ k in atTop, ∀ a b : Fin 3, ContDiffAt ℝ ∞ (H k a b) (p k) := |
| 75 | eventually_all.mpr (fun a => eventually_all.mpr (fun b => hH a b)) |
| 76 | filter_upwards [hAll] with k hk |
| 77 | symm |
| 78 | change iteratedFDeriv ℝ r (fun y => ∑ a : Fin 3, ∑ b : Fin 3, H k a b y) (p k) = _ |
| 79 | have hr : (r : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top (a := (r : ℕ∞)) |
| 80 | rw [iteratedFDeriv_fun_sum_apply (fun a _ => |
| 81 | (ContDiffAt.sum (fun b _ => hk a b)).of_le hr)] |
| 82 | exact Finset.sum_congr rfl (fun a _ => |
| 83 | iteratedFDeriv_fun_sum_apply (fun b _ => (hk a b).of_le hr)) |
| 84 | |
| 85 | end PoincareMT.M35 |