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.Analysis.Calculus.SmoothCompactness.Pullback |
| 2 | |
| 3 | /-! |
| 4 | # Smooth convergence under fixed linear postcomposition |
| 5 | |
| 6 | A fixed continuous linear map preserves local eventual smoothness and |
| 7 | compact-uniform convergence of every derivative. Local smoothness supplies |
| 8 | the exact jet identity even when the linear map is not injective. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | open Set Filter |
| 13 | open scoped ContDiff Topology |
| 14 | |
| 15 | namespace Poincare.Analysis.Calculus |
| 16 | |
| 17 | variable {E F G : Type*} |
| 18 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 20 | [NormedAddCommGroup G] [NormedSpace ℝ G] |
| 21 | |
| 22 | /-- A fixed continuous linear map preserves local eventual smoothness. -/ |
| 23 | theorem locally_eventually_smooth_continuousLinearMap_comp |
| 24 | (L : F →L[ℝ] G) {U : Set E} {f : ℕ → E → F} |
| 25 | (hlocal : ∀ x ∈ U, ∃ W, IsOpen W ∧ x ∈ W ∧ |
| 26 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) : |
| 27 | ∀ x ∈ U, ∃ W, IsOpen W ∧ x ∈ W ∧ |
| 28 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (L ∘ f k) W := by |
| 29 | intro x hx |
| 30 | obtain ⟨W, hW, hxW, hks⟩ := hlocal x hx |
| 31 | exact ⟨W, hW, hxW, hks.mono fun _ hk => hk.continuousLinearMap_comp L⟩ |
| 32 | |
| 33 | /-- Continuous linear postcomposition preserves compact-uniform convergence |
| 34 | of all jets, together with local eventual smoothness. -/ |
| 35 | theorem smooth_convergence_continuousLinearMap_comp |
| 36 | (L : F →L[ℝ] G) {U : Set E} (hU : IsOpen U) |
| 37 | {f : ℕ → E → F} {f₀ : E → F} (hf₀ : ContDiffOn ℝ ∞ f₀ U) |
| 38 | (hlocal : ∀ x ∈ U, ∃ W, IsOpen W ∧ x ∈ W ∧ |
| 39 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) |
| 40 | (hjet : ∀ m K, IsCompact K → K ⊆ U → TendstoUniformlyOn |
| 41 | (fun k => iteratedFDeriv ℝ m (f k)) (iteratedFDeriv ℝ m f₀) atTop K) : |
| 42 | (∀ x ∈ U, ∃ W, IsOpen W ∧ x ∈ W ∧ |
| 43 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (L ∘ f k) W) ∧ |
| 44 | ∀ m K, IsCompact K → K ⊆ U → TendstoUniformlyOn |
| 45 | (fun k => iteratedFDeriv ℝ m (L ∘ f k)) |
| 46 | (iteratedFDeriv ℝ m (L ∘ f₀)) atTop K := by |
| 47 | refine ⟨locally_eventually_smooth_continuousLinearMap_comp L hlocal, ?_⟩ |
| 48 | intro m K hK hKU |
| 49 | have h := (ContinuousLinearMap.compContinuousMultilinearMapL ℝ |
| 50 | (fun _ : Fin m => E) F G L).uniformContinuous.comp_tendstoUniformlyOn |
| 51 | (hjet m K hK hKU) |
| 52 | apply (h.congr ?_).congr_right ?_ |
| 53 | · filter_upwards [eventually_contDiffAt_on_compact hK hKU hlocal] with k hk x hx |
| 54 | exact (L.iteratedFDeriv_comp_left (hk x hx) (by exact_mod_cast le_top)).symm |
| 55 | · intro x hx |
| 56 | exact (L.iteratedFDeriv_comp_left (hf₀.contDiffAt (hU.mem_nhds (hKU hx))) |
| 57 | (by exact_mod_cast le_top)).symm |
| 58 | |
| 59 | end Poincare.Analysis.Calculus |