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.Geometry.RicciFlow.Extinction.Width.Class.BasepointTransport |
| 2 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Comparison.CubeTransportMultiplication |
| 3 | |
| 4 | /-! |
| 5 | # Higher basepoint transport on actual cubical representatives |
| 6 | |
| 7 | Hatcher, Section 4.1, pp. 341-342: transporting from x to y carries the |
| 8 | path from x to y on the boundary of a homotopy, equivalently applying |
| 9 | Hatcher's beta construction for the reversed path. Homotopy extension |
| 10 | chooses representatives; relative homotopy makes the choice immaterial. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Topology unitInterval |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Whisker actual generalized loops by extending the prescribed boundary path. |
| 24 | Source: Hatcher, Section 4.1, pp. 341-342. -/ |
| 25 | def m59GenLoopWhisker (X : Type u) [TopologicalSpace X] (n : ℕ) : |
| 26 | M59GenLoopWhisker X n where |
| 27 | whisker := GenLoop.boundaryTransport |
| 28 | respects_homotopy := GenLoop.boundaryTransport_homotopic |
| 29 | |
| 30 | /-- The quotient map is represented by the chosen transported cube. |
| 31 | Source: Hatcher, Section 4.1, definition of beta, p. 341. -/ |
| 32 | theorem m59GenLoopWhisker_map_mk {X : Type u} [TopologicalSpace X] {n : ℕ} |
| 33 | {x y : X} (p : Path x y) (a : GenLoop (Fin n) X x) : |
| 34 | M59GenLoopWhisker.map (m59GenLoopWhisker X n) p ⟦a⟧ = |
| 35 | ⟦GenLoop.boundaryTransport p a⟧ := rfl |
| 36 | |
| 37 | /-- All path and group laws for higher basepoint transport, in every dimension. |
| 38 | The zero-dimensional map preserves the underlying path component. |
| 39 | Source: Hatcher, Section 4.1, pp. 341-342. -/ |
| 40 | def m59HigherBasepointTransport (X : Type u) [TopologicalSpace X] (n : ℕ) : |
| 41 | M59HigherBasepointTransport X n where |
| 42 | whisker := m59GenLoopWhisker X n |
| 43 | map_refl a := Quotient.inductionOn a fun a => |
| 44 | Quotient.sound (GenLoop.boundaryTransport_refl a) |
| 45 | map_trans p q a := Quotient.inductionOn a fun a => |
| 46 | Quotient.sound (GenLoop.boundaryTransport_trans p q a) |
| 47 | map_left_inverse p a := Quotient.inductionOn a fun a => |
| 48 | Quotient.sound (GenLoop.boundaryTransport_symm p a) |
| 49 | map_one p _ := Quotient.sound (GenLoop.boundaryTransport_const p) |
| 50 | map_mul p _ a b := by |
| 51 | let i : Fin n := Classical.choice inferInstance |
| 52 | refine Quotient.inductionOn₂ a b ?_ |
| 53 | intro a b |
| 54 | exact (congrArg (M59GenLoopWhisker.map (m59GenLoopWhisker X n) p) |
| 55 | (HomotopyGroup.mul_spec (i := i) (p := a) (q := b))).trans |
| 56 | ((Quotient.sound (GenLoop.boundaryTransport_transAt i p b a)).trans |
| 57 | (HomotopyGroup.mul_spec (i := i) |
| 58 | (p := GenLoop.boundaryTransport p a) (q := GenLoop.boundaryTransport p b)).symm) |
| 59 | |
| 60 | /-- A path homotopy leaves the induced transport map unchanged. |
| 61 | Source: Hatcher, Section 4.1, p. 341. -/ |
| 62 | theorem m59HigherBasepointTransport_path_homotopic |
| 63 | {X : Type u} [TopologicalSpace X] {n : ℕ} {x y : X} {p q : Path x y} |
| 64 | (h : p.Homotopic q) (a : HomotopyGroup.Pi n X x) : |
| 65 | (m59HigherBasepointTransport X n).map p a = |
| 66 | (m59HigherBasepointTransport X n).map q a := |
| 67 | Quotient.inductionOn a fun a => Quotient.sound (GenLoop.boundaryTransport_path_homotopic h a) |
| 68 | |
| 69 | end PoincareMT |