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 Mathlib.Analysis.Calculus.ContDiff.Comp |
| 3 | |
| 4 | /-! |
| 5 | # Finite jets of compositions at moving points |
| 6 | |
| 7 | The finite Taylor composition formula gives continuity of actual composed |
| 8 | jets, including maps between different dimensions. Used for the preferred |
| 9 | neck charts in Morgan-Tian Theorem 12.28, pp. 323-324. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Filter |
| 15 | open scoped ContDiff Topology |
| 16 | |
| 17 | namespace PoincareMT.M35 |
| 18 | |
| 19 | /-- Converging finite jets at the actual image points give convergence |
| 20 | of the composite jet by the finite Faà di Bruno formula. -/ |
| 21 | theorem tendsto_iteratedFDeriv_comp_of_jets |
| 22 | {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 24 | [NormedAddCommGroup G] [NormedSpace ℝ G] |
| 25 | {f : ℕ → E → F} {g : ℕ → F → G} {f₀ : E → F} {g₀ : F → G} |
| 26 | {p : ℕ → E} {p₀ : E} (r : ℕ) |
| 27 | (hf₀ : ContDiffAt ℝ ∞ f₀ p₀) (hg₀ : ContDiffAt ℝ ∞ g₀ (f₀ p₀)) |
| 28 | (hf : ∀ᶠ k in atTop, ContDiffAt ℝ ∞ (f k) (p k)) |
| 29 | (hg : ∀ᶠ k in atTop, ContDiffAt ℝ ∞ (g k) (f k (p k))) |
| 30 | (hfjet : ∀ m ≤ r, Tendsto (fun k => iteratedFDeriv ℝ m (f k) (p k)) atTop |
| 31 | (𝓝 (iteratedFDeriv ℝ m f₀ p₀))) |
| 32 | (hgjet : ∀ m ≤ r, Tendsto (fun k => iteratedFDeriv ℝ m (g k) (f k (p k))) atTop |
| 33 | (𝓝 (iteratedFDeriv ℝ m g₀ (f₀ p₀)))) : |
| 34 | Tendsto (fun k => iteratedFDeriv ℝ r (g k ∘ f k) (p k)) atTop |
| 35 | (𝓝 (iteratedFDeriv ℝ r (g₀ ∘ f₀) p₀)) := by |
| 36 | have hr : (r : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top (a := (r : ℕ∞)) |
| 37 | rw [iteratedFDeriv_comp hg₀ hf₀ hr] |
| 38 | have hseries : Tendsto (fun k => |
| 39 | (ftaylorSeries ℝ (g k) (f k (p k))).taylorComp (ftaylorSeries ℝ (f k) (p k)) r) |
| 40 | atTop (𝓝 ((ftaylorSeries ℝ g₀ (f₀ p₀)).taylorComp (ftaylorSeries ℝ f₀ p₀) r)) := by |
| 41 | unfold FormalMultilinearSeries.taylorComp |
| 42 | apply tendsto_finsetSum |
| 43 | intro c _ |
| 44 | let B := c.compAlongOrderedFinpartitionL ℝ E F G |
| 45 | exact (B.continuous_uncurry_of_multilinear.tendsto _).comp |
| 46 | ((hgjet c.length c.length_le).prodMk_nhds |
| 47 | (tendsto_pi_nhds.mpr (fun i => hfjet (c.partSize i) (c.partSize_le i)))) |
| 48 | apply hseries.congr' |
| 49 | filter_upwards [hf, hg] with k hfk hgk |
| 50 | exact (iteratedFDeriv_comp hgk hfk hr).symm |
| 51 | |
| 52 | end PoincareMT.M35 |