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.Topology.Covering.SimplyConnected |
| 2 | import PoincareLib.Topology.Homotopy.Sphere |
| 3 | import Mathlib.Geometry.Manifold.LocalDiffeomorph |
| 4 | |
| 5 | /-! |
| 6 | # Compact local diffeomorphisms to spheres |
| 7 | |
| 8 | For spheres of dimension at least two, a local diffeomorphism with compact |
| 9 | connected nonempty source is a diffeomorphism. This is the covering-space |
| 10 | step in the Gauss-map proof of Eschenburg's Lemma 6.6, pp. 517-518. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | open scoped ContDiff Manifold |
| 15 | |
| 16 | namespace Poincare.Geometry.Manifold |
| 17 | |
| 18 | /-- A local diffeomorphism from a compact connected manifold to a standard |
| 19 | sphere of dimension at least two is a global diffeomorphism. -/ |
| 20 | def sphereDiffeomorphOfLocalDiffeomorph |
| 21 | {n : ℕ} {S : Type*} [TopologicalSpace S] [T2Space S] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin (n + 2))) S] |
| 23 | [CompactSpace S] [ConnectedSpace S] |
| 24 | (f : S → Metric.sphere (0 : EuclideanSpace ℝ (Fin ((n + 2) + 1))) 1) |
| 25 | (hf : IsLocalDiffeomorph (𝓡 (n + 2)) (𝓡 (n + 2)) ∞ f) : |
| 26 | Diffeomorph (𝓡 (n + 2)) (𝓡 (n + 2)) S |
| 27 | (Metric.sphere (0 : EuclideanSpace ℝ (Fin ((n + 2) + 1))) 1) ∞ := by |
| 28 | let : SimplyConnectedSpace |
| 29 | (Metric.sphere (0 : EuclideanSpace ℝ (Fin ((n + 2) + 1))) 1) := |
| 30 | Poincare.Topology.sphereSimplyConnected_of_two_le (by omega) |
| 31 | let : LocallyPathConnectedSpace |
| 32 | (Metric.sphere (0 : EuclideanSpace ℝ (Fin ((n + 2) + 1))) 1) := |
| 33 | ChartedSpace.locallyPathConnectedSpace (EuclideanSpace ℝ (Fin (n + 2))) _ |
| 34 | exact hf.diffeomorphOfBijective |
| 35 | (Poincare.Topology.bijective_of_isCoveringMap_of_simplyConnected |
| 36 | (isLocalHomeomorph_iff_isCoveringMap.mp hf.isLocalHomeomorph)) |
| 37 | |
| 38 | end Poincare.Geometry.Manifold |