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.Class.Uniqueness |
| 3 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Path.InitialClass |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open scoped Manifold ContDiff Bundle Topology unitInterval |
| 8 | |
| 9 | universe u |
| 10 | |
| 11 | namespace PoincareMT |
| 12 | |
| 13 | /-- The topological part of a width slice, before choosing its metric. -/ |
| 14 | structure M67ClassDatum (S : M59IdentificationSystem.{u}) |
| 15 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) where |
| 16 | pi_two_trivial : Subsingleton (HomotopyGroup.Pi 2 C.carrier.carrier C.basepoint) |
| 17 | alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 18 | (constantC1Loop C.basepoint) |
| 19 | nonzero : (S.core C.compact C.connected C.basepoint pi_two_trivial).pi_two_pi_three |
| 20 | alpha ≠ 1 |
| 21 | |
| 22 | @[ext] theorem M67ClassDatum.ext |
| 23 | {S : M59IdentificationSystem.{u}} |
| 24 | {A : GeneralizedSliceCarrier.{u}} {C : SurgerySelectedComponent A} |
| 25 | {a b : M67ClassDatum S C} (h : a.alpha = b.alpha) : a = b := by |
| 26 | cases a |
| 27 | cases b |
| 28 | cases h |
| 29 | rfl |
| 30 | |
| 31 | def M67InitialClassData.toClassDatum |
| 32 | {S : M59IdentificationSystem.{u}} {A : GeneralizedSliceCarrier.{u}} |
| 33 | {C : SurgerySelectedComponent A} {g : RiemannianMetric 3 A.carrier} |
| 34 | (initial : M67InitialClassData S C g) : M67ClassDatum S C := |
| 35 | ⟨initial.pi_two_trivial, initial.alpha, initial.nonzero⟩ |
| 36 | |
| 37 | theorem m67_class_datum_regular_exists |
| 38 | {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 39 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 40 | {P : RepairedComponentPath D.flow T W} |
| 41 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 42 | (H : RepairedAncestryTransportInput D W P K C) |
| 43 | (S : M59IdentificationSystem.{u}) (B : M59HigherBasepointTransportService.{u}) |
| 44 | (a b : Set.Icc (0 : ℝ) T) (hab : a.1 < b.1) |
| 45 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc a.1 b.1)) |
| 46 | (x : M67ClassDatum S (P.component a)) : |
| 47 | ∃ y : M67ClassDatum S (P.component b), |
| 48 | M67AlphaTransport B (P.component a).basepoint (P.component b).basepoint |
| 49 | (repairedDiffeomorphContinuousMap (P.regular_transport a b hab hJ)) |
| 50 | x.alpha y.alpha := by |
| 51 | obtain ⟨p⟩ := H.regular_basepoint_bridge a b hab hJ |
| 52 | obtain ⟨hpi, alpha, hnonzero, htransport⟩ := m67_alpha_transport_of_diffeomorph |
| 53 | S B (P.component a).compact (P.component a).connected |
| 54 | (P.component b).compact (P.component b).connected |
| 55 | (P.component a).basepoint (P.component b).basepoint |
| 56 | (P.regular_transport a b hab hJ) p (m67ConstantLoopPath p) |
| 57 | x.pi_two_trivial x.alpha x.nonzero |
| 58 | exact ⟨⟨hpi, alpha, hnonzero⟩, htransport⟩ |
| 59 | |
| 60 | noncomputable def m67RegularClassDatum |
| 61 | {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 62 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 63 | {P : RepairedComponentPath D.flow T W} |
| 64 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 65 | (H : RepairedAncestryTransportInput D W P K C) |
| 66 | (S : M59IdentificationSystem.{u}) (B : M59HigherBasepointTransportService.{u}) |
| 67 | (a b : Set.Icc (0 : ℝ) T) (hab : a.1 < b.1) |
| 68 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc a.1 b.1)) |
| 69 | (x : M67ClassDatum S (P.component a)) : M67ClassDatum S (P.component b) := |
| 70 | (m67_class_datum_regular_exists H S B a b hab hJ x).choose |
| 71 | |
| 72 | theorem m67RegularClassDatum_transport |
| 73 | {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 74 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 75 | {P : RepairedComponentPath D.flow T W} |
| 76 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 77 | (H : RepairedAncestryTransportInput D W P K C) |
| 78 | (S : M59IdentificationSystem.{u}) (B : M59HigherBasepointTransportService.{u}) |
| 79 | (a b : Set.Icc (0 : ℝ) T) (hab : a.1 < b.1) |
| 80 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc a.1 b.1)) |
| 81 | (x : M67ClassDatum S (P.component a)) : |
| 82 | M67AlphaTransport B (P.component a).basepoint (P.component b).basepoint |
| 83 | (repairedDiffeomorphContinuousMap (P.regular_transport a b hab hJ)) |
| 84 | x.alpha (m67RegularClassDatum H S B a b hab hJ x).alpha := |
| 85 | (m67_class_datum_regular_exists H S B a b hab hJ x).choose_spec |
| 86 | |
| 87 | end PoincareMT |