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.AlgebraicTopology.HomotopyGroup.LoopSpace.Comparison.Lefschetz.SupportedComparison |
| 2 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Compatibility.ThreeManifoldTopology |
| 3 | import Mathlib.Algebra.Homology.QuasiIso |
| 4 | |
| 5 | /-! |
| 6 | # The empty selected set in the characteristic comparison |
| 7 | |
| 8 | The empty selected nerve has no simplices, and its coordinate |
| 9 | neighborhood has no points. Its actual characteristic map is therefore |
| 10 | already a simplicial isomorphism. |
| 11 | Source: the initial case of Hatcher, Theorem 2.27, pp. 128-130. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open CategoryTheory HomologicalComplex |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M59 |
| 23 | |
| 24 | open M02.Topology |
| 25 | |
| 26 | variable {J : Type u} [PartialOrder J] [Fintype J] |
| 27 | {E : Type u} [TopologicalSpace E] (p : C(E, (finiteOrderComplex J).space)) |
| 28 | |
| 29 | /-- The empty selected coordinate neighborhood contains no points. |
| 30 | Source: Hatcher, Theorem 2.27, pp. 128-130. -/ |
| 31 | theorem liftedCoordinateNeighborhood_empty_isEmpty : |
| 32 | IsEmpty (liftedCoordinateNeighborhood p (∅ : Finset J)) := by |
| 33 | refine ⟨fun x => ?_⟩ |
| 34 | have h := (mem_orderComplexNeighborhood_iff (∅ : Finset J) (p x.val)).mp x.property |
| 35 | obtain ⟨i, hi, _⟩ := h |
| 36 | exact Finset.notMem_empty i hi |
| 37 | |
| 38 | /-- The actual characteristic map for the empty selected set is |
| 39 | degreewise a bijection between empty types. Source: Hatcher, Theorem 2.27. -/ |
| 40 | theorem supportedSingularComparison_empty_isIso : |
| 41 | IsIso (supportedSingularComparison p (∅ : Finset J)) := by |
| 42 | let := liftedCoordinateNeighborhood_empty_isEmpty p |
| 43 | have (n : SimplexCategoryᵒᵖ) : |
| 44 | IsIso ((supportedSingularComparison p (∅ : Finset J)).app n) := by |
| 45 | apply (isIso_iff_bijective _).mpr |
| 46 | constructor |
| 47 | · intro a _ _ |
| 48 | exact (Finset.notMem_empty _ (a.property 0)).elim |
| 49 | · intro y |
| 50 | exact isEmptyElim |
| 51 | ((TopCat.of (liftedCoordinateNeighborhood p (∅ : Finset J))).toSSetObjEquiv n y |
| 52 | (stdSimplex.vertex 0)) |
| 53 | exact NatIso.isIso_of_isIso_app _ |
| 54 | |
| 55 | /-- The empty selected-set comparison is an actual chain |
| 56 | quasi-isomorphism. Source: Hatcher, Theorem 2.27, pp. 128-130. -/ |
| 57 | theorem supportedSingularComparison_empty_quasiIso : |
| 58 | QuasiIso (SSet.chainComplexMap (supportedSingularComparison p (∅ : Finset J)) |
| 59 | integralCoefficient.{u}) := by |
| 60 | let := supportedSingularComparison_empty_isIso p |
| 61 | infer_instance |
| 62 | |
| 63 | end PoincareMT.Proofs.M59 |