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.Flow.Basic |
| 2 | import PoincareLib.Geometry.RicciFlow.Pullback |
| 3 | import PoincareLib.Geometry.Riemannian.Metric.LocalDiffeomorph |
| 4 | import PoincareLib.Geometry.Riemannian.Connection.Construction |
| 5 | |
| 6 | /-! |
| 7 | # Pulling ordinary slabs through changing-carrier identifications |
| 8 | |
| 9 | Morgan--Tian Definition 15.5, printed pp. 359--361. Pull the actual source |
| 10 | flow back through a fixed initial-carrier diffeomorphism, then display it on |
| 11 | the target slices through their supplied metric-preserving maps. Ordinary |
| 12 | transport is the conjugate of the source transport. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | namespace SurgeryRegularSlab |
| 24 | |
| 25 | variable {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 26 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} |
| 27 | {a b : ℝ} |
| 28 | {S : SurgeryRegularSlab slice metric a b} |
| 29 | {slice' : ℝ → GeneralizedSliceCarrier.{u}} |
| 30 | {metric' : ∀ t, RiemannianMetric 3 (slice' t).carrier} |
| 31 | {initial : Diffeomorph (𝓡 3) (𝓡 3) |
| 32 | (slice' a).carrier (slice a).carrier ∞} |
| 33 | |
| 34 | /-- The map `initial` goes from the target initial carrier to the source one. |
| 35 | The maps `sliceMap` go in the opposite direction at each displayed time. |
| 36 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 37 | structure PullbackData (S : SurgeryRegularSlab slice metric a b) |
| 38 | (slice' : ℝ → GeneralizedSliceCarrier.{u}) |
| 39 | (metric' : ∀ t, RiemannianMetric 3 (slice' t).carrier) |
| 40 | (initial : Diffeomorph (𝓡 3) (𝓡 3) |
| 41 | (slice' a).carrier (slice a).carrier ∞) where |
| 42 | flow : RicciFlow 3 (slice' a).carrier (Set.Icc a b) |
| 43 | sliceMap : ∀ t : Set.Icc a b, |
| 44 | Diffeomorph (𝓡 3) (𝓡 3) |
| 45 | (slice t.1).carrier (slice' t.1).carrier ∞ |
| 46 | initial_sliceMap : ∀ x, |
| 47 | sliceMap ⟨a, le_rfl, S.ordered.le⟩ (initial x) = x |
| 48 | metric_pullback : ∀ (t : Set.Icc a b) (x : (slice' a).carrier) |
| 49 | (v w : TangentSpace (𝓡 3) x), |
| 50 | (metric' t.1).inner (initial.trans ((S.identify t).trans (sliceMap t)) x) |
| 51 | (mfderiv (𝓡 3) (𝓡 3) |
| 52 | (initial.trans ((S.identify t).trans (sliceMap t))) x v) |
| 53 | (mfderiv (𝓡 3) (𝓡 3) |
| 54 | (initial.trans ((S.identify t).trans (sliceMap t))) x w) = |
| 55 | (flow.metric t.1).inner x v w |
| 56 | |
| 57 | /-- Build the target flow by pulling the source flow through the fixed map on |
| 58 | the initial carrier. The displayed slice maps are assumed to be isometries; |
| 59 | the constructor then supplies the ordinary slab metric equation. |
| 60 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 61 | noncomputable def PullbackData.ofIsometry |
| 62 | (S : SurgeryRegularSlab slice metric a b) |
| 63 | (slice' : ℝ → GeneralizedSliceCarrier.{u}) |
| 64 | (metric' : ∀ t, RiemannianMetric 3 (slice' t).carrier) |
| 65 | (initial : Diffeomorph (𝓡 3) (𝓡 3) |
| 66 | (slice' a).carrier (slice a).carrier ∞) |
| 67 | (sliceMap : ∀ t : Set.Icc a b, |
| 68 | Diffeomorph (𝓡 3) (𝓡 3) |
| 69 | (slice t.1).carrier (slice' t.1).carrier ∞) |
| 70 | (initial_sliceMap : ∀ x, |
| 71 | sliceMap ⟨a, le_rfl, S.ordered.le⟩ (initial x) = x) |
| 72 | (slice_isometry : ∀ (t : Set.Icc a b) (y : (slice t.1).carrier) |
| 73 | (v w : TangentSpace (𝓡 3) y), |
| 74 | (metric' t.1).inner (sliceMap t y) |
| 75 | (mfderiv (𝓡 3) (𝓡 3) (sliceMap t) y v) |
| 76 | (mfderiv (𝓡 3) (𝓡 3) (sliceMap t) y w) = |
| 77 | (metric t.1).inner y v w) : |
| 78 | PullbackData S slice' metric' initial := by |
| 79 | let e : (slice' a).carrier → (slice a).carrier := initial |
| 80 | let he : IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ e := initial.isLocalDiffeomorph |
| 81 | let F := S.flow.pullbackWithConnection e he |
| 82 | (fun t => ((S.flow.metric t).pullbackOfLocalDiffeomorph e he).leviCivitaData) |
| 83 | refine |
| 84 | { flow := F |
| 85 | sliceMap := sliceMap |
| 86 | initial_sliceMap := initial_sliceMap |
| 87 | metric_pullback := ?_ } |
| 88 | intro t x v w |
| 89 | let j := S.identify t |
| 90 | let k := sliceMap t |
| 91 | let c := initial.trans (j.trans k) |
| 92 | have hc : (c : (slice' a).carrier → (slice' t.1).carrier) = |
| 93 | k ∘ j ∘ e := by |
| 94 | funext z |
| 95 | rfl |
| 96 | have he' : ContMDiff (𝓡 3) (𝓡 3) ∞ e := initial.contMDiff |
| 97 | change (metric' t.1).inner (c x) |
| 98 | (mfderiv (𝓡 3) (𝓡 3) c x v) |
| 99 | (mfderiv (𝓡 3) (𝓡 3) c x w) = |
| 100 | (F.metric t.1).inner x v w |
| 101 | rw [hc, mfderiv_comp x |
| 102 | (k.contMDiff.mdifferentiable (by simp) (j (e x))) |
| 103 | ((j.contMDiff.comp he').mdifferentiable (by simp) x), |
| 104 | mfderiv_comp x (j.contMDiff.mdifferentiable (by simp) (e x)) |
| 105 | (he'.mdifferentiable (by simp) x)] |
| 106 | simp only [Function.comp_apply, ContinuousLinearMap.comp_apply] |
| 107 | change (metric' t.1).inner (sliceMap t (S.identify t (e x))) |
| 108 | (mfderiv (𝓡 3) (𝓡 3) (sliceMap t) (S.identify t (e x)) |
| 109 | (mfderiv (𝓡 3) (𝓡 3) (S.identify t) (e x) |
| 110 | (mfderiv (𝓡 3) (𝓡 3) e x v))) |
| 111 | (mfderiv (𝓡 3) (𝓡 3) (sliceMap t) (S.identify t (e x)) |
| 112 | (mfderiv (𝓡 3) (𝓡 3) (S.identify t) (e x) |
| 113 | (mfderiv (𝓡 3) (𝓡 3) e x w))) = |
| 114 | (F.metric t.1).inner x v w |
| 115 | rw [slice_isometry t (j (e x)) _ _, S.metric_pullback t (e x) _ _] |
| 116 | rfl |
| 117 | |
| 118 | /-- The displayed target identification on the fixed initial carrier. |
| 119 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 120 | noncomputable def PullbackData.identify (D : PullbackData S slice' metric' initial) |
| 121 | (t : Set.Icc a b) : |
| 122 | Diffeomorph (𝓡 3) (𝓡 3) (slice' a).carrier (slice' t.1).carrier ∞ := |
| 123 | initial.trans ((S.identify t).trans (D.sliceMap t)) |
| 124 | |
| 125 | /-- Realize the pulled-back flow and displayed maps as an ordinary slab. |
| 126 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 127 | noncomputable def pullback (S : SurgeryRegularSlab slice metric a b) |
| 128 | (D : PullbackData S slice' metric' initial) : |
| 129 | SurgeryRegularSlab slice' metric' a b := |
| 130 | { ordered := S.ordered |
| 131 | flow := D.flow |
| 132 | identify := D.identify |
| 133 | initial_identify := by |
| 134 | intro x |
| 135 | change D.sliceMap ⟨a, le_rfl, S.ordered.le⟩ |
| 136 | (S.identify ⟨a, le_rfl, S.ordered.le⟩ (initial x)) = x |
| 137 | rw [S.initial_identify] |
| 138 | exact D.initial_sliceMap x |
| 139 | metric_pullback := by |
| 140 | intro t x v w |
| 141 | change (metric' t.1).inner |
| 142 | (initial.trans ((S.identify t).trans (D.sliceMap t)) x) |
| 143 | (mfderiv (𝓡 3) (𝓡 3) |
| 144 | (initial.trans ((S.identify t).trans (D.sliceMap t))) x v) |
| 145 | (mfderiv (𝓡 3) (𝓡 3) |
| 146 | (initial.trans ((S.identify t).trans (D.sliceMap t))) x w) = |
| 147 | (D.flow.metric t.1).inner x v w |
| 148 | exact D.metric_pullback t x v w } |
| 149 | |
| 150 | /-- The original strict slab endpoints are retained. |
| 151 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 152 | @[simp] theorem pullback_ordered |
| 153 | (S : SurgeryRegularSlab slice metric a b) |
| 154 | (D : PullbackData S slice' metric' initial) : |
| 155 | (pullback S D).ordered = S.ordered := rfl |
| 156 | |
| 157 | /-- Ordinary transport intertwines with the displayed source-to-target maps. |
| 158 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 159 | theorem pullback_transport |
| 160 | (S : SurgeryRegularSlab slice metric a b) |
| 161 | (D : PullbackData S slice' metric' initial) |
| 162 | (s t : Set.Icc a b) (x : (slice s.1).carrier) : |
| 163 | (pullback S D).transport s t (D.sliceMap s x) = |
| 164 | D.sliceMap t (S.transport s t x) := by |
| 165 | change |
| 166 | (initial.trans ((S.identify t).trans (D.sliceMap t))) |
| 167 | ((initial.trans ((S.identify s).trans (D.sliceMap s))).symm |
| 168 | (D.sliceMap s x)) = |
| 169 | D.sliceMap t |
| 170 | (S.identify t ((S.identify s).symm x)) |
| 171 | simp only [Diffeomorph.coe_trans, Function.comp_apply, |
| 172 | Diffeomorph.symm_trans', |
| 173 | Diffeomorph.symm_apply_apply, Diffeomorph.apply_symm_apply] |
| 174 | |
| 175 | /-- Ordinary transport at an arbitrary target point is conjugated transport. |
| 176 | Morgan--Tian Definition 15.5, pp. 359-361. -/ |
| 177 | theorem pullback_transport_symm |
| 178 | (S : SurgeryRegularSlab slice metric a b) |
| 179 | (D : PullbackData S slice' metric' initial) |
| 180 | (s t : Set.Icc a b) (y : (slice' s.1).carrier) : |
| 181 | (pullback S D).transport s t y = |
| 182 | D.sliceMap t (S.transport s t ((D.sliceMap s).symm y)) := by |
| 183 | simpa only [Diffeomorph.coe_trans, Function.comp_apply, |
| 184 | Diffeomorph.symm_trans', |
| 185 | Diffeomorph.symm_apply_apply, Diffeomorph.apply_symm_apply, |
| 186 | SurgeryRegularSlab.transport] using |
| 187 | (pullback_transport S D s t ((D.sliceMap s).symm y)) |
| 188 | |
| 189 | end SurgeryRegularSlab |
| 190 | |
| 191 | end PoincareMT |