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 Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension |
| 3 | |
| 4 | /-! # Smooth finite-dimensional families of linear maps -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | |
| 8 | open scoped Manifold ContDiff |
| 9 | |
| 10 | namespace PoincareMT |
| 11 | |
| 12 | theorem contMDiffAt_clm_of_apply_model |
| 13 | {EB H B : Type*} [NormedAddCommGroup EB] [NormedSpace ℝ EB] |
| 14 | [TopologicalSpace H] [TopologicalSpace B] [ChartedSpace H B] |
| 15 | {IB : ModelWithCorners ℝ EB H} |
| 16 | {E E' : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 17 | [NormedAddCommGroup E'] [NormedSpace ℝ E'] [FiniteDimensional ℝ E] |
| 18 | {f : B → E →L[ℝ] E'} {x : B} |
| 19 | (hf : ∀ v, ContMDiffAt IB 𝓘(ℝ, E') ∞ (fun y => f y v) x) : |
| 20 | ContMDiffAt IB 𝓘(ℝ, E →L[ℝ] E') ∞ f x := by |
| 21 | let d := Module.finrank ℝ E |
| 22 | have hd : d = Module.finrank ℝ (Fin d → ℝ) := (Module.finrank_fin_fun ℝ).symm |
| 23 | let e₁ : E ≃L[ℝ] (Fin d → ℝ) := ContinuousLinearEquiv.ofFinrankEq hd |
| 24 | let e₂ := (e₁.arrowCongr (1 : E' ≃L[ℝ] E')).trans (ContinuousLinearEquiv.piRing (Fin d)) |
| 25 | rw [← Function.id_comp f, ← e₂.symm_comp_self] |
| 26 | exact e₂.symm.contDiff.contMDiff.contMDiffAt.comp x |
| 27 | (contMDiffAt_pi_space.mpr fun i => hf _) |
| 28 | |
| 29 | end PoincareMT |