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.Assembly.ClassPath.Event |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.Event.Parent |
| 3 | |
| 4 | set_option autoImplicit false |
| 5 | |
| 6 | open scoped Manifold ContDiff Bundle Topology |
| 7 | |
| 8 | universe u |
| 9 | |
| 10 | namespace PoincareMT |
| 11 | |
| 12 | def M67ClassDatum.cast {S : M59IdentificationSystem.{u}} |
| 13 | {U : GeneralizedSliceCarrier.{u}} {C₁ C₂ : SurgerySelectedComponent U} |
| 14 | (h : C₁ = C₂) (x : M67ClassDatum S C₁) : M67ClassDatum S C₂ := h ▸ x |
| 15 | |
| 16 | theorem M67ClassDatum.cast_alpha_heq {S : M59IdentificationSystem.{u}} |
| 17 | {U : GeneralizedSliceCarrier.{u}} {C₁ C₂ : SurgerySelectedComponent U} |
| 18 | (h : C₁ = C₂) (x : M67ClassDatum S C₁) : |
| 19 | HEq (x.cast h).alpha x.alpha := by subst C₂; rfl |
| 20 | |
| 21 | theorem M67ClassDatum.cast_transport {S : M59IdentificationSystem.{u}} |
| 22 | (B : M59HigherBasepointTransportService.{u}) |
| 23 | {U : GeneralizedSliceCarrier.{u}} {C₁ C₂ : SurgerySelectedComponent U} |
| 24 | (h : C₂ = C₁) (x : M67ClassDatum S C₁) : |
| 25 | M67AlphaTransport B C₁.basepoint C₂.basepoint |
| 26 | (repairedDiffeomorphContinuousMap (m67ComponentIdentification C₁ C₂ h)) |
| 27 | x.alpha (x.cast h.symm).alpha := by |
| 28 | subst C₂ |
| 29 | exact m67_alpha_transport_refl B C₁.basepoint x.alpha |
| 30 | |
| 31 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 32 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 33 | {P : RepairedComponentPath D.flow T W} |
| 34 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 35 | (H : RepairedAncestryTransportInput D W P K C) |
| 36 | (B : M59HigherBasepointTransportService.{u}) |
| 37 | (A : RepairedAncestryTransportData D W P K C H B) |
| 38 | (S : M59IdentificationSystem.{u}) |
| 39 | (t : Set.Icc (0 : ℝ) T) (ht : t.1 ∈ D.flow.surgery_times) |
| 40 | (hpost : Nonempty (D.flow.slice t.1).carrier) |
| 41 | (hdelta : D.flow.parameters.delta t.1 < repairedComparisonDeltaBound D.flow.local_constants) |
| 42 | (hh : D.flow.parameters.h t.1 < repairedComparisonHeightBound D.flow.local_constants) |
| 43 | |
| 44 | def m67EventParentClassDatum |
| 45 | (x : M67ClassDatum S (P.component (m67EventPreTime t ht hpost))) : |
| 46 | M67ClassDatum S (H.event_input t ht hpost).parent := |
| 47 | x.cast (eq_of_heq (H.event_parent_path t ht hpost)).symm |
| 48 | |
| 49 | noncomputable def m67EventPostClassDatum |
| 50 | (x : M67ClassDatum S (P.component (m67EventPreTime t ht hpost))) : |
| 51 | M67ClassDatum S (H.event_input t ht hpost).child := |
| 52 | m67EventClassDatum S B (H.event_input t ht hpost) |
| 53 | (A.event_output t ht hpost hdelta hh) (m67EventParentClassDatum H S t ht hpost x) |
| 54 | |
| 55 | noncomputable def m67SelectedEventClassDatum |
| 56 | (x : M67ClassDatum S (P.component (m67EventPreTime t ht hpost))) : |
| 57 | M67ClassDatum S (P.component t) := |
| 58 | (m67EventPostClassDatum H B A S t ht hpost hdelta hh x).cast |
| 59 | (eq_of_heq (H.event_child_path t ht hpost)) |
| 60 | |
| 61 | theorem m67_event_class_transport_of_regular |
| 62 | (x : M67ClassDatum S (P.component (m67EventPreTime t ht hpost))) |
| 63 | (s : Set.Icc (0 : ℝ) T) |
| 64 | (hs : (D.flow.event t.1 ht).tMinus < s.1) |
| 65 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event t.1 ht).tMinus s.1)) |
| 66 | (y : M67ClassDatum S (P.component s)) |
| 67 | (hregular : M67AlphaTransport B |
| 68 | (P.component (m67EventPreTime t ht hpost)).basepoint (P.component s).basepoint |
| 69 | (repairedDiffeomorphContinuousMap |
| 70 | (P.regular_transport (m67EventPreTime t ht hpost) s hs hJ)) x.alpha y.alpha) |
| 71 | (f : C((H.event_input t ht hpost).parent.carrier.carrier, |
| 72 | (H.event_input t ht hpost).child.carrier.carrier)) |
| 73 | (hsmooth : ContMDiff (𝓡 3) (𝓡 3) ∞ f) |
| 74 | (hbase : f (H.event_input t ht hpost).parent.basepoint = |
| 75 | (A.event_output t ht hpost hdelta hh).comparison.target_basepoint) |
| 76 | (hmap : ∀ alpha, surgeryHomotopyMap (n := 3) f hbase alpha = |
| 77 | surgeryHomotopyMap (A.event_output t ht hpost hdelta hh).comparison.map |
| 78 | (A.event_output t ht hpost hdelta hh).comparison.based alpha) : |
| 79 | M67AlphaTransport B (P.component s).basepoint |
| 80 | (H.event_input t ht hpost).child.basepoint |
| 81 | (f.comp (repairedDiffeomorphContinuousMap |
| 82 | (m67EventPreToParent H t ht hpost s hs hJ))) |
| 83 | y.alpha (m67EventPostClassDatum H B A S t ht hpost hdelta hh x).alpha := by |
| 84 | have hback := m67_alpha_transport_symm S B |
| 85 | (P.regular_transport (m67EventPreTime t ht hpost) s hs hJ) |
| 86 | (S.core (P.component (m67EventPreTime t ht hpost)).compact |
| 87 | (P.component (m67EventPreTime t ht hpost)).connected |
| 88 | (P.component (m67EventPreTime t ht hpost)).basepoint x.pi_two_trivial) hregular |
| 89 | have hparent := x.cast_transport B (eq_of_heq (H.event_parent_path t ht hpost)) |
| 90 | have hevent := m67EventClassDatum_transport S B (H.event_input t ht hpost) |
| 91 | (A.event_output t ht hpost hdelta hh) (m67EventParentClassDatum H S t ht hpost x) |
| 92 | f hsmooth hbase hmap |
| 93 | exact m67_alpha_transport_trans B (m67_alpha_transport_trans B hback hparent) hevent |
| 94 | |
| 95 | end PoincareMT |