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.SupportedConeComparison |
| 2 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Comparison.Lefschetz.SupportedEmptyComparison |
| 3 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Comparison.Lefschetz.SupportedComparisonGluing |
| 4 | import Mathlib.Order.Preorder.Finite |
| 5 | |
| 6 | /-! |
| 7 | # The actual singular comparison for a lifted finite order complex |
| 8 | |
| 9 | Induct on a selected finite vertex set, using a minimal vertex. Its |
| 10 | deletion and strict upper link have fewer vertices, and its upper cone |
| 11 | has the proved characteristic comparison. The literal subcomplex square |
| 12 | and matching open neighborhoods give the induction step by Mayer-Vietoris. |
| 13 | At the full selected set, removing only subtype proofs recovers the actual |
| 14 | singular projection of the original lifted model. |
| 15 | Source: Hatcher, Theorem 2.27, printed pp. 128-130. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | open CategoryTheory HomologicalComplex |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M59 |
| 27 | |
| 28 | open M02.Topology |
| 29 | |
| 30 | variable {J : Type u} [PartialOrder J] [Fintype J] |
| 31 | {E : Type u} [TopologicalSpace E] |
| 32 | (p : C(E, (finiteOrderComplex J).space)) (hp : IsCoveringMap p) |
| 33 | |
| 34 | include hp in |
| 35 | /-- Every selected characteristic map is a quasi-isomorphism, by the |
| 36 | deletion, cone, and link induction. Source: Hatcher, Theorem 2.27. -/ |
| 37 | theorem supportedSingularComparison_quasiIso (s : Finset J) : |
| 38 | QuasiIso (SSet.chainComplexMap (supportedSingularComparison p s) |
| 39 | integralCoefficient.{u}) := by |
| 40 | classical |
| 41 | refine s.strongInductionOn ?_ |
| 42 | intro s ih |
| 43 | by_cases hs : s = ∅ |
| 44 | · subst s |
| 45 | exact supportedSingularComparison_empty_quasiIso p |
| 46 | obtain ⟨v, hv, hmin⟩ := Finset.exists_minimal (Finset.nonempty_iff_ne_empty.mpr hs) |
| 47 | have hminimal : ∀ j ∈ s, j ≤ v → j = v := by |
| 48 | intro j hj hjv |
| 49 | exact le_antisymm hjv (hmin hj hjv) |
| 50 | have hl : s.filter (v < ·) ⊂ s := by |
| 51 | apply Finset.ssubset_iff_subset_ne.mpr |
| 52 | refine ⟨Finset.filter_subset _ _, ?_⟩ |
| 53 | intro h |
| 54 | have hv' : v ∈ s.filter (v < ·) := h.symm ▸ hv |
| 55 | exact (lt_irrefl v) (Finset.mem_filter.mp hv').2 |
| 56 | exact supportedSingularComparison_minimal_gluing p s v hminimal |
| 57 | (ih _ (Finset.erase_ssubset hv)) |
| 58 | (supportedSingularComparison_cone_quasiIso p hp (s.filter (v ≤ ·)) v |
| 59 | (Finset.mem_filter.mpr ⟨hv, le_rfl⟩) |
| 60 | (fun _ hj => (Finset.mem_filter.mp hj).2)) |
| 61 | (ih _ hl) |
| 62 | |
| 63 | /-- With all vertices selected, the supported lifted subcomplex is |
| 64 | the entire original lifted model. Source: Hatcher, Theorem 2.27. -/ |
| 65 | theorem supportedSingularLift_univ : |
| 66 | supportedSingularLift p (orderComplexSingular J) (Finset.univ : Finset J) = ⊤ := by |
| 67 | ext n z |
| 68 | change (∀ i, z.val.1.obj i ∈ Finset.univ) ↔ True |
| 69 | simp only [Finset.mem_univ, implies_true] |
| 70 | |
| 71 | omit hp in |
| 72 | set_option backward.isDefEq.respectTransparency false in |
| 73 | /-- The literal characteristic projection from the lifted finite nerve |
| 74 | to actual singular simplices is an integral quasi-isomorphism. This holds |
| 75 | for every covering, without compactness or connectedness assumptions. |
| 76 | Source: Hatcher, Theorem 2.27, pp. 128-130. -/ |
| 77 | theorem orderComplexSingularLift_quasiIso (hp : IsCoveringMap p) : |
| 78 | QuasiIso (SSet.chainComplexMap |
| 79 | (singularLiftProjection p (nerve J) (orderComplexSingular J)) |
| 80 | integralCoefficient.{u}) := by |
| 81 | let D := supportedSingularLift p (orderComplexSingular J) (Finset.univ : Finset J) |
| 82 | let W := liftedCoordinateNeighborhood p (Finset.univ : Finset J) |
| 83 | have hW (x : E) : x ∈ W := by |
| 84 | change p x ∈ orderComplexNeighborhood (Finset.univ : Finset J) |
| 85 | rw [orderComplexNeighborhood_univ] |
| 86 | exact Set.mem_univ _ |
| 87 | let e : W ≃ₜ E := { |
| 88 | toFun := Subtype.val |
| 89 | invFun := fun x => ⟨x, hW x⟩ |
| 90 | left_inv := fun _ => rfl |
| 91 | right_inv := fun _ => rfl |
| 92 | continuous_toFun := continuous_subtype_val |
| 93 | continuous_invFun := continuous_id.subtype_mk hW } |
| 94 | let : IsIso D.ι := by |
| 95 | dsimp only [D] |
| 96 | rw [supportedSingularLift_univ p] |
| 97 | change IsIso (SSet.Subcomplex.topIso _).hom |
| 98 | infer_instance |
| 99 | let := supportedSingularComparison_quasiIso p hp (Finset.univ : Finset J) |
| 100 | let := homeomorphSingularChainMap_quasiIso e |
| 101 | let T := (SSet.chainComplexFunctor (ModuleCat.{u} ℤ)).obj integralCoefficient |
| 102 | have h : QuasiIso (T.map (D.ι ≫ |
| 103 | singularLiftProjection p (nerve J) (orderComplexSingular J))) := by |
| 104 | rw [← supportedSingularComparison_projection p (Finset.univ : Finset J), |
| 105 | Functor.map_comp] |
| 106 | infer_instance |
| 107 | rw [Functor.map_comp] at h |
| 108 | exact (quasiIso_iff_comp_left _ _).mp h |
| 109 | |
| 110 | end PoincareMT.Proofs.M59 |