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.PiL2 |
| 2 | import Mathlib.Geometry.Manifold.ChartedSpace |
| 3 | import Mathlib.Topology.Connected.TotallyDisconnected |
| 4 | |
| 5 | /-! |
| 6 | # Connected zero-dimensional manifolds |
| 7 | |
| 8 | A charted space over a discrete model is discrete, so preconnectedness makes |
| 9 | its carrier subsingleton. The Euclidean dimension-zero specialization handles |
| 10 | the carrier in the dimension-zero case of pointed Ricci-flow compactness |
| 11 | (Morgan--Tian, Theorem 5.15, printed pp. 91--92). |
| 12 | -/ |
| 13 | |
| 14 | namespace Poincare |
| 15 | |
| 16 | /-- A preconnected charted space over a discrete model has at most one point. -/ |
| 17 | theorem subsingleton_of_preconnected_chartedSpace |
| 18 | (H M : Type*) [TopologicalSpace H] [DiscreteTopology H] |
| 19 | [TopologicalSpace M] [ChartedSpace H M] [PreconnectedSpace M] : |
| 20 | Subsingleton M := by |
| 21 | let : DiscreteTopology M := ChartedSpace.discreteTopology H M |
| 22 | exact subsingleton_of_preconnected_totallyDisconnected |
| 23 | |
| 24 | /-- A preconnected manifold modeled on zero-dimensional Euclidean space has |
| 25 | at most one point. No differentiability or separation assumption is needed. -/ |
| 26 | theorem subsingleton_of_preconnected_euclidean_zero |
| 27 | (M : Type*) [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 0)) M] [PreconnectedSpace M] : |
| 29 | Subsingleton M := |
| 30 | subsingleton_of_preconnected_chartedSpace (EuclideanSpace ℝ (Fin 0)) M |
| 31 | |
| 32 | end Poincare |