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.FreeLoopAbelian |
| 2 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Comparison.CubeBoundaryQuotient |
| 3 | |
| 4 | /-! |
| 5 | # Exact circle quotients and free loop classes |
| 6 | |
| 7 | For an abelian fundamental group, descending a based interval loop through |
| 8 | an exact circle quotient detects its based class even under free homotopy. |
| 9 | Source: Hatcher, Proposition 4A.2, p. 422. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Topology unitInterval |
| 15 | |
| 16 | namespace PoincareMT.Proofs.M59.CubeBoundaryQuotient |
| 17 | |
| 18 | variable {S X : Type*} [TopologicalSpace S] [T2Space S] [TopologicalSpace X] |
| 19 | (q : CubeBoundaryQuotient (Fin 1) S) {x : X} |
| 20 | |
| 21 | /-- A free homotopy between two descended based loops detects equality |
| 22 | of their based classes when pi1 is abelian. Source: Hatcher 4A.2, p. 422. -/ |
| 23 | theorem homotopic_of_descend_homotopic |
| 24 | (hcomm : ∀ a b : FundamentalGroup X x, a * b = b * a) |
| 25 | {f g : GenLoop (Fin 1) X x} (h : (q.descend f).Homotopic (q.descend g)) : |
| 26 | GenLoop.Homotopic f g := by |
| 27 | obtain ⟨H⟩ := h |
| 28 | let p := genLoopEquivOfUnique (Fin 1) f |
| 29 | let r := genLoopEquivOfUnique (Fin 1) g |
| 30 | let K : p.toContinuousMap.Homotopy r.toContinuousMap := { |
| 31 | toFun v := H (v.1, q.map (fun _ => v.2)) |
| 32 | continuous_toFun := by fun_prop |
| 33 | map_zero_left := fun t => (H.apply_zero _).trans (q.descend_map f _) |
| 34 | map_one_left := fun t => (H.apply_one _).trans (q.descend_map g _) } |
| 35 | have hK : ∀ t, K (t, 0) = K (t, 1) := by |
| 36 | intro t |
| 37 | change H (t, q.map (fun _ => 0)) = H (t, q.map (fun _ => 1)) |
| 38 | rw [q.boundary_collapsed _ ⟨0, Or.inl rfl⟩, |
| 39 | q.boundary_collapsed _ ⟨0, Or.inr rfl⟩] |
| 40 | have hp := Path.homotopic_of_free_homotopy hcomm p r K hK |
| 41 | have he : (⟦f⟧ : HomotopyGroup (Fin 1) X x) = ⟦g⟧ := |
| 42 | (homotopyGroupEquivFundamentalGroupOfUnique (Fin 1)).injective (Quotient.sound hp) |
| 43 | exact Quotient.exact he |
| 44 | |
| 45 | /-- For abelian pi1, based interval classes are exactly free classes of |
| 46 | their descended circle maps. Source: Hatcher 4A.2, p. 422. -/ |
| 47 | theorem descend_homotopic_iff |
| 48 | (hcomm : ∀ a b : FundamentalGroup X x, a * b = b * a) |
| 49 | {f g : GenLoop (Fin 1) X x} : |
| 50 | (q.descend f).Homotopic (q.descend g) ↔ GenLoop.Homotopic f g := |
| 51 | ⟨q.homotopic_of_descend_homotopic hcomm, q.descend_homotopic⟩ |
| 52 | |
| 53 | end PoincareMT.Proofs.M59.CubeBoundaryQuotient |