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.Compactness.Convergence.LocalRealization |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.CurvatureBounds |
| 4 | |
| 5 | /-! |
| 6 | # Curvature convergence from frozen coordinate germs |
| 7 | |
| 8 | Local Euclidean realizations of the frozen scalar metric coefficients have |
| 9 | the same retained curvature norm as the original metric or source pullback. |
| 10 | The frozen scalar jets therefore give retained curvature-norm convergence and |
| 11 | the two-time limit bound in Topping, Theorem 1.7, p. 179. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 23 | normedSpaceTangentSpaceVectorSpace |
| 24 | |
| 25 | private theorem bilinear_eq_of_basis {n : ℕ} |
| 26 | {B B' : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ} |
| 27 | (h : ∀ a b : Fin n, B (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 28 | (EuclideanSpace.basisFun (Fin n) ℝ b) = |
| 29 | B' (EuclideanSpace.basisFun (Fin n) ℝ a) (EuclideanSpace.basisFun (Fin n) ℝ b)) : |
| 30 | B = B' := by |
| 31 | apply ContinuousLinearMap.coe_injective |
| 32 | apply (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.ext |
| 33 | intro a |
| 34 | apply ContinuousLinearMap.coe_injective |
| 35 | apply (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.ext |
| 36 | exact h a |
| 37 | |
| 38 | namespace FlowCarrier |
| 39 | |
| 40 | /-- A Euclidean realization of the frozen chart coefficients preserves the |
| 41 | retained curvature norm at the corresponding manifold point. -/ |
| 42 | theorem curvatureTensorNorm_eq_of_coordinate_germ |
| 43 | {n : ℕ} (C : FlowCarrier n) (gM : C.metric) |
| 44 | (DM : @LeviCivitaData n C.carrier C.topologicalSpace C.chartedSpace C.isManifold gM) |
| 45 | (q : C.carrier) (t : ℝ) (p : EuclideanSpace ℝ (Fin n)) |
| 46 | (hp : |
| 47 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 48 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 49 | p ∈ (extChartAt (𝓡 n) q).target) |
| 50 | (gE : RiemannianMetric n (EuclideanSpace ℝ (Fin n))) (DE : LeviCivitaData gE) |
| 51 | (h : ∀ᶠ x in 𝓝 p, ∀ a b : Fin n, |
| 52 | gE.euclideanCoefficients x (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 53 | (EuclideanSpace.basisFun (Fin n) ℝ b) = |
| 54 | C.coordinateCoefficient q (fun _ y v w => C.metricInner gM y v w) a b (t, x)) : |
| 55 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 56 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 57 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 58 | DE.curvatureTensorNorm p = DM.curvatureTensorNorm ((extChartAt (𝓡 n) q).symm p) := by |
| 59 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 60 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 61 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 62 | let c := extChartAt (𝓡 n) q |
| 63 | obtain ⟨V, hV, hVo, hpV⟩ := mem_nhds_iff.mp |
| 64 | (inter_mem (extChartAt_target_mem_nhds' hp) h) |
| 65 | apply DE.curvatureTensorNorm_eq_of_local_isometry DM hVo |
| 66 | (fun x hx => (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q |
| 67 | (hV hx).1).contMDiffAt (extChartAt_target_mem_nhds' (hV hx).1) |
| 68 | |>.contMDiffWithinAt) (x := p) (hx := hpV) |
| 69 | · intro x hx |
| 70 | have hB : gE.euclideanCoefficients x = gM.pullbackCoefficients c.symm x := |
| 71 | bilinear_eq_of_basis (hV hx).2 |
| 72 | intro u v |
| 73 | exact congrArg (fun B => B u v) hB |
| 74 | |
| 75 | end FlowCarrier |
| 76 | |
| 77 | namespace SmoothSpacetimeEmbedding |
| 78 | |
| 79 | /-- A Euclidean realization of the frozen source pullback coefficients has |
| 80 | the retained curvature norm of the source flow at the embedded point. -/ |
| 81 | theorem curvatureTensorNorm_eq_of_coordinate_germ |
| 82 | {n : ℕ} {T' T : ℝ} {C D : FlowCarrier n} |
| 83 | {F : BasedFlow n T' T C} {G : BasedFlow n T' T D} {U : Set C.carrier} |
| 84 | (e : SmoothSpacetimeEmbedding F G (Ioo T' T ×ˢ U)) |
| 85 | (hU : @IsOpen C.carrier C.topologicalSpace U) |
| 86 | (q : C.carrier) (p : ℝ × EuclideanSpace ℝ (Fin n)) |
| 87 | (ht : p.1 ∈ Ioo T' T) |
| 88 | (hp : |
| 89 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 90 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 91 | p.2 ∈ (extChartAt (𝓡 n) q).target ∧ (extChartAt (𝓡 n) q).symm p.2 ∈ U) |
| 92 | (gE : RiemannianMetric n (EuclideanSpace ℝ (Fin n))) (DE : LeviCivitaData gE) |
| 93 | (h : ∀ᶠ x in 𝓝 p.2, ∀ a b : Fin n, |
| 94 | gE.euclideanCoefficients x (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 95 | (EuclideanSpace.basisFun (Fin n) ℝ b) = |
| 96 | C.coordinateCoefficient q (pullbackInnerValue F G e) a b (p.1, x)) : |
| 97 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 98 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 99 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 100 | letI : TopologicalSpace D.carrier := D.topologicalSpace |
| 101 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) D.carrier := D.chartedSpace |
| 102 | letI : IsManifold (𝓡 n) ∞ D.carrier := D.isManifold |
| 103 | DE.curvatureTensorNorm p.2 = (G.flow.connection p.1).curvatureTensorNorm |
| 104 | ((e.toFun (p.1, (extChartAt (𝓡 n) q).symm p.2)).2) := by |
| 105 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 106 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 107 | let : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 108 | let : TopologicalSpace D.carrier := D.topologicalSpace |
| 109 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) D.carrier := D.chartedSpace |
| 110 | let : IsManifold (𝓡 n) ∞ D.carrier := D.isManifold |
| 111 | let c := extChartAt (𝓡 n) q |
| 112 | let f : C.carrier → D.carrier := fun y => (e.toFun (p.1, y)).2 |
| 113 | let W := c.target ∩ c.symm ⁻¹' U |
| 114 | have hW : IsOpen W := |
| 115 | (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 116 | (isOpen_extChartAt_target q) hU |
| 117 | have hc (x : EuclideanSpace ℝ (Fin n)) (hx : x ∈ W) : |
| 118 | ContMDiffAt (𝓡 n) (𝓡 n) ∞ c.symm x := |
| 119 | (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q hx.1).contMDiffAt |
| 120 | (extChartAt_target_mem_nhds' hx.1) |
| 121 | have hf (x : EuclideanSpace ℝ (Fin n)) (hx : x ∈ W) : |
| 122 | ContMDiffAt (𝓡 n) (𝓡 n) ∞ f (c.symm x) := |
| 123 | e.spatialMap_contMDiffAt hU ht hx.2 |
| 124 | have hderiv (x : EuclideanSpace ℝ (Fin n)) (hx : x ∈ W) : |
| 125 | mfderiv (𝓡 n) (𝓡 n) (f ∘ c.symm) x = |
| 126 | (mfderiv (𝓡 n) (𝓡 n) f (c.symm x)).comp |
| 127 | (mfderiv (𝓡 n) (𝓡 n) c.symm x) := |
| 128 | mfderiv_comp x ((hf x hx).mdifferentiableAt (by simp)) |
| 129 | ((hc x hx).mdifferentiableAt (by simp)) |
| 130 | obtain ⟨V, hV, hVo, hpV⟩ := mem_nhds_iff.mp (inter_mem (hW.mem_nhds hp) h) |
| 131 | apply DE.curvatureTensorNorm_eq_of_local_isometry (G.flow.connection p.1) hVo |
| 132 | (fun x hx => ((hf x (hV hx).1).comp x (hc x (hV hx).1)).contMDiffWithinAt) |
| 133 | (x := p.2) (hx := hpV) |
| 134 | · intro x hx |
| 135 | have hcoeff := (hV hx).2 |
| 136 | have hB : gE.euclideanCoefficients x = |
| 137 | (G.metricAt p.1).pullbackCoefficients (f ∘ c.symm) x := by |
| 138 | apply bilinear_eq_of_basis |
| 139 | intro a b |
| 140 | rw [hcoeff a b] |
| 141 | change _ = (G.metricAt p.1).inner (f (c.symm x)) |
| 142 | (mfderiv (𝓡 n) (𝓡 n) (f ∘ c.symm) x (EuclideanSpace.basisFun (Fin n) ℝ a)) |
| 143 | (mfderiv (𝓡 n) (𝓡 n) (f ∘ c.symm) x (EuclideanSpace.basisFun (Fin n) ℝ b)) |
| 144 | rw [hderiv x (hV hx).1] |
| 145 | rfl |
| 146 | intro u v |
| 147 | exact congrArg (fun B => B u v) hB |
| 148 | |
| 149 | end SmoothSpacetimeEmbedding |
| 150 | |
| 151 | namespace PointedGeometricConvergence |
| 152 | |
| 153 | /-- Frozen smooth pointed convergence gives convergence of the retained |
| 154 | curvature norms at every fixed interior point. -/ |
| 155 | theorem tendsto_curvatureTensorNorm |
| 156 | {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 157 | (G : PointedGeometricConvergence S) (t : ℝ) (ht : t ∈ Ioo T' T) |
| 158 | (x : G.limitCarrier.carrier) : |
| 159 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 160 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 161 | G.limitCarrier.chartedSpace |
| 162 | letI : IsManifold (𝓡 n) ∞ G.limitCarrier.carrier := G.limitCarrier.isManifold |
| 163 | Tendsto (fun k : ℕ => |
| 164 | let C := S.carrier (G.subsequence k) |
| 165 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 166 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 167 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 168 | ((S.flow (G.subsequence k)).flow.connection t).curvatureTensorNorm |
| 169 | ((G.embedding k).toFun (t, x)).2) |
| 170 | atTop (𝓝 ((G.limitFlow.flow.connection t).curvatureTensorNorm x)) := by |
| 171 | classical |
| 172 | let : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 173 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 174 | G.limitCarrier.chartedSpace |
| 175 | let : IsManifold (𝓡 n) ∞ G.limitCarrier.carrier := G.limitCarrier.isManifold |
| 176 | let c := extChartAt (𝓡 n) x |
| 177 | let p := c x |
| 178 | have hp : p ∈ c.target := c.map_source (mem_extChartAt_source x) |
| 179 | have hcx : (extChartAt (𝓡 n) x).symm p = x := c.left_inv (mem_extChartAt_source x) |
| 180 | obtain ⟨g, D, V, hVo, hpV, _, heq⟩ := G.limitCarrier.exists_local_coordinate_realization |
| 181 | (G.limitFlow.metricAt t) x t p hp |
| 182 | have hg : ∀ᶠ y in 𝓝 p, ∀ a b : Fin n, |
| 183 | g.euclideanCoefficients y (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 184 | (EuclideanSpace.basisFun (Fin n) ℝ b) = |
| 185 | G.limitCarrier.coordinateCoefficient x |
| 186 | (fun _ y v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) y v w) |
| 187 | a b (t, y) := Filter.Eventually.mono (hVo.mem_nhds hpV) heq |
| 188 | have hreal : ∀ᶠ k : ℕ in atTop, |
| 189 | ∃ gd : Σ g : RiemannianMetric n (EuclideanSpace ℝ (Fin n)), LeviCivitaData g, |
| 190 | ∀ᶠ y in 𝓝 p, ∀ a b : Fin n, |
| 191 | gd.1.euclideanCoefficients y (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 192 | (EuclideanSpace.basisFun (Fin n) ℝ b) = |
| 193 | G.limitCarrier.coordinateCoefficient x |
| 194 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) |
| 195 | a b (t, y) := by |
| 196 | filter_upwards [G.eventually_exists_local_coordinate_realization x (t, p) ht hp] |
| 197 | with k hk |
| 198 | obtain ⟨gk, Dk, Vk, hVko, hpVk, heqk⟩ := hk |
| 199 | exact ⟨⟨gk, Dk⟩, Filter.Eventually.mono (hVko.mem_nhds hpVk) heqk⟩ |
| 200 | obtain ⟨gd, hgd⟩ := hreal.choice |
| 201 | have hnorm := LeviCivitaData.tendsto_curvatureTensorNorm_of_scalar_metric_jets |
| 202 | (l := atTop) (fun k => (gd k).2) D p (EuclideanSpace.basisFun (Fin n) ℝ).toBasis (by |
| 203 | intro r _ a b |
| 204 | simp only [OrthonormalBasis.coe_toBasis] |
| 205 | erw [G.limitCarrier.iteratedFDeriv_coordinateCoefficient_eq_of_eventuallyEq |
| 206 | x _ t p g hg r a b] |
| 207 | apply (G.tendsto_coordinate_spatial_metricJet x r a b (t, p) ht hp).congr' |
| 208 | filter_upwards [hgd] with k hk |
| 209 | exact (G.limitCarrier.iteratedFDeriv_coordinateCoefficient_eq_of_eventuallyEq |
| 210 | x _ t p (gd k).1 hk r a b).symm) |
| 211 | have hlim : D.curvatureTensorNorm p = |
| 212 | (G.limitFlow.flow.connection t).curvatureTensorNorm x := by |
| 213 | simpa only [hcx] using G.limitCarrier.curvatureTensorNorm_eq_of_coordinate_germ |
| 214 | (G.limitFlow.metricAt t) (G.limitFlow.flow.connection t) x t p hp g D hg |
| 215 | rw [hlim] at hnorm |
| 216 | apply hnorm.congr' |
| 217 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset (isCompact_singleton (x := x)) |
| 218 | filter_upwards [hgd, eventually_ge_atTop j] with k hk hjk |
| 219 | simpa only [hcx] using (G.embedding k).curvatureTensorNorm_eq_of_coordinate_germ |
| 220 | (G.exhaustion_open k) x (t, p) ht |
| 221 | ⟨hp, by rw [hcx]; exact G.exhaustion_monotone hjk (hj (mem_singleton x))⟩ |
| 222 | (gd k).1 (gd k).2 hk |
| 223 | |
| 224 | /-- The frozen two-time source curvature control passes to the pointed limit, |
| 225 | with one bound per radius uniform in both interior times. -/ |
| 226 | theorem curvatureTensorNorm_le |
| 227 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 228 | (G : PointedGeometricConvergence H.sequence) (A : ℝ) (hA : 0 < A) : |
| 229 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 230 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 231 | G.limitCarrier.chartedSpace |
| 232 | letI : IsManifold (𝓡 n) ∞ G.limitCarrier.carrier := G.limitCarrier.isManifold |
| 233 | ∃ K : ℝ, 0 ≤ K ∧ ∀ s ∈ Ioo T' T, |
| 234 | ∀ x ∈ G.limitFlow.ballAt s A, ∀ t ∈ Ioo T' T, |
| 235 | (G.limitFlow.flow.connection t).curvatureTensorNorm x ≤ K := by |
| 236 | apply G.curvatureTensorNorm_le_of_tendsto H A hA |
| 237 | intro s hs x hx t ht |
| 238 | exact G.tendsto_curvatureTensorNorm t ht x |
| 239 | |
| 240 | end PointedGeometricConvergence |
| 241 | end PoincareMT |