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.Surgery.Comparison.Basic |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Path.LegacyData |
| 3 | import PoincareLib.Topology.Homotopy.Sphere.ThreeSphere |
| 4 | import Mathlib.Topology.Covering.Basic |
| 5 | import Mathlib.Geometry.Manifold.LocalDiffeomorph |
| 6 | |
| 7 | /-! |
| 8 | # M59 component topology and chosen width representatives |
| 9 | |
| 10 | The covering projection and its induced third-homotopy map are actual maps. |
| 11 | The width representative stays on one chosen surgery component, with its |
| 12 | basepoint, sphere parameter, comparison equivalence and class fixed in advance. |
| 13 | |
| 14 | Sources: Morgan--Tian Proposition 18.9, printed p. 424, and Claims 18.19--18.20, |
| 15 | printed p. 431; Claim 18.16 and Definition 18.17, printed p. 430, for the width |
| 16 | carrier. The December 2015 correction concerns pp. 441--445 and changes none |
| 17 | of these topology statements. See `reviews/contracts/M59-round1.md`. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle Topology ENNReal unitInterval ContinuousMap |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT |
| 27 | |
| 28 | section Cover |
| 29 | |
| 30 | variable {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 32 | [IsManifold (𝓡 3) ∞ M] |
| 33 | |
| 34 | /-- A pointed finite smooth universal cover with its actual induced pi3 map. |
| 35 | Surjectivity is explicit because `IsCoveringMap` alone permits empty covers. -/ |
| 36 | structure M59PointedFiniteSmoothUniversalCover (x : M) where |
| 37 | space : GeneralizedSliceCarrier.{u} |
| 38 | projection : ContinuousMap space.carrier M |
| 39 | covering : IsCoveringMap projection |
| 40 | surjective : Function.Surjective projection |
| 41 | finite_fibers : ∀ y : M, (projection ⁻¹' {y}).Finite |
| 42 | local_diffeomorph : IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ projection |
| 43 | compact : IsCompact (Set.univ : Set space.carrier) |
| 44 | simply_connected : SimplyConnectedSpace space.carrier |
| 45 | lift : space.carrier |
| 46 | based : projection lift = x |
| 47 | homotopy_three_sphere : Nonempty (space.carrier ≃ₕ ThreeSphere) |
| 48 | cover_pi_three_integer : |
| 49 | HomotopyGroup.Pi 3 space.carrier lift ≃* Multiplicative ℤ |
| 50 | projection_pi_three : |
| 51 | HomotopyGroup.Pi 3 space.carrier lift ≃* HomotopyGroup.Pi 3 M x |
| 52 | projection_pi_three_eq : ∀ alpha, |
| 53 | projection_pi_three alpha = surgeryHomotopyMap (n := 3) projection based alpha |
| 54 | |
| 55 | /-- The base's integer comparison factors through the actual covering map. -/ |
| 56 | noncomputable def M59PointedFiniteSmoothUniversalCover.basePiThreeInteger {x : M} |
| 57 | (U : M59PointedFiniteSmoothUniversalCover x) : |
| 58 | HomotopyGroup.Pi 3 M x ≃* Multiplicative ℤ := |
| 59 | U.projection_pi_three.symm.trans U.cover_pi_three_integer |
| 60 | |
| 61 | end Cover |
| 62 | |
| 63 | section Width |
| 64 | |
| 65 | variable {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 66 | (sphere_parameter : ContinuousMap (Fin 2 → I) LoopTwoSphere) |
| 67 | (loop_pi_three : |
| 68 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 69 | (constantC1Loop C.basepoint) ≃* |
| 70 | HomotopyGroup.Pi 3 C.carrier.carrier C.basepoint) |
| 71 | (xi : HomotopyGroup.Pi 3 C.carrier.carrier C.basepoint) |
| 72 | |
| 73 | /-- A regular representative of the specified pi3 class on the selected |
| 74 | component. The sigma equality fixes both the basepoint and the based class. -/ |
| 75 | structure M59WidthCarrierRepresentative where |
| 76 | family : FreeTwoSphereFamily (M := C.carrier.carrier) |
| 77 | sphere_parameter_eq : family.class_certificate.sphere_parameter = sphere_parameter |
| 78 | class_eq : familySigmaClass family = ⟨C.basepoint, loop_pi_three.symm xi⟩ |
| 79 | |
| 80 | namespace M59WidthCarrierRepresentative |
| 81 | |
| 82 | variable {C sphere_parameter loop_pi_three xi} |
| 83 | |
| 84 | theorem basepoint_eq |
| 85 | (R : M59WidthCarrierRepresentative C sphere_parameter loop_pi_three xi) : |
| 86 | R.family.basepoint = C.basepoint := |
| 87 | congrArg Sigma.fst R.class_eq |
| 88 | |
| 89 | variable (R : M59WidthCarrierRepresentative C sphere_parameter loop_pi_three xi) |
| 90 | (ambient_metric : RiemannianMetric 3 A.carrier) |
| 91 | (metric : RiemannianMetric 3 C.carrier.carrier) |
| 92 | (connection : LeviCivitaData metric) |
| 93 | (metric_pullback : ∀ x v w, |
| 94 | ambient_metric.inner (C.inclusion x) |
| 95 | (mfderiv (𝓡 3) (𝓡 3) C.inclusion x v) |
| 96 | (mfderiv (𝓡 3) (𝓡 3) C.inclusion x w) = metric.inner x v w) |
| 97 | (orientation : componentThirdHomology C.carrier.carrier ≃ₗ[ℤ] ULift.{u} ℤ) |
| 98 | (pi_two_trivial : Subsingleton (HomotopyGroup.Pi 2 C.carrier.carrier C.basepoint)) |
| 99 | (pi_three_integer : HomotopyGroup.Pi 3 C.carrier.carrier C.basepoint ≃* |
| 100 | Multiplicative ℤ) |
| 101 | |
| 102 | /-- The legacy width carrier retains all pre-chosen geometric data. Only the |
| 103 | based group fields require transport along the representative's point equality. -/ |
| 104 | def toLegacy : WidthComponentSlice.{u} := |
| 105 | { ambient := A |
| 106 | carrier := C.carrier |
| 107 | inclusion := C.inclusion |
| 108 | inclusion_openEmbedding := C.inclusion_openEmbedding |
| 109 | inclusion_smooth := C.inclusion_smooth |
| 110 | ambient_metric := ambient_metric |
| 111 | metric := metric |
| 112 | connection := connection |
| 113 | metric_pullback := metric_pullback |
| 114 | compact := C.compact |
| 115 | connected := C.connected |
| 116 | family := R.family |
| 117 | component_range := by simpa only [R.basepoint_eq] using C.range_eq_component |
| 118 | pi_two := by simpa only [R.basepoint_eq] using pi_two_trivial |
| 119 | loop_pi_three := Eq.mpr |
| 120 | (congrArg (fun x : C.carrier.carrier => |
| 121 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 122 | (constantC1Loop x) ≃* HomotopyGroup.Pi 3 C.carrier.carrier x) |
| 123 | R.basepoint_eq) loop_pi_three |
| 124 | pi_three_integer := Eq.mpr |
| 125 | (congrArg (fun x : C.carrier.carrier => |
| 126 | HomotopyGroup.Pi 3 C.carrier.carrier x ≃* Multiplicative ℤ) |
| 127 | R.basepoint_eq) pi_three_integer |
| 128 | orientation := orientation } |
| 129 | |
| 130 | @[simp] theorem toLegacy_ambient : |
| 131 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 132 | pi_two_trivial pi_three_integer).ambient = A := rfl |
| 133 | |
| 134 | @[simp] theorem toLegacy_carrier : |
| 135 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 136 | pi_two_trivial pi_three_integer).carrier = C.carrier := rfl |
| 137 | |
| 138 | @[simp] theorem toLegacy_inclusion : |
| 139 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 140 | pi_two_trivial pi_three_integer).inclusion = C.inclusion := rfl |
| 141 | |
| 142 | @[simp] theorem toLegacy_ambient_metric : |
| 143 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 144 | pi_two_trivial pi_three_integer).ambient_metric = ambient_metric := rfl |
| 145 | |
| 146 | @[simp] theorem toLegacy_metric : |
| 147 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 148 | pi_two_trivial pi_three_integer).metric = metric := rfl |
| 149 | |
| 150 | @[simp] theorem toLegacy_connection : |
| 151 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 152 | pi_two_trivial pi_three_integer).connection = connection := rfl |
| 153 | |
| 154 | @[simp] theorem toLegacy_orientation : |
| 155 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 156 | pi_two_trivial pi_three_integer).orientation = orientation := rfl |
| 157 | |
| 158 | @[simp] theorem toLegacy_family : |
| 159 | (R.toLegacy ambient_metric metric connection metric_pullback orientation |
| 160 | pi_two_trivial pi_three_integer).family = R.family := rfl |
| 161 | |
| 162 | /-- The adapter's third-homotopy class is exactly the class specified on the |
| 163 | selected component, including the dependent basepoint. -/ |
| 164 | theorem toLegacy_class : |
| 165 | (⟨R.family.basepoint, |
| 166 | componentPiThreeClass (R.toLegacy ambient_metric metric connection metric_pullback |
| 167 | orientation pi_two_trivial pi_three_integer)⟩ : |
| 168 | Σ x : C.carrier.carrier, HomotopyGroup.Pi 3 C.carrier.carrier x) = |
| 169 | ⟨C.basepoint, xi⟩ := by |
| 170 | have htransport : ∀ {a b : C.carrier.carrier} (h : a = b) |
| 171 | (e : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 172 | (constantC1Loop b) ≃* HomotopyGroup.Pi 3 C.carrier.carrier b) |
| 173 | (alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 174 | (constantC1Loop a)) |
| 175 | (beta : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 176 | (constantC1Loop b)), |
| 177 | (⟨a, alpha⟩ : Σ x : C.carrier.carrier, |
| 178 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 179 | (constantC1Loop x)) = ⟨b, beta⟩ → |
| 180 | (⟨a, (Eq.mpr (congrArg (fun x : C.carrier.carrier => |
| 181 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 182 | (constantC1Loop x) ≃* HomotopyGroup.Pi 3 C.carrier.carrier x) h) e) alpha⟩ : |
| 183 | Σ x : C.carrier.carrier, HomotopyGroup.Pi 3 C.carrier.carrier x) = |
| 184 | ⟨b, e beta⟩ := by |
| 185 | intro a b h |
| 186 | cases h |
| 187 | intro e alpha beta hclass |
| 188 | have hab : alpha = beta := eq_of_heq (Sigma.mk.inj_iff.mp hclass).2 |
| 189 | cases hab |
| 190 | rfl |
| 191 | change (⟨R.family.basepoint, (Eq.mpr (congrArg (fun x : C.carrier.carrier => |
| 192 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 193 | (constantC1Loop x) ≃* HomotopyGroup.Pi 3 C.carrier.carrier x) |
| 194 | R.basepoint_eq) loop_pi_three) R.family.homotopy_class⟩ : |
| 195 | Σ x : C.carrier.carrier, HomotopyGroup.Pi 3 C.carrier.carrier x) = |
| 196 | ⟨C.basepoint, xi⟩ |
| 197 | simpa only [MulEquiv.apply_symm_apply] using |
| 198 | htransport R.basepoint_eq loop_pi_three R.family.homotopy_class |
| 199 | (loop_pi_three.symm xi) R.class_eq |
| 200 | |
| 201 | end M59WidthCarrierRepresentative |
| 202 | |
| 203 | end Width |
| 204 | |
| 205 | end PoincareMT |