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.Calculus.ContDiff.Operations |
| 2 | import Mathlib.Topology.Algebra.Support |
| 3 | |
| 4 | /-! |
| 5 | # Extending within smoothness by a supported scalar factor |
| 6 | |
| 7 | A smooth cutoff supported in an open set extends local within smoothness |
| 8 | to the entire parameter set. This is the partition step for actual field |
| 9 | realization in Morgan-Tian Proposition 6.37, pp. 123-127. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped ContDiff Topology |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | /-- A globally smooth scalar supported inside the local domain makes |
| 20 | a locally within-smooth vector function smooth on the full set, |
| 21 | as used in the partition step of Proposition 6.37, pp. 123-127. -/ |
| 22 | theorem contDiffOn_smul_of_tsupport_subset |
| 23 | {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 24 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 25 | {C U : Set E} (hU : IsOpen U) {ρ : E → ℝ} {f : E → F} |
| 26 | (hρ : ContDiff ℝ ∞ ρ) (hf : ContDiffOn ℝ ∞ f (C ∩ U)) |
| 27 | (hsupport : tsupport ρ ⊆ U) : ContDiffOn ℝ ∞ (fun x => ρ x • f x) C := by |
| 28 | intro x hx |
| 29 | by_cases hs : x ∈ tsupport ρ |
| 30 | · apply (hρ.contDiffAt.contDiffWithinAt.smul (hf x ⟨hx, hsupport hs⟩)).mono_of_mem_nhdsWithin |
| 31 | exact inter_mem self_mem_nhdsWithin |
| 32 | (mem_nhdsWithin_of_mem_nhds (hU.mem_nhds (hsupport hs))) |
| 33 | · have heq : (fun x => ρ x • f x) =ᶠ[𝓝 x] fun _ => (0 : F) := by |
| 34 | filter_upwards [(isClosed_tsupport ρ).isOpen_compl.mem_nhds hs] with y hy |
| 35 | rw [image_eq_zero_of_notMem_tsupport hy, zero_smul] |
| 36 | exact contDiffWithinAt_const.congr_of_eventuallyEq |
| 37 | (heq.filter_mono nhdsWithin_le_nhds) heq.eq_of_nhds |
| 38 | |
| 39 | end PoincareMT.M14 |