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.Class.Regular |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.Rebasing.HomotopyNaturality |
| 3 | |
| 4 | set_option autoImplicit false |
| 5 | |
| 6 | open scoped Manifold ContDiff Bundle ENNReal Topology unitInterval |
| 7 | |
| 8 | universe u |
| 9 | |
| 10 | namespace PoincareMT |
| 11 | |
| 12 | variable {M N O : Type u} |
| 13 | [TopologicalSpace M] [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 14 | [TopologicalSpace N] [ChartedSpace LoopAmbient N] [IsManifold (𝓡 3) ∞ N] |
| 15 | [TopologicalSpace O] [ChartedSpace LoopAmbient O] [IsManifold (𝓡 3) ∞ O] |
| 16 | |
| 17 | theorem m67_loop_postcomposition_apply {f : C(M, N)} |
| 18 | (L : M59LoopPostcomposition f) (gamma : C1FreeLoopSpace (M := M)) |
| 19 | (z : LoopCircle) : L.map gamma z = f (gamma z) := by |
| 20 | rw [← (L.map gamma).boundary, L.extension_agreement, gamma.boundary] |
| 21 | |
| 22 | noncomputable def m67LoopPostcompositionId : M59LoopPostcomposition (ContinuousMap.id M) where |
| 23 | map := ContinuousMap.id _ |
| 24 | extension_agreement := fun _ _ => rfl |
| 25 | maps_constant := fun _ => rfl |
| 26 | |
| 27 | noncomputable def m67LoopPostcompositionComp {f : C(M, N)} {g : C(N, O)} |
| 28 | (L : M59LoopPostcomposition f) (K : M59LoopPostcomposition g) : |
| 29 | M59LoopPostcomposition (g.comp f) where |
| 30 | map := K.map.comp L.map |
| 31 | extension_agreement := fun gamma z => by |
| 32 | change (K.map (L.map gamma)).extension z = g (f (gamma.extension z)) |
| 33 | rw [K.extension_agreement, L.extension_agreement] |
| 34 | maps_constant := fun x => by |
| 35 | change K.map (L.map (constantC1Loop x)) = constantC1Loop (g (f x)) |
| 36 | rw [L.maps_constant, K.maps_constant] |
| 37 | |
| 38 | theorem m67_alpha_transport_refl |
| 39 | (B : M59HigherBasepointTransportService.{u}) (x : M) |
| 40 | (alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := M)) (constantC1Loop x)) : |
| 41 | M67AlphaTransport B x x (ContinuousMap.id M) alpha alpha := by |
| 42 | refine ⟨m67LoopPostcompositionId, Path.refl x, |
| 43 | ⟨Path.refl (constantC1Loop x), fun _ _ => rfl⟩, ?_⟩ |
| 44 | exact ((B.transport 2).map_refl _).trans (m67_homotopy_map_id alpha) |
| 45 | |
| 46 | /-- Class transport composes along the actual continuous maps and concatenated |
| 47 | point paths. -/ |
| 48 | theorem m67_alpha_transport_trans |
| 49 | (B : M59HigherBasepointTransportService.{u}) |
| 50 | {x : M} {y : N} {z : O} {f : C(M, N)} {g : C(N, O)} |
| 51 | {alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := M)) (constantC1Loop x)} |
| 52 | {beta : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := N)) (constantC1Loop y)} |
| 53 | {gamma : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := O)) (constantC1Loop z)} |
| 54 | (h₁ : M67AlphaTransport B x y f alpha beta) |
| 55 | (h₂ : M67AlphaTransport B y z g beta gamma) : |
| 56 | M67AlphaTransport B x z (g.comp f) alpha gamma := by |
| 57 | obtain ⟨L, p, lp, hbeta⟩ := h₁ |
| 58 | obtain ⟨K, q, lq, hgamma⟩ := h₂ |
| 59 | let r := p.map g.continuous |
| 60 | let lr : Path (constantC1Loop (g (f x))) (constantC1Loop (g y)) := |
| 61 | (lp.loop.map K.map.continuous).cast |
| 62 | (K.maps_constant (f x)).symm (K.maps_constant y).symm |
| 63 | let lpr : M59ConstantLoopPath r := |
| 64 | { loop := lr |
| 65 | pointwise := fun t c => by |
| 66 | change K.map (lp.loop t) c = g (p t) |
| 67 | rw [m67_loop_postcomposition_apply, lp.pointwise] } |
| 68 | let lpq : M59ConstantLoopPath (r.trans q) := |
| 69 | { loop := lr.trans lq.loop |
| 70 | pointwise := fun t c => by |
| 71 | simp only [Path.trans_apply] |
| 72 | split_ifs |
| 73 | · exact lpr.pointwise _ c |
| 74 | · exact lq.pointwise _ c } |
| 75 | refine ⟨m67LoopPostcompositionComp L K, r.trans q, lpq, ?_⟩ |
| 76 | have hnat := m67_basepoint_transport_naturality B K.map lp.loop lr |
| 77 | (K.maps_constant (f x)) (K.maps_constant y) (fun _ => rfl) |
| 78 | (surgeryHomotopyMap (n := 2) L.map (L.map_based rfl) alpha) |
| 79 | change M59HigherBasepointTransport.map (B.transport 2) (lr.trans lq.loop) |
| 80 | (surgeryHomotopyMap (n := 2) (K.map.comp L.map) |
| 81 | ((congrArg K.map (L.map_based rfl)).trans (K.maps_constant (f x))) alpha) = gamma |
| 82 | refine ((B.transport 2 (X := C1FreeLoopSpace (M := O))).map_trans |
| 83 | lr lq.loop _).trans ?_ |
| 84 | rw [← m67_homotopy_map_comp L.map K.map (L.map_based rfl) (K.maps_constant (f x))] |
| 85 | exact (congrArg (M59HigherBasepointTransport.map (B.transport 2) lq.loop) hnat).trans |
| 86 | ((congrArg (fun b => M59HigherBasepointTransport.map (B.transport 2) lq.loop |
| 87 | (surgeryHomotopyMap (n := 2) K.map (K.maps_constant y) b)) hbeta).trans hgamma) |
| 88 | |
| 89 | end PoincareMT |