diff --git a/Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean b/Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean index 7f3214bf009fed..df5e5c10ec9d2d 100644 --- a/Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean +++ b/Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean @@ -82,9 +82,10 @@ distributions open TopologicalSpace SeminormFamily Set Function Seminorm UniformSpace open scoped BoundedContinuousFunction Topology NNReal ContDiff -variable (π•œ E F : Type*) [NontriviallyNormedField π•œ] +variable (π•œ E F F' : Type*) [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedSpace π•œ F] [SMulCommClass ℝ π•œ F] + [NormedAddCommGroup F'] [NormedSpace ℝ F'] [NormedSpace π•œ F'] [SMulCommClass ℝ π•œ F'] {n k : β„•βˆž} {K : Compacts E} /-- The type of bundled `n`-times continuously differentiable maps which vanish outside of a fixed @@ -148,7 +149,7 @@ instance toContDiffMapSupportedInClass : map_contDiff f := f.contDiff' map_zero_on_compl f := f.zero_on_compl' -variable {E F} +variable {E F F'} protected theorem contDiff (f : 𝓓^{n}_{K}(E, F)) : ContDiff ℝ n f := map_contDiff f protected theorem zero_on_compl (f : 𝓓^{n}_{K}(E, F)) : EqOn f 0 Kᢜ := map_zero_on_compl f @@ -297,6 +298,114 @@ lemma toBoundedContinuousFunctionLM_eq_of_scalars (π•œ' : Type*) [NontriviallyN (toBoundedContinuousFunctionLM π•œ : 𝓓^{n}_{K}(E, F) β†’ _) = toBoundedContinuousFunctionLM π•œ' := rfl +variable {π•œ} in +-- Note: generalizing this to a semilinear setting would require a semilinear version of +-- `CompatibleSMul`. +/-- Given `T : F β†’L[π•œ] F'`, `postcompLM T` is the `π•œ`-linear-map sending `f : 𝓓^{n}_{K}(E, F)` +to `T ∘ f` as an element of `𝓓^{n}_{K}(E, F')`. + +This is subsumed by `postcompCLM T`, which also bundles the continuity. -/ +noncomputable def postcompLM [LinearMap.CompatibleSMul F F' ℝ π•œ] (T : F β†’L[π•œ] F') : + 𝓓^{n}_{K}(E, F) β†’β‚—[π•œ] 𝓓^{n}_{K}(E, F') where + toFun f := ⟨T ∘ f, T.restrictScalars ℝ |>.contDiff.comp f.contDiff, + fun x hx ↦ by simp [f.zero_on_compl hx]⟩ + map_add' f g := by ext x; exact map_add T (f x) (g x) + map_smul' c f := by ext x; exact map_smul T c (f x) + +@[simp] +lemma postcompLM_apply [LinearMap.CompatibleSMul F F' ℝ π•œ] (T : F β†’L[π•œ] F') + (f : 𝓓^{n}_{K}(E, F)) : + postcompLM T f = T ∘ f := + rfl + +variable (n k) in +/-- `fderivWithOrderLM π•œ n k` is the `π•œ`-linear-map sending `f : 𝓓^{n}_{K}(E, F)` to +its derivative as an element of `𝓓^{k}_{K}(E, E β†’L[ℝ] F)`. +This only makes mathematical sense if `k + 1 ≀ n`, otherwise we define it as the zero map. + +See `fderivLM` for the very common case where everything is infinitely differentiable. + +This is subsumed by `fderivWithOrderCLM`, which also bundles the continuity. -/ +noncomputable def fderivWithOrderLM : + 𝓓^{n}_{K}(E, F) β†’β‚—[π•œ] 𝓓^{k}_{K}(E, E β†’L[ℝ] F) where + toFun f := + if hk : k + 1 ≀ n then + .of_support_subset + (f.contDiff.fderiv_right <| mod_cast hk) + ((support_fderiv_subset ℝ).trans f.tsupport_subset) + else 0 + map_add' f g := by + split_ifs with hk + Β· have hk' : 1 ≀ (n : WithTop β„•βˆž) := mod_cast (le_of_add_le_right hk) + ext + simp [fderiv_add (f.contDiff.differentiable hk').differentiableAt + (g.contDiff.differentiable hk').differentiableAt] + Β· simp + map_smul' c f := by + split_ifs with hk + Β· have hk' : 1 ≀ (n : WithTop β„•βˆž) := mod_cast (le_of_add_le_right hk) + ext + simp [fderiv_const_smul (f.contDiff.differentiable hk').differentiableAt] + Β· simp + +@[simp] +lemma fderivWithOrderLM_apply (f : 𝓓^{n}_{K}(E, F)) : + fderivWithOrderLM π•œ n k f = if k + 1 ≀ n then fderiv ℝ f else 0 := by + rw [fderivWithOrderLM] + split_ifs <;> rfl + +lemma fderivWithOrderLM_apply_of_le (f : 𝓓^{n}_{K}(E, F)) (hk : k + 1 ≀ n) : + fderivWithOrderLM π•œ n k f = fderiv ℝ f := by + simp [hk] + +lemma fderivWithOrderLM_apply_of_gt (f : 𝓓^{n}_{K}(E, F)) (hk : Β¬ (k + 1 ≀ n)) : + fderivWithOrderLM π•œ n k f = 0 := by + ext : 1 + simp [hk] + +lemma fderivWithOrderLM_eq_of_scalars (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivWithOrderLM π•œ n k : 𝓓^{n}_{K}(E, F) β†’ _) = fderivWithOrderLM π•œ' n k := + rfl + +/-- `fderivLM π•œ` is the `π•œ`-linear-map sending `f : 𝓓_{K}(E, F)` to +its derivative as an element of `𝓓_{K}(E, E β†’L[ℝ] F)`. + +See also `fderivWithOrderLM` if you need more control on the regularities. + +This is subsumed by `fderivCLM`, which also bundles the continuity. -/ +noncomputable def fderivLM : + 𝓓_{K}(E, F) β†’β‚—[π•œ] 𝓓_{K}(E, E β†’L[ℝ] F) where + toFun f := .of_support_subset + (f.contDiff.fderiv_right le_rfl) + ((support_fderiv_subset ℝ).trans f.tsupport_subset) + map_add' f g := by + have h : 1 ≀ ∞ := mod_cast le_top + ext + simp [fderiv_add (f.contDiff.differentiable h).differentiableAt + (g.contDiff.differentiable h).differentiableAt] + map_smul' c f := by + have h : 1 ≀ ∞ := mod_cast le_top + ext + simp [fderiv_const_smul (f.contDiff.differentiable h).differentiableAt] + +@[simp] +lemma fderivLM_apply (f : 𝓓_{K}(E, F)) : + fderivLM π•œ f = fderiv ℝ f := + rfl + +/-- Note: this turns out to be a definitional equality thanks to decidablity of the order +on `β„•βˆž`. This means we could have *defined* `fderivLM` this way, but we avoid it +to make sure that `if`s won't appear in the smooth case. -/ +lemma fderivLM_eq_withOrder : + (fderivLM π•œ : 𝓓_{K}(E, F) β†’β‚—[π•œ] _) = fderivWithOrderLM π•œ ⊀ ⊀ := + rfl + +lemma fderivLM_eq_of_scalars (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivLM π•œ : 𝓓_{K}(E, F) β†’ _) = fderivLM π•œ' := + rfl + variable (n k) in /-- `iteratedFDerivWithOrderLM π•œ n k i` is the `π•œ`-linear-map sending `f : 𝓓^{n}_{K}(E, F)` to its `i`-th iterated derivative as an element of `𝓓^{k}_{K}(E, E [Γ—i]β†’L[ℝ] F)`. @@ -631,7 +740,7 @@ theorem norm_toBoundedContinuousFunction (f : 𝓓^{n}_{K}(E, F)) : simp [BoundedContinuousFunction.norm_eq_iSup_norm, ContDiffMapSupportedIn.seminorm_apply, structureMapCLM_apply_withOrder] -/-- The inclusion of the space `𝓓^{n}_{K}(E, F)` into the space `E →ᡇ F` of bounded continuous +/-- The inclusion of the space `𝓓^{n}_{K}(E, F)` into the space `E →ᡇ F` of bounded continuous functions as a continuous `π•œ`-linear map. -/ noncomputable def toBoundedContinuousFunctionCLM : 𝓓^{n}_{K}(E, F) β†’L[π•œ] E →ᡇ F where toLinearMap := toBoundedContinuousFunctionLM π•œ @@ -657,6 +766,116 @@ instance : T3Space 𝓓^{n}_{K}(E, F) := (toBoundedContinuousFunctionCLM ℝ).continuous inferInstance +theorem seminorm_postcompLM_le [LinearMap.CompatibleSMul F F' ℝ π•œ] {i : β„•} (T : F β†’L[π•œ] F') + (f : 𝓓^{n}_{K}(E, F)) : + N[π•œ]_{K, n, i} (postcompLM T f) ≀ β€–Tβ€– * N[π•œ]_{K, n, i} f := by + set T' := T.restrictScalars ℝ + change N[ℝ]_{K, n, i} (postcompLM T' f) ≀ β€–T'β€– * N[ℝ]_{K, n, i} f + rw [ContDiffMapSupportedIn.seminorm_le_iff_withOrder ℝ (by positivity)] + intro hi x hx + rw [postcompLM_apply] + calc + β€–iteratedFDeriv ℝ i (T' ∘ f) xβ€– + _ = β€–T'.compContinuousMultilinearMap (iteratedFDeriv ℝ i f x)β€– := by + rw [T'.iteratedFDeriv_comp_left f.contDiff.contDiffAt (mod_cast hi)] + _ ≀ β€–T'β€– * β€–iteratedFDeriv ℝ i f xβ€– := T'.norm_compContinuousMultilinearMap_le _ + _ ≀ β€–T'β€– * N[ℝ]_{K, n, i} f := by grw [norm_iteratedFDeriv_apply_le_seminorm_withOrder ℝ hi] + +variable {π•œ} in +-- Note: generalizing this to a semilinear setting would require a semilinear version of +-- `CompatibleSMul`. +/-- Given `T : F β†’L[π•œ] F'`, `postcompCLM T` is the continuous `π•œ`-linear-map sending +`f : 𝓓^{n}_{K}(E, F)` to `T ∘ f` as an element of `𝓓^{n}_{K}(E, F')`. -/ +noncomputable def postcompCLM [LinearMap.CompatibleSMul F F' ℝ π•œ] (T : F β†’L[π•œ] F') : + 𝓓^{n}_{K}(E, F) β†’L[π•œ] 𝓓^{n}_{K}(E, F') where + toLinearMap := postcompLM T + cont := show Continuous (postcompLM T) by + refine continuous_from_bounded (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) + (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) _ (fun i ↦ ⟨{i}, β€–Tβ€–β‚Š, fun f ↦ ?_⟩) + simpa [NNReal.smul_def] using seminorm_postcompLM_le π•œ T f + +@[simp] +lemma postcompCLM_apply [LinearMap.CompatibleSMul F F' ℝ π•œ] (T : F β†’L[π•œ] F') + (f : 𝓓^{n}_{K}(E, F)) : + postcompCLM T f = T ∘ f := + rfl + +theorem seminorm_fderivWithOrderLM_le {i : β„•} (f : 𝓓^{n}_{K}(E, F)) : + N[π•œ]_{K, k, i} (fderivWithOrderLM π•œ n k f) ≀ N[π•œ]_{K, n, i+1} f := by + by_cases hk : k + 1 ≀ n + Β· rw [ContDiffMapSupportedIn.seminorm_le_iff_withOrder π•œ (apply_nonneg _ _)] + intro hi x hx + have hi' : i + 1 ≀ n := (add_le_add_left hi 1).trans hk + simpa [hk, norm_iteratedFDeriv_fderiv] using + norm_iteratedFDeriv_apply_le_seminorm_withOrder π•œ hi' + Β· simp [fderivWithOrderLM_apply_of_gt π•œ f hk] + +variable (n k) in +/-- `fderivWithOrderCLM π•œ n k` is the continuous `π•œ`-linear-map sending `f : 𝓓^{n}_{K}(E, F)` to +its derivative as an element of `𝓓^{k}_{K}(E, E β†’L[ℝ] F)`. +This only makes mathematical sense if `k + 1 ≀ n`, otherwise we define it as the zero map. + +See `fderivCLM` for the very common case where everything is infinitely differentiable. -/ +noncomputable def fderivWithOrderCLM : + 𝓓^{n}_{K}(E, F) β†’L[π•œ] 𝓓^{k}_{K}(E, E β†’L[ℝ] F) where + toLinearMap := fderivWithOrderLM π•œ n k + cont := show Continuous (fderivWithOrderLM π•œ n k) by + refine continuous_from_bounded (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) + (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) _ (fun i ↦ ⟨{i+1}, 1, fun f ↦ ?_⟩) + simpa using seminorm_fderivWithOrderLM_le π•œ f + +@[simp] +lemma fderivWithOrderCLM_apply (f : 𝓓^{n}_{K}(E, F)) : + fderivWithOrderCLM π•œ n k f = if k + 1 ≀ n then fderiv ℝ f else 0 := + fderivWithOrderLM_apply π•œ f + +lemma fderivWithOrderCLM_apply_of_le (f : 𝓓^{n}_{K}(E, F)) (hk : k + 1 ≀ n) : + fderivWithOrderCLM π•œ n k f = fderiv ℝ f := + fderivWithOrderLM_apply_of_le π•œ f hk + +lemma fderivWithOrderCLM_apply_of_gt (f : 𝓓^{n}_{K}(E, F)) (hk : Β¬ (k + 1 ≀ n)) : + fderivWithOrderCLM π•œ n k f = 0 := + fderivWithOrderLM_apply_of_gt π•œ f hk + +lemma fderivWithOrderCLM_eq_of_scalars (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivWithOrderCLM π•œ n k : 𝓓^{n}_{K}(E, F) β†’ _) = fderivWithOrderCLM π•œ' n k := + rfl + +theorem seminorm_fderivLM {i : β„•} (f : 𝓓_{K}(E, F)) : + N[π•œ]_{K, i} (fderivLM π•œ f) = N[π•œ]_{K, i+1} f := by + simp [ContDiffMapSupportedIn.seminorm_apply, BoundedContinuousFunction.norm_eq_iSup_norm, + norm_iteratedFDeriv_fderiv] + +/-- `fderivCLM π•œ` is the continuous `π•œ`-linear-map sending `f : 𝓓_{K}(E, F)` to +its derivative as an element of `𝓓_{K}(E, E β†’L[ℝ] F)`. + +See also `fderivWithOrderCLM` if you need more control on the regularities. -/ +noncomputable def fderivCLM : + 𝓓_{K}(E, F) β†’L[π•œ] 𝓓_{K}(E, E β†’L[ℝ] F) where + toLinearMap := fderivLM π•œ + cont := show Continuous (fderivLM π•œ) by + refine continuous_from_bounded (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) + (ContDiffMapSupportedIn.withSeminorms _ _ _ _ _) _ (fun i ↦ ⟨{i+1}, 1, fun f ↦ ?_⟩) + simp [seminorm_fderivLM π•œ f] + +@[simp] +lemma fderivCLM_apply (f : 𝓓_{K}(E, F)) : + fderivCLM π•œ f = fderiv ℝ f := + rfl + +/-- Note: this turns out to be a definitional equality thanks to decidablity of the order +on `β„•βˆž`. This means we could have *defined* `fderivLM` this way, but we avoid it +to make sure that `if`s won't appear in the smooth case. -/ +lemma fderivCLM_eq_withOrder : + (fderivCLM π•œ : 𝓓_{K}(E, F) β†’L[π•œ] _) = fderivWithOrderCLM π•œ ⊀ ⊀ := + rfl + +lemma fderivCLM_eq_of_scalars (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivCLM π•œ : 𝓓_{K}(E, F) β†’ _) = fderivCLM π•œ' := + rfl + end Topology end ContDiffMapSupportedIn diff --git a/Mathlib/Analysis/Distribution/TestFunction.lean b/Mathlib/Analysis/Distribution/TestFunction.lean index a35f29971bb76a..a1e1c28a42dbb7 100644 --- a/Mathlib/Analysis/Distribution/TestFunction.lean +++ b/Mathlib/Analysis/Distribution/TestFunction.lean @@ -54,12 +54,12 @@ distributions, test function @[expose] public section open Function Seminorm SeminormFamily Set TopologicalSpace UniformSpace -open scoped BoundedContinuousFunction NNReal Topology +open scoped BoundedContinuousFunction NNReal Topology ContDiff variable {π•œ 𝕂 : Type*} [NontriviallyNormedField π•œ] [RCLike 𝕂] {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {Ξ© : Opens E} {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedSpace π•œ F] [NormedSpace 𝕂 F] - {n : β„•βˆž} + {n k : β„•βˆž} variable (Ξ© F n) in /-- The type of bundled `n`-times continuously differentiable maps with compact support -/ @@ -158,6 +158,12 @@ theorem copy_eq (f : 𝓓^{n}(Ξ©, F)) (f' : E β†’ F) (h : f' = f) : f.copy f' h theorem coe_toBoundedContinuousFunction (f : 𝓓^{n}(Ξ©, F)) : (f : BoundedContinuousFunction E F) = (f : E β†’ F) := rfl +@[simp] +theorem coe_mk {f : E β†’ F} {contDiff : ContDiff ℝ n f} {hasCompactSupport : HasCompactSupport f} + {tsupport_subset : tsupport f βŠ† Ξ©} : + TestFunction.mk f contDiff hasCompactSupport tsupport_subset = f := + rfl + section AddCommGroup @[simps -fullyApplied] @@ -233,6 +239,110 @@ def ofSupportedInLM [SMulCommClass ℝ π•œ F] {K : Compacts E} (K_sub_Ξ© : (K : (ofSupportedInLM π•œ K_sub_Ξ© : 𝓓^{n}_{K}(E, F) β†’ 𝓓^{n}(Ξ©, F)) = ofSupportedIn K_sub_Ξ© := rfl +variable (π•œ n k) in +/-- `fderivWithOrderLM π•œ n k` is the `π•œ`-linear-map sending `f : 𝓓^{n}(Ξ©, F)` to +its derivative as an element of `𝓓^{k}(Ξ©, E β†’L[ℝ] F)`. +This only makes mathematical sense if `k + 1 ≀ n`, otherwise we define it as the zero map. + +See `fderivLM` for the very common case where everything is infinitely differentiable. + +This is subsumed by `fderivWithOrderCLM`, which also bundles the continuity. -/ +noncomputable def fderivWithOrderLM [SMulCommClass ℝ π•œ F] : + 𝓓^{n}(Ξ©, F) β†’β‚—[π•œ] 𝓓^{k}(Ξ©, E β†’L[ℝ] F) where + toFun f := + if hk : k + 1 ≀ n then + ⟨fderiv ℝ f, f.contDiff.fderiv_right (mod_cast hk), + f.hasCompactSupport.fderiv ℝ, tsupport_fderiv_subset ℝ |>.trans f.tsupport_subset⟩ + else 0 + map_add' f g := by + split_ifs with hk + Β· have hk' : 1 ≀ (n : WithTop β„•βˆž) := mod_cast (le_of_add_le_right hk) + ext + simp [fderiv_add (f.contDiff.differentiable hk').differentiableAt + (g.contDiff.differentiable hk').differentiableAt] + Β· simp + map_smul' c f := by + split_ifs with hk + Β· have hk' : 1 ≀ (n : WithTop β„•βˆž) := mod_cast (le_of_add_le_right hk) + ext + simp [fderiv_const_smul (f.contDiff.differentiable hk').differentiableAt] + Β· simp + +@[simp] +lemma fderivWithOrderLM_apply [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) : + fderivWithOrderLM π•œ n k f = if k + 1 ≀ n then fderiv ℝ f else 0 := by + rw [fderivWithOrderLM] + split_ifs <;> rfl + +lemma fderivWithOrderLM_apply_of_le [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) (hk : k + 1 ≀ n) : + fderivWithOrderLM π•œ n k f = fderiv ℝ f := by + simp [hk] + +lemma fderivWithOrderLM_apply_of_gt [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) (hk : Β¬ (k + 1 ≀ n)) : + fderivWithOrderLM π•œ n k f = 0 := by + ext : 1 + simp [hk] + +variable (π•œ) in +lemma fderivWithOrderLM_eq_of_scalars [SMulCommClass ℝ π•œ F] (π•œ' : Type*) + [NontriviallyNormedField π•œ'] [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivWithOrderLM π•œ n k : 𝓓^{n}(Ξ©, F) β†’ _) = fderivWithOrderLM π•œ' n k := + rfl + +variable (π•œ) in +lemma fderivWithOrderLM_ofSupportedIn [SMulCommClass ℝ π•œ F] {K : Compacts E} + (K_sub_Ξ© : (K : Set E) βŠ† Ξ©) (f : 𝓓^{n}_{K}(E, F)) : + fderivWithOrderLM π•œ n k (ofSupportedIn K_sub_Ξ© f) = + ofSupportedIn K_sub_Ξ© (ContDiffMapSupportedIn.fderivWithOrderLM π•œ n k f) := by + ext + simp + +variable (π•œ) in +/-- `fderivLM π•œ` is the `π•œ`-linear-map sending `f : 𝓓_{K}(E, F)` to +its derivative as an element of `𝓓_{K}(E, E β†’L[ℝ] F)`. + +See also `fderivWithOrderLM` if you need more control on the regularities. + +This is subsumed by `fderivCLM`, which also bundles the continuity. -/ +noncomputable def fderivLM [SMulCommClass ℝ π•œ F] : + 𝓓(Ξ©, F) β†’β‚—[π•œ] 𝓓(Ξ©, E β†’L[ℝ] F) where + toFun f := ⟨fderiv ℝ f, f.contDiff.fderiv_right le_rfl, f.hasCompactSupport.fderiv ℝ, + tsupport_fderiv_subset ℝ |>.trans f.tsupport_subset⟩ + map_add' f g := by + have h : 1 ≀ ∞ := mod_cast le_top + ext + simp [fderiv_add (f.contDiff.differentiable h).differentiableAt + (g.contDiff.differentiable h).differentiableAt] + map_smul' c f := by + have h : 1 ≀ ∞ := mod_cast le_top + ext + simp [fderiv_const_smul (f.contDiff.differentiable h).differentiableAt] + +@[simp] +lemma fderivLM_apply [SMulCommClass ℝ π•œ F] (f : 𝓓(Ξ©, F)) : + fderivLM π•œ f = fderiv ℝ f := + rfl + +/-- Note: this turns out to be a definitional equality thanks to decidablity of the order +on `β„•βˆž`. This means we could have *defined* `fderivLM` this way, but we avoid it +to make sure that `if`s won't appear in the smooth case. -/ +lemma fderivLM_eq_withOrder [SMulCommClass ℝ π•œ F] : + (fderivLM π•œ : 𝓓(Ξ©, F) β†’β‚—[π•œ] _) = fderivWithOrderLM π•œ ⊀ ⊀ := + rfl + +variable (π•œ) in +lemma fderivLM_eq_of_scalars [SMulCommClass ℝ π•œ F] (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivLM π•œ : 𝓓(Ξ©, F) β†’ _) = fderivLM π•œ' := + rfl + +variable (π•œ) in +lemma fderivLM_ofSupportedIn [SMulCommClass ℝ π•œ F] {K : Compacts E} (K_sub_Ξ© : (K : Set E) βŠ† Ξ©) + (f : 𝓓_{K}(E, F)) : + fderivLM π•œ (ofSupportedIn K_sub_Ξ© f) = + ofSupportedIn K_sub_Ξ© (ContDiffMapSupportedIn.fderivLM π•œ f) := + rfl + section Topology variable {V : Type*} [AddCommGroup V] [Module ℝ V] [t : TopologicalSpace V] @@ -332,4 +442,76 @@ protected theorem continuous_iff_continuous_comp [Algebra ℝ π•œ] [IsScalarTow end Topology +section FDerivCLM + +variable (π•œ n k) in +/-- `fderivWithOrderCLM π•œ n k` is the continuous `π•œ`-linear-map sending `f : 𝓓^{n}_{K}(E, F)` to +its derivative as an element of `𝓓^{k}_{K}(E, E β†’L[ℝ] F)`. +This only makes mathematical sense if `k + 1 ≀ n`, otherwise we define it as the zero map. + +See `fderivCLM` for the very common case where everything is infinitely differentiable. -/ +noncomputable def fderivWithOrderCLM [SMulCommClass ℝ π•œ F] : + 𝓓^{n}(Ξ©, F) β†’L[π•œ] 𝓓^{k}(Ξ©, E β†’L[ℝ] F) where + toLinearMap := fderivWithOrderLM π•œ n k + cont := show Continuous (fderivWithOrderLM π•œ n k) by + rw [fderivWithOrderLM_eq_of_scalars π•œ ℝ, TestFunction.continuous_iff_continuous_comp] + intro K K_sub_Ξ© + refine .congr ?_ fun f ↦ (fderivWithOrderLM_ofSupportedIn π•œ K_sub_Ξ© f).symm + exact (continuous_ofSupportedIn K_sub_Ξ©).comp + (ContDiffMapSupportedIn.fderivWithOrderCLM π•œ n k).continuous + +@[simp] +lemma fderivWithOrderCLM_apply [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) : + fderivWithOrderCLM π•œ n k f = if k + 1 ≀ n then fderiv ℝ f else 0 := + fderivWithOrderLM_apply f + +lemma fderivWithOrderCLM_apply_of_le [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) (hk : k + 1 ≀ n) : + fderivWithOrderCLM π•œ n k f = fderiv ℝ f := + fderivWithOrderLM_apply_of_le f hk + +lemma fderivWithOrderCLM_apply_of_gt [SMulCommClass ℝ π•œ F] (f : 𝓓^{n}(Ξ©, F)) (hk : Β¬ (k + 1 ≀ n)) : + fderivWithOrderCLM π•œ n k f = 0 := + fderivWithOrderLM_apply_of_gt f hk + +variable (π•œ) in +lemma fderivWithOrderCLM_eq_of_scalars [SMulCommClass ℝ π•œ F] (π•œ' : Type*) + [NontriviallyNormedField π•œ'] [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivWithOrderLM π•œ n k : 𝓓^{n}(Ξ©, F) β†’ _) = fderivWithOrderLM π•œ' n k := + rfl + +variable (π•œ) in +/-- `fderivCLM π•œ` is the continuous `π•œ`-linear-map sending `f : 𝓓_{K}(E, F)` to +its derivative as an element of `𝓓_{K}(E, E β†’L[ℝ] F)`. + +See also `fderivWithOrderCLM` if you need more control on the regularities. -/ +noncomputable def fderivCLM [SMulCommClass ℝ π•œ F] : + 𝓓(Ξ©, F) β†’L[π•œ] 𝓓(Ξ©, E β†’L[ℝ] F) where + toLinearMap := fderivLM π•œ + cont := show Continuous (fderivLM π•œ) by + rw [fderivLM_eq_of_scalars π•œ ℝ, TestFunction.continuous_iff_continuous_comp] + intro K K_sub_Ξ© + refine .congr ?_ fun f ↦ (fderivLM_ofSupportedIn π•œ K_sub_Ξ© f).symm + exact (continuous_ofSupportedIn K_sub_Ξ©).comp + (ContDiffMapSupportedIn.fderivCLM π•œ).continuous + +@[simp] +lemma fderivCLM_apply [SMulCommClass ℝ π•œ F] (f : 𝓓(Ξ©, F)) : + fderivCLM π•œ f = fderiv ℝ f := + rfl + +/-- Note: this turns out to be a definitional equality thanks to decidablity of the order +on `β„•βˆž`. This means we could have *defined* `fderivLM` this way, but we avoid it +to make sure that `if`s won't appear in the smooth case. -/ +lemma fderivCLM_eq_withOrder [SMulCommClass ℝ π•œ F] : + (fderivCLM π•œ : 𝓓(Ξ©, F) β†’L[π•œ] _) = fderivWithOrderCLM π•œ ⊀ ⊀ := + rfl + +variable (π•œ) in +lemma fderivCLM_eq_of_scalars [SMulCommClass ℝ π•œ F] (π•œ' : Type*) [NontriviallyNormedField π•œ'] + [NormedSpace π•œ' F] [SMulCommClass ℝ π•œ' F] : + (fderivCLM π•œ : 𝓓(Ξ©, F) β†’ _) = fderivCLM π•œ' := + rfl + +end FDerivCLM + end TestFunction