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/ConnectionDifferenceCoordinateRate.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Connection.DifferenceEvolution |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricDifferenceEvolution |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureHom |
| 8 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricInverse |
| 9 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Coordinates.FamilyBundleCoordinates |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxHeartbeats 8000000 |
| 13 | set_option synthInstance.maxHeartbeats 200000 |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 16 | open Bundle Manifold Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow.Local |
| 21 | |
| 22 | private theorem covector_reconstruct {n : Nat} |
| 23 | (l : EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) : |
| 24 | l = ∑ i : Fin n, |
| 25 | (l (EuclideanSpace.single i 1)) • EuclideanSpace.proj i := by |
| 26 | classical |
| 27 | let b := PiLp.basisFun 2 ℝ (Fin n) |
| 28 | have hv (v : EuclideanSpace ℝ (Fin n)) : |
| 29 | v = ∑ i : Fin n, v i • EuclideanSpace.single i 1 := by |
| 30 | calc |
| 31 | v = ∑ i : Fin n, (b.repr v) i • b i := (b.sum_repr v).symm |
| 32 | _ = ∑ i : Fin n, v i • EuclideanSpace.single i 1 := by |
| 33 | apply Finset.sum_congr rfl |
| 34 | intro i hi |
| 35 | simp [b, PiLp.basisFun_repr, PiLp.basisFun_apply] |
| 36 | apply ContinuousLinearMap.ext |
| 37 | intro v |
| 38 | calc |
| 39 | l v = l (∑ i : Fin n, v i • EuclideanSpace.single i 1) := congrArg l (hv v) |
| 40 | _ = (∑ i : Fin n, |
| 41 | (l (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) v := by |
| 42 | simp only [map_sum, map_smul] |
| 43 | simp [EuclideanSpace.proj, mul_comm] |
| 44 | |
| 45 | private theorem inverse_reconstruct {n : Nat} |
| 46 | {G : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 47 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ} |
| 48 | (hG : G.IsInvertible) (v : EuclideanSpace ℝ (Fin n)) : |
| 49 | G.inverse (∑ i : Fin n, |
| 50 | (G v (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) = v := by |
| 51 | have hc := covector_reconstruct (G v) |
| 52 | rw [← hc] |
| 53 | simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply] using |
| 54 | congrArg (fun L : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 55 | EuclideanSpace ℝ (Fin n) => L v) hG.inverse_comp_self |
| 56 | |
| 57 | private theorem native_from_pairings {n : Nat} |
| 58 | {G : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 59 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ} |
| 60 | (hG : G.IsInvertible) (dv : EuclideanSpace ℝ (Fin n)) |
| 61 | (p : Fin n -> ℝ) |
| 62 | (hp : ∀ i : Fin n, G dv (EuclideanSpace.single i 1) = p i) : |
| 63 | dv = G.inverse (∑ i : Fin n, p i • EuclideanSpace.proj i) := by |
| 64 | calc |
| 65 | dv = G.inverse (∑ i : Fin n, |
| 66 | (G dv (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) := |
| 67 | (inverse_reconstruct hG dv).symm |
| 68 | _ = G.inverse (∑ i : Fin n, p i • EuclideanSpace.proj i) := by |
| 69 | congr 1 |
| 70 | apply Finset.sum_congr rfl |
| 71 | intro i hi |
| 72 | rw [hp i] |
| 73 | |
| 74 | private theorem tensor_coordinate_reconstruct {n dA : ℕ} |
| 75 | (qA : (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 76 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) ≃L[ℝ] |
| 77 | EuclideanSpace ℝ (Fin dA)) |
| 78 | (T : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 79 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 80 | (α : Fin dA) : |
| 81 | qA T α = ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 82 | (qA ((EuclideanSpace.proj j).smulRight |
| 83 | ((EuclideanSpace.proj i).smulRight (EuclideanSpace.single l 1))) α) * |
| 84 | (T (EuclideanSpace.single j 1) (EuclideanSpace.single i 1)) l := by |
| 85 | classical |
| 86 | let B : Fin n → Fin n → Fin n → |
| 87 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 88 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 89 | fun l j i => (EuclideanSpace.proj j).smulRight |
| 90 | ((EuclideanSpace.proj i).smulRight (EuclideanSpace.single l 1)) |
| 91 | have hvec (u : EuclideanSpace ℝ (Fin n)) : |
| 92 | u = ∑ j : Fin n, u j • EuclideanSpace.single j 1 := by |
| 93 | let b := PiLp.basisFun 2 ℝ (Fin n) |
| 94 | calc |
| 95 | u = ∑ j : Fin n, (b.repr u) j • b j := (b.sum_repr u).symm |
| 96 | _ = ∑ j : Fin n, u j • EuclideanSpace.single j 1 := by |
| 97 | apply Finset.sum_congr rfl |
| 98 | intro j hj |
| 99 | simp [b, PiLp.basisFun_repr, PiLp.basisFun_apply] |
| 100 | have hT : T = ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 101 | (T (EuclideanSpace.single j 1) (EuclideanSpace.single i 1)) l • B l j i := by |
| 102 | apply ContinuousLinearMap.ext |
| 103 | intro u |
| 104 | apply ContinuousLinearMap.ext |
| 105 | intro v |
| 106 | ext l |
| 107 | rw [hvec u, hvec v] |
| 108 | simp only [map_sum, map_smul, smul_eq_mul] |
| 109 | simp [B, EuclideanSpace.single, Pi.single_apply, Finset.smul_sum, |
| 110 | Finset.sum_smul, Finset.sum_mul, mul_assoc, mul_left_comm, mul_comm] |
| 111 | rw [hT, map_sum] |
| 112 | simp only [map_sum, map_smul] |
| 113 | simp [B, EuclideanSpace.single, Pi.single_apply, Finset.sum_add_distrib, |
| 114 | Finset.mul_sum, mul_assoc, mul_left_comm, mul_comm] |
| 115 | |
| 116 | private theorem fixed_scalar_derivative |
| 117 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 118 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 119 | (f : M → ℝ) (a : M) {z : EuclideanSpace ℝ (Fin n)} |
| 120 | (hz : z ∈ (chartAt (EuclideanSpace ℝ (Fin n)) a).target) |
| 121 | (hf : MDifferentiableAt (𝓡 n) 𝓘(ℝ, ℝ) f |
| 122 | ((chartAt (EuclideanSpace ℝ (Fin n)) a).symm z)) |
| 123 | (v : EuclideanSpace ℝ (Fin n)) : |
| 124 | fderiv ℝ (fun q => f ((chartAt (EuclideanSpace ℝ (Fin n)) a).symm q)) z v = |
| 125 | mvfderiv (𝓡 n) f ((chartAt (EuclideanSpace ℝ (Fin n)) a).symm z) |
| 126 | ((trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) a).symmL |
| 127 | ℝ ((chartAt (EuclideanSpace ℝ (Fin n)) a).symm z) v) := by |
| 128 | let V := EuclideanSpace ℝ (Fin n) |
| 129 | let c := chartAt V a |
| 130 | let e := trivializationAt V (TangentSpace (𝓡 n)) a |
| 131 | let x := c.symm z |
| 132 | have hx : x ∈ c.source := c.map_target hz |
| 133 | have hcx : c x = z := c.right_inv hz |
| 134 | have hc : MDifferentiableAt 𝓘(ℝ, V) (𝓡 n) c.symm z := |
| 135 | ((contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := a)).contMDiffAt |
| 136 | (c.open_target.mem_nhds hz)).mdifferentiableAt (by simp) |
| 137 | have he : e.symmL ℝ x = mfderiv 𝓘(ℝ, V) (𝓡 n) c.symm z := by |
| 138 | have h := TangentBundle.symmL_trivializationAt (I := 𝓡 n) (x₀ := a) hx |
| 139 | simp only [extChartAt_coe, extChartAt_coe_symm, modelWithCornersSelf_coe, |
| 140 | modelWithCornersSelf_coe_symm, Function.comp_def, id_eq, Set.range_id, |
| 141 | mfderivWithin_univ] at h |
| 142 | change e.symmL ℝ x = mfderiv 𝓘(ℝ, V) (𝓡 n) c.symm (c x) at h |
| 143 | rw [hcx] at h |
| 144 | exact h |
| 145 | rw [← mfderiv_eq_fderiv] |
| 146 | change mvfderiv 𝓘(ℝ, V) (f ∘ c.symm) z v = mvfderiv (𝓡 n) f x (e.symmL ℝ x v) |
| 147 | rw [mvfderiv_comp_apply z hf hc v, ← he] |
| 148 | rfl |
| 149 | |
| 150 | private theorem centered_scalar_derivative |
| 151 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 152 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 153 | (f : M → ℝ) (x : M) |
| 154 | (hf : MDifferentiableAt (𝓡 n) 𝓘(ℝ, ℝ) f x) |
| 155 | (v : TangentSpace (𝓡 n) x) : |
| 156 | fderiv ℝ (fun z => f ((extChartAt (𝓡 n) x).symm z)) |
| 157 | ((extChartAt (𝓡 n) x) x) v = mvfderiv (𝓡 n) f x v := by |
| 158 | let c := extChartAt (𝓡 n) x |
| 159 | have hc : c.symm (c x) = x := c.left_inv (mem_extChartAt_source x) |
| 160 | have hcs : MDifferentiableAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) |
| 161 | c.symm (c x) := |
| 162 | ((contMDiffOn_extChartAt_symm (I := 𝓡 n) (n := ∞) x).contMDiffAt |
| 163 | (extChartAt_target_mem_nhds' (mem_extChartAt_target x))).mdifferentiableAt |
| 164 | (by simp) |
| 165 | have hid : mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) c.symm (c x) = |
| 166 | ContinuousLinearMap.id ℝ (TangentSpace (𝓡 n) (c x)) := by |
| 167 | simpa only [(𝓡 n).range_eq_univ, mfderivWithin_univ] using |
| 168 | (mfderivWithin_range_extChartAt_symm (I := 𝓡 n) (x := x)) |
| 169 | have hdf : fderiv ℝ (fun z => f (c.symm z)) (c x) = mvfderiv (𝓡 n) f x := by |
| 170 | rw [← mfderiv_eq_fderiv] |
| 171 | change mvfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (f ∘ c.symm) (c x) = _ |
| 172 | have hf' : MDifferentiableAt (𝓡 n) 𝓘(ℝ, ℝ) f (c.symm (c x)) := by |
| 173 | simpa only [hc] using hf |
| 174 | rw [mvfderiv_comp (c x) hf' hcs, hid] |
| 175 | change mvfderiv (𝓡 n) f (c.symm (c x)) = mvfderiv (𝓡 n) f x |
| 176 | rw [hc] |
| 177 | exact congrArg (fun L => L v) hdf |
| 178 | |
| 179 | private theorem ricci_pair_smooth |
| 180 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 181 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 182 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 183 | {U : Set M} (hU : IsOpen U) |
| 184 | (Y Z : (y : M) → TangentSpace (𝓡 n) y) |
| 185 | (hY : ContMDiffOn (𝓡 n) |
| 186 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Y) U) |
| 187 | (hZ : ContMDiffOn (𝓡 n) |
| 188 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Z) U) |
| 189 | {x : M} (hx : x ∈ U) : |
| 190 | ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 191 | (fun y => (F.connection t).ricci y (Y y) (Z y)) x := by |
| 192 | let c := extChartAt (𝓡 n) x |
| 193 | have hcx : c.symm (c x) = x := c.left_inv (mem_extChartAt_source x) |
| 194 | have hcxt : c x ∈ c.target := mem_extChartAt_target x |
| 195 | have hc : ContMDiffAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) ∞ c.symm (c x) := |
| 196 | (contMDiffOn_extChartAt_symm (I := 𝓡 n) x).contMDiffAt |
| 197 | (extChartAt_target_mem_nhds' hcxt) |
| 198 | have hn : interior J ×ˢ (c.target ∩ c.symm ⁻¹' U) ∈ 𝓝 (t, c x) := |
| 199 | prod_mem_nhds (isOpen_interior.mem_nhds ht) |
| 200 | (Filter.inter_mem (extChartAt_target_mem_nhds' hcxt) |
| 201 | (hc.continuousAt.preimage_mem_nhds (hU.mem_nhds (by simpa only [hcx] using hx)))) |
| 202 | have hh := (contDiffOn_ricciFlow_ricci_chart_pair F hU Y Z hY hZ x).contDiffAt hn |
| 203 | have hs := hh.comp (c x) (contDiffAt_const.prodMk contDiffAt_id) |
| 204 | rw [contMDiffAt_iff_source] |
| 205 | simpa only [(𝓡 n).range_eq_univ, contMDiffWithinAt_univ, Function.comp_def, c] using |
| 206 | hs.contMDiffAt |
| 207 | |
| 208 | theorem exists_connection_difference_coordinate_rate_bound |
| 209 | {n dH dA dS : ℕ} {M : Type u} [TopologicalSpace M] |
| 210 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 211 | [IsManifold (𝓡 n) ∞ M] : |
| 212 | let V := EuclideanSpace ℝ (Fin n) |
| 213 | letI : NormedAddCommGroup (V →L[ℝ] V) := inferInstance |
| 214 | letI : NormedSpace ℝ (V →L[ℝ] V) := inferInstance |
| 215 | letI : NormedAddCommGroup (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 216 | letI : NormedSpace ℝ (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 217 | let FH := V →L[ℝ] V →L[ℝ] ℝ |
| 218 | let FA := V →L[ℝ] V →L[ℝ] V |
| 219 | let FS := V →L[ℝ] V →L[ℝ] V →L[ℝ] V |
| 220 | let BH := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 221 | TangentSpace (𝓡 n) x →L[ℝ] ℝ |
| 222 | let BA := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 223 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x |
| 224 | let BS := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 225 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] |
| 226 | TangentSpace (𝓡 n) x |
| 227 | ∀ (qH : FH ≃L[ℝ] EuclideanSpace ℝ (Fin dH)) |
| 228 | (qA : FA ≃L[ℝ] EuclideanSpace ℝ (Fin dA)) |
| 229 | (qS : FS ≃L[ℝ] EuclideanSpace ℝ (Fin dS)) |
| 230 | (s : Finset M) (Q : M → Set V), |
| 231 | (∀ a ∈ s, IsCompact (Q a) ∧ Q a ⊆ (chartAt V a).target) → |
| 232 | ∀ (J J' : Set ℝ) (F : RicciFlow n M J) (F' : RicciFlow n M J'), |
| 233 | F.metric 0 = F'.metric 0 → |
| 234 | ∀ (R R' : (t : ℝ) → (x : M) → BS x), |
| 235 | (∀ t x u v w, R t x u v w = |
| 236 | (F.connection t).curvature x u v w) → |
| 237 | (∀ t x u v w, R' t x u v w = |
| 238 | (F'.connection t).curvature x u v w) → |
| 239 | ∀ (K : Set ℝ), IsCompact K → K ⊆ J ∩ J' → |
| 240 | let c := chartAt V |
| 241 | let eH := trivializationAt FH BH |
| 242 | let eA := trivializationAt FA BA |
| 243 | let eS := trivializationAt FS BS |
| 244 | let H : (t : ℝ) → (x : M) → BH x := |
| 245 | fun t x => (F.metric t).inner x - (F'.metric t).inner x |
| 246 | let A : (t : ℝ) → (x : M) → BA x := fun t x => |
| 247 | CovariantDerivative.difference |
| 248 | (F.connection t).connection (F'.connection t).connection x |
| 249 | let S : (t : ℝ) → (x : M) → BS x := fun t x => R t x - R' t x |
| 250 | let fH : M → Fin dH → ℝ × V → ℝ := fun a i p => |
| 251 | qH ((eH a) (TotalSpace.mk' FH |
| 252 | ((c a).symm p.2) (H p.1 ((c a).symm p.2)))).2 i |
| 253 | let fA : M → Fin dA → ℝ × V → ℝ := fun a i p => |
| 254 | qA ((eA a) (TotalSpace.mk' FA |
| 255 | ((c a).symm p.2) (A p.1 ((c a).symm p.2)))).2 i |
| 256 | let fS : M → Fin dS → ℝ × V → ℝ := fun a i p => |
| 257 | qS ((eS a) (TotalSpace.mk' FS |
| 258 | ((c a).symm p.2) (S p.1 ((c a).symm p.2)))).2 i |
| 259 | let density : M → ℝ × V → ℝ := fun a p => |
| 260 | (∑ i : Fin dH, (fH a i p) ^ 2) + |
| 261 | (∑ i : Fin dA, (fA a i p) ^ 2) + |
| 262 | (∑ i : Fin dS, (fS a i p) ^ 2) |
| 263 | let gradient : M → ℝ → V → ℝ := fun a t z => |
| 264 | ∑ i : Fin dS, ∑ j : Fin n, |
| 265 | (fderiv ℝ (fun y => fS a i (t, y)) z |
| 266 | (EuclideanSpace.single j 1)) ^ 2 |
| 267 | ∃ C : ℝ, 0 ≤ C ∧ |
| 268 | ∀ ε : ℝ, 0 < ε → |
| 269 | ∀ t ∈ interior K, ∀ a ∈ s, ∀ z ∈ Q a, |
| 270 | (∑ i : Fin dA, 2 * fA a i (t, z) * |
| 271 | fderiv ℝ (fA a i) (t, z) (1, 0)) ≤ |
| 272 | ε * gradient a t z + (C / ε + C) * density a (t, z) := by |
| 273 | let V := EuclideanSpace ℝ (Fin n) |
| 274 | let : NormedAddCommGroup (V →L[ℝ] V) := inferInstance |
| 275 | let : NormedSpace ℝ (V →L[ℝ] V) := inferInstance |
| 276 | let : NormedAddCommGroup (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 277 | let : NormedSpace ℝ (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 278 | let FH := V →L[ℝ] V →L[ℝ] ℝ |
| 279 | let FA := V →L[ℝ] V →L[ℝ] V |
| 280 | let FS := V →L[ℝ] V →L[ℝ] V →L[ℝ] V |
| 281 | let BH := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 282 | TangentSpace (𝓡 n) x →L[ℝ] ℝ |
| 283 | let BA := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 284 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x |
| 285 | let BS := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 286 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] |
| 287 | TangentSpace (𝓡 n) x |
| 288 | let : NormedAddCommGroup FH := inferInstance |
| 289 | let : NormedSpace ℝ FH := inferInstance |
| 290 | let : NormedAddCommGroup FA := inferInstance |
| 291 | let : NormedSpace ℝ FA := inferInstance |
| 292 | let : NormedAddCommGroup FS := inferInstance |
| 293 | let : NormedSpace ℝ FS := inferInstance |
| 294 | let : ∀ x, AddCommGroup (BH x) := inferInstance |
| 295 | let : ∀ x, Module ℝ (BH x) := inferInstance |
| 296 | let : ∀ x, AddCommGroup (BA x) := inferInstance |
| 297 | let : ∀ x, Module ℝ (BA x) := inferInstance |
| 298 | let : ∀ x, AddCommGroup (BS x) := inferInstance |
| 299 | let : ∀ x, Module ℝ (BS x) := inferInstance |
| 300 | classical |
| 301 | dsimp only |
| 302 | intro qH qA qS s Q hQ J J' F F' hinit R R' hR hR' K hK hKsub |
| 303 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 304 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 305 | let c := chartAt V (M := M) |
| 306 | let eH := trivializationAt FH BH |
| 307 | let eA := trivializationAt FA BA |
| 308 | let eS := trivializationAt FS BS |
| 309 | let H : (t : ℝ) → (x : M) → BH x := |
| 310 | fun t x => (F.metric t).inner x - (F'.metric t).inner x |
| 311 | let A : (t : ℝ) → (x : M) → BA x := fun t x => |
| 312 | CovariantDerivative.difference (F.connection t).connection (F'.connection t).connection x |
| 313 | let S : (t : ℝ) → (x : M) → BS x := fun t x => R t x - R' t x |
| 314 | let fH : M → Fin dH → ℝ × V → ℝ := fun a i p => |
| 315 | qH ((eH a) (TotalSpace.mk' FH ((c a).symm p.2) (H p.1 ((c a).symm p.2)))).2 i |
| 316 | let fA : M → Fin dA → ℝ × V → ℝ := fun a i p => |
| 317 | qA ((eA a) (TotalSpace.mk' FA ((c a).symm p.2) (A p.1 ((c a).symm p.2)))).2 i |
| 318 | let fS : M → Fin dS → ℝ × V → ℝ := fun a i p => |
| 319 | qS ((eS a) (TotalSpace.mk' FS ((c a).symm p.2) (S p.1 ((c a).symm p.2)))).2 i |
| 320 | let τ : FS →L[ℝ] FH := ∑ k : Fin n, |
| 321 | (ContinuousLinearMap.compL ℝ V (V →L[ℝ] V) (V →L[ℝ] ℝ) |
| 322 | (ContinuousLinearMap.compL ℝ V V ℝ (EuclideanSpace.proj k))).comp |
| 323 | (ContinuousLinearMap.apply ℝ (V →L[ℝ] V →L[ℝ] V) |
| 324 | (EuclideanSpace.single k 1)) |
| 325 | have hτ (T : FS) (u v : V) : |
| 326 | τ T u v = ∑ k : Fin n, (T (EuclideanSpace.single k 1) u v) k := by |
| 327 | simp [τ] |
| 328 | apply Finset.sum_congr rfl |
| 329 | intro k hk |
| 330 | rfl |
| 331 | obtain ⟨R₀, hR₀, hRsm⟩ := |
| 332 | exists_contMDiffOn_curvature_family_trilinearMap F.smooth F.connection |
| 333 | obtain ⟨R₁, hR₁, hR'sm⟩ := |
| 334 | exists_contMDiffOn_curvature_family_trilinearMap F'.smooth F'.connection |
| 335 | have hReq : R₀ = R := by |
| 336 | funext t x |
| 337 | ext u v w |
| 338 | exact (hR₀ t x u v w).trans (hR t x u v w).symm |
| 339 | have hR'eq : R₁ = R' := by |
| 340 | funext t x |
| 341 | ext u v w |
| 342 | exact (hR₁ t x u v w).trans (hR' t x u v w).symm |
| 343 | rw [hReq] at hRsm |
| 344 | rw [hR'eq] at hR'sm |
| 345 | have hF := F.smooth.mono (Set.prod_mono |
| 346 | (show J ∩ J' ⊆ J from Set.inter_subset_left) subset_rfl) |
| 347 | have hF' := F'.smooth.mono (Set.prod_mono |
| 348 | (show J ∩ J' ⊆ J' from Set.inter_subset_right) subset_rfl) |
| 349 | have hAsm := contMDiffOn_connection_family_difference hF hF' F.connection F'.connection |
| 350 | have hbaseA (a : M) : (c a).source ⊆ (eA a).baseSet := by |
| 351 | simp only [c, eA, V, FA, BA, hom_trivializationAt_baseSet, |
| 352 | TangentBundle.trivializationAt_baseSet] |
| 353 | intro x hx |
| 354 | exact ⟨hx, hx, hx⟩ |
| 355 | have hacoord (a : M) : ContDiffOn ℝ ∞ |
| 356 | (fun p : ℝ × V => qA ((eA a) (TotalSpace.mk' FA ((c a).symm p.2) |
| 357 | (A p.1 ((c a).symm p.2)))).2) ((J ∩ J') ×ˢ (c a).target) := |
| 358 | contDiffOn_family_bundle_coordinates (E := BA) qA A hAsm a (hbaseA a) |
| 359 | have hbaseH (a : M) : (c a).source ⊆ (eH a).baseSet := by |
| 360 | simp only [c, eH, V, FH, BH, hom_trivializationAt_baseSet, |
| 361 | TangentBundle.trivializationAt_baseSet] |
| 362 | intro x hx |
| 363 | exact ⟨hx, hx, mem_univ x⟩ |
| 364 | have hbaseS (a : M) : (c a).source ⊆ (eS a).baseSet := by |
| 365 | simp only [c, eS, V, FS, BS, hom_trivializationAt_baseSet, |
| 366 | TangentBundle.trivializationAt_baseSet] |
| 367 | intro x hx |
| 368 | exact ⟨hx, hx, hx, hx⟩ |
| 369 | have hHcoord (a : M) : ContDiffOn ℝ ∞ |
| 370 | (fun p : ℝ × V => qH ((eH a) (TotalSpace.mk' FH ((c a).symm p.2) |
| 371 | (H p.1 ((c a).symm p.2)))).2) ((J ∩ J') ×ˢ (c a).target) := by |
| 372 | have h₁ := (contDiffOn_family_bundle_coordinates (E := BH) qH |
| 373 | (fun t x => (F.metric t).inner x) F.smooth a (hbaseH a)).mono |
| 374 | (t := (J ∩ J') ×ˢ (c a).target) |
| 375 | (Set.prod_mono (show J ∩ J' ⊆ J from Set.inter_subset_left) subset_rfl) |
| 376 | have h₂ := (contDiffOn_family_bundle_coordinates (E := BH) qH |
| 377 | (fun t x => (F'.metric t).inner x) F'.smooth a (hbaseH a)).mono |
| 378 | (t := (J ∩ J') ×ˢ (c a).target) |
| 379 | (Set.prod_mono (show J ∩ J' ⊆ J' from Set.inter_subset_right) subset_rfl) |
| 380 | apply (h₁.sub h₂).congr |
| 381 | intro p hp |
| 382 | have hx := (hbaseH a) ((c a).map_target hp.2) |
| 383 | change qH ((eH a) (TotalSpace.mk' FH _ (_ - _))).2 = _ |
| 384 | rw [← Trivialization.linearEquivAt_apply (R := ℝ) (eH a) _ hx, |
| 385 | map_sub, map_sub] |
| 386 | rfl |
| 387 | |
| 388 | have hScoord (a : M) : ContDiffOn ℝ ∞ |
| 389 | (fun p : ℝ × V => qS ((eS a) (TotalSpace.mk' FS ((c a).symm p.2) |
| 390 | (S p.1 ((c a).symm p.2)))).2) ((J ∩ J') ×ˢ (c a).target) := by |
| 391 | have h₁ := (contDiffOn_family_bundle_coordinates (E := BS) qS R hRsm a |
| 392 | (hbaseS a)).mono (t := (J ∩ J') ×ˢ (c a).target) |
| 393 | (Set.prod_mono (show J ∩ J' ⊆ J from Set.inter_subset_left) subset_rfl) |
| 394 | have h₂ := (contDiffOn_family_bundle_coordinates (E := BS) qS R' hR'sm a |
| 395 | (hbaseS a)).mono (t := (J ∩ J') ×ˢ (c a).target) |
| 396 | (Set.prod_mono (show J ∩ J' ⊆ J' from Set.inter_subset_right) subset_rfl) |
| 397 | apply (h₁.sub h₂).congr |
| 398 | intro p hp |
| 399 | have hx := (hbaseS a) ((c a).map_target hp.2) |
| 400 | change qS ((eS a) (TotalSpace.mk' FS _ (_ - _))).2 = _ |
| 401 | rw [← Trivialization.linearEquivAt_apply (R := ℝ) (eS a) _ hx, |
| 402 | map_sub, map_sub] |
| 403 | rfl |
| 404 | let eT := trivializationAt V (TangentSpace (𝓡 n) : M → Type _) |
| 405 | let frame := fun (a : M) (i : Fin n) (y : M) => |
| 406 | (eT a).symmL ℝ y (EuclideanSpace.single i 1) |
| 407 | let gmod := fun (g : ℝ → RiemannianMetric n M) (a : M) (p : ℝ × V) => |
| 408 | ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 409 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 410 | a ((c a).symm p.2) a ((c a).symm p.2) ((g p.1).inner ((c a).symm p.2)) |
| 411 | let gamma := fun (a : M) (p : ℝ × V) (i j : Fin n) => |
| 412 | (eT a).continuousLinearMapAt ℝ ((c a).symm p.2) |
| 413 | ((F.connection p.1).connection (frame a j) ((c a).symm p.2) |
| 414 | (frame a i ((c a).symm p.2))) |
| 415 | let gamma' := fun (a : M) (p : ℝ × V) (i j : Fin n) => |
| 416 | (eT a).continuousLinearMapAt ℝ ((c a).symm p.2) |
| 417 | ((F'.connection p.1).connection (frame a j) ((c a).symm p.2) |
| 418 | (frame a i ((c a).symm p.2))) |
| 419 | let rmod' := fun (a : M) (p : ℝ × V) => |
| 420 | τ (((eS a) (TotalSpace.mk' FS ((c a).symm p.2) |
| 421 | (R' p.1 ((c a).symm p.2)))).2) |
| 422 | have hframe (a : M) (i : Fin n) : ContMDiffOn (𝓡 n) |
| 423 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (frame a i)) (eT a).baseSet := by |
| 424 | rw [(eT a).contMDiffOn_section_baseSet_iff (IB := 𝓡 n) (n := ∞)] |
| 425 | refine (contMDiffOn_const (c := EuclideanSpace.single i 1)).congr ?_ |
| 426 | intro y hy |
| 427 | simpa [frame, Trivialization.symmL_apply _ hy] using |
| 428 | congrArg Prod.snd ((eT a).apply_mk_symm hy (EuclideanSpace.single i 1)) |
| 429 | have hchartK (a : M) (ha : a ∈ s) : ContinuousOn |
| 430 | (fun p : ℝ × V => (p.1, (c a).symm p.2)) (K ×ˢ Q a) := by |
| 431 | apply continuousOn_fst.prodMk |
| 432 | exact (c a).continuousOn_symm.comp continuousOn_snd |
| 433 | (fun p hp => (hQ a ha).2 hp.2) |
| 434 | have hbaseT (a : M) {z : V} (hz : z ∈ (c a).target) : |
| 435 | (c a).symm z ∈ (eT a).baseSet := by |
| 436 | simpa only [eT, c, V, TangentBundle.trivializationAt_baseSet] using |
| 437 | (c a).map_target hz |
| 438 | have hginv (g : ℝ → RiemannianMetric n M) |
| 439 | (hg : RiemannianMetric.IsSmoothFamilyOn g (J ∩ J')) (a : M) (ha : a ∈ s) : |
| 440 | ContinuousOn (fun p => (gmod g a p).inverse) (K ×ˢ Q a) := by |
| 441 | have hgsm := (contMDiffOn_family_metric_frame_inverse hg a).2.2 |
| 442 | exact hgsm.continuousOn.comp (hchartK a ha) (fun p hp => |
| 443 | ⟨hKsub hp.1, hbaseT a ((hQ a ha).2 hp.2)⟩) |
| 444 | have hgamma (g : ℝ → RiemannianMetric n M) |
| 445 | (D : (t : ℝ) → LeviCivitaData (g t)) |
| 446 | (hg : RiemannianMetric.IsSmoothFamilyOn g (J ∩ J')) |
| 447 | (a : M) (ha : a ∈ s) (i j : Fin n) : |
| 448 | ContinuousOn (fun p : ℝ × V => |
| 449 | (eT a).continuousLinearMapAt ℝ ((c a).symm p.2) |
| 450 | ((D p.1).connection (frame a j) ((c a).symm p.2) |
| 451 | (frame a i ((c a).symm p.2)))) (K ×ˢ Q a) := by |
| 452 | have hs := contMDiffOn_connection_family_apply hg D (eT a).open_baseSet |
| 453 | (frame a j) (frame a i) (hframe a j) (hframe a i) |
| 454 | have hmaps : MapsTo (fun p : ℝ × M => TotalSpace.mk' V p.2 |
| 455 | ((D p.1).connection (frame a j) p.2 (frame a i p.2))) |
| 456 | ((J ∩ J') ×ˢ (eT a).baseSet) (eT a).source := by |
| 457 | intro p hp |
| 458 | exact ((eT a).mem_source).mpr hp.2 |
| 459 | have hc := ((eT a).contMDiffOn_iff hmaps).mp hs |
| 460 | apply (hc.2.continuousOn.comp (hchartK a ha) (fun p hp => |
| 461 | ⟨hKsub hp.1, hbaseT a ((hQ a ha).2 hp.2)⟩)).congr |
| 462 | intro p hp |
| 463 | exact Trivialization.continuousLinearMapAt_apply_of_mem ℝ (eT a) |
| 464 | (hbaseT a ((hQ a ha).2 hp.2)) _ |
| 465 | have hrmod' (a : M) : ContDiffOn ℝ ∞ (rmod' a) |
| 466 | (J' ×ˢ (c a).target) := by |
| 467 | have hh := contDiffOn_family_bundle_coordinates (E := BS) qS R' hR'sm a |
| 468 | (hbaseS a) |
| 469 | have hnative := qS.symm.contDiff.comp_contDiffOn hh |
| 470 | have hnative' : ContDiffOn ℝ ∞ |
| 471 | (fun p : ℝ × V => ((eS a) (TotalSpace.mk' FS ((c a).symm p.2) |
| 472 | (R' p.1 ((c a).symm p.2)))).2) (J' ×ˢ (c a).target) := by |
| 473 | simpa only [Function.comp_def, ContinuousLinearEquiv.symm_apply_apply] using hnative |
| 474 | exact τ.contDiff.comp_contDiffOn hnative' |
| 475 | have hpartial (a : M) (j k i : Fin n) : ContinuousOn |
| 476 | (fun p : ℝ × V => fderiv ℝ (fun z => rmod' a (p.1, z) |
| 477 | (EuclideanSpace.single j 1) (EuclideanSpace.single k 1)) p.2 |
| 478 | (EuclideanSpace.single i 1)) (J' ×ˢ (c a).target) := by |
| 479 | let r : ℝ × V → ℝ := fun p => rmod' a p |
| 480 | (EuclideanSpace.single j 1) (EuclideanSpace.single k 1) |
| 481 | have hr : ContDiffOn ℝ ∞ r (J' ×ˢ (c a).target) := |
| 482 | ((hrmod' a).clm_apply contDiffOn_const).clm_apply contDiffOn_const |
| 483 | have hw : ContDiffOn ℝ ∞ (fun p : ℝ × V => |
| 484 | fderivWithin ℝ (fun z => r (p.1, z)) (c a).target p.2 |
| 485 | (EuclideanSpace.single i 1)) (J' ×ˢ (c a).target) := by |
| 486 | intro p hp |
| 487 | have hh : ContDiffWithinAt ℝ ∞ |
| 488 | (fun q : (ℝ × V) × V => r (q.1.1, q.2)) |
| 489 | ((J' ×ˢ (c a).target) ×ˢ (c a).target) (p, p.2) := |
| 490 | (hr p hp).comp (p, p.2) |
| 491 | (contDiffWithinAt_fst.fst.prodMk contDiffWithinAt_snd) |
| 492 | (fun (q : (ℝ × V) × V) |
| 493 | (hq : q ∈ (J' ×ˢ (c a).target) ×ˢ (c a).target) => ⟨hq.1.1, hq.2⟩) |
| 494 | exact hh.fderivWithin_apply contDiffWithinAt_snd contDiffWithinAt_const |
| 495 | (c a).open_target.uniqueDiffOn (by simp) hp (fun q hq => hq.2) |
| 496 | apply hw.continuousOn.congr |
| 497 | intro p hp |
| 498 | change fderiv ℝ (fun z => r (p.1, z)) p.2 _ = |
| 499 | fderivWithin ℝ (fun z => r (p.1, z)) (c a).target p.2 _ |
| 500 | rw [fderivWithin_of_mem_nhds ((c a).open_target.mem_nhds hp.2)] |
| 501 | let cp := fun (a : M) (p : ℝ × V) (i j k : Fin n) => |
| 502 | fderiv ℝ (fun z => rmod' a (p.1, z) (EuclideanSpace.single j 1) |
| 503 | (EuclideanSpace.single k 1)) p.2 (EuclideanSpace.single i 1) - |
| 504 | rmod' a p (gamma' a p i j) (EuclideanSpace.single k 1) - |
| 505 | rmod' a p (EuclideanSpace.single j 1) (gamma' a p i k) |
| 506 | let vp := fun (a : M) (p : ℝ × V) (i j : Fin n) => |
| 507 | (gmod F'.metric a p).inverse |
| 508 | (∑ k : Fin n, (-cp a p i j k - cp a p j k i + cp a p k i j) • |
| 509 | EuclideanSpace.proj k) |
| 510 | have hrcont (a : M) (ha : a ∈ s) : ContinuousOn (rmod' a) (K ×ˢ Q a) := |
| 511 | (hrmod' a).continuousOn.mono (Set.prod_mono (fun t ht => (hKsub ht).2) |
| 512 | (hQ a ha).2) |
| 513 | have hcp (a : M) (ha : a ∈ s) (i j k : Fin n) : |
| 514 | ContinuousOn (fun p => cp a p i j k) (K ×ˢ Q a) := by |
| 515 | apply ((hpartial a j k i).mono (Set.prod_mono (fun t ht => (hKsub ht).2) |
| 516 | (hQ a ha).2)).sub |
| 517 | (((hrcont a ha).clm_apply (hgamma F'.metric F'.connection hF' a ha i j)).clm_apply |
| 518 | continuousOn_const) |>.sub |
| 519 | (((hrcont a ha).clm_apply continuousOn_const).clm_apply |
| 520 | (hgamma F'.metric F'.connection hF' a ha i k)) |
| 521 | have hvp (a : M) (ha : a ∈ s) (i j : Fin n) : |
| 522 | ContinuousOn (fun p => vp a p i j) (K ×ˢ Q a) := by |
| 523 | apply (hginv F'.metric hF' a ha).clm_apply |
| 524 | apply continuousOn_finsetSum |
| 525 | intro k hk |
| 526 | exact (((hcp a ha i j k).neg.sub (hcp a ha j k i)).add (hcp a ha k i j)).smul |
| 527 | continuousOn_const |
| 528 | let theta := fun (α : Fin dA) (l j i : Fin n) => |
| 529 | qA ((EuclideanSpace.proj j).smulRight |
| 530 | ((EuclideanSpace.proj i).smulRight (EuclideanSpace.single l 1))) α |
| 531 | let sigma := fun (β : Fin dS) => τ (qS.symm (EuclideanSpace.single β 1)) |
| 532 | let combine := fun (a : M) (p : ℝ × V) (α : Fin dA) |
| 533 | (v : Fin n → Fin n → Fin n → ℝ) => |
| 534 | ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, ∑ k : Fin n, |
| 535 | theta α l j i * ((gmod F.metric a p).inverse (EuclideanSpace.proj k)) l * v i j k |
| 536 | let cd := fun (a : M) (p : ℝ × V) (α : Fin dA) (β : Fin dS × Fin n) => |
| 537 | combine a p α (fun i j k => |
| 538 | -(if i = β.2 then sigma β.1 (EuclideanSpace.single j 1) |
| 539 | (EuclideanSpace.single k 1) else 0) - |
| 540 | (if j = β.2 then sigma β.1 (EuclideanSpace.single k 1) |
| 541 | (EuclideanSpace.single i 1) else 0) + |
| 542 | (if k = β.2 then sigma β.1 (EuclideanSpace.single i 1) |
| 543 | (EuclideanSpace.single j 1) else 0)) |
| 544 | let ch := fun (a : M) (p : ℝ × V) (α : Fin dA) (β : Fin dH) => |
| 545 | combine a p α (fun i j k => |
| 546 | -(qH.symm (EuclideanSpace.single β 1)) (vp a p i j) (EuclideanSpace.single k 1)) |
| 547 | let ca := fun (a : M) (p : ℝ × V) (α β : Fin dA) => |
| 548 | combine a p α (fun i j k => 2 * rmod' a p |
| 549 | ((qA.symm (EuclideanSpace.single β 1)) (EuclideanSpace.single j 1) |
| 550 | (EuclideanSpace.single i 1)) (EuclideanSpace.single k 1)) |
| 551 | let cs := fun (a : M) (p : ℝ × V) (α : Fin dA) (β : Fin dS) => |
| 552 | combine a p α (fun i j k => |
| 553 | sigma β (gamma a p i j) (EuclideanSpace.single k 1) + |
| 554 | sigma β (EuclideanSpace.single j 1) (gamma a p i k) + |
| 555 | sigma β (gamma a p j k) (EuclideanSpace.single i 1) + |
| 556 | sigma β (EuclideanSpace.single k 1) (gamma a p j i) - |
| 557 | sigma β (gamma a p k i) (EuclideanSpace.single j 1) - |
| 558 | sigma β (EuclideanSpace.single i 1) (gamma a p k j)) |
| 559 | have hcombine (a : M) (ha : a ∈ s) (α : Fin dA) |
| 560 | (v : (ℝ × V) → Fin n → Fin n → Fin n → ℝ) |
| 561 | (hv : ∀ i j k, ContinuousOn (fun p => v p i j k) (K ×ˢ Q a)) : |
| 562 | ContinuousOn (fun p => combine a p α (v p)) (K ×ˢ Q a) := by |
| 563 | apply continuousOn_finsetSum |
| 564 | intro l hl |
| 565 | apply continuousOn_finsetSum |
| 566 | intro j hj |
| 567 | apply continuousOn_finsetSum |
| 568 | intro i hi |
| 569 | apply continuousOn_finsetSum |
| 570 | intro k hk |
| 571 | apply ContinuousOn.mul _ (hv i j k) |
| 572 | exact continuousOn_const.mul ((EuclideanSpace.proj l).continuous.comp_continuousOn |
| 573 | ((hginv F.metric hF a ha).clm_apply continuousOn_const)) |
| 574 | have hcd (a : M) (ha : a ∈ s) (α : Fin dA) (β : Fin dS × Fin n) : |
| 575 | ContinuousOn (fun p => cd a p α β) (K ×ˢ Q a) := by |
| 576 | apply hcombine a ha α |
| 577 | intro i j k |
| 578 | exact continuousOn_const |
| 579 | have hch (a : M) (ha : a ∈ s) (α : Fin dA) (β : Fin dH) : |
| 580 | ContinuousOn (fun p => ch a p α β) (K ×ˢ Q a) := by |
| 581 | apply hcombine a ha α |
| 582 | intro i j k |
| 583 | exact ((continuousOn_const.clm_apply (hvp a ha i j)).clm_apply continuousOn_const).neg |
| 584 | have hca (a : M) (ha : a ∈ s) (α β : Fin dA) : |
| 585 | ContinuousOn (fun p => ca a p α β) (K ×ˢ Q a) := by |
| 586 | apply hcombine a ha α |
| 587 | intro i j k |
| 588 | exact continuousOn_const.mul |
| 589 | (((hrcont a ha).clm_apply continuousOn_const).clm_apply continuousOn_const) |
| 590 | have hcs (a : M) (ha : a ∈ s) (α : Fin dA) (β : Fin dS) : |
| 591 | ContinuousOn (fun p => cs a p α β) (K ×ˢ Q a) := by |
| 592 | apply hcombine a ha α |
| 593 | intro i j k |
| 594 | exact (((((continuousOn_const.clm_apply (hgamma F.metric F.connection hF a ha i j)).clm_apply |
| 595 | continuousOn_const).add ((continuousOn_const.clm_apply continuousOn_const).clm_apply |
| 596 | (hgamma F.metric F.connection hF a ha i k))).add |
| 597 | ((continuousOn_const.clm_apply (hgamma F.metric F.connection hF a ha j k)).clm_apply |
| 598 | continuousOn_const)).add ((continuousOn_const.clm_apply continuousOn_const).clm_apply |
| 599 | (hgamma F.metric F.connection hF a ha j i))).sub |
| 600 | ((continuousOn_const.clm_apply (hgamma F.metric F.connection hF a ha k i)).clm_apply |
| 601 | continuousOn_const) |>.sub |
| 602 | ((continuousOn_const.clm_apply continuousOn_const).clm_apply |
| 603 | (hgamma F.metric F.connection hF a ha k j)) |
| 604 | let coeffSq := fun (a : M) (p : ℝ × V) => |
| 605 | (∑ α : Fin dA, ∑ β : Fin dS × Fin n, (cd a p α β) ^ 2) + |
| 606 | (∑ α : Fin dA, ∑ β : Fin dH, (ch a p α β) ^ 2) + |
| 607 | (∑ α : Fin dA, ∑ β : Fin dA, (ca a p α β) ^ 2) + |
| 608 | (∑ α : Fin dA, ∑ β : Fin dS, (cs a p α β) ^ 2) |
| 609 | have hcoeffSq (a : M) (ha : a ∈ s) : ContinuousOn (coeffSq a) (K ×ˢ Q a) := by |
| 610 | apply ContinuousOn.add |
| 611 | · apply ContinuousOn.add |
| 612 | · apply ContinuousOn.add |
| 613 | · exact continuousOn_finsetSum Finset.univ (fun α _ => |
| 614 | continuousOn_finsetSum Finset.univ (fun β _ => (hcd a ha α β).pow 2)) |
| 615 | · exact continuousOn_finsetSum Finset.univ (fun α _ => |
| 616 | continuousOn_finsetSum Finset.univ (fun β _ => (hch a ha α β).pow 2)) |
| 617 | · exact continuousOn_finsetSum Finset.univ (fun α _ => |
| 618 | continuousOn_finsetSum Finset.univ (fun β _ => (hca a ha α β).pow 2)) |
| 619 | · exact continuousOn_finsetSum Finset.univ (fun α _ => |
| 620 | continuousOn_finsetSum Finset.univ (fun β _ => (hcs a ha α β).pow 2)) |
| 621 | have hcompactBound (a : M) (ha : a ∈ s) : |
| 622 | ∃ B : ℝ, 0 ≤ B ∧ ∀ p ∈ K ×ˢ Q a, coeffSq a p ≤ B := by |
| 623 | obtain ⟨B, hB⟩ := (hK.prod (hQ a ha).1).exists_bound_of_continuousOn (hcoeffSq a ha) |
| 624 | refine ⟨max B 0, le_max_right _ _, ?_⟩ |
| 625 | intro p hp |
| 626 | exact (le_abs_self _).trans ((hB p hp).trans (le_max_left _ _)) |
| 627 | let bound := fun a : M => if ha : a ∈ s then Classical.choose (hcompactBound a ha) else 0 |
| 628 | have hbound (a : M) (ha : a ∈ s) : |
| 629 | 0 ≤ bound a ∧ ∀ p ∈ K ×ˢ Q a, coeffSq a p ≤ bound a := by |
| 630 | dsimp only [bound] |
| 631 | rw [dif_pos ha] |
| 632 | exact Classical.choose_spec (hcompactBound a ha) |
| 633 | let B : ℝ := ∑ a ∈ s, bound a |
| 634 | have hB : 0 ≤ B := Finset.sum_nonneg (fun a ha => (hbound a ha).1) |
| 635 | have hBbound (a : M) (ha : a ∈ s) {p : ℝ × V} (hp : p ∈ K ×ˢ Q a) : |
| 636 | coeffSq a p ≤ B := |
| 637 | ((hbound a ha).2 p hp).trans (Finset.single_le_sum (fun b hb => (hbound b hb).1) ha) |
| 638 | refine ⟨B + 1, by positivity, ?_⟩ |
| 639 | intro ε hε t ht a ha z hz |
| 640 | have hzChart : z ∈ (c a).target := (hQ a ha).2 hz |
| 641 | have htInt : t ∈ interior (J ∩ J') := interior_mono hKsub ht |
| 642 | have htJ : t ∈ J ∩ J' := interior_subset htInt |
| 643 | have htJint : t ∈ interior J := interior_mono inter_subset_left htInt |
| 644 | have htJ'int : t ∈ interior J' := interior_mono inter_subset_right htInt |
| 645 | have htN : J ∩ J' ∈ 𝓝 t := mem_interior_iff_mem_nhds.mp htInt |
| 646 | have hpointA : DifferentiableAt ℝ |
| 647 | (fun p : ℝ × V => qA ((eA a) (TotalSpace.mk' FA ((c a).symm p.2) |
| 648 | (A p.1 ((c a).symm p.2)))).2) (t, z) := |
| 649 | ((hacoord a (t, z) ⟨htJ, hzChart⟩).contDiffAt |
| 650 | (prod_mem_nhds htN ((c a).open_target.mem_nhds hzChart))).differentiableAt (by simp) |
| 651 | have hcurve : HasDerivAt (fun r : ℝ => (r, z)) (1, 0) t := |
| 652 | (hasDerivAt_id t).prodMk (hasDerivAt_const t z) |
| 653 | have hcoord : HasDerivAt |
| 654 | (fun r : ℝ => qA ((eA a) (TotalSpace.mk' FA ((c a).symm z) |
| 655 | (A r ((c a).symm z)))).2) |
| 656 | (fderiv ℝ (fun p : ℝ × V => qA ((eA a) (TotalSpace.mk' FA ((c a).symm p.2) |
| 657 | (A p.1 ((c a).symm p.2)))).2) (t, z) (1, 0)) t := |
| 658 | by simpa only [Function.comp_def] using |
| 659 | hpointA.hasFDerivAt.comp_hasDerivAt t hcurve |
| 660 | let e := trivializationAt V (TangentSpace (𝓡 n)) a |
| 661 | let x := (c a).symm z |
| 662 | let E := fun k : Fin n => fun y : M => e.symmL ℝ y (EuclideanSpace.single k 1) |
| 663 | have hx : x ∈ e.baseSet := by |
| 664 | simpa only [x, e, c, V, TangentBundle.trivializationAt_baseSet] using |
| 665 | (c a).map_target hzChart |
| 666 | have hG (g : RiemannianMetric n M) : |
| 667 | (ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 668 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 669 | a x a x (g.inner x)).IsInvertible := by |
| 670 | apply isInvertible_bilinear_of_pos |
| 671 | intro v hv |
| 672 | have heval : |
| 673 | ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 674 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 675 | a x a x (g.inner x) v v = |
| 676 | g.inner x (e.symmL ℝ x v) (e.symmL ℝ x v) := by |
| 677 | rw [inCoordinates_apply_eq₂ |
| 678 | (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 679 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 680 | (E₃ := fun _ : M => ℝ) hx hx (by simp)] |
| 681 | rw [← Trivialization.symmL_apply (R := ℝ) e hx v] |
| 682 | simp |
| 683 | rw [heval] |
| 684 | apply g.pos x |
| 685 | intro hzv |
| 686 | have hzv' := congrArg (e.continuousLinearMapAt ℝ x) hzv |
| 687 | rw [Trivialization.continuousLinearMapAt_symmL _ hx, map_zero] at hzv' |
| 688 | exact hv hzv' |
| 689 | have hE (k : Fin n) : ContMDiffOn (𝓡 n) |
| 690 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (E k)) e.baseSet := by |
| 691 | rw [e.contMDiffOn_section_baseSet_iff (IB := 𝓡 n) (n := ∞)] |
| 692 | refine (contMDiffOn_const (c := EuclideanSpace.single k 1)).congr ?_ |
| 693 | intro y hy |
| 694 | simpa [E, Trivialization.symmL_apply _ hy] using |
| 695 | congrArg Prod.snd (e.apply_mk_symm hy (EuclideanSpace.single k 1)) |
| 696 | let G := fun g : RiemannianMetric n M => |
| 697 | ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 698 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 699 | a x a x (g.inner x) |
| 700 | let L := e.continuousLinearMapAt ℝ x |
| 701 | have hbridge (f : M → ℝ) |
| 702 | (hf : MDifferentiableAt (𝓡 n) 𝓘(ℝ, ℝ) f x) (k : Fin n) : |
| 703 | fderiv ℝ (fun q => f ((extChartAt (𝓡 n) x).symm q)) |
| 704 | ((extChartAt (𝓡 n) x) x) (E k x) = |
| 705 | fderiv ℝ (fun q => f ((c a).symm q)) z |
| 706 | (EuclideanSpace.single k 1) := by |
| 707 | exact (centered_scalar_derivative f x hf (E k x)).trans |
| 708 | (fixed_scalar_derivative f a hzChart hf (EuclideanSpace.single k 1)).symm |
| 709 | have hpairF (k l : Fin n) : |
| 710 | ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 711 | (fun y => (F.connection t).ricci y (E k y) (E l y)) x := |
| 712 | ricci_pair_smooth F htJint e.open_baseSet (E k) (E l) |
| 713 | (hE k) (hE l) hx |
| 714 | have hpairF' (k l : Fin n) : |
| 715 | ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 716 | (fun y => (F'.connection t).ricci y (E k y) (E l y)) x := |
| 717 | ricci_pair_smooth F' htJ'int e.open_baseSet (E k) (E l) |
| 718 | (hE k) (hE l) hx |
| 719 | let C' := fun (i j k : Fin n) => |
| 720 | fderiv ℝ (fun q => (F'.connection t).ricci ((extChartAt (𝓡 n) x).symm q) |
| 721 | (E j ((extChartAt (𝓡 n) x).symm q)) (E k ((extChartAt (𝓡 n) x).symm q))) |
| 722 | ((extChartAt (𝓡 n) x) x) (E i x) - |
| 723 | (F'.connection t).ricci x ((F'.connection t).connection (E j) x (E i x)) |
| 724 | (E k x) - |
| 725 | (F'.connection t).ricci x (E j x) |
| 726 | ((F'.connection t).connection (E k) x (E i x)) |
| 727 | let C := fun (i j k : Fin n) => |
| 728 | fderiv ℝ (fun q => |
| 729 | ((F.connection t).ricci ((extChartAt (𝓡 n) x).symm q) |
| 730 | (E j ((extChartAt (𝓡 n) x).symm q)) |
| 731 | (E k ((extChartAt (𝓡 n) x).symm q))) - |
| 732 | ((F'.connection t).ricci ((extChartAt (𝓡 n) x).symm q) |
| 733 | (E j ((extChartAt (𝓡 n) x).symm q)) |
| 734 | (E k ((extChartAt (𝓡 n) x).symm q)))) |
| 735 | ((extChartAt (𝓡 n) x) x) (E i x) - |
| 736 | ((F.connection t).ricci x ((F.connection t).connection (E j) x (E i x)) |
| 737 | (E k x) - |
| 738 | (F'.connection t).ricci x ((F.connection t).connection (E j) x (E i x)) |
| 739 | (E k x)) - |
| 740 | ((F.connection t).ricci x (E j x) |
| 741 | ((F.connection t).connection (E k) x (E i x)) - |
| 742 | (F'.connection t).ricci x (E j x) |
| 743 | ((F.connection t).connection (E k) x (E i x))) |
| 744 | have hC (i j k : Fin n) : |
| 745 | C i j k = fderiv ℝ (fun q => |
| 746 | ((F.connection t).ricci ((c a).symm q) |
| 747 | (E j ((c a).symm q)) (E k ((c a).symm q))) - |
| 748 | ((F'.connection t).ricci ((c a).symm q) |
| 749 | (E j ((c a).symm q)) (E k ((c a).symm q)))) z |
| 750 | (EuclideanSpace.single i 1) - |
| 751 | ((F.connection t).ricci x ((F.connection t).connection (E j) x (E i x)) |
| 752 | (E k x) - |
| 753 | (F'.connection t).ricci x ((F.connection t).connection (E j) x (E i x)) |
| 754 | (E k x)) - |
| 755 | ((F.connection t).ricci x (E j x) |
| 756 | ((F.connection t).connection (E k) x (E i x)) - |
| 757 | (F'.connection t).ricci x (E j x) |
| 758 | ((F.connection t).connection (E k) x (E i x))) := by |
| 759 | dsimp only [C] |
| 760 | rw [hbridge _ ((hpairF j k).sub (hpairF' j k) |>.mdifferentiableAt (by simp)) i] |
| 761 | have hC' (i j k : Fin n) : |
| 762 | C' i j k = fderiv ℝ (fun q => |
| 763 | ((F'.connection t).ricci ((c a).symm q) |
| 764 | (E j ((c a).symm q)) (E k ((c a).symm q)))) z |
| 765 | (EuclideanSpace.single i 1) - |
| 766 | (F'.connection t).ricci x ((F'.connection t).connection (E j) x (E i x)) |
| 767 | (E k x) - |
| 768 | (F'.connection t).ricci x (E j x) |
| 769 | ((F'.connection t).connection (E k) x (E i x)) := by |
| 770 | dsimp only [C'] |
| 771 | rw [hbridge _ ((hpairF' j k).mdifferentiableAt (by simp)) i] |
| 772 | have hpair' (i j k : Fin n) : |
| 773 | HasDerivAt (fun r : ℝ => (F'.connection r).connection (E j) x (E i x)) |
| 774 | (deriv (fun r : ℝ => (F'.connection r).connection (E j) x (E i x)) t) t ∧ |
| 775 | (F'.metric t).inner x |
| 776 | (deriv (fun r : ℝ => (F'.connection r).connection (E j) x (E i x)) t) |
| 777 | (E k x) = -C' i j k - C' j k i + C' k i j := by |
| 778 | simpa only [C'] using |
| 779 | (ricciFlow_connection_variation_pairing F' htJ'int |
| 780 | e.open_baseSet (E i) (E j) (E k) (hE i) (hE j) (hE k) hx) |
| 781 | let W' := fun (i j : Fin n) (r : ℝ) => |
| 782 | (F'.connection r).connection (E j) x (E i x) |
| 783 | let Acurve := fun (i j : Fin n) (r : ℝ) => |
| 784 | CovariantDerivative.difference (F.connection r).connection |
| 785 | (F'.connection r).connection x (E j x) (E i x) |
| 786 | let GF := G (F.metric t) |
| 787 | let GF' := G (F'.metric t) |
| 788 | have hG_eval (g : RiemannianMetric n M) (v : TangentSpace (𝓡 n) x) |
| 789 | (k : Fin n) : G g (L v) (EuclideanSpace.single k 1) = |
| 790 | g.inner x v (E k x) := by |
| 791 | dsimp [G, L] |
| 792 | rw [inCoordinates_apply_eq₂ |
| 793 | (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 794 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 795 | (E₃ := fun _ : M => ℝ) hx hx (by simp)] |
| 796 | rw [← Trivialization.symmL_apply (R := ℝ) e hx (L v), |
| 797 | ← Trivialization.symmL_apply (R := ℝ) e hx (EuclideanSpace.single k 1)] |
| 798 | rw [Trivialization.symmL_continuousLinearMapAt e hx v] |
| 799 | simp [E] |
| 800 | have hA_pair (i j k : Fin n) : |
| 801 | HasDerivAt (Acurve i j) (deriv (Acurve i j) t) t ∧ |
| 802 | (F.metric t).inner x (deriv (Acurve i j) t) (E k x) = |
| 803 | -C i j k - C j k i + C k i j + |
| 804 | 2 * (F'.connection t).ricci x ((Acurve i j) t) (E k x) - |
| 805 | ((F.metric t).inner x (deriv (W' i j) t) (E k x) - |
| 806 | (F'.metric t).inner x (deriv (W' i j) t) (E k x)) := by |
| 807 | simpa only [C, Acurve, W'] using |
| 808 | (ricciFlow_connection_difference_evolution_pairing F F' hinit htJint htJ'int |
| 809 | e.open_baseSet (E i) (E j) (E k) (hE i) (hE j) (hE k) hx) |
| 810 | have hWnative (i j : Fin n) : |
| 811 | L (deriv (W' i j) t) = GF'.inverse |
| 812 | (∑ k : Fin n, (-C' i j k - C' j k i + C' k i j) • EuclideanSpace.proj k) := by |
| 813 | apply native_from_pairings (hG (F'.metric t)) |
| 814 | intro k |
| 815 | rw [hG_eval] |
| 816 | exact (hpair' i j k).2 |
| 817 | let Hmod := GF - GF' |
| 818 | have hAnative (i j : Fin n) : |
| 819 | L (deriv (Acurve i j) t) = GF.inverse |
| 820 | (∑ k : Fin n, |
| 821 | (-C i j k - C j k i + C k i j + |
| 822 | 2 * (F'.connection t).ricci x ((Acurve i j) t) (E k x) - |
| 823 | Hmod (GF'.inverse |
| 824 | (∑ l : Fin n, (-C' i j l - C' j l i + C' l i j) • |
| 825 | EuclideanSpace.proj l)) (EuclideanSpace.single k 1)) • |
| 826 | EuclideanSpace.proj k) := by |
| 827 | apply native_from_pairings (hG (F.metric t)) |
| 828 | intro k |
| 829 | rw [hG_eval] |
| 830 | have hp := (hA_pair i j k).2 |
| 831 | rw [← hG_eval (F.metric t) (deriv (W' i j) t) k, |
| 832 | ← hG_eval (F'.metric t) (deriv (W' i j) t) k, |
| 833 | hWnative i j] at hp |
| 834 | dsimp [Hmod, GF, GF'] |
| 835 | simpa only [sub_apply] using hp |
| 836 | let hCoord : FH := |
| 837 | ((eH a) (TotalSpace.mk' FH x (H t x))).2 |
| 838 | let aCoord : FA := |
| 839 | ((eA a) (TotalSpace.mk' FA x (A t x))).2 |
| 840 | let sCoord : FS := |
| 841 | ((eS a) (TotalSpace.mk' FS x (S t x))).2 |
| 842 | have hHmodel (u v : V) : Hmod u v = hCoord u v := by |
| 843 | change G (F.metric t) u v - G (F'.metric t) u v = hCoord u v |
| 844 | have hGeval (g : RiemannianMetric n M) (u v : V) : |
| 845 | G g u v = g.inner x (e.symmL ℝ x u) (e.symmL ℝ x v) := by |
| 846 | dsimp [G] |
| 847 | rw [inCoordinates_apply_eq₂ |
| 848 | (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 849 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 850 | (E₃ := fun _ : M => ℝ) hx hx (by simp)] |
| 851 | rw [← Trivialization.symmL_apply (R := ℝ) e hx u, |
| 852 | ← Trivialization.symmL_apply (R := ℝ) e hx v] |
| 853 | simp |
| 854 | rw [hGeval, hGeval] |
| 855 | dsimp [hCoord, eH] |
| 856 | rw [hom_trivializationAt_apply] |
| 857 | rw [inCoordinates_apply_eq₂ |
| 858 | (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 859 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 860 | (E₃ := fun _ : M => ℝ) hx hx (by simp)] |
| 861 | rw [← Trivialization.symmL_apply (R := ℝ) e hx u, |
| 862 | ← Trivialization.symmL_apply (R := ℝ) e hx v] |
| 863 | simp [H] |
| 864 | have hSmodel (u v w : V) : |
| 865 | sCoord u v w = |
| 866 | e.linearMapAt ℝ x (S t x (e.symmL ℝ x u) (e.symmL ℝ x v) |
| 867 | (e.symmL ℝ x w)) := by |
| 868 | have hxhom : x ∈ (trivializationAt (V →L[ℝ] V) |
| 869 | (fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) a).baseSet := by |
| 870 | rw [hom_trivializationAt_baseSet] |
| 871 | exact ⟨hx, hx⟩ |
| 872 | dsimp [sCoord, eS] |
| 873 | rw [hom_trivializationAt_apply] |
| 874 | rw [inCoordinates_apply_eq₂ |
| 875 | (F₁ := V) (F₂ := V) (F₃ := V →L[ℝ] V) |
| 876 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 877 | (E₃ := fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) |
| 878 | hx hx hxhom] |
| 879 | rw [Trivialization.linearMapAt_apply, if_pos hxhom, hom_trivializationAt_apply] |
| 880 | change ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) V |
| 881 | (TangentSpace (𝓡 n)) a x a x |
| 882 | (S t x (e.symm x u) (e.symm x v)) w = _ |
| 883 | simp only [ContinuousLinearMap.inCoordinates, ContinuousLinearMap.comp_apply, |
| 884 | Trivialization.continuousLinearMapAt_apply] |
| 885 | rw [Trivialization.symmL_apply (R := ℝ) e hx u, |
| 886 | Trivialization.symmL_apply (R := ℝ) e hx v, |
| 887 | Trivialization.symmL_apply (R := ℝ) e hx w] |
| 888 | let sbar : V → FS := fun q => |
| 889 | ((eS a) (TotalSpace.mk' FS ((c a).symm q) (S t ((c a).symm q)))).2 |
| 890 | have hsbar_eval (q : V) (hq : q ∈ (c a).target) (u v w : V) : |
| 891 | sbar q u v w = |
| 892 | e.linearMapAt ℝ ((c a).symm q) |
| 893 | (S t ((c a).symm q) |
| 894 | (e.symmL ℝ ((c a).symm q) u) |
| 895 | (e.symmL ℝ ((c a).symm q) v) |
| 896 | (e.symmL ℝ ((c a).symm q) w)) := by |
| 897 | have hy : (c a).symm q ∈ e.baseSet := by |
| 898 | simpa only [e, c, V, TangentBundle.trivializationAt_baseSet] using |
| 899 | (c a).map_target hq |
| 900 | have hyhom : (c a).symm q ∈ (trivializationAt (V →L[ℝ] V) |
| 901 | (fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) a).baseSet := by |
| 902 | rw [hom_trivializationAt_baseSet] |
| 903 | exact ⟨hy, hy⟩ |
| 904 | dsimp [sbar, eS] |
| 905 | rw [hom_trivializationAt_apply] |
| 906 | rw [inCoordinates_apply_eq₂ |
| 907 | (F₁ := V) (F₂ := V) (F₃ := V →L[ℝ] V) |
| 908 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 909 | (E₃ := fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) |
| 910 | hy hy hyhom] |
| 911 | rw [Trivialization.linearMapAt_apply, if_pos hyhom, hom_trivializationAt_apply] |
| 912 | change ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) V |
| 913 | (TangentSpace (𝓡 n)) a ((c a).symm q) a ((c a).symm q) |
| 914 | (S t ((c a).symm q) (e.symm ((c a).symm q) u) |
| 915 | (e.symm ((c a).symm q) v)) w = _ |
| 916 | simp only [ContinuousLinearMap.inCoordinates, ContinuousLinearMap.comp_apply, |
| 917 | Trivialization.continuousLinearMapAt_apply] |
| 918 | rw [Trivialization.symmL_apply (R := ℝ) e hy u, |
| 919 | Trivialization.symmL_apply (R := ℝ) e hy v, |
| 920 | Trivialization.symmL_apply (R := ℝ) e hy w] |
| 921 | have htrace (q : V) (hq : q ∈ (c a).target) (u v : V) : |
| 922 | τ (sbar q) u v = |
| 923 | (F.connection t).ricci ((c a).symm q) |
| 924 | (e.symmL ℝ ((c a).symm q) u) (e.symmL ℝ ((c a).symm q) v) - |
| 925 | (F'.connection t).ricci ((c a).symm q) |
| 926 | (e.symmL ℝ ((c a).symm q) u) (e.symmL ℝ ((c a).symm q) v) := by |
| 927 | let y := (c a).symm q |
| 928 | have hy : y ∈ e.baseSet := by |
| 929 | simpa only [y, e, c, V, TangentBundle.trivializationAt_baseSet] using |
| 930 | (c a).map_target hq |
| 931 | let b := (PiLp.basisFun 2 ℝ (Fin n)).map (e.linearEquivAt ℝ y hy).symm |
| 932 | have hbrepr (v : TangentSpace (𝓡 n) y) (p : Fin n) : |
| 933 | b.repr v p = ((e.linearEquivAt ℝ y hy) v) p := by |
| 934 | simp [b, Module.Basis.map_repr, PiLp.basisFun_repr] |
| 935 | have hb (p : Fin n) : b p = E p y := by |
| 936 | simp [b, E, Trivialization.symmL_apply _ hy] |
| 937 | rw [hτ] |
| 938 | rw [ricci_eq_sum_basis_of_curvature_pairing (F.connection t) y |
| 939 | (e.symmL ℝ y u) (e.symmL ℝ y v) b, |
| 940 | ricci_eq_sum_basis_of_curvature_pairing (F'.connection t) y |
| 941 | (e.symmL ℝ y u) (e.symmL ℝ y v) b] |
| 942 | rw [← Finset.sum_sub_distrib] |
| 943 | apply Finset.sum_congr rfl |
| 944 | intro p hp |
| 945 | rw [hb] |
| 946 | rw [hbrepr, hbrepr] |
| 947 | rw [← hR t y (E p y) (e.symmL ℝ y u) (e.symmL ℝ y v), |
| 948 | ← hR' t y (E p y) (e.symmL ℝ y u) (e.symmL ℝ y v)] |
| 949 | have hs := hsbar_eval q hq (EuclideanSpace.single p 1) u v |
| 950 | rw [hs] |
| 951 | change (e.linearMapAt ℝ y |
| 952 | ((R t y) (e.symmL ℝ y (EuclideanSpace.single p 1)) |
| 953 | (e.symmL ℝ y u) (e.symmL ℝ y v) - |
| 954 | (R' t y) (e.symmL ℝ y (EuclideanSpace.single p 1)) |
| 955 | (e.symmL ℝ y u) (e.symmL ℝ y v))).ofLp p = _ |
| 956 | rw [e.linearMapAt_def_of_mem hy, map_sub, |
| 957 | hR t y (E p y) (e.symmL ℝ y u) (e.symmL ℝ y v), |
| 958 | hR' t y (E p y) (e.symmL ℝ y u) (e.symmL ℝ y v)] |
| 959 | rfl |
| 960 | have hqS (T : FS) : T = ∑ β : Fin dS, |
| 961 | (qS T β) • qS.symm (EuclideanSpace.single β 1) := by |
| 962 | let b := PiLp.basisFun 2 ℝ (Fin dS) |
| 963 | have hb (u : EuclideanSpace ℝ (Fin dS)) : |
| 964 | u = ∑ β : Fin dS, u β • EuclideanSpace.single β 1 := by |
| 965 | calc |
| 966 | u = ∑ β, (b.repr u) β • b β := (b.sum_repr u).symm |
| 967 | _ = ∑ β, u β • EuclideanSpace.single β 1 := by |
| 968 | apply Finset.sum_congr rfl |
| 969 | intro β hβ |
| 970 | simp [b, PiLp.basisFun_repr, PiLp.basisFun_apply] |
| 971 | calc |
| 972 | T = qS.symm (qS T) := (qS.symm_apply_apply T).symm |
| 973 | _ = qS.symm (∑ β, (qS T β) • EuclideanSpace.single β 1) := |
| 974 | congrArg qS.symm (hb (qS T)) |
| 975 | _ = _ := by simp only [map_sum, map_smul] |
| 976 | let σ := fun (β : Fin dS) (u v : V) => |
| 977 | τ (qS.symm (EuclideanSpace.single β 1)) u v |
| 978 | have htrace_expand (q : V) (hq : q ∈ (c a).target) (u v : V) : |
| 979 | τ (sbar q) u v = ∑ β : Fin dS, |
| 980 | fS a β (t, q) * σ β u v := by |
| 981 | rw [hqS (sbar q), map_sum] |
| 982 | simp only [map_smul, smul_eq_mul, sum_apply, smul_apply, smul_eq_mul] |
| 983 | apply Finset.sum_congr rfl |
| 984 | intro β hβ |
| 985 | rfl |
| 986 | have hCderiv (i j k : Fin n) : |
| 987 | fderiv ℝ (fun q : V => |
| 988 | ((F.connection t).ricci ((c a).symm q) |
| 989 | (E j ((c a).symm q)) (E k ((c a).symm q))) - |
| 990 | ((F'.connection t).ricci ((c a).symm q) |
| 991 | (E j ((c a).symm q)) (E k ((c a).symm q)))) z |
| 992 | (EuclideanSpace.single i 1) = |
| 993 | ∑ β : Fin dS, |
| 994 | σ β (EuclideanSpace.single j 1) (EuclideanSpace.single k 1) * |
| 995 | (fderiv ℝ (fun q => fS a β (t, q)) z |
| 996 | (EuclideanSpace.single i 1)) := by |
| 997 | let r : V → ℝ := fun q => |
| 998 | ((F.connection t).ricci ((c a).symm q) |
| 999 | (E j ((c a).symm q)) (E k ((c a).symm q))) - |
| 1000 | ((F'.connection t).ricci ((c a).symm q) |
| 1001 | (E j ((c a).symm q)) (E k ((c a).symm q))) |
| 1002 | have heq : r =ᶠ[𝓝 z] (fun q => ∑ β : Fin dS, |
| 1003 | fS a β (t, q) * σ β (EuclideanSpace.single j 1) |
| 1004 | (EuclideanSpace.single k 1)) := by |
| 1005 | filter_upwards [(c a).open_target.mem_nhds hzChart] with q hq |
| 1006 | dsimp [r] |
| 1007 | rw [← htrace q hq (EuclideanSpace.single j 1) |
| 1008 | (EuclideanSpace.single k 1)] |
| 1009 | exact htrace_expand q hq (EuclideanSpace.single j 1) |
| 1010 | (EuclideanSpace.single k 1) |
| 1011 | have hf (β : Fin dS) : |
| 1012 | DifferentiableAt ℝ (fun q => fS a β (t, q)) z := by |
| 1013 | have hh := (hScoord a (t, z) ⟨htJ, hzChart⟩).contDiffAt |
| 1014 | (prod_mem_nhds htN ((c a).open_target.mem_nhds hzChart)) |
| 1015 | have hd := hh.differentiableAt (by simp) |
| 1016 | have hg : DifferentiableAt ℝ (fun q : V => (t, q)) z := by |
| 1017 | fun_prop |
| 1018 | have hcoord := hd.comp z hg |
| 1019 | have hproj := (EuclideanSpace.proj β).differentiableAt.comp z hcoord |
| 1020 | simpa only [fS, Function.comp_def, EuclideanSpace.coe_proj] using hproj |
| 1021 | change fderiv ℝ r z (EuclideanSpace.single i 1) = _ |
| 1022 | rw [heq.fderiv_eq] |
| 1023 | rw [fderiv_fun_sum (fun β _ => |
| 1024 | (hf β).mul_const (σ β (EuclideanSpace.single j 1) |
| 1025 | (EuclideanSpace.single k 1)))] |
| 1026 | simp only [ContinuousLinearMap.sum_apply] |
| 1027 | apply Finset.sum_congr rfl |
| 1028 | intro β hβ |
| 1029 | rw [fderiv_mul_const (hf β) |
| 1030 | (σ β (EuclideanSpace.single j 1) (EuclideanSpace.single k 1))] |
| 1031 | simp only [smul_apply, smul_eq_mul] |
| 1032 | have hCexpand (i j k : Fin n) : |
| 1033 | C i j k = |
| 1034 | (∑ β : Fin dS, |
| 1035 | σ β (EuclideanSpace.single j 1) (EuclideanSpace.single k 1) * |
| 1036 | fderiv ℝ (fun q => fS a β (t, q)) z |
| 1037 | (EuclideanSpace.single i 1)) - |
| 1038 | ((F.connection t).ricci x |
| 1039 | ((F.connection t).connection (E j) x (E i x)) (E k x) - |
| 1040 | (F'.connection t).ricci x |
| 1041 | ((F.connection t).connection (E j) x (E i x)) (E k x)) - |
| 1042 | ((F.connection t).ricci x (E j x) |
| 1043 | ((F.connection t).connection (E k) x (E i x)) - |
| 1044 | (F'.connection t).ricci x (E j x) |
| 1045 | ((F.connection t).connection (E k) x (E i x))) := by |
| 1046 | rw [hC i j k, hCderiv i j k] |
| 1047 | let θ := fun (α : Fin dA) (l j i : Fin n) => |
| 1048 | (qA ((EuclideanSpace.proj j).smulRight |
| 1049 | ((EuclideanSpace.proj i).smulRight (EuclideanSpace.single l 1))) α) |
| 1050 | have hAeval (r : ℝ) (i j l : Fin n) : |
| 1051 | (((eA a) (TotalSpace.mk' FA x (A r x))).2 |
| 1052 | (EuclideanSpace.single j 1) (EuclideanSpace.single i 1)) l = |
| 1053 | (L (Acurve i j r)) l := by |
| 1054 | have hxhom : x ∈ (trivializationAt (V →L[ℝ] V) |
| 1055 | (fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) a).baseSet := by |
| 1056 | rw [hom_trivializationAt_baseSet] |
| 1057 | exact ⟨hx, hx⟩ |
| 1058 | dsimp [eA] |
| 1059 | rw [hom_trivializationAt_apply] |
| 1060 | dsimp only [Bundle.TotalSpace.mk'] |
| 1061 | rw [inCoordinates_apply_eq₂ |
| 1062 | (F₁ := V) (F₂ := V) (F₃ := V) |
| 1063 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 1064 | (E₃ := fun y : M => TangentSpace (𝓡 n) y) |
| 1065 | hx hx hx] |
| 1066 | rw [Trivialization.linearMapAt_apply, if_pos hx] |
| 1067 | rw [← Trivialization.continuousLinearMapAt_apply_of_mem ℝ e hx] |
| 1068 | dsimp [Acurve, E] |
| 1069 | rw [Trivialization.symmL_apply (R := ℝ) e hx, |
| 1070 | Trivialization.symmL_apply (R := ℝ) e hx] |
| 1071 | have hAmodel (i j l : Fin n) : |
| 1072 | (aCoord (EuclideanSpace.single j 1) (EuclideanSpace.single i 1)) l = |
| 1073 | (L (Acurve i j t)) l := by |
| 1074 | exact hAeval t i j l |
| 1075 | have hfrepr (r : ℝ) (α : Fin dA) : |
| 1076 | fA a α (r, z) = ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 1077 | θ α l j i * (L (Acurve i j r)) l := by |
| 1078 | dsimp only [fA] |
| 1079 | rw [tensor_coordinate_reconstruct qA |
| 1080 | (((eA a) (TotalSpace.mk' FA x (A r x))).2) α] |
| 1081 | apply Finset.sum_congr rfl |
| 1082 | intro l hl |
| 1083 | apply Finset.sum_congr rfl |
| 1084 | intro j hj |
| 1085 | apply Finset.sum_congr rfl |
| 1086 | intro i hi |
| 1087 | rw [hAeval] |
| 1088 | have hderivA (α : Fin dA) : |
| 1089 | HasDerivAt (fun r : ℝ => fA a α (r, z)) |
| 1090 | (∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 1091 | θ α l j i * (L (deriv (Acurve i j) t)) l) t := by |
| 1092 | have hterm (l j i : Fin n) : |
| 1093 | HasDerivAt (fun r : ℝ => θ α l j i * (L (Acurve i j r)) l) |
| 1094 | (θ α l j i * (L (deriv (Acurve i j) t)) l) t := by |
| 1095 | have hL := (hasDerivAt_const t L).clm_apply (hA_pair i j l).1 |
| 1096 | have hproj : HasDerivAt |
| 1097 | (fun r : ℝ => (EuclideanSpace.proj l) (L (Acurve i j r))) |
| 1098 | ((EuclideanSpace.proj l) (L (deriv (Acurve i j) t))) t := |
| 1099 | by |
| 1100 | simpa only [zero_apply, zero_add, add_zero] using |
| 1101 | (hasDerivAt_const t (EuclideanSpace.proj l)).clm_apply hL |
| 1102 | have hp := hproj.const_mul (θ α l j i) |
| 1103 | simpa [Function.comp_def, EuclideanSpace.coe_proj, |
| 1104 | ContinuousLinearMap.coe_coe] using hp |
| 1105 | have hs := HasDerivAt.sum (u := Finset.univ) (fun l _ => |
| 1106 | HasDerivAt.sum (u := Finset.univ) (fun j _ => |
| 1107 | HasDerivAt.sum (u := Finset.univ) (fun i _ => hterm l j i))) |
| 1108 | have hsumfun : |
| 1109 | (fun r : ℝ => ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 1110 | θ α l j i * (L (Acurve i j r)) l) = |
| 1111 | (∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 1112 | fun r : ℝ => θ α l j i * (L (Acurve i j r)) l) := by |
| 1113 | funext r |
| 1114 | simp only [Finset.sum_apply] |
| 1115 | rw [← hsumfun] at hs |
| 1116 | exact hs.congr_of_eventuallyEq |
| 1117 | (Filter.Eventually.of_forall (fun r => hfrepr r α)) |
| 1118 | have hderiv_coord (α : Fin dA) : |
| 1119 | fderiv ℝ (fA a α) (t, z) (1, 0) = |
| 1120 | ∑ l : Fin n, ∑ j : Fin n, ∑ i : Fin n, |
| 1121 | θ α l j i * (L (deriv (Acurve i j) t)) l := by |
| 1122 | have hfunα : DifferentiableAt ℝ (fA a α) (t, z) := by |
| 1123 | have h := (EuclideanSpace.proj α).differentiableAt.comp (t, z) hpointA |
| 1124 | simpa only [fA, Function.comp_def, EuclideanSpace.coe_proj] using h |
| 1125 | have hjointα := hfunα.hasFDerivAt.comp_hasDerivAt t hcurve |
| 1126 | exact hjointα.unique (hderivA α) |
| 1127 | have hsum : (∑ i : Fin dA, 2 * fA a i (t, z) * |
| 1128 | fderiv ℝ (fA a i) (t, z) (1, 0)) = |
| 1129 | ∑ i : Fin dA, 2 * fA a i (t, z) * |
| 1130 | (∑ l : Fin n, ∑ j : Fin n, ∑ k : Fin n, |
| 1131 | θ i l j k * (L (deriv (Acurve k j) t)) l) := by |
| 1132 | apply Finset.sum_congr rfl |
| 1133 | intro i hi |
| 1134 | have hd := hderiv_coord i |
| 1135 | simpa only using congrArg (fun q : ℝ => 2 * fA a i (t, z) * q) hd |
| 1136 | have hrprime (q : V) (hq : q ∈ (c a).target) (u v : V) : |
| 1137 | rmod' a (t, q) u v = (F'.connection t).ricci ((c a).symm q) |
| 1138 | (e.symmL ℝ ((c a).symm q) u) (e.symmL ℝ ((c a).symm q) v) := by |
| 1139 | let y := (c a).symm q |
| 1140 | have hy : y ∈ e.baseSet := hbaseT a hq |
| 1141 | let b := (PiLp.basisFun 2 ℝ (Fin n)).map (e.linearEquivAt ℝ y hy).symm |
| 1142 | have hbrepr (w : TangentSpace (𝓡 n) y) (k : Fin n) : |
| 1143 | b.repr w k = ((e.linearEquivAt ℝ y hy) w) k := by |
| 1144 | simp [b, Module.Basis.map_repr, PiLp.basisFun_repr] |
| 1145 | have hb (k : Fin n) : b k = E k y := by |
| 1146 | simp [b, E, Trivialization.symmL_apply _ hy] |
| 1147 | have heval (u v w : V) : |
| 1148 | (((eS a) (TotalSpace.mk' FS y (R' t y))).2) u v w = |
| 1149 | e.linearMapAt ℝ y (R' t y (e.symmL ℝ y u) |
| 1150 | (e.symmL ℝ y v) (e.symmL ℝ y w)) := by |
| 1151 | have hyhom : y ∈ (trivializationAt (V →L[ℝ] V) |
| 1152 | (fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) a).baseSet := by |
| 1153 | rw [hom_trivializationAt_baseSet] |
| 1154 | exact ⟨hy, hy⟩ |
| 1155 | dsimp only [eS] |
| 1156 | rw [hom_trivializationAt_apply] |
| 1157 | rw [inCoordinates_apply_eq₂ |
| 1158 | (F₁ := V) (F₂ := V) (F₃ := V →L[ℝ] V) |
| 1159 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 1160 | (E₃ := fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) |
| 1161 | hy hy hyhom] |
| 1162 | rw [Trivialization.linearMapAt_apply, if_pos hyhom, hom_trivializationAt_apply] |
| 1163 | change ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) V |
| 1164 | (TangentSpace (𝓡 n)) a y a y |
| 1165 | (R' t y (e.symm y u) (e.symm y v)) w = _ |
| 1166 | simp only [ContinuousLinearMap.inCoordinates, ContinuousLinearMap.comp_apply, |
| 1167 | Trivialization.continuousLinearMapAt_apply] |
| 1168 | rw [Trivialization.symmL_apply (R := ℝ) e hy u, |
| 1169 | Trivialization.symmL_apply (R := ℝ) e hy v, |
| 1170 | Trivialization.symmL_apply (R := ℝ) e hy w] |
| 1171 | change τ (((eS a) (TotalSpace.mk' FS y (R' t y))).2) u v = _ |
| 1172 | rw [hτ, ricci_eq_sum_basis_of_curvature_pairing (F'.connection t) y |
| 1173 | (e.symmL ℝ y u) (e.symmL ℝ y v) b] |
| 1174 | apply Finset.sum_congr rfl |
| 1175 | intro k hk |
| 1176 | rw [hb, hbrepr, heval, hR'] |
| 1177 | rw [e.linearMapAt_def_of_mem hy] |
| 1178 | rfl |
| 1179 | have hcp_eq (i j k : Fin n) : C' i j k = cp a (t, z) i j k := by |
| 1180 | have heq : (fun q => (F'.connection t).ricci ((c a).symm q) |
| 1181 | (E j ((c a).symm q)) (E k ((c a).symm q))) =ᶠ[𝓝 z] |
| 1182 | (fun q => rmod' a (t, q) (EuclideanSpace.single j 1) |
| 1183 | (EuclideanSpace.single k 1)) := by |
| 1184 | filter_upwards [(c a).open_target.mem_nhds hzChart] with q hq |
| 1185 | exact (hrprime q hq _ _).symm |
| 1186 | rw [hC', heq.fderiv_eq] |
| 1187 | dsimp only [cp] |
| 1188 | rw [hrprime z hzChart, hrprime z hzChart] |
| 1189 | change _ = _ - (F'.connection t).ricci x |
| 1190 | (e.symmL ℝ x (L ((F'.connection t).connection (E j) x (E i x)))) (E k x) - |
| 1191 | (F'.connection t).ricci x (E j x) |
| 1192 | (e.symmL ℝ x (L ((F'.connection t).connection (E k) x (E i x)))) |
| 1193 | rw [Trivialization.symmL_continuousLinearMapAt e hx, |
| 1194 | Trivialization.symmL_continuousLinearMapAt e hx] |
| 1195 | have hvp_eq (i j : Fin n) : GF'.inverse |
| 1196 | (∑ k : Fin n, (-C' i j k - C' j k i + C' k i j) • EuclideanSpace.proj k) = |
| 1197 | vp a (t, z) i j := by |
| 1198 | simp only [hcp_eq] |
| 1199 | rfl |
| 1200 | have hRicciModel (u v : TangentSpace (𝓡 n) x) : |
| 1201 | (F.connection t).ricci x u v - (F'.connection t).ricci x u v = |
| 1202 | τ (sbar z) (L u) (L v) := by |
| 1203 | rw [htrace z hzChart] |
| 1204 | rw [Trivialization.symmL_continuousLinearMapAt e hx, |
| 1205 | Trivialization.symmL_continuousLinearMapAt e hx] |
| 1206 | have hLE (i : Fin n) : L (E i x) = EuclideanSpace.single i 1 := |
| 1207 | Trivialization.continuousLinearMapAt_symmL e hx _ |
| 1208 | have hCfull (i j k : Fin n) : C i j k = |
| 1209 | (∑ β : Fin dS, sigma β (EuclideanSpace.single j 1) (EuclideanSpace.single k 1) * |
| 1210 | fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single i 1)) - |
| 1211 | (∑ β : Fin dS, fS a β (t, z) * sigma β (gamma a (t, z) i j) |
| 1212 | (EuclideanSpace.single k 1)) - |
| 1213 | (∑ β : Fin dS, fS a β (t, z) * sigma β (EuclideanSpace.single j 1) |
| 1214 | (gamma a (t, z) i k)) := by |
| 1215 | rw [hCexpand, hRicciModel, hRicciModel, hLE, hLE] |
| 1216 | rw [htrace_expand z hzChart, htrace_expand z hzChart] |
| 1217 | have hqcoord {d : ℕ} {T : Type} [NormedAddCommGroup T] [NormedSpace ℝ T] |
| 1218 | (q : T ≃L[ℝ] EuclideanSpace ℝ (Fin d)) (w : T) : |
| 1219 | w = ∑ β : Fin d, q w β • q.symm (EuclideanSpace.single β 1) := by |
| 1220 | let b := PiLp.basisFun 2 ℝ (Fin d) |
| 1221 | have hb : q w = ∑ β : Fin d, q w β • EuclideanSpace.single β 1 := by |
| 1222 | calc |
| 1223 | q w = ∑ β : Fin d, (b.repr (q w)) β • b β := (b.sum_repr (q w)).symm |
| 1224 | _ = _ := by |
| 1225 | apply Finset.sum_congr rfl |
| 1226 | intro β hβ |
| 1227 | simp [b, PiLp.basisFun_repr, PiLp.basisFun_apply] |
| 1228 | calc |
| 1229 | w = q.symm (q w) := (q.symm_apply_apply w).symm |
| 1230 | _ = q.symm (∑ β : Fin d, q w β • EuclideanSpace.single β 1) := congrArg q.symm hb |
| 1231 | _ = _ := by simp only [map_sum, map_smul] |
| 1232 | have hHexpand (i j k : Fin n) : |
| 1233 | Hmod (vp a (t, z) i j) (EuclideanSpace.single k 1) = |
| 1234 | ∑ β : Fin dH, fH a β (t, z) * |
| 1235 | (qH.symm (EuclideanSpace.single β 1)) (vp a (t, z) i j) |
| 1236 | (EuclideanSpace.single k 1) := by |
| 1237 | rw [hHmodel, hqcoord qH hCoord] |
| 1238 | simp only [sum_apply, smul_apply, smul_eq_mul] |
| 1239 | rfl |
| 1240 | have hRexpand (i j k : Fin n) : |
| 1241 | (F'.connection t).ricci x (Acurve i j t) (E k x) = |
| 1242 | ∑ β : Fin dA, fA a β (t, z) * rmod' a (t, z) |
| 1243 | ((qA.symm (EuclideanSpace.single β 1)) (EuclideanSpace.single j 1) |
| 1244 | (EuclideanSpace.single i 1)) (EuclideanSpace.single k 1) := by |
| 1245 | have haeval : aCoord (EuclideanSpace.single j 1) (EuclideanSpace.single i 1) = |
| 1246 | L (Acurve i j t) := by |
| 1247 | ext l |
| 1248 | exact hAmodel i j l |
| 1249 | have hh := hrprime z hzChart (L (Acurve i j t)) (EuclideanSpace.single k 1) |
| 1250 | rw [Trivialization.symmL_continuousLinearMapAt e hx] at hh |
| 1251 | rw [← hh, ← haeval, hqcoord qA aCoord] |
| 1252 | simp only [sum_apply, smul_apply, map_sum, map_smul, smul_eq_mul] |
| 1253 | rfl |
| 1254 | let d := fun β : Fin dS × Fin n => fderiv ℝ (fun q => fS a β.1 (t, q)) z |
| 1255 | (EuclideanSpace.single β.2 1) |
| 1256 | let dcoef := fun (β : Fin dS × Fin n) (i j k : Fin n) => |
| 1257 | -(if i = β.2 then sigma β.1 (EuclideanSpace.single j 1) |
| 1258 | (EuclideanSpace.single k 1) else 0) - |
| 1259 | (if j = β.2 then sigma β.1 (EuclideanSpace.single k 1) |
| 1260 | (EuclideanSpace.single i 1) else 0) + |
| 1261 | (if k = β.2 then sigma β.1 (EuclideanSpace.single i 1) |
| 1262 | (EuclideanSpace.single j 1) else 0) |
| 1263 | let hcoef := fun (β : Fin dH) (i j k : Fin n) => |
| 1264 | -(qH.symm (EuclideanSpace.single β 1)) (vp a (t, z) i j) (EuclideanSpace.single k 1) |
| 1265 | let acoef := fun (β : Fin dA) (i j k : Fin n) => 2 * rmod' a (t, z) |
| 1266 | ((qA.symm (EuclideanSpace.single β 1)) (EuclideanSpace.single j 1) |
| 1267 | (EuclideanSpace.single i 1)) (EuclideanSpace.single k 1) |
| 1268 | let scoef := fun (β : Fin dS) (i j k : Fin n) => |
| 1269 | sigma β (gamma a (t, z) i j) (EuclideanSpace.single k 1) + |
| 1270 | sigma β (EuclideanSpace.single j 1) (gamma a (t, z) i k) + |
| 1271 | sigma β (gamma a (t, z) j k) (EuclideanSpace.single i 1) + |
| 1272 | sigma β (EuclideanSpace.single k 1) (gamma a (t, z) j i) - |
| 1273 | sigma β (gamma a (t, z) k i) (EuclideanSpace.single j 1) - |
| 1274 | sigma β (EuclideanSpace.single i 1) (gamma a (t, z) k j) |
| 1275 | let lower : Fin n → Fin n → Fin n → ℝ := |
| 1276 | (∑ β : Fin dS × Fin n, d β • dcoef β) + |
| 1277 | (∑ β : Fin dH, fH a β (t, z) • hcoef β) + |
| 1278 | (∑ β : Fin dA, fA a β (t, z) • acoef β) + |
| 1279 | (∑ β : Fin dS, fS a β (t, z) • scoef β) |
| 1280 | have hselect (v : Fin dS × Fin n → ℝ) (w : Fin dS → ℝ) (i : Fin n) : |
| 1281 | (∑ β : Fin dS × Fin n, v β * (if i = β.2 then w β.1 else 0)) = |
| 1282 | ∑ β : Fin dS, w β * v (β, i) := by |
| 1283 | rw [Fintype.sum_prod_type] |
| 1284 | apply Finset.sum_congr rfl |
| 1285 | intro β hβ |
| 1286 | simp only [mul_ite, mul_zero, Fintype.sum_ite_eq] |
| 1287 | exact mul_comm _ _ |
| 1288 | have hdcoef (i j k : Fin n) : (∑ β : Fin dS × Fin n, d β * dcoef β i j k) = |
| 1289 | -(∑ β : Fin dS, sigma β (EuclideanSpace.single j 1) (EuclideanSpace.single k 1) * |
| 1290 | fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single i 1)) - |
| 1291 | (∑ β : Fin dS, sigma β (EuclideanSpace.single k 1) (EuclideanSpace.single i 1) * |
| 1292 | fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single j 1)) + |
| 1293 | (∑ β : Fin dS, sigma β (EuclideanSpace.single i 1) (EuclideanSpace.single j 1) * |
| 1294 | fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single k 1)) := by |
| 1295 | simp only [dcoef, mul_add, mul_sub, mul_neg, Finset.sum_add_distrib, |
| 1296 | Finset.sum_sub_distrib, Finset.sum_neg_distrib] |
| 1297 | rw [hselect d (fun β => sigma β (EuclideanSpace.single j 1) |
| 1298 | (EuclideanSpace.single k 1)) i, |
| 1299 | hselect d (fun β => sigma β (EuclideanSpace.single k 1) |
| 1300 | (EuclideanSpace.single i 1)) j, |
| 1301 | hselect d (fun β => sigma β (EuclideanSpace.single i 1) |
| 1302 | (EuclideanSpace.single j 1)) k] |
| 1303 | have hlower (i j k : Fin n) : |
| 1304 | -C i j k - C j k i + C k i j + |
| 1305 | 2 * (F'.connection t).ricci x (Acurve i j t) (E k x) - |
| 1306 | Hmod (GF'.inverse (∑ l : Fin n, |
| 1307 | (-C' i j l - C' j l i + C' l i j) • EuclideanSpace.proj l)) |
| 1308 | (EuclideanSpace.single k 1) = lower i j k := by |
| 1309 | rw [hCfull, hCfull, hCfull, hRexpand, hvp_eq, hHexpand] |
| 1310 | simp only [lower, Pi.add_apply, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] |
| 1311 | rw [hdcoef] |
| 1312 | simp only [hcoef, acoef, scoef, mul_add, mul_sub, mul_neg, |
| 1313 | Finset.sum_add_distrib, Finset.sum_sub_distrib, Finset.sum_neg_distrib] |
| 1314 | simp only [Finset.mul_sum] |
| 1315 | simp only [mul_left_comm (2 : ℝ), mul_assoc] |
| 1316 | ring |
| 1317 | have hfactor (α : Fin dA) : |
| 1318 | fderiv ℝ (fA a α) (t, z) (1, 0) = |
| 1319 | (∑ β : Fin dS × Fin n, cd a (t, z) α β * d β) + |
| 1320 | (∑ β : Fin dH, ch a (t, z) α β * fH a β (t, z)) + |
| 1321 | (∑ β : Fin dA, ca a (t, z) α β * fA a β (t, z)) + |
| 1322 | (∑ β : Fin dS, cs a (t, z) α β * fS a β (t, z)) := by |
| 1323 | let T : (Fin n → Fin n → Fin n → ℝ) →ₗ[ℝ] ℝ := |
| 1324 | { toFun := combine a (t, z) α |
| 1325 | map_add' := by |
| 1326 | intro u v |
| 1327 | simp only [combine, Pi.add_apply, mul_add, Finset.sum_add_distrib] |
| 1328 | map_smul' := by |
| 1329 | intro r v |
| 1330 | simp only [combine, Pi.smul_apply, RingHom.id_apply, smul_eq_mul, |
| 1331 | Finset.mul_sum] |
| 1332 | apply Finset.sum_congr rfl |
| 1333 | intro l hl |
| 1334 | apply Finset.sum_congr rfl |
| 1335 | intro j hj |
| 1336 | apply Finset.sum_congr rfl |
| 1337 | intro i hi |
| 1338 | apply Finset.sum_congr rfl |
| 1339 | intro k hk |
| 1340 | ring } |
| 1341 | have hcalc : fderiv ℝ (fA a α) (t, z) (1, 0) = T lower := by |
| 1342 | rw [hderiv_coord] |
| 1343 | dsimp only [T, LinearMap.coe_mk, AddHom.coe_mk, combine] |
| 1344 | apply Finset.sum_congr rfl |
| 1345 | intro l hl |
| 1346 | apply Finset.sum_congr rfl |
| 1347 | intro j hj |
| 1348 | apply Finset.sum_congr rfl |
| 1349 | intro i hi |
| 1350 | rw [hAnative] |
| 1351 | simp only [hlower] |
| 1352 | change theta α l j i * (EuclideanSpace.proj l) |
| 1353 | (GF.inverse (∑ k : Fin n, lower i j k • EuclideanSpace.proj k)) = _ |
| 1354 | simp only [map_sum, map_smul, smul_eq_mul, Finset.mul_sum] |
| 1355 | apply Finset.sum_congr rfl |
| 1356 | intro k hk |
| 1357 | change theta α l j i * |
| 1358 | (lower i j k * ((gmod F.metric a (t, z)).inverse (EuclideanSpace.proj k)) l) = _ |
| 1359 | ring |
| 1360 | rw [hcalc] |
| 1361 | dsimp only [lower] |
| 1362 | simp only [map_add, map_sum, map_smul, smul_eq_mul] |
| 1363 | change (∑ β : Fin dS × Fin n, d β * cd a (t, z) α β) + |
| 1364 | (∑ β : Fin dH, fH a β (t, z) * ch a (t, z) α β) + |
| 1365 | (∑ β : Fin dA, fA a β (t, z) * ca a (t, z) α β) + |
| 1366 | (∑ β : Fin dS, fS a β (t, z) * cs a (t, z) α β) = _ |
| 1367 | simp only [mul_comm] |
| 1368 | have hyoung {I D : Type} [Fintype I] [Fintype D] |
| 1369 | (c : I → D → ℝ) (u : I → ℝ) (v : D → ℝ) |
| 1370 | {δ B : ℝ} (hδ : 0 < δ) (hB : 0 ≤ B) |
| 1371 | (hc : (∑ i, ∑ j, (c i j) ^ 2) ≤ B) : |
| 1372 | (∑ i, 2 * u i * (∑ j, c i j * v j)) ≤ |
| 1373 | δ * (∑ j, (v j) ^ 2) + (B / δ) * (∑ i, (u i) ^ 2) := by |
| 1374 | let U₂ := ∑ i, (u i) ^ 2 |
| 1375 | let V₂ := ∑ j, (v j) ^ 2 |
| 1376 | let P := ∑ i, u i * (∑ j, c i j * v j) |
| 1377 | have hU : 0 ≤ U₂ := by dsimp [U₂]; positivity |
| 1378 | have hV : 0 ≤ V₂ := by dsimp [V₂]; positivity |
| 1379 | have hcross : P ^ 2 ≤ U₂ * (∑ i, (∑ j, c i j * v j) ^ 2) := by |
| 1380 | simpa only [mul_comm] using (Finset.sum_mul_sq_le_sq_mul_sq |
| 1381 | (s := Finset.univ) (f := u) (g := fun i => ∑ j, c i j * v j)) |
| 1382 | have hcoeff : (∑ i, (∑ j, c i j * v j) ^ 2) ≤ B * V₂ := by |
| 1383 | calc |
| 1384 | _ ≤ ∑ i, (∑ j, (c i j) ^ 2) * V₂ := by |
| 1385 | apply Finset.sum_le_sum |
| 1386 | intro i hi |
| 1387 | simpa only [mul_comm] using (Finset.sum_mul_sq_le_sq_mul_sq |
| 1388 | (s := Finset.univ) (f := c i) (g := v)) |
| 1389 | _ = (∑ i, ∑ j, (c i j) ^ 2) * V₂ := by rw [← Finset.sum_mul] |
| 1390 | _ ≤ B * V₂ := mul_le_mul_of_nonneg_right hc hV |
| 1391 | have hP : 2 * P ≤ δ * V₂ + (B / δ) * U₂ := by |
| 1392 | by_cases hV0 : V₂ = 0 |
| 1393 | · have hP0 : P = 0 := by |
| 1394 | have hnorm : ∑ i, (∑ j, c i j * v j) ^ 2 = 0 := by |
| 1395 | exact le_antisymm (by simpa [hV0] using hcoeff) (by positivity) |
| 1396 | have hi : ∀ i, ∑ j, c i j * v j = 0 := by |
| 1397 | intro i |
| 1398 | exact sq_eq_zero_iff.mp ((Finset.sum_eq_zero_iff_of_nonneg |
| 1399 | (s := Finset.univ) (fun i _ => sq_nonneg (∑ j, c i j * v j))).mp hnorm |
| 1400 | i (Finset.mem_univ i)) |
| 1401 | simp [P, hi] |
| 1402 | simp only [hV0, hP0, mul_zero, zero_add] |
| 1403 | exact mul_nonneg (div_nonneg hB (le_of_lt hδ)) hU |
| 1404 | · have hVp : 0 < V₂ := lt_of_le_of_ne hV (Ne.symm hV0) |
| 1405 | have hY : 2 * P ≤ δ * V₂ + P ^ 2 / (δ * V₂) := by |
| 1406 | have hh := sq_nonneg (δ * V₂ - P) |
| 1407 | field_simp |
| 1408 | nlinarith |
| 1409 | have hQ : P ^ 2 / (δ * V₂) ≤ (B / δ) * U₂ := by |
| 1410 | apply (div_le_iff₀ (mul_pos hδ hVp)).mpr |
| 1411 | calc |
| 1412 | P ^ 2 ≤ U₂ * (∑ i, (∑ j, c i j * v j) ^ 2) := hcross |
| 1413 | _ ≤ U₂ * (B * V₂) := mul_le_mul_of_nonneg_left hcoeff hU |
| 1414 | _ = (B / δ) * U₂ * (δ * V₂) := by field_simp |
| 1415 | exact hY.trans (by nlinarith) |
| 1416 | simpa [U₂, V₂, P, Finset.mul_sum, mul_assoc, mul_left_comm, mul_comm] using hP |
| 1417 | let remCoeff : Fin dA → Fin dH ⊕ (Fin dA ⊕ Fin dS) → ℝ := fun α => |
| 1418 | Sum.elim (ch a (t, z) α) (Sum.elim (ca a (t, z) α) (cs a (t, z) α)) |
| 1419 | let remValue : Fin dH ⊕ (Fin dA ⊕ Fin dS) → ℝ := |
| 1420 | Sum.elim (fun β => fH a β (t, z)) |
| 1421 | (Sum.elim (fun β => fA a β (t, z)) (fun β => fS a β (t, z))) |
| 1422 | have hcoeff := hBbound a ha (show (t, z) ∈ K ×ˢ Q a from ⟨interior_subset ht, hz⟩) |
| 1423 | have hnonnegD : 0 ≤ ∑ α : Fin dA, ∑ β : Fin dS × Fin n, (cd a (t, z) α β) ^ 2 := by |
| 1424 | positivity |
| 1425 | have hnonnegH : 0 ≤ ∑ α : Fin dA, ∑ β : Fin dH, (ch a (t, z) α β) ^ 2 := by |
| 1426 | positivity |
| 1427 | have hnonnegA : 0 ≤ ∑ α : Fin dA, ∑ β : Fin dA, (ca a (t, z) α β) ^ 2 := by |
| 1428 | positivity |
| 1429 | have hnonnegS : 0 ≤ ∑ α : Fin dA, ∑ β : Fin dS, (cs a (t, z) α β) ^ 2 := by |
| 1430 | positivity |
| 1431 | have hcD : (∑ α : Fin dA, ∑ β : Fin dS × Fin n, (cd a (t, z) α β) ^ 2) ≤ B := by |
| 1432 | dsimp only [coeffSq] at hcoeff |
| 1433 | linarith |
| 1434 | have hcR : (∑ α : Fin dA, ∑ β, (remCoeff α β) ^ 2) ≤ B := by |
| 1435 | simp only [remCoeff, Fintype.sum_sum_type, Sum.elim_inl, Sum.elim_inr, |
| 1436 | Finset.sum_add_distrib] |
| 1437 | dsimp only [coeffSq] at hcoeff |
| 1438 | linarith |
| 1439 | have hprincipal := hyoung (cd a (t, z)) (fun α => fA a α (t, z)) d hε hB hcD |
| 1440 | have hremainder := hyoung remCoeff (fun α => fA a α (t, z)) remValue |
| 1441 | (δ := 1) (by norm_num) hB hcR |
| 1442 | simp only [remCoeff, remValue, Fintype.sum_sum_type, Sum.elim_inl, Sum.elim_inr, |
| 1443 | one_mul, div_one, ← add_assoc] at hremainder |
| 1444 | have hrateSum : (∑ α : Fin dA, 2 * fA a α (t, z) * |
| 1445 | fderiv ℝ (fA a α) (t, z) (1, 0)) = |
| 1446 | (∑ α : Fin dA, 2 * fA a α (t, z) * |
| 1447 | (∑ β : Fin dS × Fin n, cd a (t, z) α β * d β)) + |
| 1448 | (∑ α : Fin dA, 2 * fA a α (t, z) * |
| 1449 | ((∑ β : Fin dH, ch a (t, z) α β * fH a β (t, z)) + |
| 1450 | (∑ β : Fin dA, ca a (t, z) α β * fA a β (t, z)) + |
| 1451 | (∑ β : Fin dS, cs a (t, z) α β * fS a β (t, z)))) := by |
| 1452 | simp only [hfactor, mul_add, Finset.sum_add_distrib] |
| 1453 | ring |
| 1454 | have hH0 : 0 ≤ ∑ β : Fin dH, (fH a β (t, z)) ^ 2 := by positivity |
| 1455 | have hA0 : 0 ≤ ∑ β : Fin dA, (fA a β (t, z)) ^ 2 := by positivity |
| 1456 | have hS0 : 0 ≤ ∑ β : Fin dS, (fS a β (t, z)) ^ 2 := by positivity |
| 1457 | have hden : (∑ β : Fin dA, (fA a β (t, z)) ^ 2) ≤ |
| 1458 | (∑ β : Fin dH, (fH a β (t, z)) ^ 2) + |
| 1459 | (∑ β : Fin dA, (fA a β (t, z)) ^ 2) + |
| 1460 | (∑ β : Fin dS, (fS a β (t, z)) ^ 2) := by linarith |
| 1461 | have hdens0 : 0 ≤ (∑ β : Fin dH, (fH a β (t, z)) ^ 2) + |
| 1462 | (∑ β : Fin dA, (fA a β (t, z)) ^ 2) + |
| 1463 | (∑ β : Fin dS, (fS a β (t, z)) ^ 2) := by positivity |
| 1464 | have hpbound := mul_le_mul (div_le_div_of_nonneg_right |
| 1465 | (show B ≤ B + 1 by linarith) (le_of_lt hε)) hden hA0 |
| 1466 | (by positivity : 0 ≤ (B + 1) / ε) |
| 1467 | have hrbound := mul_le_mul_of_nonneg_left hden hB |
| 1468 | change (∑ α : Fin dA, 2 * fA a α (t, z) * |
| 1469 | fderiv ℝ (fA a α) (t, z) (1, 0)) ≤ |
| 1470 | ε * (∑ β : Fin dS, ∑ j : Fin n, |
| 1471 | (fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single j 1)) ^ 2) + |
| 1472 | ((B + 1) / ε + (B + 1)) * |
| 1473 | ((∑ β : Fin dH, (fH a β (t, z)) ^ 2) + |
| 1474 | (∑ β : Fin dA, (fA a β (t, z)) ^ 2) + |
| 1475 | (∑ β : Fin dS, (fS a β (t, z)) ^ 2)) |
| 1476 | rw [hrateSum] |
| 1477 | have hgrad : (∑ β : Fin dS × Fin n, (d β) ^ 2) = |
| 1478 | ∑ β : Fin dS, ∑ j : Fin n, |
| 1479 | (fderiv ℝ (fun q => fS a β (t, q)) z (EuclideanSpace.single j 1)) ^ 2 := by |
| 1480 | simp only [d, Fintype.sum_prod_type] |
| 1481 | rw [hgrad] at hprincipal |
| 1482 | nlinarith only [hprincipal, hremainder, hpbound, hrbound] |
| 1483 | |
| 1484 | end PoincareMT.RicciFlow.Local |