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.InnerProductSpace.l2Space |
| 2 | import Mathlib.Analysis.RCLike.Lemmas |
| 3 | import Mathlib.Topology.Algebra.Module.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Second countability from a countable Hilbert basis |
| 7 | |
| 8 | The countable basis has separable dense span in the actual norm topology. |
| 9 | This supplies the Fourier coefficient space topology for MT2007 |
| 10 | Claim 19.1, p. 437; `2026-09-21-countable-hilbert-basis.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set TopologicalSpace |
| 16 | |
| 17 | namespace PoincareMT.M63 |
| 18 | |
| 19 | /-- A countable Hilbert basis makes the actual norm topology second |
| 20 | countable. MT2007 Claim 19.1, p. 437; auxiliary countable Hilbert basis |
| 21 | derivation, using Mathlib's dense span and separable span theorems. -/ |
| 22 | theorem secondCountable_of_countable_hilbertBasis |
| 23 | {iota 𝕜 E : Type*} [Countable iota] [RCLike 𝕜] |
| 24 | [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (b : HilbertBasis iota 𝕜 E) : |
| 25 | SecondCountableTopology E := by |
| 26 | have hs := ((countable_range b).isSeparable.span (R := 𝕜)).closure |
| 27 | rw [← Submodule.topologicalClosure_coe, b.dense_span, Submodule.top_coe] at hs |
| 28 | let : SeparableSpace E := isSeparable_univ_iff.mp hs |
| 29 | infer_instance |
| 30 | |
| 31 | end PoincareMT.M63 |