MATHLIBANNEX / EXACT SOURCE

Mathlib/Analysis/Calculus/ContDiff/Convolution.lean

Exact source: Mathlib/Analysis/Calculus/ContDiff/Convolution.lean

Pinned GitHub source Β· Raw UTF-8 source

Back to Differentiating a local mollification through its kernel

1/-2Copyright (c) 2022 Floris van Doorn. All rights reserved.3Released under Apache 2.0 license as described in the file LICENSE.4Authors: Floris van Doorn5-/6module78public import Mathlib.Analysis.Calculus.ContDiff.Comp9public import Mathlib.Analysis.Calculus.ParametricIntegral10public import Mathlib.Analysis.Convolution1112/-!13# Differentiability of a convolution of functions1415Criteria for a convolution of functions to be differentiable.1617## Main Results1819* `HasCompactSupport.hasFDerivAt_convolution_right` and20  `HasCompactSupport.hasFDerivAt_convolution_left`: we can compute the total derivative21  of the convolution as a convolution with the total derivative of the right (left) function.22* `HasCompactSupport.contDiff_convolution_right` and23  `HasCompactSupport.contDiff_convolution_left`: the convolution is `π’žβΏ` if one of the functions24  is `π’žβΏ` with compact support and the other function in locally integrable.2526-/2728public section29open Set Function Filter MeasureTheory MeasureTheory.Measure TopologicalSpace3031open Bornology ContinuousLinearMap Metric Topology32open scoped Pointwise NNReal Filter3334universe uπ•œ uG uE uE' uE'' uF uF' uF'' uP3536variable {π•œ : Type uπ•œ} {G : Type uG} {E : Type uE} {E' : Type uE'} {E'' : Type uE''} {F : Type uF}37  {F' : Type uF'} {F'' : Type uF''} {P : Type uP}3839variable [NormedAddCommGroup E] [NormedAddCommGroup E'] [NormedAddCommGroup E'']40  [NormedAddCommGroup F] {f f' : G β†’ E} {g g' : G β†’ E'} {x x' : G} {y y' : E}4142namespace MeasureTheory4344open scoped Convolution4546section RCLike47variable [RCLike π•œ]48variable [NormedSpace π•œ E]49variable [NormedSpace π•œ E']50variable [NormedSpace π•œ E'']51variable [NormedSpace ℝ F] [NormedSpace π•œ F]52variable {n : β„•βˆž}53variable [MeasurableSpace G] {ΞΌ Ξ½ : Measure G}54variable (L : E β†’L[π•œ] E' β†’L[π•œ] F)5556variable [NormedAddCommGroup G] [BorelSpace G]5758variable [NormedSpace π•œ G] [SFinite ΞΌ] [IsAddLeftInvariant ΞΌ]5960/-- Compute the total derivative of `f ⋆ g` if `g` is `C^1` with compact support and `f` is locally61integrable. To write down the total derivative as a convolution, we use62`ContinuousLinearMap.precompR`. -/63theorem _root_.HasCompactSupport.hasFDerivAt_convolution_right (hcg : HasCompactSupport g)64    (hf : LocallyIntegrable f ΞΌ) (hg : ContDiff π•œ 1 g) (xβ‚€ : G) :65    HasFDerivAt (f ⋆[L, ΞΌ] g) ((f ⋆[L.precompR G, ΞΌ] fderiv π•œ g) xβ‚€) xβ‚€ := by66  rcases hcg.eq_zero_or_finiteDimensional π•œ hg.continuous with (rfl | fin_dim)67  Β· have : fderiv π•œ (0 : G β†’ E') = 0 := fderiv_const (0 : E')68    simp only [this, convolution_zero, Pi.zero_apply]69    exact hasFDerivAt_const (0 : F) xβ‚€70  have : ProperSpace G := FiniteDimensional.proper_rclike π•œ G71  set L' := L.precompR G72  have h1 : βˆ€αΆ  x in 𝓝 xβ‚€, AEStronglyMeasurable (fun t => L (f t) (g (x - t))) ΞΌ :=73    Eventually.of_forall74      (hf.aestronglyMeasurable.convolution_integrand_snd L hg.continuous.aestronglyMeasurable)75  have h2 : βˆ€ x, AEStronglyMeasurable (fun t => L' (f t) (fderiv π•œ g (x - t))) ΞΌ :=76    hf.aestronglyMeasurable.convolution_integrand_snd L'77      (hg.continuous_fderiv one_ne_zero).aestronglyMeasurable78  have h3 : βˆ€ x t, HasFDerivAt (fun x => g (x - t)) (fderiv π•œ g (x - t)) x := fun x t ↦ by79    simpa using!80      (hg.differentiable one_ne_zero).differentiableAt.hasFDerivAt.comp x81        ((hasFDerivAt_id x).sub (hasFDerivAt_const t x))82  let K' := -tsupport (fderiv π•œ g) + closedBall xβ‚€ 183  have hK' : IsCompact K' := (hcg.fderiv π•œ).isCompact.neg.add (isCompact_closedBall xβ‚€ 1)84  apply hasFDerivAt_integral_of_dominated_of_fderiv_le (ball_mem_nhds _ zero_lt_one) h1 _ (h2 xβ‚€)85  Β· filter_upwards with t x hx using86      (hcg.fderiv π•œ).convolution_integrand_bound_right L' (hg.continuous_fderiv one_ne_zero)87        (ball_subset_closedBall hx)88  Β· rw [integrable_indicator_iff hK'.measurableSet]89    exact ((hf.integrableOn_isCompact hK').norm.const_mul _).mul_const _90  Β· exact Eventually.of_forall fun t x _ => (L _).hasFDerivAt.comp x (h3 x t)91  Β· exact hcg.convolutionExists_right L hf hg.continuous xβ‚€9293theorem _root_.HasCompactSupport.hasFDerivAt_convolution_left [IsNegInvariant ΞΌ]94    (hcf : HasCompactSupport f) (hf : ContDiff π•œ 1 f) (hg : LocallyIntegrable g ΞΌ) (xβ‚€ : G) :95    HasFDerivAt (f ⋆[L, ΞΌ] g) ((fderiv π•œ f ⋆[L.precompL G, ΞΌ] g) xβ‚€) xβ‚€ := by96  simp +singlePass only [← convolution_flip]97  exact hcf.hasFDerivAt_convolution_right L.flip hg hf xβ‚€9899end RCLike100101section Real102103/-! The one-variable case -/104105variable [RCLike π•œ]106variable [NormedSpace π•œ E]107variable [NormedSpace π•œ E']108variable [NormedSpace ℝ F] [NormedSpace π•œ F]109variable {fβ‚€ : π•œ β†’ E} {gβ‚€ : π•œ β†’ E'}110variable {n : β„•βˆž}111variable (L : E β†’L[π•œ] E' β†’L[π•œ] F)112variable {ΞΌ : Measure π•œ}113variable [IsAddLeftInvariant ΞΌ] [SFinite ΞΌ]114115theorem _root_.HasCompactSupport.hasDerivAt_convolution_right (hf : LocallyIntegrable fβ‚€ ΞΌ)116    (hcg : HasCompactSupport gβ‚€) (hg : ContDiff π•œ 1 gβ‚€) (xβ‚€ : π•œ) :117    HasDerivAt (fβ‚€ ⋆[L, ΞΌ] gβ‚€) ((fβ‚€ ⋆[L, ΞΌ] deriv gβ‚€) xβ‚€) xβ‚€ := by118  convert (hcg.hasFDerivAt_convolution_right L hf hg xβ‚€).hasDerivAt119  rw [convolution_precompR_apply L hf (hcg.fderiv π•œ) (hg.continuous_fderiv one_ne_zero)]120  rfl121122theorem _root_.HasCompactSupport.hasDerivAt_convolution_left [IsNegInvariant ΞΌ]123    (hcf : HasCompactSupport fβ‚€) (hf : ContDiff π•œ 1 fβ‚€) (hg : LocallyIntegrable gβ‚€ ΞΌ) (xβ‚€ : π•œ) :124    HasDerivAt (fβ‚€ ⋆[L, ΞΌ] gβ‚€) ((deriv fβ‚€ ⋆[L, ΞΌ] gβ‚€) xβ‚€) xβ‚€ := by125  simp +singlePass only [← convolution_flip]126  exact hcf.hasDerivAt_convolution_right L.flip hg hf xβ‚€127128end Real129130section WithParam131132variable [RCLike π•œ] [NormedSpace π•œ E] [NormedSpace π•œ E'] [NormedSpace π•œ E''] [NormedSpace ℝ F]133  [NormedSpace π•œ F] [MeasurableSpace G] [NormedAddCommGroup G] [BorelSpace G]134  [NormedSpace π•œ G] [NormedAddCommGroup P] [NormedSpace π•œ P] {ΞΌ : Measure G}135  (L : E β†’L[π•œ] E' β†’L[π•œ] F)136137/-- The derivative of the convolution `f * g` is given by `f * Dg`, when `f` is locally integrable138and `g` is `C^1` and compactly supported. Version where `g` depends on an additional parameter in an139open subset `s` of a parameter space `P` (and the compact support `k` is independent of the140parameter in `s`). -/141theorem hasFDerivAt_convolution_right_with_param {g : P β†’ G β†’ E'} {s : Set P} {k : Set G}142    (hs : IsOpen s) (hk : IsCompact k) (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0)143    (hf : LocallyIntegrable f ΞΌ) (hg : ContDiffOn π•œ 1 β†Ώg (s Γ—Λ’ univ)) (qβ‚€ : P Γ— G)144    (hqβ‚€ : qβ‚€.1 ∈ s) :145    HasFDerivAt (fun q : P Γ— G => (f ⋆[L, ΞΌ] g q.1) q.2)146      ((f ⋆[L.precompR (P Γ— G), ΞΌ] fun x : G => fderiv π•œ β†Ώg (qβ‚€.1, x)) qβ‚€.2) qβ‚€ := by147  let g' := fderiv π•œ β†Ώg148  have A : βˆ€ p ∈ s, Continuous (g p) := fun p hp ↦ by149    refine hg.continuousOn.comp_continuous (.prodMk_right _) fun x => ?_150    simpa only [prodMk_mem_set_prod_eq, mem_univ, and_true] using hp151  have A' : βˆ€ q : P Γ— G, q.1 ∈ s β†’ s Γ—Λ’ univ ∈ 𝓝 q := fun q hq ↦ by152    apply (hs.prod isOpen_univ).mem_nhds153    simpa only [mem_prod, mem_univ, and_true] using hq154  -- The derivative of `g` vanishes away from `k`.155  have g'_zero : βˆ€ p x, p ∈ s β†’ x βˆ‰ k β†’ g' (p, x) = 0 := by156    intro p x hp hx157    refine (hasFDerivAt_zero_of_eventually_const 0 ?_).fderiv158    have M2 : kᢜ ∈ 𝓝 x := hk.isClosed.isOpen_compl.mem_nhds hx159    have M1 : s ∈ 𝓝 p := hs.mem_nhds hp160    rw [nhds_prod_eq]161    filter_upwards [prod_mem_prod M1 M2]162    rintro ⟨p, y⟩ ⟨hp, hy⟩163    exact hgs p y hp hy164  /- We find a small neighborhood of `{qβ‚€.1} Γ— k` on which the derivative is uniformly bounded. This165    follows from the continuity at all points of the compact set `k`. -/166  obtain ⟨Ρ, C, Ξ΅pos, hβ‚€Ξ΅, hΡ⟩ :167      βˆƒ Ξ΅ C, 0 < Ξ΅ ∧ ball qβ‚€.1 Ξ΅ βŠ† s ∧ βˆ€ p x, β€–p - qβ‚€.1β€– < Ξ΅ β†’ β€–g' (p, x)β€– ≀ C := by168    have A : IsCompact ({qβ‚€.1} Γ—Λ’ k) := isCompact_singleton.prod hk169    obtain ⟨t, kt, t_open, ht⟩ : βˆƒ t, {qβ‚€.1} Γ—Λ’ k βŠ† t ∧ IsOpen t ∧ IsBounded (g' '' t) := by170      have B : ContinuousOn g' (s Γ—Λ’ univ) :=171        hg.continuousOn_fderiv_of_isOpen (hs.prod isOpen_univ) le_rfl172      apply exists_isOpen_isBounded_image_of_isCompact_of_continuousOn A (hs.prod isOpen_univ) _ B173      simp only [prod_subset_prod_iff, hqβ‚€, singleton_subset_iff, subset_univ, and_self_iff,174        true_or]175    obtain ⟨Ρ, Ξ΅pos, hΞ΅, h'Ρ⟩ :176      βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ thickening Ξ΅ ({qβ‚€.fst} Γ—Λ’ k) βŠ† t ∧ ball qβ‚€.1 Ξ΅ βŠ† s := by177      obtain ⟨Ρ, Ξ΅pos, hΡ⟩ : βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ thickening Ξ΅ (({qβ‚€.fst} : Set P) Γ—Λ’ k) βŠ† t :=178        A.exists_thickening_subset_open t_open kt179      obtain ⟨δ, Ξ΄pos, hδ⟩ : βˆƒ Ξ΄ : ℝ, 0 < Ξ΄ ∧ ball qβ‚€.1 Ξ΄ βŠ† s := Metric.isOpen_iff.1 hs _ hqβ‚€180      refine ⟨min Ξ΅ Ξ΄, lt_min Ξ΅pos Ξ΄pos, ?_, ?_⟩181      Β· exact Subset.trans (thickening_mono (min_le_left _ _) _) hΞ΅182      Β· exact Subset.trans (ball_subset_ball (min_le_right _ _)) hΞ΄183    obtain ⟨C, Cpos, hC⟩ : βˆƒ C, 0 < C ∧ g' '' t βŠ† closedBall 0 C := ht.subset_closedBall_lt 0 0184    refine ⟨Ρ, C, Ξ΅pos, h'Ξ΅, fun p x hp => ?_⟩185    have hps : p ∈ s := h'Ξ΅ (mem_ball_iff_norm.2 hp)186    by_cases hx : x ∈ k187    Β· have H : (p, x) ∈ t := by188        apply hΞ΅189        refine mem_thickening_iff.2 ⟨(qβ‚€.1, x), ?_, ?_⟩190        Β· simp only [hx, singleton_prod, mem_image, Prod.mk_inj, true_and, exists_eq_right]191        Β· rw [← dist_eq_norm] at hp192          simpa only [Prod.dist_eq, Ξ΅pos, dist_self, max_lt_iff, and_true] using hp193      have : g' (p, x) ∈ closedBall (0 : P Γ— G β†’L[π•œ] E') C := hC (mem_image_of_mem _ H)194      rwa [mem_closedBall_zero_iff] at this195    Β· have : g' (p, x) = 0 := g'_zero _ _ hps hx196      rw [this]197      simpa only [norm_zero] using Cpos.le198  /- Now, we wish to apply a theorem on differentiation of integrals. For this, we need to check199    trivial measurability or integrability assumptions (in `I1`, `I2`, `I3`), as well as a uniform200    integrability assumption over the derivative (in `I4` and `I5`) and pointwise differentiability201    in `I6`. -/202  have I1 :203    βˆ€αΆ  x : P Γ— G in 𝓝 qβ‚€, AEStronglyMeasurable (fun a : G => L (f a) (g x.1 (x.2 - a))) ΞΌ := by204    filter_upwards [A' qβ‚€ hqβ‚€]205    rintro ⟨p, x⟩ ⟨hp, -⟩206    refine (HasCompactSupport.convolutionExists_right L ?_ hf (A _ hp) _).1207    apply hk.of_isClosed_subset (isClosed_tsupport _)208    exact closure_minimal (support_subset_iff'.2 fun z hz => hgs _ _ hp hz) hk.isClosed209  have I2 : Integrable (fun a : G => L (f a) (g qβ‚€.1 (qβ‚€.2 - a))) ΞΌ := by210    have M : HasCompactSupport (g qβ‚€.1) := HasCompactSupport.intro hk fun x hx => hgs qβ‚€.1 x hqβ‚€ hx211    apply M.convolutionExists_right L hf (A qβ‚€.1 hqβ‚€) qβ‚€.2212  have I3 : AEStronglyMeasurable (fun a : G => (L (f a)).comp (g' (qβ‚€.fst, qβ‚€.snd - a))) ΞΌ := by213    have T : HasCompactSupport fun y => g' (qβ‚€.1, y) :=214      HasCompactSupport.intro hk fun x hx => g'_zero qβ‚€.1 x hqβ‚€ hx215    apply (HasCompactSupport.convolutionExists_right (L.precompR (P Γ— G) :) T hf _ qβ‚€.2).1216    have : ContinuousOn g' (s Γ—Λ’ univ) :=217      hg.continuousOn_fderiv_of_isOpen (hs.prod isOpen_univ) le_rfl218    apply this.comp_continuous (.prodMk_right _)219    intro x220    simpa only [prodMk_mem_set_prod_eq, mem_univ, and_true] using hqβ‚€221  set K' := (-k + {qβ‚€.2} : Set G) with K'_def222  have hK' : IsCompact K' := hk.neg.add isCompact_singleton223  obtain ⟨U, U_open, K'U, hU⟩ : βˆƒ U, IsOpen U ∧ K' βŠ† U ∧ IntegrableOn f U ΞΌ :=224    hf.integrableOn_nhds_isCompact hK'225  obtain ⟨δ, Ξ΄pos, δΡ, hδ⟩ : βˆƒ Ξ΄, (0 : ℝ) < Ξ΄ ∧ Ξ΄ ≀ Ξ΅ ∧ K' + ball 0 Ξ΄ βŠ† U := by226    obtain ⟨V, V_mem, hV⟩ : βˆƒ V ∈ 𝓝 (0 : G), K' + V βŠ† U :=227      compact_open_separated_add_right hK' U_open K'U228    rcases Metric.mem_nhds_iff.1 V_mem with ⟨δ, Ξ΄pos, hδ⟩229    refine ⟨min Ξ΄ Ξ΅, lt_min Ξ΄pos Ξ΅pos, min_le_right Ξ΄ Ξ΅, ?_⟩230    exact (add_subset_add_left ((ball_subset_ball (min_le_left _ _)).trans hΞ΄)).trans hV231  letI := ContinuousLinearMap.hasOpNorm (π•œ := π•œ) (π•œβ‚‚ := π•œ) (E := E)232    (F := (P Γ— G β†’L[π•œ] E') β†’L[π•œ] P Γ— G β†’L[π•œ] F) (σ₁₂ := RingHom.id π•œ)233  let bound : G β†’ ℝ := indicator U fun t => β€–(L.precompR (P Γ— G))β€– * β€–f tβ€– * C234  have I4 : βˆ€α΅ a : G βˆ‚ΞΌ, βˆ€ x : P Γ— G, dist x qβ‚€ < Ξ΄ β†’235      β€–L.precompR (P Γ— G) (f a) (g' (x.fst, x.snd - a))β€– ≀ bound a := by236    filter_upwards with a x hx237    rw [Prod.dist_eq, dist_eq_norm, dist_eq_norm] at hx238    have : (-tsupport fun a => g' (x.1, a)) + ball qβ‚€.2 Ξ΄ βŠ† U := by239      apply Subset.trans _ hΞ΄240      rw [K'_def, add_assoc]241      apply add_subset_add242      Β· rw [neg_subset_neg]243        refine closure_minimal (support_subset_iff'.2 fun z hz => ?_) hk.isClosed244        apply g'_zero x.1 z (hβ‚€Ξ΅ _) hz245        rw [mem_ball_iff_norm]246        exact ((le_max_left _ _).trans_lt hx).trans_le δΡ247      Β· simp only [add_ball, thickening_singleton, zero_vadd, subset_rfl]248    apply convolution_integrand_bound_right_of_le_of_subset _ _ _ this249    Β· intro y250      exact hΞ΅ _ _ (((le_max_left _ _).trans_lt hx).trans_le δΡ)251    Β· rw [mem_ball_iff_norm]252      exact (le_max_right _ _).trans_lt hx253  have I5 : Integrable bound ΞΌ := by254    rw [integrable_indicator_iff U_open.measurableSet]255    exact (hU.norm.const_mul _).mul_const _256  have I6 : βˆ€α΅ a : G βˆ‚ΞΌ, βˆ€ x : P Γ— G, dist x qβ‚€ < Ξ΄ β†’257      HasFDerivAt (fun x : P Γ— G => L (f a) (g x.1 (x.2 - a)))258        ((L (f a)).comp (g' (x.fst, x.snd - a))) x := by259    filter_upwards with a x hx260    apply (L _).hasFDerivAt.comp x261    have N : s Γ—Λ’ univ ∈ 𝓝 (x.1, x.2 - a) := by262      apply A'263      apply hβ‚€Ξ΅264      rw [Prod.dist_eq] at hx265      exact lt_of_lt_of_le (lt_of_le_of_lt (le_max_left _ _) hx) δΡ266    have Z := ((hg.differentiableOn one_ne_zero).differentiableAt N).hasFDerivAt267    have Z' :268        HasFDerivAt (fun x : P Γ— G => (x.1, x.2 - a)) (ContinuousLinearMap.id π•œ (P Γ— G)) x := by269      have : (fun x : P Γ— G => (x.1, x.2 - a)) = _root_.id - fun x => (0, a) := by270        ext x <;> simp only [Pi.sub_apply, _root_.id, Prod.fst_sub, sub_zero, Prod.snd_sub]271      rw [this]272      exact (hasFDerivAt_id x).sub_const (0, a)273    exact Z.comp x Z'274  exact hasFDerivAt_integral_of_dominated_of_fderiv_le (ball_mem_nhds _ Ξ΄pos) I1 I2 I3 I4 I5 I6275276/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly277supported. Version where `g` depends on an additional parameter in an open subset `s` of a278parameter space `P` (and the compact support `k` is independent of the parameter in `s`).279In this version, all the types belong to the same universe (to get an induction working in the280proof). Use instead `contDiffOn_convolution_right_with_param`, which removes this restriction. -/281theorem contDiffOn_convolution_right_with_param_aux {G : Type uP} {E' : Type uP} {F : Type uP}282    {P : Type uP} [NormedAddCommGroup E'] [NormedAddCommGroup F] [NormedSpace π•œ E']283    [NormedSpace ℝ F] [NormedSpace π•œ F] [MeasurableSpace G]284    {ΞΌ : Measure G}285    [NormedAddCommGroup G] [BorelSpace G] [NormedSpace π•œ G] [NormedAddCommGroup P] [NormedSpace π•œ P]286    {f : G β†’ E} {n : β„•βˆž} (L : E β†’L[π•œ] E' β†’L[π•œ] F) {g : P β†’ G β†’ E'} {s : Set P} {k : Set G}287    (hs : IsOpen s) (hk : IsCompact k) (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0)288    (hf : LocallyIntegrable f ΞΌ) (hg : ContDiffOn π•œ n β†Ώg (s Γ—Λ’ univ)) :289    ContDiffOn π•œ n (fun q : P Γ— G => (f ⋆[L, ΞΌ] g q.1) q.2) (s Γ—Λ’ univ) := by290  /- We have a formula for the derivation of `f * g`, which is of the same form, thanks to291    `hasFDerivAt_convolution_right_with_param`. Therefore, we can prove the result by induction on292    `n` (but for this we need the spaces at the different steps of the induction to live in the same293    universe, which is why we make the assumption in the lemma that all the relevant spaces294    come from the same universe). -/295  induction n using ENat.nat_induction generalizing g E' F with296  | zero =>297    rw [WithTop.coe_zero, contDiffOn_zero] at hg ⊒298    exact continuousOn_convolution_right_with_param L hk hgs hf hg299  | succ n ih =>300    simp only [Nat.succ_eq_add_one, Nat.cast_add, Nat.cast_one, WithTop.coe_add,301      WithTop.coe_natCast, WithTop.coe_one] at hg ⊒302    let f' : P β†’ G β†’ P Γ— G β†’L[π•œ] F := fun p a =>303      (f ⋆[L.precompR (P Γ— G), ΞΌ] fun x : G => fderiv π•œ (uncurry g) (p, x)) a304    have A : βˆ€ qβ‚€ : P Γ— G, qβ‚€.1 ∈ s β†’305        HasFDerivAt (fun q : P Γ— G => (f ⋆[L, ΞΌ] g q.1) q.2) (f' qβ‚€.1 qβ‚€.2) qβ‚€ :=306      hasFDerivAt_convolution_right_with_param L hs hk hgs hf hg.one_of_succ307    rw [contDiffOn_succ_iff_fderiv_of_isOpen (hs.prod (@isOpen_univ G _))] at hg ⊒308    refine ⟨?_, by simp, ?_⟩309    Β· rintro ⟨p, x⟩ ⟨hp, -⟩310      exact (A (p, x) hp).differentiableAt.differentiableWithinAt311    Β· suffices H : ContDiffOn π•œ n β†Ώf' (s Γ—Λ’ univ) by312        apply H.congr313        rintro ⟨p, x⟩ ⟨hp, -⟩314        exact (A (p, x) hp).fderiv315      have B : βˆ€ (p : P) (x : G), p ∈ s β†’ x βˆ‰ k β†’ fderiv π•œ (uncurry g) (p, x) = 0 := by316        intro p x hp hx317        apply (hasFDerivAt_zero_of_eventually_const (0 : E') _).fderiv318        have M2 : kᢜ ∈ 𝓝 x := IsOpen.mem_nhds hk.isClosed.isOpen_compl hx319        have M1 : s ∈ 𝓝 p := hs.mem_nhds hp320        rw [nhds_prod_eq]321        filter_upwards [prod_mem_prod M1 M2]322        rintro ⟨p, y⟩ ⟨hp, hy⟩323        exact hgs p y hp hy324      apply ih (L.precompR (P Γ— G) :) B325      convert! hg.2.2326  | top ih =>327    rw [contDiffOn_infty] at hg ⊒328    exact fun n ↦ ih n L hgs (hg n)329330/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly331supported. Version where `g` depends on an additional parameter in an open subset `s` of a332parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/333theorem contDiffOn_convolution_right_with_param {f : G β†’ E} {n : β„•βˆž} (L : E β†’L[π•œ] E' β†’L[π•œ] F)334    {g : P β†’ G β†’ E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)335    (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0) (hf : LocallyIntegrable f ΞΌ)336    (hg : ContDiffOn π•œ n β†Ώg (s Γ—Λ’ univ)) :337    ContDiffOn π•œ n (fun q : P Γ— G => (f ⋆[L, ΞΌ] g q.1) q.2) (s Γ—Λ’ univ) := by338  /- The result is known when all the universes are the same, from339    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing340    everything through `ULift` continuous linear equivalences. -/341  let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G342  borelize eG343  let eE' : Type max uE' uG uF uP := ULift.{max uG uF uP} E'344  let eF : Type max uF uG uE' uP := ULift.{max uG uE' uP} F345  let eP : Type max uP uG uE' uF := ULift.{max uG uE' uF} P346  let isoG : eG ≃L[π•œ] G := ContinuousLinearEquiv.ulift347  let isoE' : eE' ≃L[π•œ] E' := ContinuousLinearEquiv.ulift348  let isoF : eF ≃L[π•œ] F := ContinuousLinearEquiv.ulift349  let isoP : eP ≃L[π•œ] P := ContinuousLinearEquiv.ulift350  let ef := f ∘ isoG351  let eΞΌ : Measure eG := Measure.map isoG.symm ΞΌ352  let eg : eP β†’ eG β†’ eE' := fun ep ex => isoE'.symm (g (isoP ep) (isoG ex))353  let eL :=354    ContinuousLinearMap.comp355      ((ContinuousLinearEquiv.arrowCongr isoE' isoF).symm : (E' β†’L[π•œ] F) β†’L[π•œ] eE' β†’L[π•œ] eF) L356  let R := fun q : eP Γ— eG => (ef ⋆[eL, eΞΌ] eg q.1) q.2357  have R_contdiff : ContDiffOn π•œ n R ((isoP ⁻¹' s) Γ—Λ’ univ) := by358    have hek : IsCompact (isoG ⁻¹' k) := isoG.toHomeomorph.isClosedEmbedding.isCompact_preimage hk359    have hes : IsOpen (isoP ⁻¹' s) := isoP.continuous.isOpen_preimage _ hs360    refine contDiffOn_convolution_right_with_param_aux eL hes hek ?_ ?_ ?_361    Β· intro p x hp hx362      simp only [eg,363        ContinuousLinearEquiv.map_eq_zero_iff]364      exact hgs _ _ hp hx365    Β· exact (locallyIntegrable_map_homeomorph isoG.symm.toHomeomorph).2 hf366    Β· apply isoE'.symm.contDiff.comp_contDiffOn367      apply hg.comp (isoP.prodCongr isoG).contDiff.contDiffOn368      rintro ⟨p, x⟩ ⟨hp, -⟩369      simpa only [mem_preimage, ContinuousLinearEquiv.prodCongr_apply, prodMk_mem_set_prod_eq,370        mem_univ, and_true] using hp371  have A : ContDiffOn π•œ n (isoF ∘ R ∘ (isoP.prodCongr isoG).symm) (s Γ—Λ’ univ) := by372    apply isoF.contDiff.comp_contDiffOn373    apply R_contdiff.comp (ContinuousLinearEquiv.contDiff _).contDiffOn374    rintro ⟨p, x⟩ ⟨hp, -⟩375    simpa only [mem_preimage, mem_prod, mem_univ, and_true, ContinuousLinearEquiv.prodCongr_symm,376      ContinuousLinearEquiv.prodCongr_apply, ContinuousLinearEquiv.apply_symm_apply] using hp377  have : isoF ∘ R ∘ (isoP.prodCongr isoG).symm = fun q : P Γ— G => (f ⋆[L, ΞΌ] g q.1) q.2 := by378    apply funext379    rintro ⟨p, x⟩380    simp only [(Β· ∘ Β·), ContinuousLinearEquiv.prodCongr_symm, ContinuousLinearEquiv.prodCongr_apply]381    simp only [R, convolution]382    rw [IsClosedEmbedding.integral_map, ← isoF.integral_comp_comm]383    Β· rfl384    Β· exact isoG.symm.toHomeomorph.isClosedEmbedding385  simp_rw [this] at A386  exact A387388/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly389supported. Version where `g` depends on an additional parameter in an open subset `s` of a390parameter space `P` (and the compact support `k` is independent of the parameter in `s`),391given in terms of composition with an additional `C^n` function. -/392theorem contDiffOn_convolution_right_with_param_comp {n : β„•βˆž} (L : E β†’L[π•œ] E' β†’L[π•œ] F) {s : Set P}393    {v : P β†’ G} (hv : ContDiffOn π•œ n v s) {f : G β†’ E} {g : P β†’ G β†’ E'} {k : Set G} (hs : IsOpen s)394    (hk : IsCompact k) (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0) (hf : LocallyIntegrable f ΞΌ)395    (hg : ContDiffOn π•œ n β†Ώg (s Γ—Λ’ univ)) : ContDiffOn π•œ n (fun x => (f ⋆[L, ΞΌ] g x) (v x)) s := by396  apply (contDiffOn_convolution_right_with_param L hs hk hgs hf hg).comp (contDiffOn_id.prodMk hv)397  intro x hx398  simp only [hx, prodMk_mem_set_prod_eq, mem_univ, and_self_iff, _root_.id]399400/-- The convolution `g * f` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly401supported. Version where `g` depends on an additional parameter in an open subset `s` of a402parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/403theorem contDiffOn_convolution_left_with_param [ΞΌ.IsAddLeftInvariant] [ΞΌ.IsNegInvariant]404    (L : E' β†’L[π•œ] E β†’L[π•œ] F) {f : G β†’ E} {n : β„•βˆž} {g : P β†’ G β†’ E'} {s : Set P} {k : Set G}405    (hs : IsOpen s) (hk : IsCompact k) (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0)406    (hf : LocallyIntegrable f ΞΌ) (hg : ContDiffOn π•œ n β†Ώg (s Γ—Λ’ univ)) :407    ContDiffOn π•œ n (fun q : P Γ— G => (g q.1 ⋆[L, ΞΌ] f) q.2) (s Γ—Λ’ univ) := by408  simpa only [convolution_flip] using contDiffOn_convolution_right_with_param L.flip hs hk hgs hf hg409410/-- The convolution `g * f` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly411supported. Version where `g` depends on an additional parameter in an open subset `s` of a412parameter space `P` (and the compact support `k` is independent of the parameter in `s`),413given in terms of composition with additional `C^n` functions. -/414theorem contDiffOn_convolution_left_with_param_comp [ΞΌ.IsAddLeftInvariant] [ΞΌ.IsNegInvariant]415    (L : E' β†’L[π•œ] E β†’L[π•œ] F) {s : Set P} {n : β„•βˆž} {v : P β†’ G} (hv : ContDiffOn π•œ n v s) {f : G β†’ E}416    {g : P β†’ G β†’ E'} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)417    (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0) (hf : LocallyIntegrable f ΞΌ)418    (hg : ContDiffOn π•œ n β†Ώg (s Γ—Λ’ univ)) : ContDiffOn π•œ n (fun x => (g x ⋆[L, ΞΌ] f) (v x)) s := by419  apply (contDiffOn_convolution_left_with_param L hs hk hgs hf hg).comp (contDiffOn_id.prodMk hv)420  intro x hx421  simp only [hx, prodMk_mem_set_prod_eq, mem_univ, and_self_iff, _root_.id]422423theorem _root_.HasCompactSupport.contDiff_convolution_right {n : β„•βˆž} (hcg : HasCompactSupport g)424    (hf : LocallyIntegrable f ΞΌ) (hg : ContDiff π•œ n g) : ContDiff π•œ n (f ⋆[L, ΞΌ] g) := by425  rcases exists_compact_iff_hasCompactSupport.2 hcg with ⟨k, hk, h'k⟩426  rw [← contDiffOn_univ]427  exact contDiffOn_convolution_right_with_param_comp L contDiffOn_id isOpen_univ hk428    (fun p x _ hx => h'k x hx) hf (hg.comp contDiff_snd).contDiffOn429430theorem _root_.HasCompactSupport.contDiff_convolution_left [ΞΌ.IsAddLeftInvariant] [ΞΌ.IsNegInvariant]431    {n : β„•βˆž} (hcf : HasCompactSupport f) (hf : ContDiff π•œ n f) (hg : LocallyIntegrable g ΞΌ) :432    ContDiff π•œ n (f ⋆[L, ΞΌ] g) := by433  rw [← convolution_flip]434  exact hcf.contDiff_convolution_right L.flip hg hf435436end WithParam437438end MeasureTheory
Back to top ↑