Skip to content

Commit fadadaa

Browse files
committed
chore(Analysis/Distribution): split off derivatives from SchwartzSpace and create new folder (#34027)
Since `Analysis/Distribution/SchwartzSpace.lean` is over 1500 lines, we have to move some of its contents into a new file. The derivatives are a natural choice, because it is quite a few lines of code, will see further expansion (with the Laplacian) and a number of imports are just needed for them. We perform this split by moving the current file to `Analysis/Distribution/SchwartzSpace/Basic.lean` and creating a new file `Analysis/Distribution/SchwartzSpace.Deriv.lean`. Moreover, we move the previous `Analysis/Distribution/FourierSchwartz.lean` to `Analysis/Distribution/SchwartzSpace/Fourier.lean`
1 parent 7048ffa commit fadadaa

File tree

7 files changed

+260
-228
lines changed

7 files changed

+260
-228
lines changed

Mathlib.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,8 +1788,9 @@ public import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff
17881788
public import Mathlib.Analysis.Distribution.ContDiffMapSupportedIn
17891789
public import Mathlib.Analysis.Distribution.DerivNotation
17901790
public import Mathlib.Analysis.Distribution.Distribution
1791-
public import Mathlib.Analysis.Distribution.FourierSchwartz
1792-
public import Mathlib.Analysis.Distribution.SchwartzSpace
1791+
public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic
1792+
public import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv
1793+
public import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier
17931794
public import Mathlib.Analysis.Distribution.TemperateGrowth
17941795
public import Mathlib.Analysis.Distribution.TemperedDistribution
17951796
public import Mathlib.Analysis.Distribution.TestFunction

Mathlib/Analysis/Distribution/SchwartzSpace.lean renamed to Mathlib/Analysis/Distribution/SchwartzSpace/Basic.lean

Lines changed: 2 additions & 222 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ Authors: Moritz Doll
55
-/
66
module
77

8-
public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
9-
public import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts
108
public import Mathlib.Analysis.LocallyConvex.WithSeminorms
119
public import Mathlib.Analysis.Normed.Group.ZeroAtInfty
1210
public import Mathlib.Analysis.Normed.Lp.SmoothApprox
1311
public import Mathlib.Analysis.SpecialFunctions.Pow.Real
14-
public import Mathlib.Analysis.Distribution.DerivNotation
1512
public import Mathlib.Analysis.Distribution.TemperateGrowth
1613
public import Mathlib.Topology.Algebra.UniformFilterBasis
17-
public import Mathlib.MeasureTheory.Integral.IntegralEqImproper
1814
public import Mathlib.MeasureTheory.Function.L2Space
1915

2016
/-!
@@ -25,7 +21,7 @@ functions $f : ℝ^n → ℂ$ such that there exists $C_{αβ} > 0$ with $$|x^α
2521
all $x ∈ ℝ^n$ and for all multiindices $α, β$.
2622
In mathlib, we use a slightly different approach and define the Schwartz space as all
2723
smooth functions `f : E → F`, where `E` and `F` are real normed vector spaces such that for all
28-
natural numbers `k` and `n` we have uniform bounds `‖x‖^k * ‖iteratedFDeriv ℝ n f x‖ < C`.
24+
natural numbers `k` and `n` we have uniform bounds `‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ < C`.
2925
This approach completely avoids using partial derivatives as well as polynomials.
3026
We construct the topology on the Schwartz space by a family of seminorms, which are the best
3127
constants in the above estimates. The abstract theory of topological vector spaces developed in
@@ -40,10 +36,6 @@ Schwartz space into a locally convex topological vector space.
4036
* `SchwartzMap.compCLM`: Composition with a function on the right as a continuous linear map
4137
`𝓢(E, F) →L[𝕜] 𝓢(D, F)`, provided that the function is temperate and grows polynomially near
4238
infinity
43-
* `SchwartzMap.fderivCLM`: The differential as a continuous linear map
44-
`𝓢(E, F) →L[𝕜] 𝓢(E, E →L[ℝ] F)`
45-
* `SchwartzMap.derivCLM`: The one-dimensional derivative as a continuous linear map
46-
`𝓢(ℝ, F) →L[𝕜] 𝓢(ℝ, F)`
4739
* `SchwartzMap.integralCLM`: Integration as a continuous linear map `𝓢(ℝ, F) →L[ℝ] F`
4840
4941
## Main statements
@@ -66,9 +58,7 @@ The implementation of the seminorms is taken almost literally from `ContinuousLi
6658
Schwartz space, tempered distributions
6759
-/
6860

69-
@[expose] public section
70-
71-
noncomputable section
61+
@[expose] public noncomputable section
7262

7363
open scoped Nat NNReal ContDiff
7464

@@ -1002,121 +992,6 @@ theorem smulLeftCLM_compCLMOfContinuousLinearEquiv {u : D → 𝕜'} (hu : u.Has
1002992

1003993
end Comp
1004994

1005-
section Derivatives
1006-
1007-
/-! ### Derivatives of Schwartz functions -/
1008-
1009-
variable (𝕜)
1010-
variable [RCLike 𝕜] [NormedSpace 𝕜 F]
1011-
1012-
variable (F) in
1013-
/-- The 1-dimensional derivative on Schwartz space as a continuous `𝕜`-linear map. -/
1014-
def derivCLM : 𝓢(ℝ, F) →L[𝕜] 𝓢(ℝ, F) :=
1015-
mkCLM (deriv ·) (fun f g _ => deriv_add f.differentiableAt g.differentiableAt)
1016-
(fun a f _ => deriv_const_smul a f.differentiableAt)
1017-
(fun f => (contDiff_succ_iff_deriv.mp (f.smooth ⊤)).2.2) fun ⟨k, n⟩ =>
1018-
⟨{⟨k, n + 1⟩}, 1, zero_le_one, fun f x => by
1019-
simpa only [Real.norm_eq_abs, Finset.sup_singleton, schwartzSeminormFamily_apply, one_mul,
1020-
norm_iteratedFDeriv_eq_norm_iteratedDeriv, ← iteratedDeriv_succ'] using
1021-
f.le_seminorm' 𝕜 k (n + 1) x⟩
1022-
1023-
@[simp]
1024-
theorem derivCLM_apply (f : 𝓢(ℝ, F)) (x : ℝ) : derivCLM 𝕜 F f x = deriv f x :=
1025-
rfl
1026-
1027-
theorem hasDerivAt (f : 𝓢(ℝ, F)) (x : ℝ) : HasDerivAt f (deriv f x) x :=
1028-
f.differentiableAt.hasDerivAt
1029-
1030-
variable [SMulCommClass ℝ 𝕜 F]
1031-
1032-
open LineDeriv
1033-
1034-
variable (E F) in
1035-
/-- The Fréchet derivative on Schwartz space as a continuous `𝕜`-linear map. -/
1036-
def fderivCLM : 𝓢(E, F) →L[𝕜] 𝓢(E, E →L[ℝ] F) :=
1037-
mkCLM (fderiv ℝ ·) (fun f g _ => fderiv_add f.differentiableAt g.differentiableAt)
1038-
(fun a f _ => fderiv_const_smul f.differentiableAt a)
1039-
(fun f => (contDiff_succ_iff_fderiv.mp (f.smooth ⊤)).2.2) fun ⟨k, n⟩ =>
1040-
⟨{⟨k, n + 1⟩}, 1, zero_le_one, fun f x => by
1041-
simpa only [schwartzSeminormFamily_apply, Seminorm.comp_apply, Finset.sup_singleton,
1042-
one_smul, norm_iteratedFDeriv_fderiv, one_mul] using f.le_seminorm 𝕜 k (n + 1) x⟩
1043-
1044-
@[simp]
1045-
theorem fderivCLM_apply (f : 𝓢(E, F)) (x : E) : fderivCLM 𝕜 E F f x = fderiv ℝ f x :=
1046-
rfl
1047-
1048-
theorem hasFDerivAt (f : 𝓢(E, F)) (x : E) : HasFDerivAt f (fderiv ℝ f x) x :=
1049-
f.differentiableAt.hasFDerivAt
1050-
1051-
/-- The partial derivative (or directional derivative) in the direction `m : E` as a
1052-
continuous linear map on Schwartz space. -/
1053-
instance instLineDeriv : LineDeriv E 𝓢(E, F) 𝓢(E, F) where
1054-
lineDerivOp m f := (SchwartzMap.evalCLM ℝ E F m ∘L fderivCLM ℝ E F) f
1055-
1056-
instance instLineDerivAdd : LineDerivAdd E 𝓢(E, F) 𝓢(E, F) where
1057-
lineDerivOp_add m := (SchwartzMap.evalCLM ℝ E F m ∘L fderivCLM ℝ E F).map_add
1058-
1059-
instance instLineDerivSMul : LineDerivSMul 𝕜 E 𝓢(E, F) 𝓢(E, F) where
1060-
lineDerivOp_smul m := (SchwartzMap.evalCLM 𝕜 E F m ∘L fderivCLM 𝕜 E F).map_smul
1061-
1062-
instance instContinuousLineDeriv : ContinuousLineDeriv E 𝓢(E, F) 𝓢(E, F) where
1063-
continuous_lineDerivOp m := (SchwartzMap.evalCLM ℝ E F m ∘L fderivCLM ℝ E F).continuous
1064-
1065-
open LineDeriv
1066-
1067-
theorem lineDerivOpCLM_eq (m : E) :
1068-
lineDerivOpCLM 𝕜 𝓢(E, F) m = SchwartzMap.evalCLM 𝕜 E F m ∘L fderivCLM 𝕜 E F := rfl
1069-
1070-
@[deprecated (since := "2025-11-25")]
1071-
alias pderivCLM := lineDerivOpCLM
1072-
1073-
@[deprecated (since := "2025-11-25")]
1074-
alias pderivCLM_apply := LineDeriv.lineDerivOpCLM_apply
1075-
1076-
theorem lineDerivOp_apply (m : E) (f : 𝓢(E, F)) (x : E) : ∂_{m} f x = lineDeriv ℝ f x m :=
1077-
f.differentiableAt.lineDeriv_eq_fderiv.symm
1078-
1079-
theorem lineDerivOp_apply_eq_fderiv (m : E) (f : 𝓢(E, F)) (x : E) :
1080-
∂_{m} f x = fderiv ℝ f x m := rfl
1081-
1082-
variable [NormedAddCommGroup D] [NormedSpace ℝ D]
1083-
1084-
theorem lineDerivOp_compCLMOfContinuousLinearEquiv (m : D) (g : D ≃L[ℝ] E) (f : 𝓢(E, F)) :
1085-
∂_{m} (compCLMOfContinuousLinearEquiv 𝕜 g f) =
1086-
compCLMOfContinuousLinearEquiv 𝕜 g (∂_{g m} f) := by
1087-
ext x
1088-
simp [lineDerivOp_apply_eq_fderiv, ContinuousLinearEquiv.comp_right_fderiv]
1089-
1090-
@[deprecated (since := "2025-11-25")]
1091-
alias iteratedPDeriv := LineDeriv.iteratedLineDerivOpCLM
1092-
1093-
@[deprecated (since := "2025-11-25")]
1094-
alias iteratedPDeriv_zero := LineDeriv.iteratedLineDerivOp_zero
1095-
1096-
@[deprecated (since := "2025-11-25")]
1097-
alias iteratedPDeriv_one := LineDeriv.iteratedLineDerivOp_one
1098-
1099-
@[deprecated (since := "2025-11-25")]
1100-
alias iteratedPDeriv_succ_left := LineDeriv.iteratedLineDerivOp_succ_left
1101-
1102-
@[deprecated (since := "2025-11-25")]
1103-
alias iteratedPDeriv_succ_right := LineDeriv.iteratedLineDerivOp_succ_right
1104-
1105-
theorem iteratedLineDerivOp_eq_iteratedFDeriv {n : ℕ} {m : Fin n → E} {f : 𝓢(E, F)} {x : E} :
1106-
∂^{m} f x = iteratedFDeriv ℝ n f x m := by
1107-
induction n generalizing x with
1108-
| zero => simp
1109-
| succ n ih =>
1110-
rw [iteratedLineDerivOp_succ_left, iteratedFDeriv_succ_apply_left,
1111-
← fderiv_continuousMultilinear_apply_const_apply]
1112-
· simp only [lineDerivOp_apply_eq_fderiv, ← ih]
1113-
· exact (f.smooth ⊤).differentiable_iteratedFDeriv (mod_cast ENat.coe_lt_top n) x
1114-
1115-
@[deprecated (since := "2025-11-25")]
1116-
alias iteratedPDeriv_eq_iteratedFDeriv := iteratedLineDerivOp_eq_iteratedFDeriv
1117-
1118-
end Derivatives
1119-
1120995
section Integration
1121996

1122997
/-! ### Integration -/
@@ -1424,99 +1299,4 @@ theorem inner_toL2_toL2_eq (f g : 𝓢(H, V)) (μ : Measure H := by volume_tac)
14241299

14251300
end L2
14261301

1427-
section integration_by_parts
1428-
1429-
open ENNReal MeasureTheory
1430-
1431-
section one_dim
1432-
1433-
variable [NormedAddCommGroup V] [NormedSpace ℝ V]
1434-
1435-
/-- Integration by parts of Schwartz functions for the 1-dimensional derivative.
1436-
1437-
Version for a general bilinear map. -/
1438-
theorem integral_bilinear_deriv_right_eq_neg_left (f : 𝓢(ℝ, E)) (g : 𝓢(ℝ, F))
1439-
(L : E →L[ℝ] F →L[ℝ] V) :
1440-
∫ (x : ℝ), L (f x) (deriv g x) = -∫ (x : ℝ), L (deriv f x) (g x) :=
1441-
MeasureTheory.integral_bilinear_hasDerivAt_right_eq_neg_left_of_integrable
1442-
f.hasDerivAt g.hasDerivAt (pairing L f (derivCLM ℝ F g)).integrable
1443-
(pairing L (derivCLM ℝ E f) g).integrable (pairing L f g).integrable
1444-
1445-
variable [NormedRing 𝕜] [NormedSpace ℝ 𝕜] [IsScalarTower ℝ 𝕜 𝕜] [SMulCommClass ℝ 𝕜 𝕜] in
1446-
/-- Integration by parts of Schwartz functions for the 1-dimensional derivative.
1447-
1448-
Version for multiplication of scalar-valued Schwartz functions. -/
1449-
theorem integral_mul_deriv_eq_neg_deriv_mul (f : 𝓢(ℝ, 𝕜)) (g : 𝓢(ℝ, 𝕜)) :
1450-
∫ (x : ℝ), f x * (deriv g x) = -∫ (x : ℝ), deriv f x * (g x) :=
1451-
integral_bilinear_deriv_right_eq_neg_left f g (ContinuousLinearMap.mul ℝ 𝕜)
1452-
1453-
variable [RCLike 𝕜] [NormedSpace 𝕜 F] [NormedSpace 𝕜 V]
1454-
1455-
/-- Integration by parts of Schwartz functions for the 1-dimensional derivative.
1456-
1457-
Version for a Schwartz function with values in continuous linear maps. -/
1458-
theorem integral_smul_deriv_right_eq_neg_left (f : 𝓢(ℝ, 𝕜)) (g : 𝓢(ℝ, F)) :
1459-
∫ (x : ℝ), f x • deriv g x = -∫ (x : ℝ), deriv f x • g x :=
1460-
integral_bilinear_deriv_right_eq_neg_left f g (ContinuousLinearMap.lsmul ℝ 𝕜)
1461-
1462-
/-- Integration by parts of Schwartz functions for the 1-dimensional derivative.
1463-
1464-
Version for a Schwartz function with values in continuous linear maps. -/
1465-
theorem integral_clm_comp_deriv_right_eq_neg_left (f : 𝓢(ℝ, F →L[𝕜] V)) (g : 𝓢(ℝ, F)) :
1466-
∫ (x : ℝ), f x (deriv g x) = -∫ (x : ℝ), deriv f x (g x) :=
1467-
integral_bilinear_deriv_right_eq_neg_left f g
1468-
((ContinuousLinearMap.id 𝕜 (F →L[𝕜] V)).bilinearRestrictScalars ℝ)
1469-
1470-
end one_dim
1471-
1472-
variable [NormedAddCommGroup V] [NormedSpace ℝ V]
1473-
[NormedAddCommGroup D] [NormedSpace ℝ D]
1474-
[MeasurableSpace D] {μ : Measure D} [BorelSpace D] [FiniteDimensional ℝ D] [μ.IsAddHaarMeasure]
1475-
1476-
open scoped LineDeriv
1477-
1478-
/-- Integration by parts of Schwartz functions for directional derivatives.
1479-
1480-
Version for a general bilinear map. -/
1481-
theorem integral_bilinear_lineDerivOp_right_eq_neg_left (f : 𝓢(D, E)) (g : 𝓢(D, F))
1482-
(L : E →L[ℝ] F →L[ℝ] V) (v : D) :
1483-
∫ (x : D), L (f x) (∂_{v} g x) ∂μ = -∫ (x : D), L (∂_{v} f x) (g x) ∂μ := by
1484-
apply integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable (v := v)
1485-
(bilinLeftCLM L g.hasTemperateGrowth _).integrable
1486-
(bilinLeftCLM L (∂_{v} g).hasTemperateGrowth _).integrable
1487-
(bilinLeftCLM L g.hasTemperateGrowth _).integrable
1488-
all_goals
1489-
intro x
1490-
exact (hasFDerivAt _ x).hasLineDerivAt v
1491-
1492-
variable [NormedRing 𝕜] [NormedSpace ℝ 𝕜] [IsScalarTower ℝ 𝕜 𝕜] [SMulCommClass ℝ 𝕜 𝕜] in
1493-
/-- Integration by parts of Schwartz functions for directional derivatives.
1494-
1495-
Version for multiplication of scalar-valued Schwartz functions. -/
1496-
theorem integral_mul_lineDerivOp_right_eq_neg_left (f : 𝓢(D, 𝕜)) (g : 𝓢(D, 𝕜)) (v : D) :
1497-
∫ (x : D), f x * ∂_{v} g x ∂μ = -∫ (x : D), ∂_{v} f x * g x ∂μ :=
1498-
integral_bilinear_lineDerivOp_right_eq_neg_left f g (ContinuousLinearMap.mul ℝ 𝕜) v
1499-
1500-
variable [RCLike 𝕜] [NormedSpace 𝕜 F] [NormedSpace 𝕜 V]
1501-
1502-
/-- Integration by parts of Schwartz functions for directional derivatives.
1503-
1504-
Version for scalar multiplication. -/
1505-
theorem integral_smul_lineDerivOp_right_eq_neg_left (f : 𝓢(D, 𝕜)) (g : 𝓢(D, F)) (v : D) :
1506-
∫ (x : D), f x • ∂_{v} g x ∂μ = -∫ (x : D), ∂_{v} f x • g x ∂μ :=
1507-
integral_bilinear_lineDerivOp_right_eq_neg_left f g (ContinuousLinearMap.lsmul ℝ 𝕜) v
1508-
1509-
/-- Integration by parts of Schwartz functions for directional derivatives.
1510-
1511-
Version for a Schwartz function with values in continuous linear maps. -/
1512-
theorem integral_clm_comp_lineDerivOp_right_eq_neg_left (f : 𝓢(D, F →L[𝕜] V)) (g : 𝓢(D, F))
1513-
(v : D) : ∫ (x : D), f x (∂_{v} g x) ∂μ = -∫ (x : D), ∂_{v} f x (g x) ∂μ :=
1514-
integral_bilinear_lineDerivOp_right_eq_neg_left f g
1515-
((ContinuousLinearMap.id 𝕜 (F →L[𝕜] V)).bilinearRestrictScalars ℝ) v
1516-
1517-
end integration_by_parts
1518-
1519-
15201302
end SchwartzMap
1521-
1522-
set_option linter.style.longFile 1700

0 commit comments

Comments
 (0)