Skip to content

Commit

Permalink
feat: the Fourier transform is self-adjoint (#10833)
Browse files Browse the repository at this point in the history
Also extend the notation `𝓕` for the Fourier transform to inner product spaces, introduce a notation `𝓕⁻` for the inverse Fourier transform, and generalize a few results from the real line to inner product spaces.
  • Loading branch information
sgouezel committed Feb 28, 2024
1 parent ae9f685 commit e059984
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 41 deletions.
154 changes: 136 additions & 18 deletions Mathlib/Analysis/Fourier/FourierTransform.lean
Expand Up @@ -5,7 +5,10 @@ Authors: David Loeffler
-/
import Mathlib.Analysis.Complex.Circle
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Haar.OfBasis
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace

#align_import analysis.fourier.fourier_transform from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"

Expand Down Expand Up @@ -33,12 +36,17 @@ where `e [x]` is notational sugar for `(e (Multiplicative.ofAdd x) : β„‚)` (avai
`fourier_transform`). This includes the cases `W` is the dual of `V` and `L` is the canonical
pairing, or `W = V` and `L` is a bilinear form (e.g. an inner product).
In namespace `fourier`, we consider the more familiar special case when `V = W = π•œ` and `L` is the
In namespace `Fourier`, we consider the more familiar special case when `V = W = π•œ` and `L` is the
multiplication map (but still allowing `π•œ` to be an arbitrary ring equipped with a measure).
The most familiar case of all is when `V = W = π•œ = ℝ`, `L` is multiplication, `ΞΌ` is volume, and
`e` is `Real.fourierChar`, i.e. the character `fun x ↦ exp ((2 * Ο€ * x) * I)`. The Fourier integral
in this case is defined as `Real.fourierIntegral`.
`e` is `Real.fourierChar`, i.e. the character `fun x ↦ exp ((2 * Ο€ * x) * I)` (for which we
introduce the notation `𝐞` in the locale `FourierTransform`).
Another familiar case (which generalizes the previous one) is when `V = W` is an inner product space
over `ℝ` and `L` is the scalar product. We introduce two notations `𝓕` for the Fourier transform in
this case and `𝓕⁻ f (v) = 𝓕 f (-v)` for the inverse Fourier transform. These notations make
in particular sense for `V = W = ℝ`.
## Main results
Expand All @@ -56,6 +64,7 @@ open MeasureTheory Filter
open scoped Topology

-- To avoid messing around with multiplicative vs. additive characters, we make a notation.
/-- Notation for multiplicative character applied in an additive setting. -/
scoped[FourierTransform] notation e "[" x "]" => (e (Multiplicative.ofAdd x) : β„‚)

open FourierTransform
Expand All @@ -66,7 +75,9 @@ open FourierTransform
namespace VectorFourier

variable {π•œ : Type*} [CommRing π•œ] {V : Type*} [AddCommGroup V] [Module π•œ V] [MeasurableSpace V]
{W : Type*} [AddCommGroup W] [Module π•œ W] {E : Type*} [NormedAddCommGroup E] [NormedSpace β„‚ E]
{W : Type*} [AddCommGroup W] [Module π•œ W]
{E F G : Type*} [NormedAddCommGroup E] [NormedSpace β„‚ E] [NormedAddCommGroup F] [NormedSpace β„‚ F]
[NormedAddCommGroup G] [NormedSpace β„‚ G]

section Defs

Expand Down Expand Up @@ -174,6 +185,63 @@ theorem fourierIntegral_continuous [FirstCountableTopology W] (he : Continuous e

end Continuous

section Fubini

variable [TopologicalSpace π•œ] [TopologicalRing π•œ] [TopologicalSpace V] [BorelSpace V]
[TopologicalSpace W] [MeasurableSpace W] [BorelSpace W]
{e : Multiplicative π•œ β†’* π•Š} {ΞΌ : Measure V} {L : V β†’β‚—[π•œ] W β†’β‚—[π•œ] π•œ}
{Ξ½ : Measure W} [SigmaFinite ΞΌ] [SigmaFinite Ξ½] [SecondCountableTopology V]

variable [CompleteSpace E] [CompleteSpace F]

/-- The Fourier transform satisfies `∫ 𝓕 f * g = ∫ f * 𝓕 g`, i.e., it is self-adjoint.
Version where the multiplication is replaced by a general bilinear form `M`. -/
theorem integral_bilin_fourierIntegral_eq_flip
{f : V β†’ E} {g : W β†’ F} (M : E β†’L[β„‚] F β†’L[β„‚] G) (he : Continuous e)
(hL : Continuous fun p : V Γ— W => L p.1 p.2) (hf : Integrable f ΞΌ) (hg : Integrable g Ξ½) :
∫ ΞΎ, M (fourierIntegral e ΞΌ L f ΞΎ) (g ΞΎ) βˆ‚Ξ½ =
∫ x, M (f x) (fourierIntegral e Ξ½ L.flip g x) βˆ‚ΞΌ := by
by_cases hG : CompleteSpace G; swap; Β· simp [integral, hG]
calc
∫ ΞΎ, M (fourierIntegral e ΞΌ L f ΞΎ) (g ΞΎ) βˆ‚Ξ½
= ∫ ΞΎ, M.flip (g ΞΎ) (∫ x, e[-L x ΞΎ] β€’ f x βˆ‚ΞΌ) βˆ‚Ξ½ := rfl
_ = ∫ ΞΎ, (∫ x, M.flip (g ΞΎ) (e[-L x ΞΎ] β€’ f x) βˆ‚ΞΌ) βˆ‚Ξ½ := by
congr with ΞΎ
apply (ContinuousLinearMap.integral_comp_comm _ _).symm
exact (fourier_integral_convergent_iff he hL _).1 hf
_ = ∫ x, (∫ ΞΎ, M.flip (g ΞΎ) (e[-L x ΞΎ] β€’ f x) βˆ‚Ξ½) βˆ‚ΞΌ := by
rw [integral_integral_swap]
have : Integrable (fun (p : W Γ— V) ↦ β€–Mβ€– * (β€–g p.1β€– * β€–f p.2β€–)) (Ξ½.prod ΞΌ) :=
(hg.norm.prod_mul hf.norm).const_mul _
apply this.mono
Β· have A : AEStronglyMeasurable (fun (p : W Γ— V) ↦ e[-L p.2 p.1] β€’ f p.2) (Ξ½.prod ΞΌ) := by
apply (Continuous.aestronglyMeasurable ?_).smul hf.1.snd
refine (continuous_induced_rng.mp he).comp (continuous_ofAdd.comp ?_)
exact (hL.comp continuous_swap).neg
exact M.flip.continuousβ‚‚.comp_aestronglyMeasurable (hg.1.fst.prod_mk A)
Β· apply eventually_of_forall
rintro ⟨ξ, x⟩
simp only [ofAdd_neg, map_inv, coe_inv_unitSphere, SMulHomClass.map_smul,
ContinuousLinearMap.flip_apply, Function.uncurry_apply_pair, norm_smul, norm_inv,
norm_eq_of_mem_sphere, inv_one, one_mul, norm_mul, norm_norm]
exact (M.le_opNormβ‚‚ (f x) (g ΞΎ)).trans (le_of_eq (by ring))
_ = ∫ x, (∫ ΞΎ, M (f x) (e[-L.flip ΞΎ x] β€’ g ΞΎ) βˆ‚Ξ½) βˆ‚ΞΌ := by simp
_ = ∫ x, M (f x) (∫ ΞΎ, e[-L.flip ΞΎ x] β€’ g ΞΎ βˆ‚Ξ½) βˆ‚ΞΌ := by
congr with x
apply ContinuousLinearMap.integral_comp_comm
apply (fourier_integral_convergent_iff he _ _).1 hg
exact hL.comp continuous_swap

/-- The Fourier transform satisfies `∫ 𝓕 f * g = ∫ f * 𝓕 g`, i.e., it is self-adjoint. -/
theorem integral_fourierIntegral_smul_eq_flip
{f : V β†’ β„‚} {g : W β†’ F} (he : Continuous e)
(hL : Continuous fun p : V Γ— W => L p.1 p.2) (hf : Integrable f ΞΌ) (hg : Integrable g Ξ½) :
∫ ΞΎ, (fourierIntegral e ΞΌ L f ΞΎ) β€’ (g ΞΎ) βˆ‚Ξ½ =
∫ x, (f x) β€’ (fourierIntegral e Ξ½ L.flip g x) βˆ‚ΞΌ :=
integral_bilin_fourierIntegral_eq_flip (ContinuousLinearMap.lsmul β„‚ β„‚) he hL hf hg

end Fubini

end VectorFourier

/-! ## Fourier theory for functions on `π•œ` -/
Expand Down Expand Up @@ -232,12 +300,14 @@ def fourierChar : Multiplicative ℝ β†’* π•Š where
map_mul' x y := by simp only; rw [toAdd_mul, mul_add, expMapCircle_add]
#align real.fourier_char Real.fourierChar

theorem fourierChar_apply (x : ℝ) : Real.fourierChar[x] = Complex.exp (↑(2 * Ο€ * x) * Complex.I) :=
@[inherit_doc] scoped[FourierTransform] notation "𝐞" => Real.fourierChar

theorem fourierChar_apply (x : ℝ) : 𝐞[x] = Complex.exp (↑(2 * Ο€ * x) * Complex.I) :=
by rfl
#align real.fourier_char_apply Real.fourierChar_apply

@[continuity]
theorem continuous_fourierChar : Continuous Real.fourierChar :=
theorem continuous_fourierChar : Continuous 𝐞 :=
(map_continuous expMapCircle).comp (continuous_const.mul continuous_toAdd)
#align real.continuous_fourier_char Real.continuous_fourierChar

Expand All @@ -251,23 +321,71 @@ theorem vector_fourierIntegral_eq_integral_exp_smul {V : Type*} [AddCommGroup V]
by simp_rw [VectorFourier.fourierIntegral, Real.fourierChar_apply, mul_neg, neg_mul]
#align real.vector_fourier_integral_eq_integral_exp_smul Real.vector_fourierIntegral_eq_integral_exp_smul

/-- The Fourier integral for `f : ℝ β†’ E`, with respect to the standard additive character and
measure on `ℝ`. -/
def fourierIntegral (f : ℝ β†’ E) (w : ℝ) :=
Fourier.fourierIntegral fourierChar volume f w

variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β„‚ E]
{V : Type*} [NormedAddCommGroup V]
[InnerProductSpace ℝ V] [MeasurableSpace V] [BorelSpace V] [FiniteDimensional ℝ V]
{W : Type*} [NormedAddCommGroup W]
[InnerProductSpace ℝ W] [MeasurableSpace W] [BorelSpace W] [FiniteDimensional ℝ W]

open scoped RealInnerProductSpace

/-- The Fourier transform of a function on an inner product space, with respect to the standard
additive character `Ο‰ ↦ exp (2 i Ο€ Ο‰)`. -/
def fourierIntegral (f : V β†’ E) (w : V) : E :=
VectorFourier.fourierIntegral 𝐞 volume (innerβ‚— V) f w
#align real.fourier_integral Real.fourierIntegral

theorem fourierIntegral_def (f : ℝ β†’ E) (w : ℝ) :
fourierIntegral f w = ∫ v : ℝ, fourierChar[-(v * w)] β€’ f v :=
rfl
#align real.fourier_integral_def Real.fourierIntegral_def
/-- The inverse Fourier transform of a function on an inner product space, defined as the Fourier
transform but with opposite sign in the exponential. -/
def fourierIntegralInv (f : V β†’ E) (w : V) : E :=
VectorFourier.fourierIntegral 𝐞 volume (-innerβ‚— V) f w

@[inherit_doc] scoped[FourierTransform] notation "𝓕" => Real.fourierIntegral
@[inherit_doc] scoped[FourierTransform] notation "𝓕⁻" => Real.fourierIntegralInv

lemma fourierIntegral_eq (f : V β†’ E) (w : V) :
𝓕 f w = ∫ v, 𝐞[-βŸͺv, w⟫] β€’ f v := rfl

theorem fourierIntegral_eq_integral_exp_smul {E : Type*} [NormedAddCommGroup E] [NormedSpace β„‚ E]
(f : ℝ β†’ E) (w : ℝ) :
lemma fourierIntegral_eq' (f : V β†’ E) (w : V) :
𝓕 f w = ∫ v, Complex.exp ((↑(-2 * Ο€ * βŸͺv, w⟫) * Complex.I)) β€’ f v := by
simp_rw [fourierIntegral_eq, Real.fourierChar_apply, mul_neg, neg_mul]

lemma fourierIntegralInv_eq (f : V β†’ E) (w : V) :
𝓕⁻ f w = ∫ v, 𝐞[βŸͺv, w⟫] β€’ f v := by
simp [fourierIntegralInv, VectorFourier.fourierIntegral]

lemma fourierIntegralInv_eq' (f : V β†’ E) (w : V) :
𝓕⁻ f w = ∫ v, Complex.exp ((↑(2 * Ο€ * βŸͺv, w⟫) * Complex.I)) β€’ f v := by
simp_rw [fourierIntegralInv_eq, Real.fourierChar_apply]

lemma fourierIntegralInv_eq_fourierIntegral_neg (f : V β†’ E) (w : V) :
𝓕⁻ f w = 𝓕 f (-w) := by
simp [fourierIntegral_eq, fourierIntegralInv_eq]

lemma fourierIntegral_comp_linearIsometry (A : W ≃ₗᡒ[ℝ] V) (f : V β†’ E) (w : W) :
𝓕 (f ∘ A) w = (𝓕 f) (A w) := by
simp only [fourierIntegral_eq, ofAdd_neg, map_inv, coe_inv_unitSphere, Function.comp_apply,
← MeasurePreserving.integral_comp A.measurePreserving A.toHomeomorph.measurableEmbedding,
← A.inner_map_map]

lemma fourierIntegralInv_comp_linearIsometry (A : W ≃ₗᡒ[ℝ] V) (f : V β†’ E) (w : W) :
𝓕⁻ (f ∘ A) w = (𝓕⁻ f) (A w) := by
simp [fourierIntegralInv_eq_fourierIntegral_neg, fourierIntegral_comp_linearIsometry]

theorem fourierIntegral_real_eq (f : ℝ β†’ E) (w : ℝ) :
fourierIntegral f w = ∫ v : ℝ, 𝐞[-(v * w)] β€’ f v :=
rfl
#align real.fourier_integral_def Real.fourierIntegral_real_eq

@[deprecated] alias fourierIntegral_def := fourierIntegral_real_eq -- deprecated on 2024-02-21

theorem fourierIntegral_real_eq_integral_exp_smul (f : ℝ β†’ E) (w : ℝ) :
𝓕 f w = ∫ v : ℝ, Complex.exp (↑(-2 * Ο€ * v * w) * Complex.I) β€’ f v := by
simp_rw [fourierIntegral_def, Real.fourierChar_apply, mul_neg, neg_mul, mul_assoc]
#align real.fourier_integral_eq_integral_exp_smul Real.fourierIntegral_eq_integral_exp_smul
simp_rw [fourierIntegral_real_eq, Real.fourierChar_apply, mul_neg, neg_mul, mul_assoc]
#align real.fourier_integral_eq_integral_exp_smul Real.fourierIntegral_real_eq_integral_exp_smul

@[deprecated] alias fourierIntegral_eq_integral_exp_smul :=
fourierIntegral_real_eq_integral_exp_smul -- deprecated on 2024-02-21

end Real
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Fourier/PoissonSummation.lean
Expand Up @@ -97,7 +97,7 @@ theorem Real.fourierCoeff_tsum_comp_add {f : C(ℝ, β„‚)}
exact funext fun n => neK ⟨Icc 0 1, isCompact_Icc⟩ _
-- Minor tidying to finish
_ = 𝓕 f m := by
rw [fourierIntegral_eq_integral_exp_smul]
rw [fourierIntegral_real_eq_integral_exp_smul]
congr 1 with x : 1
rw [smul_eq_mul, comp_apply, coe_mk, coe_mk, ContinuousMap.toFun_eq_coe, fourier_coe_apply]
congr 2
Expand Down

0 comments on commit e059984

Please sign in to comment.