import PoincareLib.Geometry.RicciFlow.Metric.PullbackVariation import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.MeanValue /-! # Homothetic metric identities from the actual soliton evolution -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set open scoped Manifold ContDiff namespace PoincareMT.RicciFlow variable {n : β„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} (F : RicciFlow n M J) (hJ : IsOpen J) {f : ℝ Γ— M β†’ ℝ} {Ξ¦ : ℝ β†’ M β†’ M} (hf : ContMDiffOn (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ f (J Γ—Λ’ univ)) (hs : ContMDiffOn (π“˜(ℝ, ℝ).prod (𝓑 n)) (𝓑 n) ∞ (fun z : ℝ Γ— M => Ξ¦ z.1 z.2) (J Γ—Λ’ univ)) (hΞ¦ : βˆ€ s ∈ J, βˆ€ y, HasMFDerivAt π“˜(ℝ, ℝ) (𝓑 n) (fun r => Ξ¦ r y) s ((1 : ℝ β†’L[ℝ] ℝ).smulRight (-((F.connection s).gradient (fun z => f (s, z)) (Ξ¦ s y))))) include hJ hf hs hΞ¦ /-- The soliton equation gives the scalar evolution of the actual pulled metric; the supplied maps need not be known to be diffeomorphisms. -/ theorem hasDerivAt_soliton_pullback_metric {t : ℝ} (ht : t ∈ J) (hsol : βˆ€ y (a b : TangentSpace (𝓑 n) y), (F.connection t).ricci y a b + (F.connection t).hessian (fun z => f (t, z)) y a b + (1 / (2 * t)) * (F.metric t).inner y a b = 0) (x : M) (v w : TangentSpace (𝓑 n) x) : HasDerivAt (fun s => (F.metric s).inner (Ξ¦ s x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x w)) ((1 / t) * (F.metric t).inner (Ξ¦ t x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x w)) t := by apply (F.hasDerivAt_negativeGradient_pullback_metric hJ hf hs hΞ¦ ht x v w).congr_deriv have h := hsol (Ξ¦ t x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x w) have hcoef : (2 : ℝ) * (1 / (2 * t)) = 1 / t := by simp only [one_div, mul_inv_rev] ring rw [← hcoef] linear_combination -2 * h /-- The actual pulled metrics at two times differ by the time ratio. -/ theorem soliton_pullback_metric_eq_time_ratio (hzero : βˆ€ s ∈ J, s β‰  0) (hsol : βˆ€ s ∈ J, βˆ€ y (a b : TangentSpace (𝓑 n) y), (F.connection s).ricci y a b + (F.connection s).hessian (fun z => f (s, z)) y a b + (1 / (2 * s)) * (F.metric s).inner y a b = 0) {s t : ℝ} (hsJ : s ∈ J) (htJ : t ∈ J) (x : M) (v w : TangentSpace (𝓑 n) x) : (F.metric t).inner (Ξ¦ t x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x w) = (t / s) * (F.metric s).inner (Ξ¦ s x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x w) := by let m : ℝ β†’ ℝ := fun r => (F.metric r).inner (Ξ¦ r x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ r) x v) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ r) x w) have hd (r : ℝ) (hr : r ∈ J) : HasDerivAt m ((1 / r) * m r) r := F.hasDerivAt_soliton_pullback_metric hJ hf hs hΞ¦ hr (hsol r hr) x v w have hz (r : ℝ) (hr : r ∈ J) : HasDerivAt (fun u => m u / u) 0 r := by apply ((hd r hr).div (hasDerivAt_id r) (hzero r hr)).congr_deriv dsimp only [id_eq] field_simp [hzero r hr] ring have heq : m t / t = m s / s := hJ.is_const_of_deriv_eq_zero F.interval.isPreconnected (fun r hr => (hz r hr).differentiableAt.differentiableWithinAt) (fun r hr => (hz r hr).deriv) htJ hsJ change m t = (t / s) * m s calc m t = (m t / t) * t := (div_mul_cancelβ‚€ (m t) (hzero t htJ)).symm _ = (m s / s) * t := by rw [heq] _ = (t / s) * m s := by ring end PoincareMT.RicciFlow