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.Path.Data |
| 2 | |
| 3 | set_option autoImplicit false |
| 4 | set_option backward.isDefEq.respectTransparency false |
| 5 | |
| 6 | open scoped Manifold ContDiff Bundle Topology |
| 7 | |
| 8 | universe u |
| 9 | |
| 10 | namespace PoincareMT |
| 11 | |
| 12 | noncomputable def m67ComponentIdentification {U : GeneralizedSliceCarrier.{u}} |
| 13 | (C₁ C₂ : SurgerySelectedComponent U) (h : C₂ = C₁) : |
| 14 | Diffeomorph (𝓡 3) (𝓡 3) C₁.carrier.carrier C₂.carrier.carrier ∞ := by |
| 15 | subst C₂ |
| 16 | exact Diffeomorph.refl (𝓡 3) C₁.carrier.carrier ∞ |
| 17 | |
| 18 | theorem m67ComponentIdentification_inclusion {U : GeneralizedSliceCarrier.{u}} |
| 19 | (C₁ C₂ : SurgerySelectedComponent U) (h : C₂ = C₁) (x) : |
| 20 | C₂.inclusion (m67ComponentIdentification C₁ C₂ h x) = C₁.inclusion x := by |
| 21 | subst C₂ |
| 22 | rfl |
| 23 | |
| 24 | theorem m67ComponentIdentification_basepoint {U : GeneralizedSliceCarrier.{u}} |
| 25 | (C₁ C₂ : SurgerySelectedComponent U) (h : C₂ = C₁) : |
| 26 | m67ComponentIdentification C₁ C₂ h C₁.basepoint = C₂.basepoint := by |
| 27 | subst C₂ |
| 28 | rfl |
| 29 | |
| 30 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 31 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 32 | {P : RepairedComponentPath D.flow T W} |
| 33 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 34 | (H : RepairedAncestryTransportInput D W P K C) |
| 35 | (S : Set.Icc (0 : ℝ) T) (hS : S.1 ∈ D.flow.surgery_times) |
| 36 | (hpost : Nonempty (D.flow.slice S.1).carrier) |
| 37 | |
| 38 | def m67EventPreTime : Set.Icc (0 : ℝ) T := |
| 39 | ⟨(D.flow.event S.1 hS).tMinus, |
| 40 | (D.flow.event S.1 hS).tMinus_nonnegative, |
| 41 | (D.flow.event S.1 hS).tMinus_lt.le.trans S.2.2⟩ |
| 42 | |
| 43 | noncomputable def m67EventParentIdentification : |
| 44 | Diffeomorph (𝓡 3) (𝓡 3) |
| 45 | (P.component (m67EventPreTime S hS hpost)).carrier.carrier |
| 46 | (H.event_input S hS hpost).parent.carrier.carrier ∞ := |
| 47 | m67ComponentIdentification _ _ (eq_of_heq (H.event_parent_path S hS hpost)) |
| 48 | |
| 49 | theorem m67EventParentIdentification_inclusion (x) : |
| 50 | (H.event_input S hS hpost).parent.inclusion |
| 51 | (m67EventParentIdentification H S hS hpost x) = |
| 52 | (P.component (m67EventPreTime S hS hpost)).inclusion x := |
| 53 | m67ComponentIdentification_inclusion _ _ _ x |
| 54 | |
| 55 | theorem m67EventParentIdentification_basepoint : |
| 56 | m67EventParentIdentification H S hS hpost |
| 57 | (P.component (m67EventPreTime S hS hpost)).basepoint = |
| 58 | (H.event_input S hS hpost).parent.basepoint := |
| 59 | m67ComponentIdentification_basepoint _ _ _ |
| 60 | |
| 61 | noncomputable def m67EventPreToParent |
| 62 | (s : Set.Icc (0 : ℝ) T) |
| 63 | (hs : (D.flow.event S.1 hS).tMinus < s.1) |
| 64 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) : |
| 65 | Diffeomorph (𝓡 3) (𝓡 3) (P.component s).carrier.carrier |
| 66 | (H.event_input S hS hpost).parent.carrier.carrier ∞ := |
| 67 | (P.regular_transport (m67EventPreTime S hS hpost) s hs hJ).symm.trans |
| 68 | (m67EventParentIdentification H S hS hpost) |
| 69 | |
| 70 | theorem m67_event_regular_ambient |
| 71 | (s : Set.Icc (0 : ℝ) T) |
| 72 | (hs : (D.flow.event S.1 hS).tMinus < s.1) (hsS : s.1 < S.1) |
| 73 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) |
| 74 | (x : (P.component (m67EventPreTime S hS hpost)).carrier.carrier) : |
| 75 | (P.component s).inclusion |
| 76 | (P.regular_transport (m67EventPreTime S hS hpost) s hs hJ x) = |
| 77 | (D.flow.event S.1 hS).pre_identify ⟨s.1, hs.le, hsS⟩ |
| 78 | ((P.component (m67EventPreTime S hS hpost)).inclusion x) := by |
| 79 | rw [P.regular_transport_ambient] |
| 80 | have hcompat := D.flow.event_slab_compatibility S.1 hS |
| 81 | (D.flow.event S.1 hS).tMinus s.1 hs |
| 82 | (fun t ht => P.time_subset ⟨(D.flow.event S.1 hS).tMinus_nonnegative.trans ht.1, |
| 83 | ht.2.trans s.2.2⟩) hJ |
| 84 | (D.flow.event S.1 hS).tMinus s.1 ⟨le_rfl, hs.le⟩ ⟨hs.le, le_rfl⟩ |
| 85 | ⟨le_rfl, (D.flow.event S.1 hS).tMinus_lt⟩ ⟨hs.le, hsS⟩ |
| 86 | ((P.component (m67EventPreTime S hS hpost)).inclusion x) |
| 87 | rw [(D.flow.event S.1 hS).pre_initial] at hcompat |
| 88 | exact hcompat |
| 89 | |
| 90 | theorem m67EventPreToParent_ambient |
| 91 | (s : Set.Icc (0 : ℝ) T) |
| 92 | (hs : (D.flow.event S.1 hS).tMinus < s.1) (hsS : s.1 < S.1) |
| 93 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) |
| 94 | (x : (P.component s).carrier.carrier) : |
| 95 | (D.flow.event S.1 hS).pre_identify ⟨s.1, hs.le, hsS⟩ |
| 96 | ((H.event_input S hS hpost).parent.inclusion |
| 97 | (m67EventPreToParent H S hS hpost s hs hJ x)) = |
| 98 | (P.component s).inclusion x := by |
| 99 | change (D.flow.event S.1 hS).pre_identify _ |
| 100 | ((H.event_input S hS hpost).parent.inclusion |
| 101 | (m67EventParentIdentification H S hS hpost |
| 102 | ((P.regular_transport (m67EventPreTime S hS hpost) s hs hJ).symm x))) = _ |
| 103 | rw [m67EventParentIdentification_inclusion] |
| 104 | rw [← m67_event_regular_ambient S hS hpost s hs hsS hJ] |
| 105 | rw [Diffeomorph.apply_symm_apply] |
| 106 | |
| 107 | end PoincareMT |