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.Analysis.Normed.Module.FiniteDimension |
| 2 | import Mathlib.LinearAlgebra.Multilinear.Curry |
| 3 | import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 4 | import Mathlib.Geometry.Manifold.ContMDiff.Constructions |
| 5 | import Mathlib.Geometry.Manifold.Instances.Real |
| 6 | import Mathlib.Tactic.FinCases |
| 7 | |
| 8 | /-! |
| 9 | # Bilinear-valued smooth families in finite dimension |
| 10 | |
| 11 | Exact evaluations determine the bundled forms and their smoothness. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option maxSynthPendingDepth 3 |
| 16 | |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 22 | [FiniteDimensional ℝ V] |
| 23 | |
| 24 | noncomputable def bilinearOfMultilinear (A : MultilinearMap ℝ (fun _ : Fin 2 ↦ V) ℝ) : |
| 25 | V →L[ℝ] V →L[ℝ] ℝ := |
| 26 | let L : V →ₗ[ℝ] V →ₗ[ℝ] ℝ := |
| 27 | (MultilinearMap.ofSubsingletonₗ ℝ ℝ V ℝ (0 : Fin 1)).symm.toLinearMap.comp A.curryLeft |
| 28 | ((LinearMap.toContinuousLinearMap : (V →ₗ[ℝ] ℝ) ≃ₗ[ℝ] (V →L[ℝ] ℝ)).toLinearMap.comp |
| 29 | L).toContinuousLinearMap |
| 30 | |
| 31 | theorem bilinearOfMultilinear_apply (A : MultilinearMap ℝ (fun _ : Fin 2 ↦ V) ℝ) |
| 32 | (v w : V) : bilinearOfMultilinear A v w = A ![v, w] := by |
| 33 | change A (Fin.cons v (fun _ : Fin 1 ↦ w)) = A ![v, w] |
| 34 | congr 1 |
| 35 | funext i |
| 36 | fin_cases i <;> rfl |
| 37 | |
| 38 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 39 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 40 | [IsManifold (𝓡 n) ∞ M] |
| 41 | |
| 42 | theorem contMDiffOn_clm_iff |
| 43 | {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] |
| 44 | {k : WithTop ℕ∞} {f : M → V →L[ℝ] W} {U : Set M} : |
| 45 | ContMDiffOn (𝓡 n) (𝓘(ℝ, V →L[ℝ] W)) k f U ↔ |
| 46 | ∀ v, ContMDiffOn (𝓡 n) (𝓘(ℝ, W)) k (fun q ↦ f q v) U := by |
| 47 | constructor |
| 48 | · intro h v |
| 49 | exact h.clm_apply contMDiffOn_const |
| 50 | · intro h |
| 51 | let d := Module.finrank ℝ V |
| 52 | have hd : d = Module.finrank ℝ (Fin d → ℝ) := (Module.finrank_fin_fun ℝ).symm |
| 53 | let e₁ : V ≃L[ℝ] (Fin d → ℝ) := ContinuousLinearEquiv.ofFinrankEq hd |
| 54 | let e₂ := (e₁.arrowCongr (ContinuousLinearEquiv.refl ℝ W)).trans |
| 55 | (ContinuousLinearEquiv.piRing (Fin d)) |
| 56 | rw [← Function.id_comp f, ← e₂.symm_comp_self] |
| 57 | exact e₂.symm.toContinuousLinearMap.contMDiff.comp_contMDiffOn |
| 58 | (contMDiffOn_pi_space.mpr fun i ↦ h _) |
| 59 | |
| 60 | theorem contMDiffOn_bilinear_iff {k : WithTop ℕ∞} |
| 61 | {f : M → V →L[ℝ] V →L[ℝ] ℝ} {U : Set M} : |
| 62 | ContMDiffOn (𝓡 n) (𝓘(ℝ, V →L[ℝ] V →L[ℝ] ℝ)) k f U ↔ |
| 63 | ∀ v w, ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ)) k (fun q ↦ f q v w) U := by |
| 64 | rw [contMDiffOn_clm_iff] |
| 65 | simp_rw [contMDiffOn_clm_iff] |
| 66 | |
| 67 | end PoincareMT.ReducedLength |