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.Blowup.Construction.LongTime.CanonicalGeometry.CanonicalSliceRound |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.CanonicalGeometry.CanonicalSliceCap |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.CanonicalGeometry.CanonicalSliceMetricComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.ShortTime.NeckTransfer.CapturedNeckTransfer |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.StrongNecks.Geometry.StrongNeckSlice |
| 6 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.PositiveEnds.PositiveComponent |
| 7 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Spheres.RoundUniformScalar |
| 8 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.Geometry.RelativeBilinearComparison |
| 9 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.Geometry.RelativeMetricReadout |
| 10 | import PoincareLib.Geometry.Riemannian.Coordinates.CompactFamily |
| 11 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.SpatialEmbedding |
| 12 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Rescaling |
| 13 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Separation.Diameter |
| 14 | import PoincareLib.Geometry.Riemannian.Normalization.Scaling.Distance |
| 15 | import Mathlib.Topology.Connected.Clopen |
| 16 | import Mathlib.Topology.Connected.LocallyConnected |
| 17 | |
| 18 | /-! |
| 19 | # Actual canonical shape from captured finite jets |
| 20 | |
| 21 | Morgan--Tian Claims 11.14-11.15, pp. 275-276, and Proposition 9.79, |
| 22 | pp. 232-234. A single retained family transfers centered necks and |
| 23 | the actual cap core side. Captured compact components give compactness |
| 24 | of the target. No target or ambient-source completeness is assumed. |
| 25 | -/ |
| 26 | |
| 27 | set_option autoImplicit false |
| 28 | set_option backward.isDefEq.respectTransparency false |
| 29 | |
| 30 | open Set Filter |
| 31 | open scoped Manifold ContDiff Topology |
| 32 | |
| 33 | universe u v w |
| 34 | |
| 35 | namespace PoincareMT.M30 |
| 36 | |
| 37 | private theorem shape_inverse_half_lt {R : ℝ} (hR : 4 < R) : |
| 38 | R ^ (-1 / 2 : ℝ) < 1 / 2 := by |
| 39 | calc |
| 40 | _ < (4 : ℝ) ^ (-1 / 2 : ℝ) := |
| 41 | Real.rpow_lt_rpow_of_neg (by norm_num) hR (by norm_num) |
| 42 | _ = _ := by norm_num [neg_div, Real.rpow_neg, ← Real.sqrt_eq_rpow] |
| 43 | |
| 44 | private theorem shape_scaled_ball |
| 45 | {X : Type u} [TopologicalSpace X] |
| 46 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 47 | (g : RiemannianMetric 3 X) {Q C R rho : ℝ} (hQ : 0 < Q) (hC : 0 < C) |
| 48 | (hR : 4 < R / Q) (hrho : C / 2 < rho) {x z : X} |
| 49 | (hdist : g.edist x z < ENNReal.ofReal (C * R ^ (-1 / 2 : ℝ))) : |
| 50 | z ∈ RiemannianMetric.ball (M13.scaleSmoothMetric g Q hQ) x rho := by |
| 51 | have hRpos : 0 < R := ((div_pos_iff.mp (show 0 < R / Q by linarith)).resolve_right |
| 52 | (fun h => (not_lt_of_ge hQ.le) h.2)).1 |
| 53 | have hpow : Real.sqrt Q * R ^ (-1 / 2 : ℝ) = (R / Q) ^ (-1 / 2 : ℝ) := by |
| 54 | rw [show R / Q = Q⁻¹ * R by ring, Real.mul_rpow (inv_nonneg.mpr hQ.le) hRpos.le, |
| 55 | Real.inv_rpow hQ.le, neg_div, Real.rpow_neg hQ.le, inv_inv, Real.sqrt_eq_rpow] |
| 56 | have hpos : 0 < rho := (half_pos hC).trans hrho |
| 57 | change RiemannianMetric.edist (rescaledMetric g Q hQ) x z < ENNReal.ofReal rho |
| 58 | rw [rescaledMetric_edist] |
| 59 | calc |
| 60 | _ < ENNReal.ofReal (Real.sqrt Q) * ENNReal.ofReal (C * R ^ (-1 / 2 : ℝ)) := |
| 61 | ENNReal.mul_lt_mul_right (ENNReal.ofReal_pos.mpr (Real.sqrt_pos.mpr hQ)).ne' |
| 62 | ENNReal.ofReal_ne_top hdist |
| 63 | _ = ENNReal.ofReal (C * (R / Q) ^ (-1 / 2 : ℝ)) := by |
| 64 | rw [← ENNReal.ofReal_mul (Real.sqrt_nonneg Q)] |
| 65 | congr 1 |
| 66 | rw [← hpow] |
| 67 | ring |
| 68 | _ < ENNReal.ofReal rho := (ENNReal.ofReal_lt_ofReal_iff hpos).mpr |
| 69 | ((mul_lt_mul_of_pos_left (shape_inverse_half_lt hR) hC).trans (by linarith)) |
| 70 | |
| 71 | private theorem shape_cap_bounds |
| 72 | {X : Type u} [TopologicalSpace X] [T3Space X] |
| 73 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 74 | [MeasurableSpace X] [BorelSpace X] |
| 75 | {g : RiemannianMetric 3 X} (A : CapCertificate g) {C : ℝ} |
| 76 | (hC : A.cap_constant ≤ C) {x : X} (hx : x ∈ A.carrier) : |
| 77 | 1 < C ∧ (∀ y ∈ A.carrier, ∀ z ∈ A.carrier, |
| 78 | A.connection.scalarCurvature y ≤ C * A.connection.scalarCurvature z) ∧ |
| 79 | ∀ z ∈ A.carrier, intrinsicEDist g A.carrier x z < |
| 80 | ENNReal.ofReal (C * A.connection.scalarCurvature x ^ (-1 / 2 : ℝ)) := by |
| 81 | obtain ⟨beta, hbeta, hratio⟩ := A.scalar_ratio |
| 82 | have hxpos := A.scalar_pos x hx |
| 83 | have hbetaOne : 1 ≤ beta := by nlinarith [hratio x hx x hx] |
| 84 | have hCOne : 1 < C := hbetaOne.trans_lt (hbeta.trans_le hC) |
| 85 | have hbounded : BddAbove (range (fun z : A.carrier => A.connection.scalarCurvature z.1)) := by |
| 86 | refine ⟨beta * A.connection.scalarCurvature x, ?_⟩ |
| 87 | rintro _ ⟨z, rfl⟩ |
| 88 | exact hratio x hx z.1 z.2 |
| 89 | have hsup : A.connection.scalarCurvature x ≤ |
| 90 | scalarCurvatureSupOn g A.connection A.carrier := le_csSup hbounded ⟨⟨x, hx⟩, rfl⟩ |
| 91 | have hpow := Real.rpow_le_rpow_of_nonpos hxpos hsup (by norm_num : (-1 / 2 : ℝ) ≤ 0) |
| 92 | have hdiam : intrinsicDiameter g A.carrier < |
| 93 | ENNReal.ofReal (C * A.connection.scalarCurvature x ^ (-1 / 2 : ℝ)) := |
| 94 | A.intrinsic_diameter_bound.trans_le (ENNReal.ofReal_le_ofReal |
| 95 | (mul_le_mul hC hpow |
| 96 | (Real.rpow_nonneg (hxpos.le.trans hsup) _) (by linarith))) |
| 97 | refine ⟨hCOne, ?_, ?_⟩ |
| 98 | · intro y hy z hz |
| 99 | exact (hratio z hz y hy).trans (mul_le_mul_of_nonneg_right |
| 100 | (hbeta.le.trans hC) (A.scalar_pos z hz).le) |
| 101 | · intro z hz |
| 102 | exact (le_sSup (show intrinsicEDist g A.carrier x z ∈ |
| 103 | range (fun p : A.carrier × A.carrier => intrinsicEDist g A.carrier p.1 p.2) from |
| 104 | ⟨(⟨x, hx⟩, ⟨z, hz⟩), rfl⟩)).trans_lt hdiam |
| 105 | |
| 106 | private theorem shape_component_distance |
| 107 | {X : Type u} [TopologicalSpace X] |
| 108 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 109 | {g : RiemannianMetric 3 X} {D : LeviCivitaData g} {C : ℝ} |
| 110 | (A : SingularCComponent g D C) {x : X} (hx : x ∈ A.carrier) : |
| 111 | ∀ z ∈ A.carrier, g.edist x z < |
| 112 | ENNReal.ofReal (C * D.scalarCurvature x ^ (-1 / 2 : ℝ)) := by |
| 113 | have hnonneg (z : A.carrier) : 0 ≤ D.scalarCurvature z.1 := by |
| 114 | simpa only [mul_zero] using D.six_mul_le_scalar_of_orthonormal_sectional_lower |
| 115 | z.1 (fun v w hvw => (A.positive_sectional z.1 z.2 v w hvw).le) |
| 116 | have hbounded : BddBelow (range (fun z : A.carrier => D.scalarCurvature z.1 ^ (-1 / 2 : ℝ))) := by |
| 117 | refine ⟨0, ?_⟩ |
| 118 | rintro _ ⟨z, rfl⟩ |
| 119 | exact Real.rpow_nonneg (hnonneg z) _ |
| 120 | have hinf := csInf_le hbounded (show D.scalarCurvature x ^ (-1 / 2 : ℝ) ∈ |
| 121 | range (fun z : A.carrier => D.scalarCurvature z.1 ^ (-1 / 2 : ℝ)) from ⟨⟨x, hx⟩, rfl⟩) |
| 122 | have hdiam := A.diameter_upper.trans_le (ENNReal.ofReal_le_ofReal |
| 123 | (mul_le_mul_of_nonneg_left hinf A.constant_pos.le)) |
| 124 | intro z hz |
| 125 | exact ((g.edist_le_intrinsicEDist A.carrier x z).trans |
| 126 | (le_sSup (show intrinsicEDist g A.carrier x z ∈ |
| 127 | range (fun p : A.carrier × A.carrier => intrinsicEDist g A.carrier p.1 p.2) from |
| 128 | ⟨(⟨x, hx⟩, ⟨z, hz⟩), rfl⟩))).trans_lt hdiam |
| 129 | |
| 130 | private theorem shape_compact_target |
| 131 | {M : Type v} [TopologicalSpace M] [T2Space M] [ConnectedSpace M] |
| 132 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 133 | {X : Type u} [TopologicalSpace X] |
| 134 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 135 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M X ∞) |
| 136 | {A : Set X} (hA : IsCompact A) (hopen : IsOpen A) (hne : A.Nonempty) |
| 137 | (hAtarget : A ⊆ e.target) : IsCompact (univ : Set M) := by |
| 138 | have hcompact : IsCompact (e.symm '' A) := |
| 139 | hA.image_of_continuousOn (e.contMDiffOn_invFun.continuousOn.mono hAtarget) |
| 140 | have hopen' : IsOpen (e.symm '' A) := |
| 141 | e.toOpenPartialHomeomorph.isOpen_image_symm_of_subset_target hopen hAtarget |
| 142 | have heq := (show IsClopen (e.symm '' A) from ⟨hcompact.isClosed, hopen'⟩).eq_univ |
| 143 | (hne.image e.symm) |
| 144 | rwa [heq] at hcompact |
| 145 | |
| 146 | set_option maxHeartbeats 1000000 in |
| 147 | -- Four actual canonical cases and their common dependent family are elaborated together. |
| 148 | set_option synthInstance.maxHeartbeats 100000 in |
| 149 | -- Each source slice retains its own metric, connection and manifold instances. |
| 150 | /-- Captured actual canonical slices give a centered neck, an actual |
| 151 | precompact cap side with scale control, or compactness of the target. |
| 152 | Source: Morgan--Tian Claims 11.14-11.15, pp. 275-276, and |
| 153 | Proposition 9.79, pp. 232-234. -/ |
| 154 | theorem exists_canonical_slice_shape_threshold : |
| 155 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 400 ∧ |
| 156 | ∀ {M : Type v} [TopologicalSpace M] [T3Space M] |
| 157 | [ConnectedSpace M] |
| 158 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 159 | [IsManifold (𝓡 3) ∞ M] |
| 160 | {ι : Type w} [Finite ι] |
| 161 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) |
| 162 | (x : M), 4 < D.scalarCurvature x → |
| 163 | ∀ (epsilon C : ℝ), 0 < epsilon → epsilon ≤ epsilon0 → |
| 164 | ∀ (F : ℕ → GeneralizedRicciFlowData.{u}) |
| 165 | (t Q : ℕ → ℝ) (hQ : ∀ k, 0 < Q k) |
| 166 | (f : ∀ k, M → ((F k).slice (t k)).carrier) |
| 167 | (U K : Set M), |
| 168 | IsOpen U → IsCompact K → K ⊆ U → x ∈ K → |
| 169 | ∀ (q : ι → M) |
| 170 | (L : ι → Set (EuclideanSpace ℝ (Fin 3))), |
| 171 | (∀ i, IsCompact (L i)) → |
| 172 | (∀ i, L i ⊆ (extChartAt (𝓡 3) (q i)).target) → |
| 173 | (∀ i, (extChartAt (𝓡 3) (q i)).symm '' L i ⊆ U) → |
| 174 | K ⊆ ⋃ i, (extChartAt (𝓡 3) (q i)).symm '' L i → |
| 175 | TendstoUniformlyOn |
| 176 | (fun k y => (F k).scalar ⟨t k, f k y⟩ / Q k) |
| 177 | D.scalarCurvature atTop K → |
| 178 | (∀ᶠ k in atTop, Nonempty |
| 179 | (GeneralizedCanonicalControl (F := F k) |
| 180 | (t k) (f k x) epsilon C)) → |
| 181 | let h : ∀ k, RiemannianMetric 3 ((F k).slice (t k)).carrier := |
| 182 | fun k => M13.scaleSmoothMetric ((F k).metric (t k)) (Q k) (hQ k) |
| 183 | let rho := |
| 184 | max (max ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2)) 8 + 1 |
| 185 | (∀ᶠ k in atTop, ∃ e : PartialDiffeomorph (𝓡 3) (𝓡 3) |
| 186 | M ((F k).slice (t k)).carrier ∞, |
| 187 | e.source = U ∧ |
| 188 | (e : M → ((F k).slice (t k)).carrier) = f k ∧ |
| 189 | (h k).ball (f k x) rho ⊆ f k '' K) → |
| 190 | (∀ i m, m ≤ ⌊(2 * epsilon)⁻¹⌋₊ + 1 → TendstoUniformlyOn |
| 191 | (fun k => iteratedFDeriv ℝ m |
| 192 | ((h k).pullbackCoefficients |
| 193 | (f k ∘ (extChartAt (𝓡 3) (q i)).symm))) |
| 194 | (iteratedFDeriv ℝ m |
| 195 | (g.pullbackCoefficients (extChartAt (𝓡 3) (q i)).symm)) |
| 196 | atTop (L i)) → |
| 197 | (∃ N : EpsilonNeck g, |
| 198 | N.epsilon = 2 * epsilon ∧ N.connection = D ∧ N.center = x) ∨ |
| 199 | (∃ N : EpsilonNeck g, ∃ W : Set M, |
| 200 | N.epsilon = 2 * epsilon ∧ N.connection = D ∧ |
| 201 | IsOpen W ∧ IsCompact (closure W) ∧ x ∈ W ∧ x ∉ N.carrier ∧ |
| 202 | frontier W = N.central_sphere ∧ |
| 203 | W ∩ N.carrier = N.region (-N.epsilon⁻¹) 0 ∧ |
| 204 | closure W ⊆ g.ball x |
| 205 | (8 * max 1 C * D.scalarCurvature x ^ (-1 / 2 : ℝ)) ∧ |
| 206 | (4 * max 1 C * D.scalarCurvature x)⁻¹ ≤ N.scale ^ 2 ∧ |
| 207 | N.scale ^ 2 ≤ 4 * max 1 C / D.scalarCurvature x) ∨ |
| 208 | IsCompact (univ : Set M) := by |
| 209 | classical |
| 210 | obtain ⟨epsilonRound, hRoundPos, _, hRound⟩ := |
| 211 | M28.tube.exists_round_scalar_accuracy.{u} (show (0 : ℝ) < 1 by norm_num) |
| 212 | refine ⟨min epsilonRound (1 / 400), lt_min hRoundPos (by norm_num), |
| 213 | min_le_right _ _, ?_⟩ |
| 214 | intro M _ _ _ _ _ ι _ g D x hx epsilon C hepsilon hepsilon0 |
| 215 | F t Q hQ f U K hU hK hKU hxK q L hL htarget hLsource hcover hscalar hcanonical |
| 216 | dsimp only |
| 217 | intro hmaps hjets |
| 218 | by_cases hcompact : IsCompact (univ : Set M) |
| 219 | · exact Or.inr (Or.inr hcompact) |
| 220 | let h : ∀ k, RiemannianMetric 3 ((F k).slice (t k)).carrier := |
| 221 | fun k => M13.scaleSmoothMetric ((F k).metric (t k)) (Q k) (hQ k) |
| 222 | let Dsrc : ∀ k, LeviCivitaData (h k) := fun k => |
| 223 | rescaledMetric_connection ((F k).metric (t k)) ((F k).connection (t k)) (Q k) (hQ k) |
| 224 | let rho := max (max ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2)) 8 + 1 |
| 225 | let r := D.scalarCurvature x |
| 226 | let d := max 1 C |
| 227 | let a := r / (2 * d) |
| 228 | let b := 2 * d * r |
| 229 | let Result : Prop := |
| 230 | (∃ N : EpsilonNeck g, N.epsilon = 2 * epsilon ∧ N.connection = D ∧ N.center = x) ∨ |
| 231 | (∃ N : EpsilonNeck g, ∃ W : Set M, |
| 232 | N.epsilon = 2 * epsilon ∧ N.connection = D ∧ |
| 233 | IsOpen W ∧ IsCompact (closure W) ∧ x ∈ W ∧ x ∉ N.carrier ∧ |
| 234 | frontier W = N.central_sphere ∧ W ∩ N.carrier = N.region (-N.epsilon⁻¹) 0 ∧ |
| 235 | closure W ⊆ g.ball x (8 * d * r ^ (-1 / 2 : ℝ)) ∧ |
| 236 | (4 * d * r)⁻¹ ≤ N.scale ^ 2 ∧ N.scale ^ 2 ≤ 4 * d / r) |
| 237 | have hr : 4 < r := hx |
| 238 | have hrpos : 0 < r := by linarith |
| 239 | have hd : 1 ≤ d := le_max_left _ _ |
| 240 | have hdpos : 0 < d := by linarith |
| 241 | have ha : 0 < a := div_pos hrpos (mul_pos (by norm_num) hdpos) |
| 242 | have hepsSmall : epsilon ≤ 1 / 400 := hepsilon0.trans (min_le_right _ _) |
| 243 | have hepsHalf : epsilon < 1 / 2 := by linarith |
| 244 | have heta : 2 * epsilon < 1 / 2 := by linarith |
| 245 | have hepsEta : epsilon < 2 * epsilon := by linarith |
| 246 | have horder : ⌊(2 * epsilon)⁻¹⌋₊ + 1 ≤ ⌊epsilon⁻¹⌋₊ := by |
| 247 | apply Nat.le_floor |
| 248 | have hinv : 400 ≤ epsilon⁻¹ := by |
| 249 | have hh := inv_anti₀ hepsilon hepsSmall |
| 250 | norm_num at hh |
| 251 | exact hh |
| 252 | have hf : (⌊(2 * epsilon)⁻¹⌋₊ : ℝ) ≤ (2 * epsilon)⁻¹ := |
| 253 | Nat.floor_le (inv_pos.mpr (mul_pos (by norm_num) hepsilon)).le |
| 254 | have heq : (2 * epsilon)⁻¹ = epsilon⁻¹ / 2 := by rw [mul_inv_rev, div_eq_mul_inv] |
| 255 | rw [heq] at hf ⊢ |
| 256 | push_cast |
| 257 | linarith |
| 258 | have hDsrc (k : ℕ) (z : ((F k).slice (t k)).carrier) : |
| 259 | (Dsrc k).scalarCurvature z = (F k).scalar ⟨t k, z⟩ / Q k := by |
| 260 | change (rescaledMetric_connection _ _ _ _).scalarCurvature z = _ |
| 261 | rw [rescaledMetric_scalarCurvature] |
| 262 | change _ = ((F k).connection (t k)).scalarCurvature z / Q k |
| 263 | ring |
| 264 | have hconv : TendstoUniformlyOn |
| 265 | (fun k y => (Dsrc k).scalarCurvature (f k y)) D.scalarCurvature atTop K := by |
| 266 | simpa only [hDsrc] using hscalar |
| 267 | let delta := min (r / 4) (min ((r - 4) / 2) (r / (4 * d))) |
| 268 | have hdelta : 0 < delta := by dsimp only [delta]; positivity |
| 269 | have hdelta0 : delta ≤ r / 4 := min_le_left _ _ |
| 270 | have hdelta1 : delta ≤ (r - 4) / 2 := (min_le_right _ _).trans (min_le_left _ _) |
| 271 | have hdelta2 : delta ≤ r / (4 * d) := (min_le_right _ _).trans (min_le_right _ _) |
| 272 | have hquarter : 0 < r / (4 * d) := by positivity |
| 273 | have haquarter : a = 2 * (r / (4 * d)) := by dsimp only [a]; ring |
| 274 | have hfloor : a ≤ r / 2 := by |
| 275 | apply (div_le_iff₀ (by positivity : 0 < 2 * d)).mpr |
| 276 | nlinarith [mul_nonneg hrpos.le (sub_nonneg.mpr hd)] |
| 277 | have hupper : 2 * r ≤ b := by |
| 278 | dsimp only [b] |
| 279 | nlinarith [mul_nonneg hrpos.le (sub_nonneg.mpr hd)] |
| 280 | have hneckRadius : (2 * Real.pi + 2 * epsilon⁻¹) / 2 < rho := by |
| 281 | have h1 := le_max_left ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2) |
| 282 | have h2 := le_max_left (max ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2)) 8 |
| 283 | dsimp only [rho] |
| 284 | linarith |
| 285 | have hcapRadius : C / 2 < rho := by |
| 286 | have h1 := le_max_right ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2) |
| 287 | have h2 := le_max_left (max ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2)) 8 |
| 288 | dsimp only [rho] |
| 289 | linarith |
| 290 | have hroundRadius : 8 < rho := by |
| 291 | dsimp only [rho] |
| 292 | linarith [le_max_right (max ((2 * Real.pi + 2 * epsilon⁻¹) / 2) (C / 2)) 8] |
| 293 | have htail : ∀ᶠ k in atTop, ∃ e : PartialDiffeomorph (𝓡 3) (𝓡 3) |
| 294 | M ((F k).slice (t k)).carrier ∞, |
| 295 | e.source = U ∧ (e : M → ((F k).slice (t k)).carrier) = f k ∧ |
| 296 | ∃ N : EpsilonNeck (h k), N.epsilon = epsilon ∧ N.carrier ⊆ e '' K ∧ |
| 297 | (a ≤ (Dsrc k).scalarCurvature N.center ∧ (Dsrc k).scalarCurvature N.center ≤ b) ∧ |
| 298 | ∀ V : EpsilonNeck g, V.epsilon = 2 * epsilon → V.connection = D → |
| 299 | V.center = e.symm N.center → V.coordinate_map = e.symm ∘ N.coordinate_map → |
| 300 | (∀ z ∈ e '' K, ∀ w : TangentSpace (𝓡 3) z, |
| 301 | g.tangentNorm (e.symm z) (mfderiv (𝓡 3) (𝓡 3) e.symm z w) ≤ |
| 302 | 2 * (h k).tangentNorm z w) → Result := by |
| 303 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp hconv delta hdelta, |
| 304 | hcanonical, hmaps] with k herr hcan hmap |
| 305 | obtain ⟨e, hsource, he, hball⟩ := hmap |
| 306 | have herror (y : M) (hy : y ∈ K) : |
| 307 | |(Dsrc k).scalarCurvature (f k y) - D.scalarCurvature y| < delta := by |
| 308 | simpa only [Real.dist_eq, abs_sub_comm] using herr y hy |
| 309 | have hxerr := abs_lt.mp (herror x hxK) |
| 310 | change -delta < (Dsrc k).scalarCurvature (f k x) - r ∧ |
| 311 | (Dsrc k).scalarCurvature (f k x) - r < delta at hxerr |
| 312 | have hhigh : 4 < (Dsrc k).scalarCurvature (f k x) := by linarith |
| 313 | have hlowerSrc : r / 2 ≤ (Dsrc k).scalarCurvature (f k x) := by linarith |
| 314 | have hupperSrc : (Dsrc k).scalarCurvature (f k x) ≤ 2 * r := by linarith |
| 315 | have hhighRaw : 4 < ((F k).connection (t k)).scalarCurvature (f k x) / Q k := by |
| 316 | simpa only [hDsrc, GeneralizedRicciFlowData.scalar] using hhigh |
| 317 | have hxsource : x ∈ e.source := hsource.symm ▸ hKU hxK |
| 318 | have himageTarget : e '' K ⊆ e.target := by |
| 319 | rintro _ ⟨y, hy, rfl⟩ |
| 320 | exact e.map_source (hsource.symm ▸ hKU hy) |
| 321 | refine ⟨e, hsource, he, ?_⟩ |
| 322 | rcases hcan with ⟨hcan⟩ |
| 323 | cases hcan with |
| 324 | | neck A hcenter => |
| 325 | let N : EpsilonNeck (h k) := (M28.strongNeck_top A hepsHalf).rescale (Q k) (hQ k) |
| 326 | have hNeps : N.epsilon = epsilon := rfl |
| 327 | have hNcenter : N.center = f k x := hcenter |
| 328 | have hscale : N.scale < 1 / 2 := by |
| 329 | rw [N.scale_eq_scalar, N.connection.scalarCurvature_eq (Dsrc k), hNcenter] |
| 330 | exact shape_inverse_half_lt hhigh |
| 331 | have hcap : N.carrier ⊆ e '' K := by |
| 332 | intro z hz |
| 333 | rw [he] |
| 334 | apply hball |
| 335 | change (h k).edist (f k x) z < ENNReal.ofReal rho |
| 336 | rw [← hNcenter] |
| 337 | refine (N.edist_center_le_of_mem_carrier hz).trans_lt ?_ |
| 338 | rw [hNeps] |
| 339 | have hcoeff : 0 < 2 * Real.pi + 2 * epsilon⁻¹ := by positivity |
| 340 | exact (ENNReal.ofReal_lt_ofReal_iff ((half_pos hcoeff).trans hneckRadius)).mpr |
| 341 | ((mul_lt_mul_of_pos_left hscale hcoeff).trans (by linarith)) |
| 342 | refine ⟨N, hNeps, hcap, ?_, ?_⟩ |
| 343 | · rw [hNcenter] |
| 344 | exact ⟨hfloor.trans hlowerSrc, hupperSrc.trans hupper⟩ |
| 345 | · intro V hVeps hVconn hVcenter _hVcoord _hnorm |
| 346 | apply Or.inl |
| 347 | refine ⟨V, hVeps, hVconn, ?_⟩ |
| 348 | rw [hVcenter, hNcenter, ← he] |
| 349 | exact e.left_inv hxsource |
| 350 | | cap A heps hconstant hconnection hxcore => |
| 351 | have hxA : f k x ∈ A.carrier := |
| 352 | (A.closed_core_eq_complement_end ▸ |
| 353 | interior_subset (A.core_eq_interior_closed_core ▸ hxcore)).1 |
| 354 | obtain ⟨hC, hratio, hintrinsic⟩ := shape_cap_bounds A hconstant hxA |
| 355 | have hCpos : 0 < C := by linarith |
| 356 | have hdC : d = C := max_eq_right hC.le |
| 357 | have hcapA : A.carrier ⊆ e '' K := by |
| 358 | intro z hz |
| 359 | rw [he] |
| 360 | apply hball |
| 361 | apply shape_scaled_ball ((F k).metric (t k)) (hQ k) hCpos hhighRaw hcapRadius |
| 362 | have hh := (((F k).metric (t k)).edist_le_intrinsicEDist A.carrier (f k x) z).trans_lt |
| 363 | (hintrinsic z hz) |
| 364 | simpa only [hconnection] using hh |
| 365 | let N : EpsilonNeck (h k) := A.end_neck.rescale (Q k) (hQ k) |
| 366 | have hNeps : N.epsilon = epsilon := A.end_neck_epsilon.trans heps |
| 367 | have hcap : N.carrier ⊆ e '' K := fun z hz => hcapA (A.end_neck_subset hz) |
| 368 | have hzA : N.center ∈ A.carrier := A.end_neck_subset |
| 369 | (A.end_neck.central_sphere_subset A.end_neck.center_on_central_sphere) |
| 370 | have hratioForward : (Dsrc k).scalarCurvature (f k x) ≤ |
| 371 | C * (Dsrc k).scalarCurvature N.center := by |
| 372 | simp only [hDsrc, GeneralizedRicciFlowData.scalar] |
| 373 | have hh := hratio (f k x) hxA N.center hzA |
| 374 | rw [hconnection] at hh |
| 375 | simpa only [mul_div_assoc] using div_le_div_of_nonneg_right hh (hQ k).le |
| 376 | have hratioBack : (Dsrc k).scalarCurvature N.center ≤ |
| 377 | C * (Dsrc k).scalarCurvature (f k x) := by |
| 378 | simp only [hDsrc, GeneralizedRicciFlowData.scalar] |
| 379 | have hh := hratio N.center hzA (f k x) hxA |
| 380 | rw [hconnection] at hh |
| 381 | simpa only [mul_div_assoc] using div_le_div_of_nonneg_right hh (hQ k).le |
| 382 | have hbounds : a ≤ (Dsrc k).scalarCurvature N.center ∧ |
| 383 | (Dsrc k).scalarCurvature N.center ≤ b := by |
| 384 | constructor |
| 385 | · dsimp only [a] |
| 386 | rw [hdC] |
| 387 | apply (div_le_iff₀ (by positivity : 0 < 2 * C)).mpr |
| 388 | nlinarith |
| 389 | · dsimp only [b] |
| 390 | rw [hdC] |
| 391 | nlinarith |
| 392 | refine ⟨N, hNeps, hcap, hbounds, ?_⟩ |
| 393 | intro V hVeps hVconn hVcenter hVcoord hnorm |
| 394 | have hrawpos := A.scalar_pos (f k x) hxA |
| 395 | have hboundRaw (z : ((F k).slice (t k)).carrier) (hz : z ∈ A.carrier) |
| 396 | (w : TangentSpace (𝓡 3) z) : |
| 397 | g.tangentNorm (e.symm z) (mfderiv (𝓡 3) (𝓡 3) e.symm z w) ≤ |
| 398 | (2 * Real.sqrt (Q k)) * ((F k).metric (t k)).tangentNorm z w := by |
| 399 | have hh := hnorm z (hcapA hz) w |
| 400 | rw [M13.scaleSmoothMetric_tangentNorm] at hh |
| 401 | simpa only [mul_assoc] using hh |
| 402 | obtain ⟨W, hWopen, hWcompact, hxW, hxNot, hfront, hoverlap, hWball⟩ := |
| 403 | exists_cap_side_of_inverse_neck_coordinates g ((F k).metric (t k)) A e |
| 404 | (hcapA.trans himageTarget) V |
| 405 | (by rw [heps, hVeps]; linarith) hVcoord hxsource |
| 406 | (by simpa only [he] using hxcore) |
| 407 | (mul_pos (by norm_num) (Real.sqrt_pos.mpr (hQ k))) |
| 408 | (mul_pos hCpos (Real.rpow_pos_of_pos hrawpos _)) hboundRaw |
| 409 | (by intro z hz; simpa only [he] using hintrinsic z hz) |
| 410 | have hpow : Real.sqrt (Q k) * A.connection.scalarCurvature (f k x) ^ (-1 / 2 : ℝ) = |
| 411 | ((Dsrc k).scalarCurvature (f k x)) ^ (-1 / 2 : ℝ) := by |
| 412 | rw [hDsrc] |
| 413 | change _ = (((F k).connection (t k)).scalarCurvature (f k x) / Q k) ^ (-1 / 2 : ℝ) |
| 414 | rw [← hconnection, show A.connection.scalarCurvature (f k x) / Q k = |
| 415 | (Q k)⁻¹ * A.connection.scalarCurvature (f k x) by ring, |
| 416 | Real.mul_rpow (inv_nonneg.mpr (hQ k).le) hrawpos.le, |
| 417 | Real.inv_rpow (hQ k).le, neg_div, Real.rpow_neg (hQ k).le, |
| 418 | inv_inv, Real.sqrt_eq_rpow] |
| 419 | have hsourcePow : ((Dsrc k).scalarCurvature (f k x)) ^ (-1 / 2 : ℝ) ≤ |
| 420 | 2 * r ^ (-1 / 2 : ℝ) := by |
| 421 | calc |
| 422 | _ ≤ (r / 4) ^ (-1 / 2 : ℝ) := |
| 423 | Real.rpow_le_rpow_of_nonpos (by positivity) (by linarith) (by norm_num) |
| 424 | _ = _ := by |
| 425 | rw [Real.div_rpow hrpos.le (by norm_num : (0 : ℝ) ≤ 4)] |
| 426 | norm_num [neg_div, Real.rpow_neg, ← Real.sqrt_eq_rpow] |
| 427 | ring |
| 428 | have hRpow : 0 < r ^ (-1 / 2 : ℝ) := Real.rpow_pos_of_pos hrpos _ |
| 429 | have hradius : (2 * Real.sqrt (Q k)) * |
| 430 | (C * A.connection.scalarCurvature (f k x) ^ (-1 / 2 : ℝ)) ≤ |
| 431 | 8 * d * r ^ (-1 / 2 : ℝ) := by |
| 432 | calc |
| 433 | _ = 2 * C * ((Dsrc k).scalarCurvature (f k x)) ^ (-1 / 2 : ℝ) := by |
| 434 | rw [← hpow] |
| 435 | ring |
| 436 | _ ≤ 4 * C * r ^ (-1 / 2 : ℝ) := by |
| 437 | calc |
| 438 | _ ≤ (2 * C) * (2 * r ^ (-1 / 2 : ℝ)) := |
| 439 | mul_le_mul_of_nonneg_left hsourcePow (by positivity) |
| 440 | _ = _ := by ring |
| 441 | _ ≤ 8 * d * r ^ (-1 / 2 : ℝ) := by rw [hdC]; nlinarith |
| 442 | obtain ⟨y, hy, heq⟩ := hcap (N.central_sphere_subset N.center_on_central_sphere) |
| 443 | have hinv : e.symm N.center = y := (congrArg e.symm heq).symm.trans |
| 444 | (e.left_inv (hsource.symm ▸ hKU hy)) |
| 445 | have hcenterErr := abs_lt.mp (herror y hy) |
| 446 | have hfy : f k y = N.center := he ▸ heq |
| 447 | rw [hfy, ← hinv, ← hVcenter] at hcenterErr |
| 448 | have htargetLow : r / (4 * d) ≤ D.scalarCurvature V.center := by |
| 449 | rw [haquarter] at hbounds |
| 450 | linarith [hbounds.1] |
| 451 | have htargetUp : D.scalarCurvature V.center ≤ 4 * d * r := by |
| 452 | have hbEq : b = 2 * d * r := rfl |
| 453 | have hdr : r ≤ d * r := by nlinarith [mul_nonneg hrpos.le (sub_nonneg.mpr hd)] |
| 454 | linarith [hbounds.2] |
| 455 | have htargetPos := hquarter.trans_le htargetLow |
| 456 | have hVsq : V.scale ^ 2 = (D.scalarCurvature V.center)⁻¹ := by |
| 457 | rw [V.scale_eq_scalar, hVconn, ← Real.rpow_mul_natCast htargetPos.le (-1 / 2) 2] |
| 458 | norm_num [Real.rpow_neg_one] |
| 459 | apply Or.inr |
| 460 | refine ⟨V, W, hVeps, hVconn, hWopen, hWcompact, hxW, hxNot, hfront, hoverlap, ?_, ?_, ?_⟩ |
| 461 | · intro z hz |
| 462 | exact (hWball hz).trans_le (ENNReal.ofReal_le_ofReal hradius) |
| 463 | · rw [hVsq] |
| 464 | exact inv_anti₀ htargetPos htargetUp |
| 465 | · rw [hVsq] |
| 466 | have hh := inv_anti₀ hquarter htargetLow |
| 467 | simpa only [inv_div] using hh |
| 468 | | component A hxA => |
| 469 | exfalso |
| 470 | apply hcompact |
| 471 | have hcapA : A.carrier ⊆ e '' K := by |
| 472 | intro z hz |
| 473 | rw [he] |
| 474 | exact hball (shape_scaled_ball ((F k).metric (t k)) (hQ k) |
| 475 | A.constant_pos hhighRaw hcapRadius (shape_component_distance A hxA z hz)) |
| 476 | let : LocallyConnectedSpace ((F k).slice (t k)).carrier := |
| 477 | ChartedSpace.locallyConnectedSpace (EuclideanSpace ℝ (Fin 3)) _ |
| 478 | have hopen : IsOpen A.carrier := by rw [A.component_eq]; exact isOpen_connectedComponent |
| 479 | exact shape_compact_target e A.compact hopen ⟨f k x, hxA⟩ (hcapA.trans himageTarget) |
| 480 | | round A hxA => |
| 481 | exfalso |
| 482 | apply hcompact |
| 483 | have haccuracy := hRound _ ((F k).metric (t k)) ((F k).connection (t k)) |
| 484 | epsilon A (hepsilon0.trans (min_le_left _ _)) (f k x) hxA |
| 485 | have hround := round_component_subset_normalized_ball ((F k).metric (t k)) |
| 486 | ((F k).connection (t k)) A hepsHalf.le (hQ k) hxA hhighRaw haccuracy |
| 487 | have hcapA : A.carrier ⊆ e '' K := by |
| 488 | intro z hz |
| 489 | rw [he] |
| 490 | exact hball ((hround hz).trans_le (ENNReal.ofReal_le_ofReal hroundRadius.le)) |
| 491 | have hopen : IsOpen A.carrier := A.forward_image ▸ A.forward_openEmbedding.isOpen_range |
| 492 | exact shape_compact_target e A.compact hopen ⟨f k x, hxA⟩ (hcapA.trans himageTarget) |
| 493 | obtain ⟨N0, hN0⟩ := eventually_atTop.mp htail |
| 494 | have hshift (k : ℕ) := hN0 (k + N0) (Nat.le_add_left N0 k) |
| 495 | choose e hsource he N heps hcap hbounds hresult using hshift |
| 496 | have hconv' : TendstoUniformlyOn |
| 497 | (fun k y => (Dsrc (k + N0)).scalarCurvature (e k y)) D.scalarCurvature atTop K := by |
| 498 | simpa only [he] using hconv.seq_tendstoUniformlyOn (fun k => k + N0) (tendsto_add_atTop_nat N0) |
| 499 | have hjets' : ∀ i m, m ≤ ⌊(2 * epsilon)⁻¹⌋₊ + 1 → TendstoUniformlyOn |
| 500 | (fun k => iteratedFDeriv ℝ m |
| 501 | ((h (k + N0)).pullbackCoefficients (e k ∘ (extChartAt (𝓡 3) (q i)).symm))) |
| 502 | (iteratedFDeriv ℝ m (g.pullbackCoefficients (extChartAt (𝓡 3) (q i)).symm)) atTop (L i) := by |
| 503 | intro i m hm |
| 504 | simpa only [he] using (hjets i m hm).seq_tendstoUniformlyOn |
| 505 | (fun k => k + N0) (tendsto_add_atTop_nat N0) |
| 506 | have htransfer := eventually_exists_neck_of_captured_finite_metric_jets |
| 507 | g D (fun k => h (k + N0)) (fun k => Dsrc (k + N0)) hepsilon hepsEta heta horder |
| 508 | U hU e hsource N heps K hK hKU hcap a b ha hbounds hconv' |
| 509 | q L hL htarget hLsource hcover hjets' |
| 510 | have hnorm := eventually_inverse_tangent_bound_of_finite_chart_jets g (fun k => h (k + N0)) e K |
| 511 | (fun k => (hsource k).symm ▸ hKU) q L hL htarget hcover (fun i => hjets' i 0 (Nat.zero_le _)) |
| 512 | obtain ⟨k, ⟨V, hVeps, hVcenter, hVconn, hVcoord⟩, hk⟩ := (htransfer.and hnorm).exists |
| 513 | rcases hresult k V hVeps hVconn hVcenter hVcoord hk with hn | hc |
| 514 | · exact Or.inl hn |
| 515 | · exact Or.inr (Or.inl hc) |
| 516 | |
| 517 | end PoincareMT.M30 |