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.Surgery.Comparison.Basic |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Topology.HomotopyFunctoriality |
| 3 | /-! |
| 4 | # Based third-homotopy transport of the comparison map |
| 5 | |
| 6 | The induced map is exactly `surgeryHomotopyMap`, including its supplied |
| 7 | basepoint equality. Homotopy equivalences induce bijections, and free |
| 8 | homotopies into a simply connected target induce equal based maps. |
| 9 | Sources: Morgan--Tian, pp. 430--431 and Claim 18.22, p. 433; Hatcher, |
| 10 | Section 4.1, pp. 341--342; the 2026-09-18 SurgeryComparison.Transport full contract. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Topology unitInterval |
| 16 | |
| 17 | universe u v |
| 18 | |
| 19 | namespace PoincareMT.SurgeryComparison.Topology |
| 20 | |
| 21 | noncomputable section |
| 22 | |
| 23 | variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] |
| 24 | |
| 25 | /-- The frozen surgery quotient map is the published cubical |
| 26 | postcomposition map; Morgan--Tian, pp. 430--431. -/ |
| 27 | theorem surgeryHomotopyMap_eq_postcomp (n : ℕ) (f : C(X, Y)) (x : X) : |
| 28 | surgeryHomotopyMap (n := n + 1) f (show f x = f x from rfl) = |
| 29 | Poincare.Topology.homotopyGroupPostcomp n f x := rfl |
| 30 | |
| 31 | /-- Freely homotopic maps with the same prescribed basepoint induce the |
| 32 | same actual based homotopy map into a simply connected target. This is |
| 33 | the basepoint-trace argument in the SurgeryComparison.Transport full contract, following Hatcher, |
| 34 | Section 4.1, p. 342. -/ |
| 35 | theorem surgeryHomotopyMap_eq_of_homotopic [SimplyConnectedSpace Y] |
| 36 | {x : X} {y : Y} {n : ℕ} (f g : C(X, Y)) (hf : f x = y) (hg : g x = y) |
| 37 | (hfg : f.Homotopic g) (a : HomotopyGroup.Pi n X x) : |
| 38 | surgeryHomotopyMap f hf a = surgeryHomotopyMap g hg a := by |
| 39 | obtain ⟨H⟩ := hfg |
| 40 | induction a using Quotient.inductionOn with | h a => |
| 41 | let p : Path y y := |
| 42 | { toFun := fun t => H (t, x) |
| 43 | continuous_toFun := H.continuous.comp (continuous_id.prodMk continuous_const) |
| 44 | source' := (H.apply_zero x).trans hf |
| 45 | target' := (H.apply_one x).trans hg } |
| 46 | apply Quotient.sound |
| 47 | apply Topology.homotopicRel_of_uniform_boundary_trace |
| 48 | (surgeryMappedGenLoop f hf a) (surgeryMappedGenLoop g hg a) |
| 49 | (H.compContinuousMap a.val) p |
| 50 | intro t z |
| 51 | exact congrArg (fun w => H (t, w)) (a.property z.val z.property) |
| 52 | |
| 53 | /-- Bijectivity is attached to the exact forward continuous map of the |
| 54 | homotopy equivalence, with the contract's chosen target point. Hatcher, |
| 55 | p. 342; Morgan--Tian, pp. 430--431. -/ |
| 56 | theorem surgeryHomotopyMap_bijective_of_homotopyEquiv |
| 57 | [SimplyConnectedSpace X] [SimplyConnectedSpace Y] |
| 58 | {x : X} {y : Y} (n : ℕ) (f : C(X, Y)) (hf : f x = y) |
| 59 | (he : ∃ e : ContinuousMap.HomotopyEquiv X Y, e.toFun = f) : |
| 60 | Function.Bijective (surgeryHomotopyMap (n := n + 1) f hf) := by |
| 61 | obtain ⟨e, rfl⟩ := he |
| 62 | subst y |
| 63 | rw [surgeryHomotopyMap_eq_postcomp] |
| 64 | exact Topology.homotopyGroupPostcomp_bijective_of_homotopyEquiv n e x |
| 65 | |
| 66 | /-- The pi3 specialization used for the selected surgery comparison map; |
| 67 | Morgan--Tian, pp. 430--431 and Claim 18.22. -/ |
| 68 | theorem surgeryPiThree_bijective_of_homotopyEquiv |
| 69 | [SimplyConnectedSpace X] [SimplyConnectedSpace Y] |
| 70 | {x : X} {y : Y} (f : C(X, Y)) (hf : f x = y) |
| 71 | (he : ∃ e : ContinuousMap.HomotopyEquiv X Y, e.toFun = f) : |
| 72 | Function.Bijective (surgeryHomotopyMap (n := 3) f hf) := |
| 73 | surgeryHomotopyMap_bijective_of_homotopyEquiv 2 f hf he |
| 74 | |
| 75 | end |
| 76 | |
| 77 | end PoincareMT.SurgeryComparison.Topology |