import PoincareLib.Geometry.RicciFlow.Curvature.Calculus import PoincareLib.Geometry.RicciFlow.Harnack.Regularity import Mathlib.Geometry.Manifold.MFDeriv.NormedSpace /-! # Scalar curvature along manifold paths The spacetime chain rule splits the derivative along a path into its time derivative and spatial differential. For scalar curvature, joint smoothness is supplied by `RicciFlowCurvatureCalculus.scalar_regular`; only interior times require ambient derivatives. These are calculus lemmas supporting the differentiation along a spacetime path in the proof of Morgan--Tian, Theorem 4.40, not the Harnack inequality itself. Reference: *Ricci Flow and the Poincare Conjecture*, arXiv:math/0607607v2 (2007), Chapter 4, Section 5.2, proof of Theorem 4.40, p. 106. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff Bundle universe u namespace Poincare.Geometry.RicciFlow.Harnack variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] omit [IsManifold (๐“ก n) โˆž M] in set_option backward.isDefEq.respectTransparency false in theorem hasDerivAt_comp_manifold_spacetimePath {f : โ„ ร— M โ†’ โ„} {ฮณ : โ„ โ†’ M} {t : โ„} (hf : MDifferentiableAt ((๐“˜(โ„, โ„)).prod (๐“ก n)) (๐“˜(โ„, โ„)) f (t, ฮณ t)) (hฮณ : MDifferentiableAt (๐“˜(โ„, โ„)) (๐“ก n) ฮณ t) : HasDerivAt (fun s โ†ฆ f (s, ฮณ s)) (deriv (fun s โ†ฆ f (s, ฮณ t)) t + mvfderiv (๐“ก n) (fun x โ†ฆ f (t, x)) (ฮณ t) (mfderiv (๐“˜(โ„, โ„)) (๐“ก n) ฮณ t 1)) t := by have hpath := (hasMFDerivAt_id (I := ๐“˜(โ„, โ„)) t).prodMk hฮณ.hasMFDerivAt have h := (hf.hasMFDerivAt.comp t hpath).hasFDerivAt.hasDerivAt change HasDerivAt (fun s โ†ฆ f (s, ฮณ s)) (mfderiv ((๐“˜(โ„, โ„)).prod (๐“ก n)) (๐“˜(โ„, โ„)) f (t, ฮณ t) (1, mfderiv (๐“˜(โ„, โ„)) (๐“ก n) ฮณ t 1)) t at h rw [mfderiv_prod_eq_add_apply hf] at h simpa only [mfderiv_eq_fderiv, fderiv_apply_one_eq_deriv, mvfderiv, ContinuousLinearMap.comp_apply] using! h theorem scalarCurvature_hasDerivAt_path {J : Set โ„} (hM04 : PoincareMT.RicciFlowCurvatureCalculus.{u}) (F : PoincareMT.RicciFlow n M J) {a b : โ„} (hJ : Icc a b โІ J) (ฮณ : โ„ โ†’ M) (hฮณ : ContMDiffOn (๐“˜(โ„, โ„)) (๐“ก n) 1 ฮณ (Icc a b)) {t : โ„} (ht : t โˆˆ Ioo a b) : HasDerivAt (fun s โ†ฆ (F.connection s).scalarCurvature (ฮณ s)) (deriv (fun s โ†ฆ (F.connection s).scalarCurvature (ฮณ t)) t + mvfderiv (๐“ก n) (F.connection t).scalarCurvature (ฮณ t) (mfderiv (๐“˜(โ„, โ„)) (๐“ก n) ฮณ t 1)) t := by have hJnhds : J โˆˆ nhds t := Filter.mem_of_superset (Icc_mem_nhds ht.1 ht.2) hJ apply hasDerivAt_comp_manifold_spacetimePath (f := fun p : โ„ ร— M โ†ฆ (F.connection p.1).scalarCurvature p.2) (ฮณ := ฮณ) ยท exact ((hM04.scalar_regular n M J F).mdifferentiableOn (by simp) (t, ฮณ t) โŸจhJ (Ioo_subset_Icc_self ht), mem_univ _โŸฉ).mdifferentiableAt (prod_mem_nhds hJnhds Filter.univ_mem) ยท exact (hฮณ.mdifferentiableOn (by simp) t (Ioo_subset_Icc_self ht)).mdifferentiableAt (Icc_mem_nhds ht.1 ht.2) end Poincare.Geometry.RicciFlow.Harnack