import PoincareLib.Geometry.RicciFlow.Curvature.Calculus import PoincareLib.Geometry.RicciFlow.Harnack.Matrix.Spacetime import PoincareLib.Geometry.Riemannian.Hessian.Tensor import PoincareLib.Geometry.Riemannian.Tensor.Product import PoincareLib.Geometry.Riemannian.Tensor.TraceRegularity /-! # Joint regularity of Hamilton's two-tensor The Ricci evolution expresses Hamilton's two-tensor as the time derivative of Ricci, minus half the scalar Hessian, plus the Ricci square and reciprocal time term. Every summand is jointly smooth away from the initial time. This supplies continuity for the first-contact argument in Chow et al., Part II, Section 15.4.5, printed pp. 282-287. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open scoped Manifold ContDiff Bundle Topology BigOperators open Set Filter universe u namespace Poincare.RicciFlow.Harnack open PoincareMT variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} /-- The scalar Hessian is jointly smooth on locally smooth fixed fields. -/ lemma contMDiffAt_hessian_scalarCurvature_fields (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) {x : M} {X : Fin 2 β†’ (y : M) β†’ TangentSpace (𝓑 n) y} (hX : βˆ€ i, ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X i)) x) : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => (F.connection p.1).hessian (F.connection p.1).scalarCurvature p.2 (X 0 p.2) (X 1 p.2)) (t, x) := by have hspace (s : ℝ) : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (F.connection s).scalarCurvature := by intro y have h := ((hC.tensor_calculus n M (F.metric s) (F.connection s)).2.1.tensorTrace (g := F.metric s)).contMDiffAt_apply (x := y) (X := fun i : Fin 0 => Fin.elim0 i) (fun i => Fin.elim0 i) convert h using 1 funext z unfold RiemannianMetric.tensorTrace LeviCivitaData.scalarCurvature apply Finset.sum_congr rfl intro i _ rfl have hscalar : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => (F.connection p.1).scalarCurvature p.2) (t, x) := (hC.scalar_regular n M J F (t, x) ⟨interior_subset ht, mem_univ x⟩).contMDiffAt (prod_mem_nhds (mem_interior_iff_mem_nhds.mp ht) Filter.univ_mem) have hreg (Y : Fin 1 β†’ (y : M) β†’ TangentSpace (𝓑 n) y) (hY : βˆ€ i, ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (Y i)) x) : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => differentialEvaluation (F.connection p.1).scalarCurvature p.2 (fun i => Y i p.2)) (t, x) := by change ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => mvfderiv (𝓑 n) (F.connection p.1).scalarCurvature p.2 (Y 0 p.2)) (t, x) exact Poincare.Manifold.contMDiffAt_mvfderiv_spatial (I := 𝓑 n) (f := fun p : ℝ Γ— M => (F.connection p.1).scalarCurvature p.2) (X := Y 0) hscalar (hY 0) have h := F.contMDiffAt_covariantTensorDerivative_fields (k := 1) (X := X) (T := fun s => differentialEvaluation (F.connection s).scalarCurvature) ht (fun s => differentialEvaluation_isSmooth (hspace s)) hreg hX convert h using 1 funext p rw [LeviCivitaData.hessian_eq_covariantTensorDerivative] congr 1 ext i fin_cases i <;> rfl /-- The Ricci-square contraction is jointly smooth without choosing a spacetime-smooth orthonormal basis. -/ lemma contMDiffAt_ricciSquare_fields (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) {x : M} {X : Fin 2 β†’ (y : M) β†’ TangentSpace (𝓑 n) y} (hX : βˆ€ i, ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X i)) x) : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => βˆ‘ i, (F.connection p.1).ricci p.2 (X 0 p.2) ((F.metric p.1).orthonormalBasis p.2 i) * (F.connection p.1).ricci p.2 ((F.metric p.1).orthonormalBasis p.2 i) (X 1 p.2)) (t, x) := by let Οƒ : Equiv.Perm (Fin 4) := Equiv.ofBijective ![2, 0, 1, 3] (by decide) let S : ℝ β†’ CovariantTensorEvaluation n M 4 := fun s y z => tensorProduct (F.connection s).ricciEvaluation (F.connection s).ricciEvaluation y (z ∘ Οƒ) have hS (s : ℝ) : IsSmoothCovariantTensor (S s) := (isSmoothCovariantTensor_tensorProduct (hC.tensor_calculus n M (F.metric s) (F.connection s)).2.1 (hC.tensor_calculus n M (F.metric s) (F.connection s)).2.1).perm Οƒ have h := F.contMDiffAt_tensorTrace_fields (T := S) ht hS (fun Y hY => (F.contMDiffAt_ricci_fields ht (hY (Οƒ 0)) (hY (Οƒ 1))).mul (F.contMDiffAt_ricci_fields ht (hY (Οƒ 2)) (hY (Οƒ 3)))) hX exact h /-- Hamilton's two-tensor is jointly smooth on locally smooth fixed fields at interior times distinct from its reciprocal-time origin. -/ lemma contMDiffAt_hamiltonM_fields (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) (Tβ‚€ : ℝ) {t : ℝ} (ht : t ∈ interior J) (hΟ„ : t - Tβ‚€ β‰  0) {x : M} {X : Fin 2 β†’ (y : M) β†’ TangentSpace (𝓑 n) y} (hX : βˆ€ i, ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X i)) x) : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => hamiltonM (F.connection p.1) (p.1 - Tβ‚€) p.2 (X 0 p.2) (X 1 p.2)) (t, x) := by have hRic := F.contMDiffAt_ricci_fields ht (hX 0) (hX 1) have hdRic := Poincare.Manifold.contMDiffAt_deriv_time hRic have hH := contMDiffAt_hessian_scalarCurvature_fields hC F ht hX have hS := contMDiffAt_ricciSquare_fields hC F ht hX have hQ : ContMDiffAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => (F.connection p.1).ricci p.2 (X 0 p.2) (X 1 p.2) / (2 * (p.1 - Tβ‚€))) (t, x) := hRic.divβ‚€ (contMDiffAt_const.mul (contMDiffAt_fst.sub contMDiffAt_const)) (mul_ne_zero (by norm_num) hΟ„) have h := ((hdRic.sub (hH.div_const 2)).add hS).add hQ apply h.congr_of_eventuallyEq have htime : βˆ€αΆ  p : ℝ Γ— M in 𝓝 (t, x), p.1 ∈ interior J := (continuousAt_fst : ContinuousAt Prod.fst (t, x)).eventually (isOpen_interior.mem_nhds ht) filter_upwards [htime] with p hp have heq := (ricci_hasDerivWithinAt_hamiltonM hC J F p.1 (interior_subset hp) (p.1 - Tβ‚€) p.2 (X 0 p.2) (X 1 p.2)).hasDerivAt (mem_interior_iff_mem_nhds.mp hp) |>.deriv simp only [Pi.add_apply] at ⊒ linarith only [heq] end Poincare.RicciFlow.Harnack