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.Geometry.Manifold.InverseFunction.ModelSpaces |
| 2 | import Mathlib.Topology.Connected.Clopen |
| 3 | |
| 4 | /-! # Surjectivity of nonsingular maps from compact manifolds -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | open Set Filter |
| 10 | open scoped Manifold ContDiff Topology |
| 11 | |
| 12 | namespace Poincare.Geometry.Manifold |
| 13 | |
| 14 | /-- A smooth map with bijective differential from a nonempty compact |
| 15 | manifold onto a connected Hausdorff manifold is surjective. -/ |
| 16 | theorem surjective_of_compact_of_bijective_mfderiv |
| 17 | {E F : Type*} |
| 18 | [NormedAddCommGroup E] [NormedSpace Real E] [CompleteSpace E] |
| 19 | [NormedAddCommGroup F] [NormedSpace Real F] [CompleteSpace F] |
| 20 | {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] |
| 21 | [ChartedSpace E M] [ChartedSpace F N] |
| 22 | [CompactSpace M] [Nonempty M] [ConnectedSpace N] [T2Space N] |
| 23 | {f : M -> N} (hf : ContMDiff 𝓘(Real, E) 𝓘(Real, F) ∞ f) |
| 24 | (hbij : ∀ x, Function.Bijective (mfderiv 𝓘(Real, E) 𝓘(Real, F) f x)) : |
| 25 | Function.Surjective f := by |
| 26 | have hopen : IsOpenMap f := IsOpenMap.of_nhds_le fun x => |
| 27 | (map_nhds_eq_of_contMDiffAt_bijective_mfderiv_modelSpaces (hf x) (hbij x)).ge |
| 28 | have hclopen : IsClopen (range f) := |
| 29 | ⟨(isCompact_range hf.continuous).isClosed, hopen.isOpen_range⟩ |
| 30 | exact range_eq_univ.mp (hclopen.eq_univ (range_nonempty f)) |
| 31 | |
| 32 | end Poincare.Geometry.Manifold |