import PoincareLib.Geometry.RicciFlow.Limit.CoordinateTime import PoincareLib.Analysis.Calculus.SpatialJets import Mathlib.Topology.UniformSpace.UniformConvergence /-! # Spatial and time derivatives from scalar spacetime metric jets Joint smoothness of the actual metric family makes the chart coefficients smooth. Restriction of their spacetime derivatives to spatial and time directions supplies the hypotheses for the Ricci-flow limit equation. Reference: Morgan--Tian, Proposition 5.14, pp. 90--91. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open scoped Manifold ContDiff Bundle Topology open Set Filter Bundle namespace PoincareMT.RiemannianMetric variable {n : โ„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] private theorem contDiffAt_family_pullback_inner {J : Set โ„} {g : โ„ โ†’ RiemannianMetric n M} (hg : IsSmoothFamilyOn g J) {f : โ„ ร— EuclideanSpace โ„ (Fin n) โ†’ M} {p : โ„ ร— EuclideanSpace โ„ (Fin n)} (hJ : J โˆˆ ๐“ p.1) (hf : ContMDiffAt ๐“˜(โ„, โ„ ร— EuclideanSpace โ„ (Fin n)) (๐“ก n) โˆž f p) (v w : โ„ ร— EuclideanSpace โ„ (Fin n)) : ContDiffAt โ„ โˆž (fun z => (g z.1).inner (f z) (mfderiv ๐“˜(โ„, โ„ ร— EuclideanSpace โ„ (Fin n)) (๐“ก n) f z v) (mfderiv ๐“˜(โ„, โ„ ร— EuclideanSpace โ„ (Fin n)) (๐“ก n) f z w)) p := by have hdom : J ร—หข (univ : Set M) โˆˆ ๐“ (p.1, f p) := prod_mem_nhds hJ Filter.univ_mem have hfst : ContMDiffAt ๐“˜(โ„, โ„ ร— EuclideanSpace โ„ (Fin n)) ๐“˜(โ„, โ„) โˆž (fun z : โ„ ร— EuclideanSpace โ„ (Fin n) => z.1) p := contDiffAt_fst.contMDiffAt have hmetric := (hg.contMDiffAt hdom).comp p (hfst.prodMk hf) have h := hmetric.clm_bundle_applyโ‚‚ (Fโ‚ƒ := โ„) (Eโ‚ƒ := Bundle.Trivial M โ„) (contMDiffAt_mfderiv_const_vector hf v) (contMDiffAt_mfderiv_const_vector hf w) have hh := (Bundle.contMDiffAt_totalSpace.mp h).2 simp at hh convert! contMDiffAt_iff_contDiffAt.mp hh using 1 /-- Actual scalar chart coefficients of a smooth metric family are jointly smooth on the open spacetime chart domain. -/ theorem IsSmoothFamilyOn.contDiffAt_spacetime_chart_coefficient {J : Set โ„} {g : โ„ โ†’ RiemannianMetric n M} (hg : IsSmoothFamilyOn g J) (hJ : IsOpen J) (q : M) {p : โ„ ร— EuclideanSpace โ„ (Fin n)} (ht : p.1 โˆˆ J) (hp : p.2 โˆˆ (extChartAt (๐“ก n) q).target) (a b : Fin n) : ContDiffAt โ„ โˆž (fun z : โ„ ร— EuclideanSpace โ„ (Fin n) => (g z.1).pullbackCoefficients (extChartAt (๐“ก n) q).symm z.2 (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) p := by let c := extChartAt (๐“ก n) q let f : โ„ ร— EuclideanSpace โ„ (Fin n) โ†’ M := fun z => c.symm z.2 have hf {z : โ„ ร— EuclideanSpace โ„ (Fin n)} (hz : z.2 โˆˆ c.target) : ContMDiffAt ๐“˜(โ„, โ„ ร— EuclideanSpace โ„ (Fin n)) (๐“ก n) โˆž f z := by have hc := (contMDiffWithinAt_extChartAt_symm_target (n := โˆž) q hz).contMDiffAt (extChartAt_target_mem_nhds' hz) exact hc.comp z contDiffAt_snd.contMDiffAt apply (contDiffAt_family_pullback_inner hg (hJ.mem_nhds ht) (hf hp) (0, EuclideanSpace.basisFun (Fin n) โ„ a) (0, EuclideanSpace.basisFun (Fin n) โ„ b)).congr_of_eventuallyEq filter_upwards [continuousAt_snd.preimage_mem_nhds (extChartAt_target_mem_nhds' hp)] with z hz have ha := mfderiv_slice_apply ((hf hz).mdifferentiableAt (by simp)) (EuclideanSpace.basisFun (Fin n) โ„ a) have hb := mfderiv_slice_apply ((hf hz).mdifferentiableAt (by simp)) (EuclideanSpace.basisFun (Fin n) โ„ b) rw [โ† ha, โ† hb] rfl private theorem tendsto_spatial_slice_jet {E : Type*} [NormedAddCommGroup E] [NormedSpace โ„ E] {ฮฑ : Type*} {l : Filter ฮฑ} {fseq : ฮฑ โ†’ โ„ ร— E โ†’ โ„} {f : โ„ ร— E โ†’ โ„} {t : โ„} {x : E} (hseq : โˆ€ k, ContDiffAt โ„ โˆž (fseq k) (t, x)) (hf : ContDiffAt โ„ โˆž f (t, x)) (r : โ„•) (h : Tendsto (fun k => iteratedFDeriv โ„ r (fseq k) (t, x)) l (๐“ (iteratedFDeriv โ„ r f (t, x)))) : Tendsto (fun k => iteratedFDeriv โ„ r (fun y => fseq k (t, y)) x) l (๐“ (iteratedFDeriv โ„ r (fun y => f (t, y)) x)) := by let P := ContinuousMultilinearMap.compContinuousLinearMapL (๐•œ := โ„) (F := โ„) (fun _ : Fin r => ContinuousLinearMap.inr โ„ โ„ E) have hs (F : โ„ ร— E โ†’ โ„) (hF : ContDiffAt โ„ โˆž F (t, x)) : iteratedFDeriv โ„ r (fun y => F (t, y)) x = P (iteratedFDeriv โ„ r F (t, x)) := by ext v exact Poincare.Analysis.iteratedFDeriv_spatial_slice F hF r v simpa only [hs _ hf, hs _ (hseq _), Function.comp_def] using P.continuous.continuousAt.tendsto.comp h private theorem deriv_time_slice_eq {E : Type*} [NormedAddCommGroup E] [NormedSpace โ„ E] {f : โ„ ร— E โ†’ โ„} {t : โ„} {x : E} (hf : ContDiffAt โ„ โˆž f (t, x)) : deriv (fun s => f (s, x)) t = iteratedFDeriv โ„ 1 f (t, x) (fun _ => (1, 0)) := by have hs : HasDerivAt (fun s : โ„ => (s, x)) (1, 0) t := (hasDerivAt_id t).prodMk (hasDerivAt_const t x) simpa only [Function.comp_def, iteratedFDeriv_one_apply] using ((hf.differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t hs).deriv /-- Pointwise full spacetime scalar jets supply both spatial jets and the actual time derivatives of the scalar coordinate coefficients. -/ theorem spatial_and_time_jets_of_spacetime_jets {ฮฑ : Type*} {l : Filter ฮฑ} {J : Set โ„} (gseq : ฮฑ โ†’ โ„ โ†’ RiemannianMetric n M) (g : โ„ โ†’ RiemannianMetric n M) (hseq : โˆ€ k, IsSmoothFamilyOn (gseq k) J) (hg : IsSmoothFamilyOn g J) (hJ : IsOpen J) {t : โ„} (ht : t โˆˆ J) (x : M) (h : โˆ€ r : โ„•, r โ‰ค 2 โ†’ โˆ€ a b : Fin n, Tendsto (fun k => iteratedFDeriv โ„ r (fun z : โ„ ร— EuclideanSpace โ„ (Fin n) => (gseq k z.1).pullbackCoefficients (extChartAt (๐“ก n) x).symm z.2 (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) (t, extChartAt (๐“ก n) x x)) l (๐“ (iteratedFDeriv โ„ r (fun z : โ„ ร— EuclideanSpace โ„ (Fin n) => (g z.1).pullbackCoefficients (extChartAt (๐“ก n) x).symm z.2 (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) (t, extChartAt (๐“ก n) x x)))) : (โˆ€ r : โ„•, r โ‰ค 2 โ†’ โˆ€ a b : Fin n, Tendsto (fun k => iteratedFDeriv โ„ r (fun y => (gseq k t).pullbackCoefficients (extChartAt (๐“ก n) x).symm y (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) (extChartAt (๐“ก n) x x)) l (๐“ (iteratedFDeriv โ„ r (fun y => (g t).pullbackCoefficients (extChartAt (๐“ก n) x).symm y (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) (extChartAt (๐“ก n) x x)))) โˆง (โˆ€ a b : Fin n, Tendsto (fun k => deriv (fun s => (gseq k s).pullbackCoefficients (extChartAt (๐“ก n) x).symm (extChartAt (๐“ก n) x x) (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) t) l (๐“ (deriv (fun s => (g s).pullbackCoefficients (extChartAt (๐“ก n) x).symm (extChartAt (๐“ก n) x x) (EuclideanSpace.basisFun (Fin n) โ„ a) (EuclideanSpace.basisFun (Fin n) โ„ b)) t))) := by have hreg (G : โ„ โ†’ RiemannianMetric n M) (hG : IsSmoothFamilyOn G J) (a b : Fin n) := hG.contDiffAt_spacetime_chart_coefficient hJ x (p := (t, extChartAt (๐“ก n) x x)) ht (mem_extChartAt_target x) a b constructor ยท intro r hr a b exact tendsto_spatial_slice_jet (fun k => hreg (gseq k) (hseq k) a b) (hreg g hg a b) r (h r hr a b) ยท intro a b have h' := (continuous_eval_const (fun _ : Fin 1 => (1, (0 : EuclideanSpace โ„ (Fin n))))).continuousAt.tendsto.comp (h 1 (by omega) a b) simpa only [Function.comp_def, โ† deriv_time_slice_eq (hreg g hg a b), โ† deriv_time_slice_eq (hreg (gseq _) (hseq _) a b)] using h' /-- Compact-uniform convergence of a scalar jet implies convergence at every interior point, by taking the singleton compact set. -/ theorem tendsto_spacetime_jet_of_compact_uniform {E : Type*} [NormedAddCommGroup E] [NormedSpace โ„ E] {ฮฑ : Type*} {l : Filter ฮฑ} {fseq : ฮฑ โ†’ E โ†’ โ„} {f : E โ†’ โ„} {S : Set E} (r : โ„•) (h : โˆ€ K : Set E, IsCompact K โ†’ K โІ S โ†’ TendstoUniformlyOn (fun k y => iteratedFDeriv โ„ r (fseq k) y) (fun y => iteratedFDeriv โ„ r f y) l K) {p : E} (hp : p โˆˆ S) : Tendsto (fun k => iteratedFDeriv โ„ r (fseq k) p) l (๐“ (iteratedFDeriv โ„ r f p)) := (h {p} isCompact_singleton (singleton_subset_iff.mpr hp)).tendsto_at (mem_singleton p) end PoincareMT.RiemannianMetric