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.Transport.EventClassRebase |
| 2 | import PoincareLib.Topology.Homotopy.Groups.HomotopyGroupHomeomorph |
| 3 | import PoincareLib.Topology.Homotopy.LoopSpace.Evaluation |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open scoped Manifold ContDiff Bundle ENNReal Topology unitInterval |
| 8 | |
| 9 | universe u |
| 10 | |
| 11 | namespace PoincareMT |
| 12 | |
| 13 | noncomputable def m67ConstantLoopPath |
| 14 | {M : Type u} [TopologicalSpace M] [ChartedSpace LoopAmbient M] |
| 15 | [IsManifold (𝓡 3) ∞ M] {x y : M} (p : Path x y) : |
| 16 | M59ConstantLoopPath p where |
| 17 | loop := p.map LoopSpace.continuous_constantC1Loop |
| 18 | pointwise := fun _ _ => rfl |
| 19 | |
| 20 | theorem m67_pi_two_trivial_of_homeomorph |
| 21 | (B : M59HigherBasepointTransportService.{u}) |
| 22 | {M N : Type u} [TopologicalSpace M] [TopologicalSpace N] |
| 23 | (e : M ≃ₜ N) (x : M) (y : N) (p : Path (e x) y) |
| 24 | (h : Subsingleton (HomotopyGroup.Pi 2 M x)) : |
| 25 | Subsingleton (HomotopyGroup.Pi 2 N y) := by |
| 26 | have hf := (Poincare.Topology.homotopyGroupPostcomp_homeomorph_bijective 1 e x).2 |
| 27 | have hp := (m59BasepointTransport_bijective (B.transport 2) p).2 |
| 28 | refine ⟨fun a b => ?_⟩ |
| 29 | obtain ⟨a', rfl⟩ := hp a |
| 30 | obtain ⟨b', rfl⟩ := hp b |
| 31 | obtain ⟨a'', rfl⟩ := hf a' |
| 32 | obtain ⟨b'', rfl⟩ := hf b' |
| 33 | rw [h.elim a'' b''] |
| 34 | |
| 35 | /-- On an ordinary piece, an actual diffeomorphism and the selected point path |
| 36 | produce the transported nonzero class, with no replacement homotopy map. -/ |
| 37 | theorem m67_alpha_transport_of_diffeomorph |
| 38 | (S : M59IdentificationSystem.{u}) |
| 39 | (B : M59HigherBasepointTransportService.{u}) |
| 40 | {M N : Type u} |
| 41 | [TopologicalSpace M] [ChartedSpace LoopAmbient M] |
| 42 | [IsManifold (𝓡 3) ∞ M] |
| 43 | [T2Space M] [SecondCountableTopology M] |
| 44 | [TopologicalSpace N] [ChartedSpace LoopAmbient N] |
| 45 | [IsManifold (𝓡 3) ∞ N] |
| 46 | [T2Space N] [SecondCountableTopology N] |
| 47 | (compactM : IsCompact (Set.univ : Set M)) |
| 48 | (connectedM : IsConnected (Set.univ : Set M)) |
| 49 | (compactN : IsCompact (Set.univ : Set N)) |
| 50 | (connectedN : IsConnected (Set.univ : Set N)) |
| 51 | (x : M) (y : N) |
| 52 | (e : Diffeomorph (𝓡 3) (𝓡 3) M N ∞) |
| 53 | (p : Path (e x) y) (lp : M59ConstantLoopPath p) |
| 54 | (piTwoM : Subsingleton (HomotopyGroup.Pi 2 M x)) |
| 55 | (alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := M)) (constantC1Loop x)) |
| 56 | (halpha : (S.core compactM connectedM x piTwoM).pi_two_pi_three alpha ≠ 1) : |
| 57 | ∃ piTwoN : Subsingleton (HomotopyGroup.Pi 2 N y), |
| 58 | ∃ beta : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := N)) (constantC1Loop y), |
| 59 | (S.core compactN connectedN y piTwoN).pi_two_pi_three beta ≠ 1 ∧ |
| 60 | M67AlphaTransport B x y (e.toHomeomorph : C(M, N)) alpha beta := by |
| 61 | let f : C(M, N) := e.toHomeomorph |
| 62 | obtain ⟨L⟩ := S.postcomposition f e.contMDiff |
| 63 | let piTwoN := m67_pi_two_trivial_of_homeomorph B e.toHomeomorph x y p piTwoM |
| 64 | let beta := M59HigherBasepointTransport.map (B.transport 2) lp.loop |
| 65 | (surgeryHomotopyMap (n := 2) L.map (L.map_based (rfl : f x = f x)) alpha) |
| 66 | refine ⟨piTwoN, beta, ?_, L, p, lp, rfl⟩ |
| 67 | apply m67_rebased_alpha_nonzero S B compactM connectedM compactN connectedN |
| 68 | x y piTwoM piTwoN f e.contMDiff L p lp alpha beta halpha |
| 69 | · exact Poincare.Topology.homotopyGroupPostcomp_homeomorph_bijective 2 |
| 70 | e.toHomeomorph x |
| 71 | · rfl |
| 72 | |
| 73 | end PoincareMT |