From a4c0c457fe257da08b90a8e82b2f1eef4a353d72 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 11:43:59 -0500 Subject: [PATCH 01/12] refactor to use fourierChar --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 51 ++++++++----------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index 47bfdd32a7..abb287e92f 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -79,8 +79,8 @@ namespace WaveVectorSpace section FourierIntegral -open MeasureTheory -open scoped Real +open MeasureTheory Real +open scoped FourierTransform variable (a b : ℝ) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] @@ -88,18 +88,6 @@ variable (a b : ℝ) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] ### A.1. Two-parameter definitions -/ -/-- The additive character `fun r ↦ exp (b * r * I)` from `ℝ` to the unit circle in `ℂ`. -/ -noncomputable def physChar : AddChar ℝ Circle where - toFun r := Circle.exp (b * r) - map_zero_eq_one' := by rw [mul_zero, Circle.exp_zero] - map_add_eq_mul' _ _ := by rw [mul_add, Circle.exp_add] - -variable {b} in -@[fun_prop] -lemma physChar_continuous : Continuous (physChar b) := by - rw [AddChar.coe_mk] - fun_prop - /-- The Fourier integral over `Space`, `√(|b| / (2 * π) ^ (1 - a)) • ∫ x, exp (b * (k ⬝ᵥ x) * I) • f x ∂volume`, @@ -108,20 +96,21 @@ parametrized by `a b : ℝ`. -/ noncomputable def fourierIntegral (f : Space d → E) (k : WaveVectorSpace d) : E := √(|b| / (2 * π) ^ (1 - a)) - • VectorFourier.fourierIntegral (physChar b) volume (-pairingCLM.flip.toLinearMap₁₂) f k + • VectorFourier.fourierIntegral 𝐞 volume (-(b / (2 * π)) • pairingCLM.flip).toLinearMap₁₂ f k lemma fourierIntegral_def (f : Space d → E) : fourierIntegral a b f = √(|b| / (2 * π) ^ (1 - a)) - • VectorFourier.fourierIntegral (physChar b) volume (-pairingCLM.flip.toLinearMap₁₂) f := + • VectorFourier.fourierIntegral 𝐞 volume + (-(b / (2 * π)) • pairingCLM.flip).toLinearMap₁₂ f := rfl open Complex in lemma fourierIntegral_eq (f : Space d → E) (k : WaveVectorSpace d) : fourierIntegral a b f k = √(|b| / (2 * π) ^ (1 - a)) • ∫ x : Space d, cexp (b * (k ⬝ᵥ x) * I) • f x := by - simp [fourierIntegral_def, VectorFourier.fourierIntegral, physChar, pairingCLM_apply_eq_dual, - dual_apply, Circle.smul_def] + simp [fourierIntegral_def, VectorFourier.fourierIntegral, fourierChar, pairingCLM_apply_eq_dual, + dual_apply, Circle.smul_def, ← mul_assoc, mul_div_cancel₀] /-- The inverse Fourier integral over `WaveVectorSpace`, @@ -131,20 +120,20 @@ parametrized by `a b : ℝ`. -/ noncomputable def fourierIntegralInv (g : WaveVectorSpace d → E) (x : Space d) : E := √(|b| / (2 * π) ^ (1 + a)) - • VectorFourier.fourierIntegral (physChar b) volume pairingCLM.toLinearMap₁₂ g x + • VectorFourier.fourierIntegral 𝐞 volume ((b / (2 * π)) • pairingCLM).toLinearMap₁₂ g x lemma fourierIntegralInv_def (g : WaveVectorSpace d → E) : fourierIntegralInv a b g = √(|b| / (2 * π) ^ (1 + a)) - • VectorFourier.fourierIntegral (physChar b) volume pairingCLM.toLinearMap₁₂ g := + • VectorFourier.fourierIntegral 𝐞 volume ((b / (2 * π)) • pairingCLM).toLinearMap₁₂ g := rfl open Complex in lemma fourierIntegralInv_eq (g : WaveVectorSpace d → E) (x : Space d) : fourierIntegralInv a b g x = √(|b| / (2 * π) ^ (1 + a)) • ∫ k : WaveVectorSpace d, cexp (-b * (k ⬝ᵥ x) * I) • g k := by - simp [fourierIntegralInv_def, VectorFourier.fourierIntegral, physChar, pairingCLM_apply_eq_dual, - dual_apply, Circle.smul_def, Complex.exp_neg] + simp [fourierIntegralInv_def, VectorFourier.fourierIntegral, pairingCLM_apply_eq_dual, + fourierChar, dual_apply, Circle.smul_def, Complex.exp_neg, ← mul_assoc, mul_div_cancel₀] /-! ### A.2. Basic properties @@ -169,24 +158,26 @@ lemma fourierIntegralInv_const_smul (f : WaveVectorSpace d → E) (c : ℂ) : lemma fourierIntegral_add {f₁ f₂ : Space d → E} (hf₁ : Integrable f₁) (hf₂ : Integrable f₂) : fourierIntegral a b (f₁ + f₂) = fourierIntegral a b f₁ + fourierIntegral a b f₂ := by - rw [fourierIntegral_def, fourierIntegral_def, fourierIntegral_def, ← smul_add, - VectorFourier.fourierIntegral_add physChar_continuous pairingCLM.flip.continuous₂.neg hf₁ hf₂] + simp only [fourierIntegral_def, ← smul_add] + rw [VectorFourier.fourierIntegral_add continuous_fourierChar + (-(b / (2 * π)) • pairingCLM.flip).continuous₂ hf₁ hf₂] lemma fourierIntegralInv_add {g₁ g₂ : WaveVectorSpace d → E} (hg₁ : Integrable g₁) (hg₂ : Integrable g₂) : fourierIntegralInv a b (g₁ + g₂) = fourierIntegralInv a b g₁ + fourierIntegralInv a b g₂ := by - rw [fourierIntegralInv_def, fourierIntegralInv_def, fourierIntegralInv_def, ← smul_add, - VectorFourier.fourierIntegral_add physChar_continuous pairingCLM.continuous₂ hg₁ hg₂] + simp only [fourierIntegralInv_def, ← smul_add] + rw [VectorFourier.fourierIntegral_add continuous_fourierChar + ((b / (2 * π)) • pairingCLM).continuous₂ hg₁ hg₂] lemma fourierIntegral_continuous {f : Space d → E} (hf : Integrable f) : Continuous (fourierIntegral a b f) := - VectorFourier.fourierIntegral_continuous physChar_continuous pairingCLM.flip.continuous₂.neg hf - |>.const_smul _ + VectorFourier.fourierIntegral_continuous continuous_fourierChar + (-(b / (2 * π)) • pairingCLM.flip).continuous₂ hf |>.const_smul _ lemma fourierIntegralInv_continuous {g : WaveVectorSpace d → E} (hg : Integrable g) : Continuous (fourierIntegralInv a b g) := - VectorFourier.fourierIntegral_continuous physChar_continuous pairingCLM.continuous₂ hg - |>.const_smul _ + VectorFourier.fourierIntegral_continuous continuous_fourierChar + ((b / (2 * π)) • pairingCLM).continuous₂ hg |>.const_smul _ end FourierIntegral From 1973233652e4ad72a02e0e1caa901f3b88ff773a Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 15:53:08 -0500 Subject: [PATCH 02/12] normed space instance --- Physlib/SpaceAndTime/WaveVectorSpace/Basic.lean | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Basic.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Basic.lean index f088719b0e..076e7089a7 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Basic.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Basic.lean @@ -198,6 +198,14 @@ noncomputable instance instNormedAddCommGroup : NormedAddCommGroup (WaveVectorSp noncomputable instance instInnerProductSpaceReal : InnerProductSpace ℝ (WaveVectorSpace d) := InnerProductSpace.ofCore instCoreReal.toCore +/-- The normed space structure on `WaveVectorSpace d`, registered directly. It is definitionally the +one underlying the inner product space structure, but registering it as its own instance is +needed for typeclass search to find the operator-norm structure on `WaveVectorSpace d →L[ℝ] ℝ` +(for example `NormSMulClass ℝ (WaveVectorSpace d →L[ℝ] ℝ)`), which is not found when +`NormedSpace ℝ (WaveVectorSpace d)` arises only as a nested subgoal through +`InnerProductSpace.toNormedSpace`. -/ +noncomputable instance : NormedSpace ℝ (WaveVectorSpace d) := InnerProductSpace.toNormedSpace + lemma norm_eq (k : WaveVectorSpace d) : ‖k‖ = √(∑ i, k i ^ 2) := by simp_rw [norm_eq_sqrt_real_inner, inner_apply, pow_two] From 79bd0f55970b9bfbc739b786a7396fc68e29175a Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 15:53:28 -0500 Subject: [PATCH 03/12] dual operator norms --- .../WaveVectorSpace/DualPairing.lean | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean b/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean index e2d82ef3ab..f45d5a5bfd 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean @@ -58,6 +58,17 @@ def dual (x : Space d) : StrongDual ℝ (WaveVectorSpace d) where lemma dual_apply (x : Space d) (k : WaveVectorSpace d) : x.dual k = k ⬝ᵥ x := rfl +@[simp] +lemma opNorm_dual_eq_norm (x : Space d) : ‖x.dual‖ = ‖x‖ := by + refine ContinuousLinearMap.opNorm_eq_of_bounds (norm_nonneg x) (fun k ↦ ?_) fun N hN h ↦ ?_ + · calc + _ = |inner ℝ (WithLp.toLp 2 x.val) (WithLp.toLp 2 k.val)| := by + simp [dual_apply, inner, dotProduct] + _ ≤ ‖WithLp.toLp 2 x.val‖ * ‖WithLp.toLp 2 k.val‖ := abs_real_inner_le_norm _ _ + _ = ‖x‖ * ‖k‖ := by simp [PiLp.norm_eq_of_L2, norm_eq, WaveVectorSpace.norm_eq] + · suffices ‖x‖ ^ 2 ≤ N * ‖x‖ by nlinarith + simpa [dual_apply, dotProduct, ← pow_two, ← norm_sq_eq, WaveVectorSpace.norm_eq] using h ⟨x⟩ + end Space namespace WaveVectorSpace @@ -70,6 +81,17 @@ def dual (k : WaveVectorSpace d) : StrongDual ℝ (Space d) where lemma dual_apply (k : WaveVectorSpace d) (x : Space d) : k.dual x = k ⬝ᵥ x := rfl +@[simp] +lemma opNorm_dual_eq_norm (k : WaveVectorSpace d) : ‖k.dual‖ = ‖k‖ := by + refine ContinuousLinearMap.opNorm_eq_of_bounds (norm_nonneg k) (fun x ↦ ?_) fun N hN h ↦ ?_ + · calc + _ = |inner ℝ (WithLp.toLp 2 x.val) (WithLp.toLp 2 k.val)| := by + simp [dual_apply, inner, dotProduct] + _ ≤ ‖WithLp.toLp 2 x.val‖ * ‖WithLp.toLp 2 k.val‖ := abs_real_inner_le_norm _ _ + _ = ‖k‖ * ‖x‖ := by simp [PiLp.norm_eq_of_L2, norm_eq, Space.norm_eq, mul_comm] + · suffices ‖k‖ ^ 2 ≤ N * ‖k‖ by nlinarith + simpa [dual_apply, dotProduct, ← pow_two, ← norm_sq_eq, Space.norm_eq] using h ⟨k⟩ + /-! ## B. Bilinear pairing -/ @@ -88,6 +110,9 @@ lemma pairingCLM_apply_eq_dual (k : WaveVectorSpace d) : pairingCLM k = k.dual : lemma pairingCLM_flip_apply_eq_dual (x : Space d) : pairingCLM.flip x = x.dual := rfl +@[simp] +lemma pairingCLM_apply_apply (k : WaveVectorSpace d) (x : Space d) : pairingCLM k x = k ⬝ᵥ x := rfl + /-! ## C. Derivatives -/ From 90017b5a7b0ae29f5922924d260f4b7b84df5998 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 15:57:07 -0500 Subject: [PATCH 04/12] integration of continuous linear maps --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index abb287e92f..940efc2ea9 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -54,6 +54,9 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - A. Fourier integrals - A.1. Two-parameter definitions - A.2. Basic properties + - A.2.1. Linearity + - A.2.2. Continuity + - A.2.3. Integration of continuous linear maps - B. Fourier instances - B.1. `(a, b) = (0, 1)` (default) - B.2. `(a, b) = (1, -1)` @@ -148,6 +151,10 @@ lemma fourierIntegralInv_congr_ae {g₁ g₂ : WaveVectorSpace d → E} (hg : g rw [fourierIntegralInv_def, fourierIntegralInv_def, VectorFourier.fourierIntegral_congr_ae _ _ _ hg] +/-! +### A.2.1. Linearity +-/ + lemma fourierIntegral_const_smul (f : Space d → E) (c : ℂ) : fourierIntegral a b (c • f) = c • fourierIntegral a b f := by simp only [fourierIntegral_def, VectorFourier.fourierIntegral_const_smul, smul_comm c] @@ -169,6 +176,10 @@ lemma fourierIntegralInv_add rw [VectorFourier.fourierIntegral_add continuous_fourierChar ((b / (2 * π)) • pairingCLM).continuous₂ hg₁ hg₂] +/-! +#### A.2.2. Continuity +-/ + lemma fourierIntegral_continuous {f : Space d → E} (hf : Integrable f) : Continuous (fourierIntegral a b f) := VectorFourier.fourierIntegral_continuous continuous_fourierChar @@ -179,6 +190,28 @@ lemma fourierIntegralInv_continuous {g : WaveVectorSpace d → E} (hg : Integrab VectorFourier.fourierIntegral_continuous continuous_fourierChar ((b / (2 * π)) • pairingCLM).continuous₂ hg |>.const_smul _ +/-! +#### A.2.3. Integration of continuous linear maps +-/ + +section IntegrandCLM + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma fourierIntegral_continuousLinearMap_apply + {f : Space d → F →L[ℝ] E} (hf : Integrable f) (k : WaveVectorSpace d) (v : F) : + fourierIntegral a b f k v = fourierIntegral a b (f · v) k := by + simp only [fourierIntegral_def, Pi.smul_apply, smul_apply, + VectorFourier.fourierIntegral_continuousLinearMap_apply continuous_fourierChar hf] + +lemma fourierIntegralInv_continuousLinearMap_apply + {g : WaveVectorSpace d → F →L[ℝ] E} (hg : Integrable g) (x : Space d) (v : F) : + fourierIntegralInv a b g x v = fourierIntegralInv a b (g · v) x := by + simp only [fourierIntegralInv_def, Pi.smul_apply, smul_apply, + VectorFourier.fourierIntegral_continuousLinearMap_apply continuous_fourierChar hg] + +end IntegrandCLM + end FourierIntegral end WaveVectorSpace From 9efbaa7d7079d90faa57c69ad12d9979494ad877 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 18:26:16 -0500 Subject: [PATCH 05/12] continuous duals --- Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean b/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean index f45d5a5bfd..d021f40dcd 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/DualPairing.lean @@ -113,6 +113,15 @@ lemma pairingCLM_flip_apply_eq_dual (x : Space d) : pairingCLM.flip x = x.dual : @[simp] lemma pairingCLM_apply_apply (k : WaveVectorSpace d) (x : Space d) : pairingCLM k x = k ⬝ᵥ x := rfl +@[fun_prop] +lemma continuous_dual : Continuous (dual : WaveVectorSpace d → StrongDual ℝ (Space d)) := + pairingCLM.continuous + +@[fun_prop] +lemma _root_.Space.continuous_dual : + Continuous (Space.dual : Space d → StrongDual ℝ (WaveVectorSpace d)) := + pairingCLM.flip.continuous + /-! ## C. Derivatives -/ From cc3367dc621ed04bc24de782c17425aaa4b7a9e0 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 18:29:18 -0500 Subject: [PATCH 06/12] fourier multipliers --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 79 ++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index 940efc2ea9..250bc27327 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -57,6 +57,8 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - A.2.1. Linearity - A.2.2. Continuity - A.2.3. Integration of continuous linear maps + - A.3. Derivatives + - A.3.1. Fourier multiplier - B. Fourier instances - B.1. `(a, b) = (0, 1)` (default) - B.2. `(a, b) = (1, -1)` @@ -82,7 +84,7 @@ namespace WaveVectorSpace section FourierIntegral -open MeasureTheory Real +open Complex MeasureTheory Real open scoped FourierTransform variable (a b : ℝ) {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] @@ -108,7 +110,6 @@ lemma fourierIntegral_def (f : Space d → E) : (-(b / (2 * π)) • pairingCLM.flip).toLinearMap₁₂ f := rfl -open Complex in lemma fourierIntegral_eq (f : Space d → E) (k : WaveVectorSpace d) : fourierIntegral a b f k = √(|b| / (2 * π) ^ (1 - a)) • ∫ x : Space d, cexp (b * (k ⬝ᵥ x) * I) • f x := by @@ -131,7 +132,6 @@ lemma fourierIntegralInv_def (g : WaveVectorSpace d → E) : • VectorFourier.fourierIntegral 𝐞 volume ((b / (2 * π)) • pairingCLM).toLinearMap₁₂ g := rfl -open Complex in lemma fourierIntegralInv_eq (g : WaveVectorSpace d → E) (x : Space d) : fourierIntegralInv a b g x = √(|b| / (2 * π) ^ (1 + a)) • ∫ k : WaveVectorSpace d, cexp (-b * (k ⬝ᵥ x) * I) • g k := by @@ -212,6 +212,79 @@ lemma fourierIntegralInv_continuousLinearMap_apply end IntegrandCLM +/-! +### A.3. Derivatives +-/ + +/-! +#### A.3.1. Fourier multipliers +-/ + +/-- Send a function `f : Space d → E` to the function `f : Space d → Hom (WaveVectorSpace d, E)` +given by `x ↦ (k ↦ b * I * (k ⬝ᵥ x) • f x)`. This is designed so that the Fourier transform of +`fourierSMulRight b f` is the `fderiv` of the Fourier transform of `f`. -/ +noncomputable def fourierSMulRight (f : Space d → E) (x : Space d) : WaveVectorSpace d →L[ℝ] E := + (b * I) • x.dual.smulRight (f x) + +/-- Send a function `g : WaveVectorSpace d → E` to the function +`g : WaveVectorSpace d → Hom (Space d, E)` given by `k ↦ (x ↦ -b * I * (k ⬝ᵥ x) • g k)`. +This is designed so that the inverse Fourier transform of `fourierInvSMulRight b g` +is the `fderiv` of the inverse Fourier transform of `g`. -/ +noncomputable def fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : + Space d →L[ℝ] E := + -(b * I) • k.dual.smulRight (g k) + +lemma fourierSMulRight_eq (f : Space d → E) : + fourierSMulRight b f = fun x ↦ (b * I) • x.dual.smulRight (f x) := + rfl + +lemma fourierInvSMulRight_eq (g : WaveVectorSpace d → E) : + fourierInvSMulRight b g = fun k ↦ -(b * I) • k.dual.smulRight (g k) := + rfl + +@[simp] +lemma fourierSMulRight_apply (f : Space d → E) (x : Space d) (k : WaveVectorSpace d) : + fourierSMulRight b f x k = (b * I) • (k ⬝ᵥ x) • f x := + rfl + +@[simp] +lemma fourierInvSMulRight_apply (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) (x : Space d) : + fourierInvSMulRight b g k x = -(b * I) • (k ⬝ᵥ x) • g k := + rfl + +@[simp] +lemma norm_fourierSMulRight (f : Space d → E) (x : Space d) : + ‖fourierSMulRight b f x‖ = |b| * ‖x‖ * ‖f x‖ := by + simp [fourierSMulRight, norm_smul, mul_assoc] + +@[simp] +lemma norm_fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : + ‖fourierInvSMulRight b g k‖ = |b| * ‖k‖ * ‖g k‖ := by + simp [fourierInvSMulRight, norm_smul, mul_assoc] + +@[fun_prop] +lemma aestronglyMeasurable_fourierSMulRight {f : Space d → E} (hf : AEStronglyMeasurable f) : + AEStronglyMeasurable (fourierSMulRight b f) := by + rw [fourierSMulRight_eq] + fun_prop + +@[fun_prop] +lemma aestronglyMeasurable_fourierInvSMulRight + {g : WaveVectorSpace d → E} (hg : AEStronglyMeasurable g) : + AEStronglyMeasurable (fourierInvSMulRight b g) := by + rw [fourierInvSMulRight_eq] + fun_prop + +lemma integrable_fourierSMulRight {f : Space d → E} + (hf : AEStronglyMeasurable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : + Integrable (fourierSMulRight b f) := + (hf'.smul |b|).mono (by fun_prop) <| ae_of_all _ fun _ ↦ by simp [mul_assoc] + +lemma integrable_fourierInvSMulRight {g : WaveVectorSpace d → E} + (hg : AEStronglyMeasurable g) (hg' : Integrable fun k ↦ ‖k‖ * ‖g k‖) : + Integrable (fourierInvSMulRight b g) := + (hg'.smul |b|).mono (by fun_prop) <| ae_of_all _ fun _ ↦ by simp [mul_assoc] + end FourierIntegral end WaveVectorSpace From 1f5bed9cc3c90d61195374e7356700fc29bf802f Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 18:29:46 -0500 Subject: [PATCH 07/12] fderivs --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index 250bc27327..bb9781938f 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -59,6 +59,7 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - A.2.3. Integration of continuous linear maps - A.3. Derivatives - A.3.1. Fourier multiplier + - A.3.2. Fréchet derivatives - B. Fourier instances - B.1. `(a, b) = (0, 1)` (default) - B.2. `(a, b) = (1, -1)` @@ -285,6 +286,31 @@ lemma integrable_fourierInvSMulRight {g : WaveVectorSpace d → E} Integrable (fourierInvSMulRight b g) := (hg'.smul |b|).mono (by fun_prop) <| ae_of_all _ fun _ ↦ by simp [mul_assoc] +/-! +#### A.3.2. Fréchet derivatives +-/ + +lemma fderiv_fourierIntegral + {f : Space d → E} (hf : Integrable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : + fderiv ℝ (fourierIntegral a b f) = fourierIntegral a b (fourierSMulRight b f) := by + rw [fourierIntegral_def, fderiv_const_smul_field, VectorFourier.fderiv_fourierIntegral _ hf hf'] + congr with x k + calc + _ = (2 * π * I * (b / (2 * π) * pairingCLM k x)) • f x := by simp [← coe_smul, smul_smul] + _ = (b * I * pairingCLM k x) • f x := by field_simp + _ = (b * I) • (k ⬝ᵥ x) • f x := by simp [← coe_smul, smul_smul] + +lemma fderiv_fourierIntegralInv + {g : WaveVectorSpace d → E} (hg : Integrable g) (hg' : Integrable (fun k ↦ ‖k‖ * ‖g k‖)) : + fderiv ℝ (fourierIntegralInv a b g) = fourierIntegralInv a b (fourierInvSMulRight b g) := by + rw [fourierIntegralInv_def, fderiv_const_smul_field, + VectorFourier.fderiv_fourierIntegral _ hg hg'] + congr with k x + calc + _ = -(2 * π * I * (b / (2 * π) * pairingCLM k x)) • g k := by simp [← coe_smul, smul_smul] + _ = -(b * I * pairingCLM k x) • g k := by field_simp + _ = -(b * I) • (k ⬝ᵥ x) • g k := by simp [← coe_smul, smul_smul] + end FourierIntegral end WaveVectorSpace From 3a4ddc205b05af38aabc7f406674430db73a907e Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 18:30:07 -0500 Subject: [PATCH 08/12] partial derivatives --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index bb9781938f..5cf9f4dd5b 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -5,7 +5,6 @@ Authors: Gregory J. Loges -/ module -public import Mathlib.Analysis.Fourier.FourierTransform public import Physlib.SpaceAndTime.WaveVectorSpace.DualPairing /-! @@ -60,6 +59,7 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - A.3. Derivatives - A.3.1. Fourier multiplier - A.3.2. Fréchet derivatives + - A.3.3. Partial derivatives - B. Fourier instances - B.1. `(a, b) = (0, 1)` (default) - B.2. `(a, b) = (1, -1)` @@ -311,6 +311,28 @@ lemma fderiv_fourierIntegralInv _ = -(b * I * pairingCLM k x) • g k := by field_simp _ = -(b * I) • (k ⬝ᵥ x) • g k := by simp [← coe_smul, smul_smul] +/-! +#### A.3.3. Partial derivatives +-/ + +lemma deriv_fourierIntegral + (i : Fin d) {f : Space d → E} (hf : Integrable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : + ∂[i] (fourierIntegral a b f) = fourierIntegral a b fun x ↦ (b * I * x i) • f x := by + ext + simp only [deriv_eq, hf, hf', fderiv_fourierIntegral, hf.aestronglyMeasurable, + integrable_fourierSMulRight, fourierIntegral_continuousLinearMap_apply] + congr + simp [dotProduct, ← nsmul_eq_mul, ← coe_smul, smul_smul] + +lemma deriv_fourierIntegralInv (i : Fin d) + {g : WaveVectorSpace d → E} (hg : Integrable g) (hg' : Integrable fun k ↦ ‖k‖ * ‖g k‖) : + ∂[i] (fourierIntegralInv a b g) = fourierIntegralInv a b fun k ↦ (-b * I * k i) • g k := by + ext + simp only [Space.deriv_eq, hg, hg', fderiv_fourierIntegralInv, hg.aestronglyMeasurable, + integrable_fourierInvSMulRight, fourierIntegralInv_continuousLinearMap_apply] + congr + simp [dotProduct, Space.basis_apply, ← coe_smul, smul_smul] + end FourierIntegral end WaveVectorSpace From 85316b49d2a136f70e30c627952e6a6ef8f69368 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 19:14:07 -0500 Subject: [PATCH 09/12] add to docs --- .../SpaceAndTime/WaveVectorSpace/Fourier.lean | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index 5cf9f4dd5b..dc69c666fa 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -47,6 +47,10 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - `fourierIntegralInv a b` : the inverse Fourier integral with real parameters `a` and `b`, corresponding to a choice of convention, which maps a function `g : WaveVectorSpace d → E` to its Fourier transform of type `Space d → E`. +- `deriv_fourierIntegral` / `deriv_fourierIntegralInv` : for a suitably nice function + `f : Space d → E` the derivative along the `i`ᵗʰ coordinate direction of its Fourier integral + is the Fourier integral of the function `x ↦ (b * I * x i) • f x`, and similarly for functions + `WaveVectorSpace d → E` and the inverse Fourier integral. ## iii. Table of contents @@ -199,12 +203,18 @@ section IntegrandCLM variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +/-- Given a CLM-valued function of space, `f : Space d → F →L[ℝ] E`, +evaluating its Fourier integral at `v : F` is the same as taking +the Fourier integral of `x ↦ f x v`. -/ lemma fourierIntegral_continuousLinearMap_apply {f : Space d → F →L[ℝ] E} (hf : Integrable f) (k : WaveVectorSpace d) (v : F) : fourierIntegral a b f k v = fourierIntegral a b (f · v) k := by simp only [fourierIntegral_def, Pi.smul_apply, smul_apply, VectorFourier.fourierIntegral_continuousLinearMap_apply continuous_fourierChar hf] +/-- Given a CLM-valued function of wavevector, `g : WaveVectorSpace d → F →L[ℝ] E`, +evaluating its inverse Fourier integral at `v : F` is the same as taking +the inverse Fourier integral of `k ↦ g k v`. -/ lemma fourierIntegralInv_continuousLinearMap_apply {g : WaveVectorSpace d → F →L[ℝ] E} (hg : Integrable g) (x : Space d) (v : F) : fourierIntegralInv a b g x v = fourierIntegralInv a b (g · v) x := by @@ -222,13 +232,13 @@ end IntegrandCLM -/ /-- Send a function `f : Space d → E` to the function `f : Space d → Hom (WaveVectorSpace d, E)` -given by `x ↦ (k ↦ b * I * (k ⬝ᵥ x) • f x)`. This is designed so that the Fourier transform of +given by `x ↦ k ↦ b * I * (k ⬝ᵥ x) • f x`. This is designed so that the Fourier transform of `fourierSMulRight b f` is the `fderiv` of the Fourier transform of `f`. -/ noncomputable def fourierSMulRight (f : Space d → E) (x : Space d) : WaveVectorSpace d →L[ℝ] E := (b * I) • x.dual.smulRight (f x) /-- Send a function `g : WaveVectorSpace d → E` to the function -`g : WaveVectorSpace d → Hom (Space d, E)` given by `k ↦ (x ↦ -b * I * (k ⬝ᵥ x) • g k)`. +`g : WaveVectorSpace d → Hom (Space d, E)` given by `k ↦ x ↦ -b * I * (k ⬝ᵥ x) • g k`. This is designed so that the inverse Fourier transform of `fourierInvSMulRight b g` is the `fderiv` of the inverse Fourier transform of `g`. -/ noncomputable def fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : @@ -256,12 +266,12 @@ lemma fourierInvSMulRight_apply (g : WaveVectorSpace d → E) (k : WaveVectorSpa @[simp] lemma norm_fourierSMulRight (f : Space d → E) (x : Space d) : ‖fourierSMulRight b f x‖ = |b| * ‖x‖ * ‖f x‖ := by - simp [fourierSMulRight, norm_smul, mul_assoc] + simp [fourierSMulRight_eq, norm_smul, mul_assoc] @[simp] lemma norm_fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : ‖fourierInvSMulRight b g k‖ = |b| * ‖k‖ * ‖g k‖ := by - simp [fourierInvSMulRight, norm_smul, mul_assoc] + simp [fourierInvSMulRight_eq, norm_smul, mul_assoc] @[fun_prop] lemma aestronglyMeasurable_fourierSMulRight {f : Space d → E} (hf : AEStronglyMeasurable f) : @@ -315,8 +325,10 @@ lemma fderiv_fourierIntegralInv #### A.3.3. Partial derivatives -/ -lemma deriv_fourierIntegral - (i : Fin d) {f : Space d → E} (hf : Integrable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : +/-- The partial derivative of the Fourier transform of `f` along coordinate `i` +is the Fourier transform of `x ↦ (b * I * x i) • f x`, provided both integrals exist. -/ +lemma deriv_fourierIntegral (i : Fin d) + {f : Space d → E} (hf : Integrable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : ∂[i] (fourierIntegral a b f) = fourierIntegral a b fun x ↦ (b * I * x i) • f x := by ext simp only [deriv_eq, hf, hf', fderiv_fourierIntegral, hf.aestronglyMeasurable, @@ -324,9 +336,11 @@ lemma deriv_fourierIntegral congr simp [dotProduct, ← nsmul_eq_mul, ← coe_smul, smul_smul] +/-- The partial derivative of the inverse Fourier transform of `g` along coordinate `i` +is the inverse Fourier transform of `k ↦ (-b * I * k i) • g k`, provided both integrals exist. -/ lemma deriv_fourierIntegralInv (i : Fin d) {g : WaveVectorSpace d → E} (hg : Integrable g) (hg' : Integrable fun k ↦ ‖k‖ * ‖g k‖) : - ∂[i] (fourierIntegralInv a b g) = fourierIntegralInv a b fun k ↦ (-b * I * k i) • g k := by + ∂[i] (fourierIntegralInv a b g) = fourierIntegralInv a b fun k ↦ -(b * I * k i) • g k := by ext simp only [Space.deriv_eq, hg, hg', fderiv_fourierIntegralInv, hg.aestronglyMeasurable, integrable_fourierInvSMulRight, fourierIntegralInv_continuousLinearMap_apply] From 5be3049ceaaf386ec1f38561e1915db4c1762452 Mon Sep 17 00:00:00 2001 From: gloges Date: Mon, 16 Nov 2026 19:27:51 -0500 Subject: [PATCH 10/12] minor changes --- Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index dc69c666fa..a597caf7ce 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -264,12 +264,12 @@ lemma fourierInvSMulRight_apply (g : WaveVectorSpace d → E) (k : WaveVectorSpa rfl @[simp] -lemma norm_fourierSMulRight (f : Space d → E) (x : Space d) : +lemma opNorm_fourierSMulRight (f : Space d → E) (x : Space d) : ‖fourierSMulRight b f x‖ = |b| * ‖x‖ * ‖f x‖ := by simp [fourierSMulRight_eq, norm_smul, mul_assoc] @[simp] -lemma norm_fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : +lemma opNorm_fourierInvSMulRight (g : WaveVectorSpace d → E) (k : WaveVectorSpace d) : ‖fourierInvSMulRight b g k‖ = |b| * ‖k‖ * ‖g k‖ := by simp [fourierInvSMulRight_eq, norm_smul, mul_assoc] @@ -289,12 +289,12 @@ lemma aestronglyMeasurable_fourierInvSMulRight lemma integrable_fourierSMulRight {f : Space d → E} (hf : AEStronglyMeasurable f) (hf' : Integrable fun x ↦ ‖x‖ * ‖f x‖) : Integrable (fourierSMulRight b f) := - (hf'.smul |b|).mono (by fun_prop) <| ae_of_all _ fun _ ↦ by simp [mul_assoc] + hf'.smul |b| |>.mono (by fun_prop) <| ae_of_all _ <| by simp [mul_assoc] lemma integrable_fourierInvSMulRight {g : WaveVectorSpace d → E} (hg : AEStronglyMeasurable g) (hg' : Integrable fun k ↦ ‖k‖ * ‖g k‖) : Integrable (fourierInvSMulRight b g) := - (hg'.smul |b|).mono (by fun_prop) <| ae_of_all _ fun _ ↦ by simp [mul_assoc] + hg'.smul |b| |>.mono (by fun_prop) <| ae_of_all _ <| by simp [mul_assoc] /-! #### A.3.2. Fréchet derivatives From 5f86b7794898639f74f41c79f58c6a4102cd48e0 Mon Sep 17 00:00:00 2001 From: Gregory Loges Date: Mon, 16 Nov 2026 21:37:20 -0500 Subject: [PATCH 11/12] fix section header --- Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index a597caf7ce..a52173b67b 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -157,7 +157,7 @@ lemma fourierIntegralInv_congr_ae {g₁ g₂ : WaveVectorSpace d → E} (hg : g VectorFourier.fourierIntegral_congr_ae _ _ _ hg] /-! -### A.2.1. Linearity +#### A.2.1. Linearity -/ lemma fourierIntegral_const_smul (f : Space d → E) (c : ℂ) : From 1af59bda5a8484ed4b31d571bf35b055c4bcf798 Mon Sep 17 00:00:00 2001 From: Gregory Loges Date: Mon, 16 Nov 2026 21:45:16 -0500 Subject: [PATCH 12/12] fix typo in ToC --- Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean index a52173b67b..3d6b59fde9 100644 --- a/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean +++ b/Physlib/SpaceAndTime/WaveVectorSpace/Fourier.lean @@ -61,7 +61,7 @@ for $(a,b) = (1,-1)$). If a common convention is missing it can be added below i - A.2.2. Continuity - A.2.3. Integration of continuous linear maps - A.3. Derivatives - - A.3.1. Fourier multiplier + - A.3.1. Fourier multipliers - A.3.2. Fréchet derivatives - A.3.3. Partial derivatives - B. Fourier instances