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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/ConnectionDifferenceEvolution.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Connection.Variation |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Metric.RicciPairRegularity |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Connection.Difference |
| 8 | import PoincareLib.Geometry.RicciFlow.Local.Connection.RateEnergyAlgebra |
| 9 | |
| 10 | /-! |
| 11 | # Evolution of the actual connection difference |
| 12 | |
| 13 | Subtract the two connection variations in a common fixed tangent norm. |
| 14 | The covariant Ricci difference and the two algebraic correction terms give |
| 15 | the lowered form of Kotschwar 1206.3225v1, printed p. 4, equations (6)-(8). |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option maxHeartbeats 1800000 |
| 20 | |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | open Set |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.RicciFlow.Local |
| 27 | |
| 28 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | theorem ricciFlow_connection_difference_evolution_pairing |
| 32 | {J J' : Set ℝ} (F : RicciFlow n M J) (F' : RicciFlow n M J') |
| 33 | (hinit : F.metric 0 = F'.metric 0) |
| 34 | {t : ℝ} (ht : t ∈ interior J) (ht' : t ∈ interior J') |
| 35 | {U : Set M} (hU : IsOpen U) |
| 36 | (X Y Z : (x : M) → TangentSpace (𝓡 n) x) |
| 37 | (hX : ContMDiffOn (𝓡 n) |
| 38 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% X) U) |
| 39 | (hY : ContMDiffOn (𝓡 n) |
| 40 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Y) U) |
| 41 | (hZ : ContMDiffOn (𝓡 n) |
| 42 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Z) U) |
| 43 | {x : M} (hx : x ∈ U) : |
| 44 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 45 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 46 | let c := extChartAt (𝓡 n) x |
| 47 | let R := fun y (a b : TangentSpace (𝓡 n) y) => |
| 48 | (F.connection t).ricci y a b - (F'.connection t).ricci y a b |
| 49 | let cR := fun (B C D : (y : M) → TangentSpace (𝓡 n) y) => |
| 50 | fderiv ℝ (fun z => R (c.symm z) (C (c.symm z)) (D (c.symm z))) |
| 51 | (c x) (B x) - |
| 52 | R x ((F.connection t).connection C x (B x)) (D x) - |
| 53 | R x (C x) ((F.connection t).connection D x (B x)) |
| 54 | let A := fun s => CovariantDerivative.difference |
| 55 | (F.connection s).connection (F'.connection s).connection x (Y x) (X x) |
| 56 | let V' := fun s => (F'.connection s).connection Y x (X x) |
| 57 | HasDerivAt A (deriv A t) t ∧ |
| 58 | (F.metric t).inner x (deriv A t) (Z x) = |
| 59 | -cR X Y Z - cR Y Z X + cR Z X Y + |
| 60 | 2 * (F'.connection t).ricci x (A t) (Z x) - |
| 61 | ((F.metric t).inner x (deriv V' t) (Z x) - |
| 62 | (F'.metric t).inner x (deriv V' t) (Z x)) := by |
| 63 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 64 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 65 | let c := extChartAt (𝓡 n) x |
| 66 | let r := fun y (a b : TangentSpace (𝓡 n) y) => (F.connection t).ricci y a b |
| 67 | let r' := fun y (a b : TangentSpace (𝓡 n) y) => (F'.connection t).ricci y a b |
| 68 | let R := fun y (a b : TangentSpace (𝓡 n) y) => r y a b - r' y a b |
| 69 | let D := fun (B C : (y : M) → TangentSpace (𝓡 n) y) => |
| 70 | (F.connection t).connection C x (B x) |
| 71 | let D' := fun (B C : (y : M) → TangentSpace (𝓡 n) y) => |
| 72 | (F'.connection t).connection C x (B x) |
| 73 | let Bdiff := fun (B C : (y : M) → TangentSpace (𝓡 n) y) => D B C - D' B C |
| 74 | let C := fun (B C W : (y : M) → TangentSpace (𝓡 n) y) => |
| 75 | fderiv ℝ (fun z => r (c.symm z) (C (c.symm z)) (W (c.symm z))) (c x) (B x) - |
| 76 | r x (D B C) (W x) - r x (C x) (D B W) |
| 77 | let C' := fun (B C W : (y : M) → TangentSpace (𝓡 n) y) => |
| 78 | fderiv ℝ (fun z => r' (c.symm z) (C (c.symm z)) (W (c.symm z))) (c x) (B x) - |
| 79 | r' x (D' B C) (W x) - r' x (C x) (D' B W) |
| 80 | let cR := fun (B C W : (y : M) → TangentSpace (𝓡 n) y) => |
| 81 | fderiv ℝ (fun z => R (c.symm z) (C (c.symm z)) (W (c.symm z))) (c x) (B x) - |
| 82 | R x (D B C) (W x) - R x (C x) (D B W) |
| 83 | let A := fun s => CovariantDerivative.difference |
| 84 | (F.connection s).connection (F'.connection s).connection x (Y x) (X x) |
| 85 | let V := fun s => (F.connection s).connection Y x (X x) |
| 86 | let V' := fun s => (F'.connection s).connection Y x (X x) |
| 87 | change HasDerivAt A (deriv A t) t ∧ |
| 88 | (F.metric t).inner x (deriv A t) (Z x) = |
| 89 | -cR X Y Z - cR Y Z X + cR Z X Y + 2 * r' x (A t) (Z x) - |
| 90 | ((F.metric t).inner x (deriv V' t) (Z x) - |
| 91 | (F'.metric t).inner x (deriv V' t) (Z x)) |
| 92 | have hXx := (hX.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp) |
| 93 | have hYx := (hY.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp) |
| 94 | have hZx := (hZ.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp) |
| 95 | have hAeq (s : ℝ) : A s = V s - V' s := by |
| 96 | have hh := IsCovariantDerivativeOn.difference_apply |
| 97 | (F.connection s).connection.isCovariantDerivativeOnUniv |
| 98 | (F'.connection s).connection.isCovariantDerivativeOnUniv (mem_univ x) hYx |
| 99 | have hh' := congrArg |
| 100 | (fun L : TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x => L (X x)) hh |
| 101 | dsimp only [A, V, V'] |
| 102 | exact hh' |
| 103 | have hv : HasDerivAt V (deriv V t) t ∧ |
| 104 | (F.metric t).inner x (deriv V t) (Z x) = -C X Y Z - C Y Z X + C Z X Y := |
| 105 | ricciFlow_connection_variation_pairing F ht hU X Y Z hX hY hZ hx |
| 106 | have hv' : HasDerivAt V' (deriv V' t) t ∧ |
| 107 | (F'.metric t).inner x (deriv V' t) (Z x) = -C' X Y Z - C' Y Z X + C' Z X Y := by |
| 108 | simpa only [← hinit] using |
| 109 | (ricciFlow_connection_variation_pairing F' ht' hU X Y Z hX hY hZ hx) |
| 110 | have hAd := (hv.1.sub hv'.1).congr_of_eventuallyEq (Filter.Eventually.of_forall hAeq) |
| 111 | have hAdot : deriv A t = deriv V t - deriv V' t := hAd.deriv |
| 112 | refine ⟨hAd.differentiableAt.hasDerivAt, ?_⟩ |
| 113 | have hcx : c.symm (c x) = x := c.left_inv (mem_extChartAt_source x) |
| 114 | have hcxt : c x ∈ c.target := mem_extChartAt_target x |
| 115 | have hcxU : c.symm (c x) ∈ U := by simpa only [hcx] using hx |
| 116 | have hc : ContMDiffAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) ∞ c.symm (c x) := |
| 117 | (contMDiffOn_extChartAt_symm (I := 𝓡 n) x).contMDiffAt |
| 118 | (extChartAt_target_mem_nhds' hcxt) |
| 119 | have hspace {K : Set ℝ} (H : RicciFlow n M K) (htK : t ∈ interior K) |
| 120 | (B W : (y : M) → TangentSpace (𝓡 n) y) |
| 121 | (hB : ContMDiffOn (𝓡 n) |
| 122 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% B) U) |
| 123 | (hW : ContMDiffOn (𝓡 n) |
| 124 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% W) U) : |
| 125 | DifferentiableAt ℝ (fun z => (H.connection t).ricci (c.symm z) |
| 126 | (B (c.symm z)) (W (c.symm z))) (c x) := by |
| 127 | have hn : interior K ×ˢ (c.target ∩ c.symm ⁻¹' U) ∈ 𝓝 (t, c x) := |
| 128 | prod_mem_nhds (isOpen_interior.mem_nhds htK) |
| 129 | (Filter.inter_mem (extChartAt_target_mem_nhds' hcxt) |
| 130 | (hc.continuousAt.preimage_mem_nhds (hU.mem_nhds hcxU))) |
| 131 | have hh := (contDiffOn_ricciFlow_ricci_chart_pair H hU B W hB hW x).contDiffAt hn |
| 132 | have hs := hh.comp (c x) (contDiffAt_const.prodMk contDiffAt_id) |
| 133 | exact hs.differentiableAt (by simp) |
| 134 | have hds (B W : (y : M) → TangentSpace (𝓡 n) y) |
| 135 | (hB : ContMDiffOn (𝓡 n) |
| 136 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% B) U) |
| 137 | (hW : ContMDiffOn (𝓡 n) |
| 138 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% W) U) |
| 139 | (a : EuclideanSpace ℝ (Fin n)) : |
| 140 | fderiv ℝ (fun z => R (c.symm z) (B (c.symm z)) (W (c.symm z))) (c x) a = |
| 141 | fderiv ℝ (fun z => r (c.symm z) (B (c.symm z)) (W (c.symm z))) (c x) a - |
| 142 | fderiv ℝ (fun z => r' (c.symm z) (B (c.symm z)) (W (c.symm z))) (c x) a := by |
| 143 | have hh := fderiv_sub (hspace F ht B W hB hW) (hspace F' ht' B W hB hW) |
| 144 | change fderiv ℝ |
| 145 | ((fun z => r (c.symm z) (B (c.symm z)) (W (c.symm z))) - |
| 146 | (fun z => r' (c.symm z) (B (c.symm z)) (W (c.symm z)))) (c x) a = _ |
| 147 | simpa only [sub_apply] using congrArg |
| 148 | (fun L : EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ => L a) hh |
| 149 | have he (a b : TangentSpace (𝓡 n) x) : |
| 150 | HasDerivAt (fun s => (F'.metric s).inner x a b) (-2 * r' x a b) t := |
| 151 | (F'.equation t (interior_subset ht') x a b).hasDerivAt |
| 152 | (mem_interior_iff_mem_nhds.mp ht') |
| 153 | have hsub₁ (a b z : TangentSpace (𝓡 n) x) : |
| 154 | r' x (a - b) z = r' x a z - r' x b z := by |
| 155 | have hd : HasDerivAt (fun s => (F'.metric s).inner x (a - b) z) |
| 156 | (-2 * r' x a z - (-2 * r' x b z)) t := by |
| 157 | refine ((he a z).sub (he b z)).congr_of_eventuallyEq ?_ |
| 158 | exact Filter.Eventually.of_forall (fun s => by |
| 159 | simp only [Pi.sub_apply, map_sub, sub_apply]) |
| 160 | have hh := (he (a - b) z).unique hd |
| 161 | linarith only [hh] |
| 162 | have hsub₂ (a b z : TangentSpace (𝓡 n) x) : |
| 163 | r' x a (b - z) = r' x a b - r' x a z := by |
| 164 | have hd : HasDerivAt (fun s => (F'.metric s).inner x a (b - z)) |
| 165 | (-2 * r' x a b - (-2 * r' x a z)) t := by |
| 166 | refine ((he a b).sub (he a z)).congr_of_eventuallyEq ?_ |
| 167 | exact Filter.Eventually.of_forall (fun s => by |
| 168 | simp only [Pi.sub_apply, map_sub, sub_apply]) |
| 169 | have hh := (he a (b - z)).unique hd |
| 170 | linarith only [hh] |
| 171 | have hsymm (a b : TangentSpace (𝓡 n) x) : r' x a b = r' x b a := by |
| 172 | have hb := (he b a).congr_of_eventuallyEq |
| 173 | (Filter.Eventually.of_forall (fun s => (F'.metric s).symm x a b)) |
| 174 | have hh := (he a b).unique hb |
| 175 | linarith only [hh] |
| 176 | have hCs (B W Q : (y : M) → TangentSpace (𝓡 n) y) |
| 177 | (hW : ContMDiffOn (𝓡 n) |
| 178 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% W) U) |
| 179 | (hQ : ContMDiffOn (𝓡 n) |
| 180 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Q) U) : |
| 181 | C B W Q - C' B W Q = |
| 182 | cR B W Q - r' x (Bdiff B W) (Q x) - r' x (W x) (Bdiff B Q) := by |
| 183 | dsimp only [C, C', cR] |
| 184 | rw [hds W Q hW hQ (B x)] |
| 185 | dsimp only [R, Bdiff] |
| 186 | rw [hsub₁, hsub₂] |
| 187 | ring |
| 188 | have hBsymm (B W : (y : M) → TangentSpace (𝓡 n) y) |
| 189 | (hB : MDifferentiableAt (𝓡 n) |
| 190 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) (T% B) x) |
| 191 | (hW : MDifferentiableAt (𝓡 n) |
| 192 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) (T% W) x) : |
| 193 | Bdiff B W = Bdiff W B := by |
| 194 | have hh : D B W - D W B = VectorField.mlieBracket (𝓡 n) B W x := |
| 195 | ((F.connection t).connection.torsion_eq_zero_iff.mp |
| 196 | (F.connection t).torsion_eq_zero) hB hW |
| 197 | have hh' : D' B W - D' W B = VectorField.mlieBracket (𝓡 n) B W x := |
| 198 | ((F'.connection t).connection.torsion_eq_zero_iff.mp |
| 199 | (F'.connection t).torsion_eq_zero) hB hW |
| 200 | rw [sub_eq_iff_eq_add] at hh hh' |
| 201 | dsimp only [Bdiff] |
| 202 | rw [hh, hh'] |
| 203 | module |
| 204 | have h1 := hCs X Y Z hY hZ |
| 205 | have h2 := hCs Y Z X hZ hX |
| 206 | have h3 := hCs Z X Y hX hY |
| 207 | rw [hBsymm Y X hYx hXx, hsymm (Z x) (Bdiff X Y), |
| 208 | hsymm (Bdiff Y Z) (X x)] at h2 |
| 209 | rw [hBsymm Z X hZx hXx, hBsymm Z Y hZx hYx, |
| 210 | hsymm (Bdiff X Z) (Y x)] at h3 |
| 211 | have hAt : A t = Bdiff X Y := hAeq t |
| 212 | rw [hAdot, map_sub, sub_apply, hAt] |
| 213 | linarith only [hv.2, hv'.2, h1, h2, h3] |
| 214 | |
| 215 | section TerminalCoordinates |
| 216 | |
| 217 | open scoped BigOperators |
| 218 | open Bundle Manifold Filter |
| 219 | |
| 220 | set_option maxHeartbeats 4000000 in |
| 221 | set_option synthInstance.maxHeartbeats 200000 in |
| 222 | /-- Actual connection coordinate jets have uniform bounds and time control on compact chart subsets. -/ |
| 223 | theorem ricciFlow_connection_coordinate_jets_terminal_control |
| 224 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 225 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 226 | [IsManifold (𝓡 n) ∞ M] |
| 227 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 228 | {T C a : ℝ} (hT : 0 < T) (F : RicciFlow n M (Ico 0 T)) |
| 229 | (hRm : ∀ s ∈ Ico 0 T, ∀ x : M, |
| 230 | (F.connection s).curvatureTensorNorm x ≤ C) |
| 231 | (ha : 0 < a) (haT : a < T) (x0 : M) |
| 232 | {K : Set (EuclideanSpace ℝ (Fin n))} (hK : IsCompact K) |
| 233 | (hKchart : K ⊆ (chartAt (EuclideanSpace ℝ (Fin n)) x0).target) : |
| 234 | let V := EuclideanSpace ℝ (Fin n) |
| 235 | let c := chartAt V x0 |
| 236 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 237 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 238 | let E := e.localFrame cb |
| 239 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 240 | let Gamma := fun (s : ℝ) (i j l : Fin n) (z : V) => |
| 241 | theta l (c.symm z) |
| 242 | ((F.connection s).connection (E j) (c.symm z) (E i (c.symm z))) |
| 243 | ∀ m : ℕ, ∃ B R : ℝ, 0 ≤ B ∧ 0 ≤ R ∧ |
| 244 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j l : Fin n, |
| 245 | ‖iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ B) ∧ |
| 246 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j l : Fin n, |
| 247 | DifferentiableAt ℝ |
| 248 | (fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) s ∧ |
| 249 | ‖deriv (fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) s‖ ≤ R) ∧ |
| 250 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, |
| 251 | ∀ z ∈ K, ∀ i j l : Fin n, |
| 252 | ‖iteratedFDeriv ℝ q (Gamma t i j l) z - |
| 253 | iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ R * |t - s|) := by |
| 254 | classical |
| 255 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 256 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 257 | let V := EuclideanSpace ℝ (Fin n) |
| 258 | let c := chartAt V x0 |
| 259 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 260 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 261 | let E := e.localFrame cb |
| 262 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 263 | let N := fun (s : ℝ) (i j : Fin n) (x : M) => |
| 264 | (F.connection s).connection (E j) x (E i x) |
| 265 | let Gamma := fun (s : ℝ) (i j l : Fin n) (z : V) => |
| 266 | theta l (c.symm z) (N s i j (c.symm z)) |
| 267 | let G := fun (s : ℝ) (x : M) => ContinuousLinearMap.inCoordinates V |
| 268 | (TangentSpace (𝓡 n)) (V →L[ℝ] ℝ) |
| 269 | (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 270 | x0 x x0 x ((F.metric s).inner x) |
| 271 | let H := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 272 | (G s (c.symm z)).inverse (EuclideanSpace.proj j) i |
| 273 | let L := fun (r : ℕ) (s : ℝ) (alpha : Fin (r + 4) → Fin n) (z : V) => |
| 274 | (F.metric s).inner (c.symm z) |
| 275 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) r |
| 276 | (fun j : Fin (r + 3) => E (alpha j.castSucc)) (c.symm z)) |
| 277 | (E (alpha (Fin.last (r + 3))) (c.symm z)) |
| 278 | let tr := fun (s : ℝ) (i j k : Fin n) (z : V) => |
| 279 | ∑ p : Fin n, ∑ q : Fin n, H s p q z * L 1 s ![i,p,j,k,q] z |
| 280 | let b := fun (s : ℝ) (i j v : Fin n) (z : V) => |
| 281 | -tr s i j v z - tr s j v i z + tr s v i j z |
| 282 | let Q := fun (s : ℝ) (i j l : Fin n) (z : V) => |
| 283 | ∑ v : Fin n, H s l v z * b s i j v z |
| 284 | let Good := fun m : ℕ => ∃ B R : ℝ, 0 ≤ B ∧ 0 ≤ R ∧ |
| 285 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j l : Fin n, |
| 286 | ‖iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ B) ∧ |
| 287 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j l : Fin n, |
| 288 | DifferentiableAt ℝ |
| 289 | (fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) s ∧ |
| 290 | ‖deriv (fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) s‖ ≤ R) ∧ |
| 291 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, |
| 292 | ∀ z ∈ K, ∀ i j l : Fin n, |
| 293 | ‖iteratedFDeriv ℝ q (Gamma t i j l) z - |
| 294 | iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ R * |t - s|) |
| 295 | change ∀ m : ℕ, Good m |
| 296 | have hbase {z : V} (hz : z ∈ c.target) : c.symm z ∈ e.baseSet := by |
| 297 | simpa only [e, TangentBundle.trivializationAt_baseSet] using c.map_target hz |
| 298 | have haI : a ∈ Ico a T := ⟨le_rfl, haT⟩ |
| 299 | have htime {s : ℝ} (hs : s ∈ Ico a T) : s ∈ Ioo 0 T := |
| 300 | ⟨ha.trans_le hs.1, hs.2⟩ |
| 301 | have hE (i : Fin n) : ContMDiffOn (𝓡 n) |
| 302 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (E i)) e.baseSet := |
| 303 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 304 | have htheta {x : M} (hx : x ∈ e.baseSet) (l : Fin n) |
| 305 | (v : TangentSpace (𝓡 n) x) : |
| 306 | theta l x v = (e.continuousLinearMapAt ℝ x v) l := by |
| 307 | have hh := e.localFrameCoeff_apply_of_mem_baseSet (I := 𝓡 n) cb hx |
| 308 | (FiberBundle.extend V v) l |
| 309 | rw [FiberBundle.extend_apply_self] at hh |
| 310 | change theta l x v = _ at hh |
| 311 | rw [hh] |
| 312 | simp only [Trivialization.basisAt, Module.Basis.map_repr, LinearEquiv.symm_symm, |
| 313 | LinearEquiv.trans_apply, cb, OrthonormalBasis.coe_toBasis_repr_apply, |
| 314 | Trivialization.linearEquivAt_apply] |
| 315 | rw [Trivialization.continuousLinearMapAt_apply_of_mem ℝ e hx] |
| 316 | rfl |
| 317 | have hchart (f : M → ℝ) |
| 318 | (hf : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ f e.baseSet) : |
| 319 | ContDiffOn ℝ ∞ (fun z => f (c.symm z)) c.target := |
| 320 | (hf.comp (contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)) |
| 321 | (fun z hz => hbase hz)).contDiffOn |
| 322 | have hGammaSmooth (s : ℝ) (i j l : Fin n) : |
| 323 | ContDiffOn ℝ ∞ (Gamma s i j l) c.target := by |
| 324 | apply hchart (fun y => theta l y (N s i j y)) |
| 325 | exact contMDiffOn_localFrameCoeff cb e.open_baseSet subset_rfl |
| 326 | ((F.connection s).contMDiffOn_connection_apply e.open_baseSet |
| 327 | (E i) (E j) (hE i) (hE j)) l |
| 328 | have hGammaJoint (i j l : Fin n) : ContDiffOn ℝ ∞ |
| 329 | (Function.uncurry (fun s => Gamma s i j l)) (Ioo 0 T ×ˢ c.target) := by |
| 330 | have hN : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) |
| 331 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 332 | (fun p : ℝ × M => TotalSpace.mk' V p.2 (N p.1 i j p.2)) |
| 333 | (Ico 0 T ×ˢ e.baseSet) := |
| 334 | contMDiffOn_connection_family_apply F.smooth F.connection e.open_baseSet |
| 335 | (E j) (E i) (hE j) (hE i) |
| 336 | have hcoords := (e.contMDiffOn_iff (by |
| 337 | intro p hp |
| 338 | change p.2 ∈ e.baseSet |
| 339 | exact hp.2)).mp hN |
| 340 | have hg : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 341 | (fun p : ℝ × M => theta l p.2 (N p.1 i j p.2)) |
| 342 | (Ico 0 T ×ˢ e.baseSet) := by |
| 343 | apply ((EuclideanSpace.proj l : V →L[ℝ] ℝ).contMDiff.comp_contMDiffOn |
| 344 | hcoords.2).congr |
| 345 | intro p hp |
| 346 | rw [htheta hp.2, Trivialization.continuousLinearMapAt_apply_of_mem ℝ e hp.2] |
| 347 | rfl |
| 348 | have hmap : ContMDiffOn (𝓘(ℝ, ℝ).prod 𝓘(ℝ, V)) |
| 349 | (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 350 | (fun p : ℝ × V => (p.1, c.symm p.2)) (Ioo 0 T ×ˢ c.target) := |
| 351 | contMDiffOn_fst.prodMk |
| 352 | ((contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)).comp |
| 353 | contMDiffOn_snd (fun p hp => hp.2)) |
| 354 | have hh := hg.comp hmap (fun p hp => ⟨⟨hp.1.1.le, hp.1.2⟩, hbase hp.2⟩) |
| 355 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at hh |
| 356 | exact hh.contDiffOn |
| 357 | have hfamily (s : ℝ) : RiemannianMetric.IsSmoothFamilyOn |
| 358 | (fun _ : ℝ => F.metric s) Set.univ := |
| 359 | ((F.metric s).contMDiff.comp contMDiff_snd).contMDiffOn |
| 360 | have hHSmooth (s : ℝ) (i j : Fin n) : |
| 361 | ContDiffOn ℝ ∞ (H s i j) c.target := by |
| 362 | have hInv : ContMDiffOn (𝓡 n) 𝓘(ℝ, (V →L[ℝ] ℝ) →L[ℝ] V) ∞ |
| 363 | (fun y => (G s y).inverse) e.baseSet := |
| 364 | (contMDiffOn_family_metric_frame_inverse (hfamily s) x0).2.2.comp |
| 365 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 366 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 367 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 368 | (fun y hy => ⟨Set.mem_univ (0 : ℝ), hy⟩) |
| 369 | apply hchart (fun y => (EuclideanSpace.proj i : V →L[ℝ] ℝ) |
| 370 | ((G s y).inverse (EuclideanSpace.proj j))) |
| 371 | exact (EuclideanSpace.proj i : V →L[ℝ] ℝ).contMDiff.comp_contMDiffOn |
| 372 | (hInv.clm_apply (contMDiffOn_const (c := EuclideanSpace.proj j))) |
| 373 | have hLSmooth (s : ℝ) (alpha : Fin 5 → Fin n) : |
| 374 | ContDiffOn ℝ ∞ (L 1 s alpha) c.target := by |
| 375 | apply hchart (fun y => (F.metric s).inner y |
| 376 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) 1 |
| 377 | (fun j : Fin 4 => E (alpha j.castSucc)) y) |
| 378 | (E (alpha (Fin.last 4)) y)) |
| 379 | exact (contMDiffOn_family_metric_pair (hfamily s) |
| 380 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) 1 |
| 381 | (fun j : Fin 4 => E (alpha j.castSucc))) |
| 382 | (E (alpha (Fin.last 4))) |
| 383 | (contMDiffOn_curvatureOnFields_iteratedCovariantDerivative (F.connection s) |
| 384 | e.open_baseSet 1 _ (fun j => hE (alpha j.castSucc))) |
| 385 | (hE (alpha (Fin.last 4)))).comp |
| 386 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 387 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 388 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 389 | (fun y hy => ⟨Set.mem_univ (0 : ℝ), hy⟩) |
| 390 | have htrSmooth (s : ℝ) (i j k : Fin n) : ContDiffOn ℝ ∞ (tr s i j k) c.target := |
| 391 | ContDiffOn.sum (fun p _ => ContDiffOn.sum (fun q _ => |
| 392 | (hHSmooth s p q).mul (hLSmooth s ![i,p,j,k,q]))) |
| 393 | have hbSmooth (s : ℝ) (i j v : Fin n) : ContDiffOn ℝ ∞ (b s i j v) c.target := |
| 394 | ((htrSmooth s i j v).neg.sub (htrSmooth s j v i)).add (htrSmooth s v i j) |
| 395 | have hGtime {s : ℝ} (hs : s ∈ Ioo 0 T) {z : V} (hz : z ∈ c.target) |
| 396 | (i j l : Fin n) : HasDerivAt (fun r => Gamma r i j l z) (Q s i j l z) s := |
| 397 | hasDerivAt_ricciFlow_connection_frame_coordinates F |
| 398 | (by simpa only [interior_Ico] using hs) x0 (c.symm z) (hbase hz) i j l |
| 399 | have hjetTime (q : ℕ) {s : ℝ} (hs : s ∈ Ioo 0 T) {z : V} (hz : z ∈ c.target) |
| 400 | (i j l : Fin n) : |
| 401 | HasDerivAt (fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) |
| 402 | (iteratedFDeriv ℝ q (Q s i j l) z) s := by |
| 403 | have hh := hasDerivAt_iteratedFDeriv_family isOpen_Ioo c.open_target |
| 404 | (fun r => Gamma r i j l) (hGammaJoint i j l) q hs hz |
| 405 | have he : (fun y => deriv (fun r => Gamma r i j l y) s) =ᶠ[𝓝 z] Q s i j l := by |
| 406 | filter_upwards [c.open_target.mem_nhds hz] with y hy |
| 407 | exact (hGtime hs hy i j l).deriv |
| 408 | exact hh.congr_deriv (he.iteratedFDeriv (𝕜 := ℝ) q).eq_of_nhds |
| 409 | have hsum {d : ℕ} (f : Fin d → V → ℝ) |
| 410 | (hf : ∀ i, ContDiffOn ℝ ∞ (f i) c.target) |
| 411 | (z : V) (hz : z ∈ c.target) (q : ℕ) (B : ℝ) |
| 412 | (hb : ∀ i, ‖iteratedFDeriv ℝ q (f i) z‖ ≤ B) : |
| 413 | ‖iteratedFDeriv ℝ q (fun y => ∑ i, f i y) z‖ ≤ (d : ℝ) * B := by |
| 414 | rw [iteratedFDeriv_fun_sum_apply |
| 415 | (fun i _ => ((hf i).contDiffAt (c.open_target.mem_nhds hz)).of_le |
| 416 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl q))] |
| 417 | calc |
| 418 | _ ≤ ∑ i : Fin d, ‖iteratedFDeriv ℝ q (f i) z‖ := norm_sum_le _ _ |
| 419 | _ ≤ ∑ _i : Fin d, B := Finset.sum_le_sum (fun i _ => hb i) |
| 420 | _ = (d : ℝ) * B := by simp |
| 421 | have hstep (m : ℕ) |
| 422 | (hprev : ∃ A : ℝ, 0 ≤ A ∧ |
| 423 | ∀ q < m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j l : Fin n, |
| 424 | ‖iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ A) : Good m := by |
| 425 | obtain ⟨⟨BH, hBH, hHbound⟩, hLbound⟩ := |
| 426 | ricciFlow_inverse_and_lowered_coordinate_jets_of_connection_jets |
| 427 | hT F hRm ha haT x0 hK hKchart m hprev |
| 428 | obtain ⟨BL, hBL, hL1bound⟩ := hLbound 1 |
| 429 | let P := (2 : ℝ) ^ m * BH * BL |
| 430 | let S := (n : ℝ) * ((n : ℝ) * P) |
| 431 | let Btr := S + S + S |
| 432 | let R := (n : ℝ) * ((2 : ℝ) ^ m * BH * Btr) |
| 433 | have hP : 0 ≤ P := by dsimp only [P]; positivity |
| 434 | have hS : 0 ≤ S := by dsimp only [S]; positivity |
| 435 | have hBtr : 0 ≤ Btr := by dsimp only [Btr]; positivity |
| 436 | have hR : 0 ≤ R := by dsimp only [R]; positivity |
| 437 | have hmulBound (q : ℕ) (hq : q ≤ m) {s : ℝ} (hs : s ∈ Ico a T) |
| 438 | {z : V} (hz : z ∈ K) (p v : Fin n) (alpha : Fin 5 → Fin n) : |
| 439 | ‖iteratedFDeriv ℝ q (fun y => H s p v y * L 1 s alpha y) z‖ ≤ P := by |
| 440 | apply (norm_iteratedFDeriv_mul_le_of_open_bounds c.open_target |
| 441 | (hHSmooth s p v) (hLSmooth s alpha) (hKchart hz) q hBH hBL |
| 442 | (fun k hk => hHbound k (hk.trans hq) s hs z hz p v) |
| 443 | (fun k hk => hL1bound k (hk.trans hq) s hs z hz alpha)).trans |
| 444 | exact mul_le_mul_of_nonneg_right |
| 445 | (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hq) hBH) hBL |
| 446 | have htrBound (q : ℕ) (hq : q ≤ m) {s : ℝ} (hs : s ∈ Ico a T) |
| 447 | {z : V} (hz : z ∈ K) (i j k : Fin n) : |
| 448 | ‖iteratedFDeriv ℝ q (tr s i j k) z‖ ≤ S := by |
| 449 | apply hsum _ (fun p => ContDiffOn.sum (fun v _ => |
| 450 | (hHSmooth s p v).mul (hLSmooth s ![i,p,j,k,v]))) z (hKchart hz) q ((n : ℝ) * P) |
| 451 | intro p |
| 452 | apply hsum _ (fun v => (hHSmooth s p v).mul (hLSmooth s ![i,p,j,k,v])) |
| 453 | z (hKchart hz) q P |
| 454 | intro v |
| 455 | exact hmulBound q hq hs hz p v ![i,p,j,k,v] |
| 456 | have hbBound (q : ℕ) (hq : q ≤ m) {s : ℝ} (hs : s ∈ Ico a T) |
| 457 | {z : V} (hz : z ∈ K) (i j v : Fin n) : |
| 458 | ‖iteratedFDeriv ℝ q (b s i j v) z‖ ≤ Btr := by |
| 459 | have hc (i j k : Fin n) : ContDiffAt ℝ q (tr s i j k) z := |
| 460 | ((htrSmooth s i j k).contDiffAt (c.open_target.mem_nhds (hKchart hz))).of_le |
| 461 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl q) |
| 462 | have hneg : iteratedFDeriv ℝ q (fun y => -tr s i j v y) z = |
| 463 | -iteratedFDeriv ℝ q (tr s i j v) z := by |
| 464 | simpa only [Pi.neg_def] using |
| 465 | (iteratedFDeriv_neg_apply (𝕜 := ℝ) (i := q) (f := tr s i j v) (x := z)) |
| 466 | dsimp only [b] |
| 467 | rw [fun_iteratedFDeriv_add_apply ((hc i j v).neg.sub (hc j v i)) (hc v i j), |
| 468 | fun_iteratedFDeriv_sub_apply (hc i j v).neg (hc j v i), |
| 469 | hneg] |
| 470 | calc |
| 471 | _ ≤ ‖-iteratedFDeriv ℝ q (tr s i j v) z - iteratedFDeriv ℝ q (tr s j v i) z‖ + |
| 472 | ‖iteratedFDeriv ℝ q (tr s v i j) z‖ := norm_add_le _ _ |
| 473 | _ ≤ (‖iteratedFDeriv ℝ q (tr s i j v) z‖ + |
| 474 | ‖iteratedFDeriv ℝ q (tr s j v i) z‖) + |
| 475 | ‖iteratedFDeriv ℝ q (tr s v i j) z‖ := |
| 476 | add_le_add (by |
| 477 | simpa only [norm_neg] using (norm_sub_le |
| 478 | (-iteratedFDeriv ℝ q (tr s i j v) z) |
| 479 | (iteratedFDeriv ℝ q (tr s j v i) z))) le_rfl |
| 480 | _ ≤ Btr := add_le_add (add_le_add (htrBound q hq hs hz i j v) |
| 481 | (htrBound q hq hs hz j v i)) (htrBound q hq hs hz v i j) |
| 482 | have hQbound (q : ℕ) (hq : q ≤ m) {s : ℝ} (hs : s ∈ Ico a T) |
| 483 | {z : V} (hz : z ∈ K) (i j l : Fin n) : |
| 484 | ‖iteratedFDeriv ℝ q (Q s i j l) z‖ ≤ R := by |
| 485 | apply hsum _ (fun v => (hHSmooth s l v).mul (hbSmooth s i j v)) |
| 486 | z (hKchart hz) q ((2 : ℝ) ^ m * BH * Btr) |
| 487 | intro v |
| 488 | apply (norm_iteratedFDeriv_mul_le_of_open_bounds c.open_target |
| 489 | (hHSmooth s l v) (hbSmooth s i j v) (hKchart hz) q hBH hBtr |
| 490 | (fun k hk => hHbound k (hk.trans hq) s hs z hz l v) |
| 491 | (fun k hk => hbBound k (hk.trans hq) hs hz i j v)).trans |
| 492 | exact mul_le_mul_of_nonneg_right |
| 493 | (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hq) hBH) hBtr |
| 494 | have hinitial (q : Fin (m + 1)) (i j l : Fin n) : |
| 495 | ∃ B0 : ℝ, 0 ≤ B0 ∧ ∀ z ∈ K, |
| 496 | ‖iteratedFDeriv ℝ (q : ℕ) (Gamma a i j l) z‖ ≤ B0 := by |
| 497 | have hc := ContinuousOn.continuousOn_iteratedFDeriv |
| 498 | (hGammaSmooth a i j l) c.open_target |
| 499 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl (q : ℕ)) |
| 500 | obtain ⟨B0, hB0⟩ := hK.bddAbove_image (hc.norm.mono hKchart) |
| 501 | refine ⟨max B0 0, le_max_right _ _, ?_⟩ |
| 502 | intro z hz |
| 503 | exact (hB0 (mem_image_of_mem _ hz)).trans (le_max_left _ _) |
| 504 | choose b0 hb0 hbound0 using hinitial |
| 505 | let B0 := ∑ q : Fin (m + 1), ∑ i : Fin n, ∑ j : Fin n, ∑ l : Fin n, b0 q i j l |
| 506 | have hB0 : 0 ≤ B0 := Finset.sum_nonneg fun q _ => Finset.sum_nonneg fun i _ => |
| 507 | Finset.sum_nonneg fun j _ => Finset.sum_nonneg fun l _ => hb0 q i j l |
| 508 | have hB0bound (q : Fin (m + 1)) (i j l : Fin n) : b0 q i j l ≤ B0 := by |
| 509 | calc |
| 510 | _ ≤ ∑ l : Fin n, b0 q i j l := |
| 511 | Finset.single_le_sum (fun l _ => hb0 q i j l) (Finset.mem_univ l) |
| 512 | _ ≤ ∑ j : Fin n, ∑ l : Fin n, b0 q i j l := Finset.single_le_sum |
| 513 | (fun j _ => Finset.sum_nonneg fun l _ => hb0 q i j l) (Finset.mem_univ j) |
| 514 | _ ≤ ∑ i : Fin n, ∑ j : Fin n, ∑ l : Fin n, b0 q i j l := Finset.single_le_sum |
| 515 | (fun i _ => Finset.sum_nonneg fun j _ => Finset.sum_nonneg fun l _ => hb0 q i j l) |
| 516 | (Finset.mem_univ i) |
| 517 | _ ≤ B0 := Finset.single_le_sum |
| 518 | (fun q _ => Finset.sum_nonneg fun i _ => Finset.sum_nonneg fun j _ => |
| 519 | Finset.sum_nonneg fun l _ => hb0 q i j l) (Finset.mem_univ q) |
| 520 | have hlip (q : ℕ) (hq : q ≤ m) {s t : ℝ} (hs : s ∈ Ico a T) (ht : t ∈ Ico a T) |
| 521 | {z : V} (hz : z ∈ K) (i j l : Fin n) : |
| 522 | ‖iteratedFDeriv ℝ q (Gamma t i j l) z - |
| 523 | iteratedFDeriv ℝ q (Gamma s i j l) z‖ ≤ R * |t - s| := by |
| 524 | have hh := (convex_Ico a T).norm_image_sub_le_of_norm_hasDerivWithin_le |
| 525 | (f := fun r => iteratedFDeriv ℝ q (Gamma r i j l) z) |
| 526 | (f' := fun r => iteratedFDeriv ℝ q (Q r i j l) z) |
| 527 | (fun r hr => (hjetTime q (htime hr) (hKchart hz) i j l).hasDerivWithinAt) |
| 528 | (fun r hr => hQbound q hq hr hz i j l) hs ht |
| 529 | simpa only [Real.norm_eq_abs] using hh |
| 530 | refine ⟨B0 + R * (T - a), R, add_nonneg hB0 (mul_nonneg hR (sub_nonneg.mpr haT.le)), |
| 531 | hR, ?_, ?_, ?_⟩ |
| 532 | · intro q hq s hs z hz i j l |
| 533 | let qf : Fin (m + 1) := ⟨q, Nat.lt_succ_of_le hq⟩ |
| 534 | have hstart := (hbound0 qf i j l z hz).trans (hB0bound qf i j l) |
| 535 | have hd := hlip q hq haI hs hz i j l |
| 536 | rw [abs_of_nonneg (sub_nonneg.mpr hs.1)] at hd |
| 537 | calc |
| 538 | ‖iteratedFDeriv ℝ q (Gamma s i j l) z‖ = |
| 539 | ‖iteratedFDeriv ℝ q (Gamma a i j l) z + |
| 540 | (iteratedFDeriv ℝ q (Gamma s i j l) z - |
| 541 | iteratedFDeriv ℝ q (Gamma a i j l) z)‖ := by congr 1; abel |
| 542 | _ ≤ ‖iteratedFDeriv ℝ q (Gamma a i j l) z‖ + |
| 543 | ‖iteratedFDeriv ℝ q (Gamma s i j l) z - |
| 544 | iteratedFDeriv ℝ q (Gamma a i j l) z‖ := norm_add_le _ _ |
| 545 | _ ≤ B0 + R * (s - a) := add_le_add hstart hd |
| 546 | _ ≤ B0 + R * (T - a) := add_le_add le_rfl |
| 547 | (mul_le_mul_of_nonneg_left (sub_le_sub_right hs.2.le a) hR) |
| 548 | · intro q hq s hs z hz i j l |
| 549 | have hd := hjetTime q (htime hs) (hKchart hz) i j l |
| 550 | refine ⟨hd.differentiableAt, ?_⟩ |
| 551 | rw [hd.deriv] |
| 552 | exact hQbound q hq hs hz i j l |
| 553 | · intro q hq s hs t ht z hz i j l |
| 554 | exact hlip q hq hs ht hz i j l |
| 555 | intro m |
| 556 | induction m with |
| 557 | | zero => |
| 558 | apply hstep 0 |
| 559 | refine ⟨0, le_rfl, ?_⟩ |
| 560 | intro q hq |
| 561 | exact (Nat.not_lt_zero q hq).elim |
| 562 | | succ m ih => |
| 563 | obtain ⟨B, R, hB, hR, hb, hr, hlip⟩ := ih |
| 564 | apply hstep (m + 1) |
| 565 | refine ⟨B, hB, ?_⟩ |
| 566 | intro q hq s hs z hz i j l |
| 567 | exact hb q (Nat.le_of_lt_succ hq) s hs z hz i j l |
| 568 | |
| 569 | set_option maxHeartbeats 4000000 in |
| 570 | set_option synthInstance.maxHeartbeats 200000 in |
| 571 | /-- Actual metric coordinate jets have uniform spatial bounds and time control. -/ |
| 572 | theorem ricciFlow_metric_coordinate_jets_terminal_control |
| 573 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 574 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 575 | [IsManifold (𝓡 n) ∞ M] |
| 576 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 577 | {T C a : ℝ} (hT : 0 < T) (F : RicciFlow n M (Ico 0 T)) |
| 578 | (hRm : ∀ s ∈ Ico 0 T, ∀ x : M, |
| 579 | (F.connection s).curvatureTensorNorm x ≤ C) |
| 580 | (ha : 0 < a) (haT : a < T) (x0 : M) |
| 581 | {K : Set (EuclideanSpace ℝ (Fin n))} (hK : IsCompact K) |
| 582 | (hKchart : K ⊆ (chartAt (EuclideanSpace ℝ (Fin n)) x0).target) : |
| 583 | let V := EuclideanSpace ℝ (Fin n) |
| 584 | let c := chartAt V x0 |
| 585 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 586 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 587 | let G := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 588 | (F.metric s).inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 589 | ∀ m : ℕ, ∃ B R : ℝ, 0 ≤ B ∧ 0 ≤ R ∧ |
| 590 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 591 | ‖iteratedFDeriv ℝ q (G s i j) z‖ ≤ B) ∧ |
| 592 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 593 | DifferentiableAt ℝ |
| 594 | (fun r => iteratedFDeriv ℝ q (G r i j) z) s ∧ |
| 595 | ‖deriv (fun r => iteratedFDeriv ℝ q (G r i j) z) s‖ ≤ R) ∧ |
| 596 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, |
| 597 | ∀ z ∈ K, ∀ i j : Fin n, |
| 598 | ‖iteratedFDeriv ℝ q (G t i j) z - |
| 599 | iteratedFDeriv ℝ q (G s i j) z‖ ≤ R * |t - s|) := by |
| 600 | classical |
| 601 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 602 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 603 | let V := EuclideanSpace ℝ (Fin n) |
| 604 | let c := chartAt V x0 |
| 605 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 606 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 607 | let E := e.localFrame cb |
| 608 | let G := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 609 | (F.metric s).inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 610 | let A := fun (s : ℝ) (x : M) => ContinuousLinearMap.inCoordinates V |
| 611 | (TangentSpace (𝓡 n)) (V →L[ℝ] ℝ) |
| 612 | (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 613 | x0 x x0 x ((F.metric s).inner x) |
| 614 | let H := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 615 | (A s (c.symm z)).inverse (EuclideanSpace.proj j) i |
| 616 | let L := fun (r : ℕ) (s : ℝ) (alpha : Fin (r + 4) → Fin n) (z : V) => |
| 617 | (F.metric s).inner (c.symm z) |
| 618 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) r |
| 619 | (fun j : Fin (r + 3) => E (alpha j.castSucc)) (c.symm z)) |
| 620 | (E (alpha (Fin.last (r + 3))) (c.symm z)) |
| 621 | let tr := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 622 | ∑ p : Fin n, ∑ q : Fin n, H s p q z * L 0 s ![p,i,j,q] z |
| 623 | let Q := fun (s : ℝ) (i j : Fin n) (z : V) => -2 * tr s i j z |
| 624 | change ∀ m : ℕ, ∃ B R : ℝ, 0 ≤ B ∧ 0 ≤ R ∧ |
| 625 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 626 | ‖iteratedFDeriv ℝ q (G s i j) z‖ ≤ B) ∧ |
| 627 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 628 | DifferentiableAt ℝ (fun r => iteratedFDeriv ℝ q (G r i j) z) s ∧ |
| 629 | ‖deriv (fun r => iteratedFDeriv ℝ q (G r i j) z) s‖ ≤ R) ∧ |
| 630 | (∀ q ≤ m, ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 631 | ‖iteratedFDeriv ℝ q (G t i j) z - iteratedFDeriv ℝ q (G s i j) z‖ ≤ R * |t - s|) |
| 632 | have hbase {z : V} (hz : z ∈ c.target) : c.symm z ∈ e.baseSet := by |
| 633 | simpa only [e, TangentBundle.trivializationAt_baseSet] using c.map_target hz |
| 634 | have htime {s : ℝ} (hs : s ∈ Ico a T) : s ∈ Ioo 0 T := |
| 635 | ⟨ha.trans_le hs.1, hs.2⟩ |
| 636 | have haI : a ∈ Ico a T := ⟨le_rfl, haT⟩ |
| 637 | have hE (i : Fin n) : ContMDiffOn (𝓡 n) |
| 638 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (E i)) e.baseSet := |
| 639 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 640 | have hchart (f : M → ℝ) |
| 641 | (hf : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ f e.baseSet) : |
| 642 | ContDiffOn ℝ ∞ (fun z => f (c.symm z)) c.target := |
| 643 | (hf.comp (contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)) |
| 644 | (fun z hz => hbase hz)).contDiffOn |
| 645 | have hGJoint (i j : Fin n) : ContDiffOn ℝ ∞ |
| 646 | (Function.uncurry (fun s => G s i j)) (Ioo 0 T ×ˢ c.target) := by |
| 647 | have hg := contMDiffOn_family_metric_pair F.smooth (E i) (E j) (hE i) (hE j) |
| 648 | have hmap : ContMDiffOn (𝓘(ℝ, ℝ).prod 𝓘(ℝ, V)) |
| 649 | (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 650 | (fun p : ℝ × V => (p.1, c.symm p.2)) (Ioo 0 T ×ˢ c.target) := |
| 651 | contMDiffOn_fst.prodMk |
| 652 | ((contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)).comp |
| 653 | contMDiffOn_snd (fun p hp => hp.2)) |
| 654 | have hh := hg.comp hmap (fun p hp => ⟨⟨hp.1.1.le, hp.1.2⟩, hbase hp.2⟩) |
| 655 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at hh |
| 656 | exact hh.contDiffOn |
| 657 | have hGSmooth (s : ℝ) (hs : s ∈ Ioo 0 T) (i j : Fin n) : |
| 658 | ContDiffOn ℝ ∞ (G s i j) c.target := |
| 659 | (hGJoint i j).comp (contDiffOn_const.prodMk contDiffOn_id) |
| 660 | (fun z hz => ⟨hs, hz⟩) |
| 661 | have hfamily (s : ℝ) : RiemannianMetric.IsSmoothFamilyOn |
| 662 | (fun _ : ℝ => F.metric s) Set.univ := |
| 663 | ((F.metric s).contMDiff.comp contMDiff_snd).contMDiffOn |
| 664 | have hHSmooth (s : ℝ) (i j : Fin n) : |
| 665 | ContDiffOn ℝ ∞ (H s i j) c.target := by |
| 666 | have hInv : ContMDiffOn (𝓡 n) 𝓘(ℝ, (V →L[ℝ] ℝ) →L[ℝ] V) ∞ |
| 667 | (fun y => (A s y).inverse) e.baseSet := |
| 668 | (contMDiffOn_family_metric_frame_inverse (hfamily s) x0).2.2.comp |
| 669 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 670 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 671 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 672 | (fun y hy => ⟨Set.mem_univ (0 : ℝ), hy⟩) |
| 673 | apply hchart (fun y => (EuclideanSpace.proj i : V →L[ℝ] ℝ) |
| 674 | ((A s y).inverse (EuclideanSpace.proj j))) |
| 675 | exact (EuclideanSpace.proj i : V →L[ℝ] ℝ).contMDiff.comp_contMDiffOn |
| 676 | (hInv.clm_apply (contMDiffOn_const (c := EuclideanSpace.proj j))) |
| 677 | have hLSmooth (r : ℕ) (s : ℝ) (alpha : Fin (r + 4) → Fin n) : |
| 678 | ContDiffOn ℝ ∞ (L r s alpha) c.target := by |
| 679 | apply hchart (fun y => (F.metric s).inner y |
| 680 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) r |
| 681 | (fun j : Fin (r + 3) => E (alpha j.castSucc)) y) |
| 682 | (E (alpha (Fin.last (r + 3))) y)) |
| 683 | exact (contMDiffOn_family_metric_pair (hfamily s) |
| 684 | (curvatureOnFields_iteratedCovariantDerivative (F.connection s) r |
| 685 | (fun j : Fin (r + 3) => E (alpha j.castSucc))) |
| 686 | (E (alpha (Fin.last (r + 3)))) |
| 687 | (contMDiffOn_curvatureOnFields_iteratedCovariantDerivative (F.connection s) |
| 688 | e.open_baseSet r _ (fun j => hE (alpha j.castSucc))) |
| 689 | (hE (alpha (Fin.last (r + 3))))).comp |
| 690 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 691 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 692 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 693 | (fun y hy => ⟨Set.mem_univ (0 : ℝ), hy⟩) |
| 694 | have htrSmooth (s : ℝ) (i j : Fin n) : ContDiffOn ℝ ∞ (tr s i j) c.target := |
| 695 | ContDiffOn.sum (fun p _ => ContDiffOn.sum (fun q _ => |
| 696 | (hHSmooth s p q).mul (hLSmooth 0 s ![p,i,j,q]))) |
| 697 | have htimeRate (s : ℝ) (hs : s ∈ Ioo 0 T) (z : V) (hz : z ∈ c.target) |
| 698 | (i j : Fin n) : HasDerivAt (fun r => G r i j z) (Q s i j z) s := by |
| 699 | have hsint : s ∈ interior (Ico 0 T) := by simpa only [interior_Ico] using hs |
| 700 | exact hasDerivAt_ricciFlow_metric_frame_coordinates F hsint x0 (c.symm z) (hbase hz) i j |
| 701 | have hjetRate (q : ℕ) (s : ℝ) (hs : s ∈ Ico a T) |
| 702 | (z : V) (hz : z ∈ c.target) (i j : Fin n) : |
| 703 | HasDerivAt (fun r => iteratedFDeriv ℝ q (G r i j) z) |
| 704 | (iteratedFDeriv ℝ q (Q s i j) z) s := by |
| 705 | have hd := hasDerivAt_iteratedFDeriv_family isOpen_Ioo c.open_target |
| 706 | (fun r => G r i j) (hGJoint i j) q (htime hs) hz |
| 707 | have he : (fun y => deriv (fun r => G r i j y) s) =ᶠ[𝓝 z] Q s i j := by |
| 708 | filter_upwards [c.open_target.mem_nhds hz] with y hy |
| 709 | exact (htimeRate s (htime hs) y hy i j).deriv |
| 710 | exact hd.congr_deriv (he.iteratedFDeriv (𝕜 := ℝ) q).eq_of_nhds |
| 711 | have hsum {N : ℕ} (f : Fin N → V → ℝ) |
| 712 | (hf : ∀ i, ContDiffOn ℝ ∞ (f i) c.target) |
| 713 | (z : V) (hz : z ∈ c.target) (q : ℕ) (B : ℝ) |
| 714 | (hb : ∀ i, ‖iteratedFDeriv ℝ q (f i) z‖ ≤ B) : |
| 715 | ‖iteratedFDeriv ℝ q (fun y => ∑ i, f i y) z‖ ≤ (N : ℝ) * B := by |
| 716 | rw [iteratedFDeriv_fun_sum_apply |
| 717 | (fun i _ => ((hf i).contDiffAt (c.open_target.mem_nhds hz)).of_le |
| 718 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl q))] |
| 719 | calc |
| 720 | _ ≤ ∑ i : Fin N, ‖iteratedFDeriv ℝ q (f i) z‖ := norm_sum_le _ _ |
| 721 | _ ≤ ∑ _i : Fin N, B := Finset.sum_le_sum (fun i _ => hb i) |
| 722 | _ = (N : ℝ) * B := by simp |
| 723 | intro m |
| 724 | obtain ⟨BG, _, hBG, _, hGammaBound, _, _⟩ := |
| 725 | ricciFlow_connection_coordinate_jets_terminal_control hT F hRm ha haT x0 hK hKchart m |
| 726 | obtain ⟨⟨BH, hBH, hHBound⟩, hLBound⟩ := |
| 727 | ricciFlow_inverse_and_lowered_coordinate_jets_of_connection_jets |
| 728 | hT F hRm ha haT x0 hK hKchart m (by |
| 729 | refine ⟨BG, hBG, ?_⟩ |
| 730 | intro q hq s hs z hz i j l |
| 731 | exact hGammaBound q (Nat.le_of_lt hq) s hs z hz i j l) |
| 732 | change ∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ i j : Fin n, |
| 733 | ‖iteratedFDeriv ℝ q (H s i j) z‖ ≤ BH at hHBound |
| 734 | obtain ⟨BL, hBL, hL0Bound⟩ := hLBound 0 |
| 735 | change ∀ q ≤ m, ∀ s ∈ Ico a T, ∀ z ∈ K, ∀ alpha : Fin 4 → Fin n, |
| 736 | ‖iteratedFDeriv ℝ q (L 0 s alpha) z‖ ≤ BL at hL0Bound |
| 737 | let P := (2 : ℝ) ^ m * BH * BL |
| 738 | let R := 2 * ((n : ℝ) * ((n : ℝ) * P)) |
| 739 | have hP : 0 ≤ P := by dsimp only [P]; positivity |
| 740 | have hR : 0 ≤ R := by dsimp only [R]; positivity |
| 741 | have htrBound (q : ℕ) (hq : q ≤ m) (s : ℝ) (hs : s ∈ Ico a T) |
| 742 | (z : V) (hz : z ∈ K) (i j : Fin n) : |
| 743 | ‖iteratedFDeriv ℝ q (tr s i j) z‖ ≤ (n : ℝ) * ((n : ℝ) * P) := by |
| 744 | apply hsum _ (fun p => ContDiffOn.sum (fun v _ => |
| 745 | (hHSmooth s p v).mul (hLSmooth 0 s ![p,i,j,v]))) z (hKchart hz) q ((n : ℝ) * P) |
| 746 | intro p |
| 747 | apply hsum _ (fun v => (hHSmooth s p v).mul (hLSmooth 0 s ![p,i,j,v])) |
| 748 | z (hKchart hz) q P |
| 749 | intro v |
| 750 | apply (norm_iteratedFDeriv_mul_le_of_open_bounds c.open_target |
| 751 | (hHSmooth s p v) (hLSmooth 0 s ![p,i,j,v]) (hKchart hz) q hBH hBL |
| 752 | (fun l hl => hHBound l (hl.trans hq) s hs z hz p v) |
| 753 | (fun l hl => hL0Bound l (hl.trans hq) s hs z hz ![p,i,j,v])).trans |
| 754 | exact mul_le_mul_of_nonneg_right |
| 755 | (mul_le_mul_of_nonneg_right |
| 756 | (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hq) hBH) hBL |
| 757 | have hQBound (q : ℕ) (hq : q ≤ m) (s : ℝ) (hs : s ∈ Ico a T) |
| 758 | (z : V) (hz : z ∈ K) (i j : Fin n) : |
| 759 | ‖iteratedFDeriv ℝ q (Q s i j) z‖ ≤ R := by |
| 760 | change ‖iteratedFDeriv ℝ q (fun y => (-2 : ℝ) • tr s i j y) z‖ ≤ R |
| 761 | rw [iteratedFDeriv_const_smul_apply' (a := (-2 : ℝ)) |
| 762 | (((htrSmooth s i j).contDiffAt (c.open_target.mem_nhds (hKchart hz))).of_le |
| 763 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl q)), norm_smul] |
| 764 | rw [show ‖(-2 : ℝ)‖ = 2 by norm_num] |
| 765 | exact mul_le_mul_of_nonneg_left (htrBound q hq s hs z hz i j) (by norm_num) |
| 766 | have hinitial (q : Fin (m + 1)) (i j : Fin n) : ∃ B : ℝ, 0 ≤ B ∧ |
| 767 | ∀ z ∈ K, ‖iteratedFDeriv ℝ q.1 (G a i j) z‖ ≤ B := by |
| 768 | have hc := ContinuousOn.continuousOn_iteratedFDeriv |
| 769 | (hGSmooth a ⟨ha, haT⟩ i j) c.open_target |
| 770 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl q.1) |
| 771 | obtain ⟨B, hB⟩ := hK.bddAbove_image (hc.norm.mono hKchart) |
| 772 | refine ⟨max B 0, le_max_right _ _, ?_⟩ |
| 773 | intro z hz |
| 774 | exact (hB (mem_image_of_mem _ hz)).trans (le_max_left _ _) |
| 775 | choose init hinitNonneg hinitBound using hinitial |
| 776 | let B0 := ∑ q : Fin (m + 1), ∑ i : Fin n, ∑ j : Fin n, init q i j |
| 777 | have hB0 : 0 ≤ B0 := Finset.sum_nonneg (fun q _ => |
| 778 | Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hinitNonneg q i j))) |
| 779 | have hinitLe (q : Fin (m + 1)) (i j : Fin n) : init q i j ≤ B0 := by |
| 780 | calc |
| 781 | _ ≤ ∑ v : Fin n, init q i v := |
| 782 | Finset.single_le_sum (fun v _ => hinitNonneg q i v) (Finset.mem_univ j) |
| 783 | _ ≤ ∑ u : Fin n, ∑ v : Fin n, init q u v := |
| 784 | Finset.single_le_sum (fun u _ => Finset.sum_nonneg |
| 785 | (fun v _ => hinitNonneg q u v)) (Finset.mem_univ i) |
| 786 | _ ≤ B0 := Finset.single_le_sum (fun p _ => Finset.sum_nonneg |
| 787 | (fun u _ => Finset.sum_nonneg (fun v _ => hinitNonneg p u v))) (Finset.mem_univ q) |
| 788 | have hinitialBound (q : ℕ) (hq : q ≤ m) (z : V) (hz : z ∈ K) (i j : Fin n) : |
| 789 | ‖iteratedFDeriv ℝ q (G a i j) z‖ ≤ B0 := |
| 790 | (hinitBound ⟨q, Nat.lt_succ_of_le hq⟩ i j z hz).trans (hinitLe _ i j) |
| 791 | have hLip (q : ℕ) (hq : q ≤ m) (s : ℝ) (hs : s ∈ Ico a T) |
| 792 | (t : ℝ) (ht : t ∈ Ico a T) (z : V) (hz : z ∈ K) (i j : Fin n) : |
| 793 | ‖iteratedFDeriv ℝ q (G t i j) z - iteratedFDeriv ℝ q (G s i j) z‖ ≤ |
| 794 | R * |t - s| := by |
| 795 | have hh := Convex.norm_image_sub_le_of_norm_hasDerivWithin_le |
| 796 | (fun r hr => (hjetRate q r hr z (hKchart hz) i j).hasDerivWithinAt) |
| 797 | (fun r hr => hQBound q hq r hr z hz i j) (convex_Ico a T) hs ht |
| 798 | simpa only [Real.norm_eq_abs] using hh |
| 799 | refine ⟨B0 + R * (T - a), R, |
| 800 | add_nonneg hB0 (mul_nonneg hR (sub_nonneg.mpr haT.le)), hR, ?_, ?_, hLip⟩ |
| 801 | · intro q hq s hs z hz i j |
| 802 | calc |
| 803 | _ ≤ ‖iteratedFDeriv ℝ q (G a i j) z‖ + |
| 804 | ‖iteratedFDeriv ℝ q (G s i j) z - iteratedFDeriv ℝ q (G a i j) z‖ := |
| 805 | norm_le_norm_add_norm_sub' _ _ |
| 806 | _ ≤ B0 + R * |s - a| := add_le_add (hinitialBound q hq z hz i j) |
| 807 | (hLip q hq a haI s hs z hz i j) |
| 808 | _ ≤ B0 + R * (T - a) := by |
| 809 | rw [abs_of_nonneg (sub_nonneg.mpr hs.1)] |
| 810 | exact add_le_add le_rfl (mul_le_mul_of_nonneg_left |
| 811 | (sub_le_sub_right hs.2.le a) hR) |
| 812 | · intro q hq s hs z hz i j |
| 813 | refine ⟨(hjetRate q s hs z (hKchart hz) i j).differentiableAt, ?_⟩ |
| 814 | rw [(hjetRate q s hs z (hKchart hz) i j).deriv] |
| 815 | exact hQBound q hq s hs z hz i j |
| 816 | |
| 817 | end TerminalCoordinates |
| 818 | |
| 819 | end PoincareMT.RicciFlow.Local |