import PoincareLib.Geometry.RicciFlow.Splitting.TimeTransport import PoincareLib.Geometry.RicciFlow.Connection.BoundaryRegularity import PoincareLib.Geometry.RicciFlow.Curvature.Regularity import PoincareLib.Geometry.RicciFlow.Frame.Transport.HigherRegularity /-! # Regularity of terminal transport coefficients The Ricci-flow equation identifies the Ricci form with a time derivative of the metric on the closed slab. Raising its index gives the smooth coefficient of the time-transport equation, including both endpoints. This is the coefficient regularity needed for Cook--Kotschwar, Section 2.1, equation (2.2), pp. 2--3. The coordinate argument follows the half-open-interval proof in `Frame.RicciRegularity`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open scoped Manifold ContDiff Bundle Topology open Bundle Filter Set universe u namespace PoincareMT.RicciFlow.Splitting variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {a b : ℝ} omit [IsManifold (𝓑 n) ∞ M] in private lemma contMDiffWithinAt_clm_of_apply {E G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup G] [NormedSpace ℝ G] [FiniteDimensional ℝ E] {f : ℝ Γ— M β†’ E β†’L[ℝ] G} {S : Set (ℝ Γ— M)} {p : ℝ Γ— M} (hf : βˆ€ v, ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, G) ∞ (fun q => f q v) S p) : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, E β†’L[ℝ] G) ∞ f S p := by let d := Module.finrank ℝ E let e₁ : E ≃L[ℝ] (Fin d β†’ ℝ) := ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℝ).symm let eβ‚‚ := (e₁.arrowCongr (1 : G ≃L[ℝ] G)).trans (ContinuousLinearEquiv.piRing (Fin d)) rw [← Function.id_comp f, ← eβ‚‚.symm_comp_self] exact eβ‚‚.symm.contDiff.contMDiff.contMDiffAt.comp_contMDiffWithinAt p (contMDiffWithinAt_pi_space.mpr fun i => hf _) private lemma contMDiffWithinAt_derivWithin_time {J : Set ℝ} {f : ℝ Γ— M β†’ ℝ} {t : ℝ} {x : M} (ht : t ∈ J) (hJ : UniqueDiffOn ℝ J) (hf : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ f (J Γ—Λ’ univ) (t, x)) : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => derivWithin (fun s => f (s, p.2)) J p.1) (J Γ—Λ’ univ) (t, x) := by have hc : ContMDiffWithinAt ((π“˜(ℝ, ℝ).prod (𝓑 n)).prod π“˜(ℝ, ℝ)) π“˜(ℝ, ℝ) ∞ (fun p : (ℝ Γ— M) Γ— ℝ => f (p.2, p.1.2)) ((J Γ—Λ’ univ) Γ—Λ’ J) ((t, x), t) := by exact hf.comp_of_eq (contMDiffWithinAt_snd.prodMk (contMDiffWithinAt_snd.comp _ contMDiffWithinAt_fst (fun _ _ => mem_univ _))) (fun p hp => ⟨hp.2, mem_univ _⟩) rfl have hd := hc.mfderivWithin (f := fun p s => f (s, p.2)) (g := Prod.fst) contMDiffWithinAt_fst (show (t, x) ∈ J Γ—Λ’ (univ : Set M) from ⟨ht, mem_univ _⟩) (fun p hp => hp.1) (m := ∞) (by simp) hJ.uniqueMDiffOn have h := hd.clm_apply (contMDiffWithinAt_const (c := (1 : ℝ))) convert h using 1 funext p rw [inTangentCoordinates_model_space] simp only [mfderivWithin_eq_fderivWithin, derivWithin] theorem contMDiffWithinAt_ricci_fields (hab : a < b) (F : RicciFlow n M (Icc a b)) {t : ℝ} (ht : t ∈ Icc a b) {x : M} {X Y : (y : M) β†’ TangentSpace (𝓑 n) y} (hX : ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% X) x) (hY : ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Y) x) : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, ℝ) ∞ (fun p : ℝ Γ— M => (F.connection p.1).ricci p.2 (X p.2) (Y p.2)) (Icc a b Γ—Λ’ univ) (t, x) := by have h := contMDiffWithinAt_derivWithin_time ht (uniqueDiffOn_Icc hab) (F.contMDiffWithinAt_inner_fields ht hX hY) apply (h.div_const (-2 : ℝ)).congr_of_eventuallyEq_of_mem (hx := show (t, x) ∈ Icc a b Γ—Λ’ (univ : Set M) from ⟨ht, mem_univ _⟩) filter_upwards [self_mem_nhdsWithin] with p hp rw [(F.equation p.1 hp.1 p.2 (X p.2) (Y p.2)).derivWithin (uniqueDiffOn_Icc hab p.1 hp.1)] ring theorem contMDiffWithinAt_ricciEndomorphism_inCoordinates (hab : a < b) (F : RicciFlow n M (Icc a b)) {t : ℝ} (ht : t ∈ Icc a b) (x : M) : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n)) ∞ (fun p : ℝ Γ— M => ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x p.2 x p.2 (ricciEndomorphism F p.2 p.1)) (Icc a b Γ—Λ’ univ) (t, x) := by let : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric b).toRiemannianMetric⟩ let E := EuclideanSpace ℝ (Fin n) let V := TangentSpace (𝓑 n) (M := M) let e := trivializationAt E V x let e' := trivializationAt (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x let G (p : ℝ Γ— M) := ContinuousLinearMap.inCoordinates E V (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x p.2 x p.2 ((F.metric p.1).inner p.2) let R (p : ℝ Γ— M) := ContinuousLinearMap.inCoordinates E V (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x p.2 x p.2 (ricciForm F p.2 p.1) have hG : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, E β†’L[ℝ] E β†’L[ℝ] ℝ) ∞ G (Icc a b Γ—Λ’ univ) (t, x) := (contMDiffWithinAt_hom_bundle _).mp (F.smooth (t, x) ⟨ht, mem_univ _⟩) |>.2 have hR : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, E β†’L[ℝ] E β†’L[ℝ] ℝ) ∞ R (Icc a b Γ—Λ’ univ) (t, x) := by apply contMDiffWithinAt_clm_of_apply intro v apply contMDiffWithinAt_clm_of_apply intro w have hfield (z : E) : ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, E)) ∞ (fun y => TotalSpace.mk' E y (e.symmL ℝ y z)) x := by have hz : ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, E)) ∞ (fun y => TotalSpace.mk' E y z) x := by rw [contMDiffAt_totalSpace] exact ⟨contMDiffAt_id, by simpa using contMDiffAt_const (c := z)⟩ exact (e.contMDiffAt_symmL (IB := 𝓑 n) (n := ∞) (FiberBundle.mem_baseSet_trivializationAt E V x)).clm_bundle_apply hz have h := contMDiffWithinAt_ricci_fields hab F ht (hfield v) (hfield w) apply h.congr_of_eventuallyEq_of_mem (hx := ⟨ht, mem_univ x⟩) have he' : βˆ€αΆ  p : ℝ Γ— M in 𝓝[Icc a b Γ—Λ’ univ] (t, x), p.2 ∈ e'.baseSet := continuousAt_snd.continuousWithinAt.eventually (e'.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x)) filter_upwards [he', self_mem_nhdsWithin] with p hp hpJ dsimp only [R] simp only [ContinuousLinearMap.inCoordinates, ContinuousLinearMap.comp_apply] rw [Trivialization.continuousLinearMapAt_apply_of_mem ℝ _ hp] change (ContinuousLinearMap.inCoordinates E V ℝ (fun _ : M => ℝ) x p.2 x p.2 (ricciForm F p.2 p.1 (e.symmL ℝ p.2 v))) w = _ have hetriv : trivializationAt ℝ (fun _ : M => ℝ) x = Bundle.Trivial.trivialization M ℝ := rfl simp only [ContinuousLinearMap.inCoordinates, hetriv, ContinuousLinearMap.comp_apply, Bundle.Trivial.continuousLinearMapAt_trivialization, ContinuousLinearMap.id_apply] exact ricciForm_apply hab F p.2 hpJ.1 _ _ have hGinv (p : ℝ Γ— M) (hp : p.2 ∈ e.baseSet) (hp' : p.2 ∈ e'.baseSet) : (G p).IsInvertible := by dsimp only [G] rw [ContinuousLinearMap.inCoordinates_eq hp hp'] exact ContinuousLinearMap.isInvertible_equiv.comp (((F.metric p.1).inner_isInvertible p.2).comp ContinuousLinearMap.isInvertible_equiv) have hinv := (hGinv (t, x) (FiberBundle.mem_baseSet_trivializationAt E V x) (FiberBundle.mem_baseSet_trivializationAt (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x)).contDiffAt_map_inverse (n := ∞) have h := (hinv.contMDiffAt.comp_contMDiffWithinAt (t, x) hG).clm_comp hR apply h.congr_of_eventuallyEq_of_mem (hx := ⟨ht, mem_univ x⟩) have he : βˆ€αΆ  p : ℝ Γ— M in 𝓝[Icc a b Γ—Λ’ univ] (t, x), p.2 ∈ e.baseSet ∧ p.2 ∈ e'.baseSet := by apply (continuousAt_snd : ContinuousAt (Prod.snd : ℝ Γ— M β†’ M) (t, x)).continuousWithinAt.eventually (p := fun y => y ∈ e.baseSet ∧ y ∈ e'.baseSet) exact inter_mem (e.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt E V x)) (e'.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt (E β†’L[ℝ] ℝ) (fun y => V y β†’L[ℝ] ℝ) x)) filter_upwards [he] with p hp apply ContinuousLinearMap.ext intro v symm apply (hGinv p hp.1 hp.2).inverse_apply_eq.mpr symm dsimp only [G, R] rw [ContinuousLinearMap.inCoordinates_eq hp.1 hp.2, ContinuousLinearMap.inCoordinates_eq hp.1 hp.1, ContinuousLinearMap.inCoordinates_eq hp.1 hp.2] change (e'.continuousLinearEquivAt ℝ p.2 hp.2) ((F.metric p.1).inner p.2 ((e.continuousLinearEquivAt ℝ p.2 hp.1).symm ((e.continuousLinearEquivAt ℝ p.2 hp.1) (((F.metric p.1).inner p.2).inverse (ricciForm F p.2 p.1 ((e.continuousLinearEquivAt ℝ p.2 hp.1).symm v)))))) = (e'.continuousLinearEquivAt ℝ p.2 hp.2) (ricciForm F p.2 p.1 ((e.continuousLinearEquivAt ℝ p.2 hp.1).symm v)) rw [ContinuousLinearEquiv.symm_apply_apply] rw [((F.metric p.1).inner_isInvertible p.2).self_apply_inverse] theorem contMDiffOn_ricciEndomorphism (hab : a < b) (F : RicciFlow n M (Icc a b)) : ContMDiffOn (π“˜(ℝ, ℝ).prod (𝓑 n)) ((𝓑 n).prod π“˜(ℝ, EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n))) ∞ (fun p : ℝ Γ— M => TotalSpace.mk' (EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n)) (E := fun y : M => TangentSpace (𝓑 n) y β†’L[ℝ] TangentSpace (𝓑 n) y) p.2 (ricciEndomorphism F p.2 p.1)) (Icc a b Γ—Λ’ univ) := by intro p hp rw [contMDiffWithinAt_hom_bundle] exact ⟨contMDiffWithinAt_snd, contMDiffWithinAt_ricciEndomorphism_inCoordinates hab F hp.1 p.2⟩ theorem contMDiffWithinAt_ricciEndomorphism_inCoordinates_of_mem (hab : a < b) (F : RicciFlow n M (Icc a b)) {t : ℝ} (ht : t ∈ Icc a b) (x : M) {y : M} (hy : y ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x).baseSet) : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod (𝓑 n)) π“˜(ℝ, EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n)) ∞ (fun p : ℝ Γ— M => ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x p.2 x p.2 (ricciEndomorphism F p.2 p.1)) (Icc a b Γ—Λ’ univ) (t, y) := by let E := EuclideanSpace ℝ (Fin n) let e := trivializationAt (E β†’L[ℝ] E) (fun y : M => TangentSpace (𝓑 n) y β†’L[ℝ] TangentSpace (𝓑 n) y) x have hm : (TotalSpace.mk' (E β†’L[ℝ] E) y (ricciEndomorphism F y t)) ∈ e.source := by change y ∈ (trivializationAt E (TangentSpace (𝓑 n)) x).baseSet ∩ (trivializationAt E (TangentSpace (𝓑 n)) x).baseSet exact ⟨hy, hy⟩ exact (e.contMDiffWithinAt_iff (f := fun p : ℝ Γ— M => TotalSpace.mk' (E β†’L[ℝ] E) (E := fun y : M => TangentSpace (𝓑 n) y β†’L[ℝ] TangentSpace (𝓑 n) y) p.2 (ricciEndomorphism F p.2 p.1)) (xβ‚€ := (t, y)) hm).mp (contMDiffOn_ricciEndomorphism hab F (t, y) ⟨ht, mem_univ y⟩) |>.2 noncomputable def chartRicciCoefficient (F : RicciFlow n M (Icc a b)) (x : M) (z : EuclideanSpace ℝ (Fin n)) (t : ℝ) : EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n) := let y := (extChartAt (𝓑 n) x).symm z ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x y x y (ricciEndomorphism F y t) theorem chartRicciCoefficient_contDiffOn (hab : a < b) (F : RicciFlow n M (Icc a b)) (x : M) : ContDiffOn ℝ ∞ (Function.uncurry (chartRicciCoefficient F x)) ((extChartAt (𝓑 n) x).target Γ—Λ’ Icc a b) := by rintro ⟨z, t⟩ ⟨hz, ht⟩ have hz' : (extChartAt (𝓑 n) x).symm z ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x).baseSet := by rw [TangentBundle.trivializationAt_baseSet] simpa only [extChartAt_source] using (extChartAt (𝓑 n) x).map_target hz have harg : ContMDiffWithinAt (π“˜(ℝ, EuclideanSpace ℝ (Fin n)).prod π“˜(ℝ, ℝ)) (π“˜(ℝ, ℝ).prod (𝓑 n)) ∞ (fun p : EuclideanSpace ℝ (Fin n) Γ— ℝ => (p.2, (extChartAt (𝓑 n) x).symm p.1)) ((extChartAt (𝓑 n) x).target Γ—Λ’ Icc a b) (z, t) := contMDiffWithinAt_snd.prodMk (((contMDiffOn_extChartAt_symm x) z hz).comp (z, t) contMDiffWithinAt_fst mapsTo_fst_prod) have h := (contMDiffWithinAt_ricciEndomorphism_inCoordinates_of_mem hab F ht x hz').comp (z, t) harg (show MapsTo (fun p : EuclideanSpace ℝ (Fin n) Γ— ℝ => (p.2, (extChartAt (𝓑 n) x).symm p.1)) ((extChartAt (𝓑 n) x).target Γ—Λ’ Icc a b) (Icc a b Γ—Λ’ univ) from fun p hp => ⟨hp.2, mem_univ _⟩) simp +instances only [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at h exact h.contDiffWithinAt end PoincareMT.RicciFlow.Splitting