import PoincareLib.Geometry.RicciFlow.MetricFamily.RelativeDensity import Mathlib.MeasureTheory.Integral.Bochner.Set import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap /-! # Continuity of compactly supported integrals along Ricci flow -/ noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set MeasureTheory open scoped Manifold ContDiff Topology ENNReal namespace PoincareMT.RicciFlow variable {n : β„•} {M : Type*} [TopologicalSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] [SecondCountableTopology M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} theorem integral_volumeMeasure_eq_reference (F : RicciFlow n M J) (h : RiemannianMetric n M) (t : ℝ) (f : M β†’ ℝ) : (∫ x, f x βˆ‚(F.metric t).volumeMeasure) = ∫ x, (F.metric t).relativeVolumeDensity h x * f x βˆ‚h.volumeMeasure := by rw [F.volumeMeasure_eq_reference_withDensity h t] have hd : AEMeasurable (fun x => ENNReal.ofReal ((F.metric t).relativeVolumeDensity h x)) h.volumeMeasure := (ENNReal.continuous_ofReal.comp ((F.metric t).continuous_relativeVolumeDensity h)).measurable.aemeasurable rw [integral_withDensity_eq_integral_toReal_smulβ‚€ hd (by simp)] apply integral_congr_ae exact Filter.Eventually.of_forall fun x => by dsimp only rw [ENNReal.toReal_ofReal ((F.metric t).relativeVolumeDensity_pos h x).le, smul_eq_mul] theorem continuousOn_integral_volumeMeasure_of_compact_support (F : RicciFlow n M J) {s : Set ℝ} {A : Set M} {f : ℝ Γ— M β†’ ℝ} (hs : s βŠ† interior J) (hA : IsCompact A) (hf : ContinuousOn f (s Γ—Λ’ univ)) (hfs : βˆ€ t ∈ s, βˆ€ x βˆ‰ A, f (t, x) = 0) : ContinuousOn (fun t => ∫ x, f (t, x) βˆ‚(F.metric t).volumeMeasure) s := by have hρ := ((F.contMDiffOn_relativeVolumeDensity (F.metric 0)).continuousOn).mono (prod_mono hs (Subset.rfl : (univ : Set M) βŠ† univ)) have hc : ContinuousOn (fun t => ∫ x, (F.metric t).relativeVolumeDensity (F.metric 0) x * f (t, x) βˆ‚(F.metric 0).volumeMeasure) s := by apply continuousOn_integral_of_compact_support hA (hρ.mul hf) intro t x ht hx rw [hfs t ht x hx, mul_zero] apply hc.congr intro t _ exact F.integral_volumeMeasure_eq_reference (F.metric 0) t (fun x => f (t, x)) theorem integrableOn_integral_volumeMeasure_Icc_of_compact_support (F : RicciFlow n M J) {a b : ℝ} {A : Set M} {f : ℝ Γ— M β†’ ℝ} (hab : Icc a b βŠ† interior J) (hA : IsCompact A) (hf : ContinuousOn f (Icc a b Γ—Λ’ univ)) (hfs : βˆ€ t ∈ Icc a b, βˆ€ x βˆ‰ A, f (t, x) = 0) : IntegrableOn (fun t => ∫ x, f (t, x) βˆ‚(F.metric t).volumeMeasure) (Icc a b) := (F.continuousOn_integral_volumeMeasure_of_compact_support hab hA hf hfs).integrableOn_Icc theorem continuousOn_backward_integral_volumeMeasure_of_compact_support (F : RicciFlow n M J) {Ξ± Ξ² : ℝ} {A : Set M} {f : M Γ— ℝ β†’ ℝ} (ht : βˆ€ Ο„ ∈ Icc Ξ± Ξ², -Ο„ ∈ interior J) (hA : IsCompact A) (hf : ContinuousOn f (univ Γ—Λ’ Icc Ξ± Ξ²)) (hfs : βˆ€ Ο„ ∈ Icc Ξ± Ξ², βˆ€ x βˆ‰ A, f (x, Ο„) = 0) : ContinuousOn (fun Ο„ => ∫ x, f (x, Ο„) βˆ‚(F.metric (-Ο„)).volumeMeasure) (Icc Ξ± Ξ²) := by have hneg (t : ℝ) (ht : t ∈ Icc (-Ξ²) (-Ξ±)) : -t ∈ Icc Ξ± Ξ² := by constructor <;> linarith [ht.1, ht.2] have hs : Icc (-Ξ²) (-Ξ±) βŠ† interior J := by intro t ht' simpa only [neg_neg] using ht (-t) (hneg t ht') have hg : ContinuousOn (fun z : ℝ Γ— M => f (z.2, -z.1)) (Icc (-Ξ²) (-Ξ±) Γ—Λ’ univ) := hf.comp ((continuous_snd.prodMk continuous_fst.neg).continuousOn) (fun z hz => ⟨mem_univ _, hneg z.1 hz.1⟩) have hc := F.continuousOn_integral_volumeMeasure_of_compact_support hs hA hg (fun t ht' x hx => hfs (-t) (hneg t ht') x hx) have hcomp := hc.comp continuous_neg.continuousOn (show MapsTo (fun Ο„ : ℝ => -Ο„) (Icc Ξ± Ξ²) (Icc (-Ξ²) (-Ξ±)) from fun Ο„ hΟ„ => ⟨neg_le_neg hΟ„.2, neg_le_neg hΟ„.1⟩) simpa only [Function.comp_def, neg_neg] using hcomp theorem integrableOn_backward_integral_volumeMeasure_Icc_of_compact_support (F : RicciFlow n M J) {Ξ± Ξ² : ℝ} {A : Set M} {f : M Γ— ℝ β†’ ℝ} (ht : βˆ€ Ο„ ∈ Icc Ξ± Ξ², -Ο„ ∈ interior J) (hA : IsCompact A) (hf : ContinuousOn f (univ Γ—Λ’ Icc Ξ± Ξ²)) (hfs : βˆ€ Ο„ ∈ Icc Ξ± Ξ², βˆ€ x βˆ‰ A, f (x, Ο„) = 0) : IntegrableOn (fun Ο„ => ∫ x, f (x, Ο„) βˆ‚(F.metric (-Ο„)).volumeMeasure) (Icc Ξ± Ξ²) := (F.continuousOn_backward_integral_volumeMeasure_of_compact_support ht hA hf hfs).integrableOn_Icc end PoincareMT.RicciFlow