The areas / V19. Complex and harmonic analysis
Mathlib.Analysis.Fourier.ZMod
24 declarations. Mathlib docs · Source
Fourier theory on ZMod N
Basic definitions and properties of the discrete Fourier transform for functions on ZMod N
(taking values in an arbitrary ℂ-vector space).
Main definitions and results
ZMod.dft: the Fourier transform, with respect to the standard additive characterZMod.stdAddChar(mappingj mod Ntoexp (2 * π * I * j / N)). The notation𝓕, scoped in namespaceZMod, is available for this.ZMod.dft_dft: the Fourier inversion formula.DirichletCharacter.fourierTransform_eq_inv_mul_gaussSum: the discrete Fourier transform of a primitive Dirichlet characterχis a Gauss sum timesχ⁻¹.
Compatibility with scalar multiplication
These lemmas are more general than LinearEquiv.map_mul etc, since they allow any scalars that
commute with the ℂ-action, rather than just ℂ itself.
theorem ZMod.dft.congr_simp E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E], ZMod.dft = ZMod.dft
theorem ZMod.stdAddChar.congr_simp E1 #
∀ {N : ℕ} [inst : NeZero N], ZMod.stdAddChar = ZMod.stdAddChar
def ZMod.dft E1 #
{N : ℕ} → [NeZero N] → {E : Type u_1} → [inst : AddCommGroup E] → [inst_1 : Module ℂ E] → (ZMod N → E) ≃ₗ[ℂ] ZMod N → E
The discrete Fourier transform on ℤ / N ℤ (with the counting measure), bundled as a linear
equivalence. Denoted as 𝓕 within the ZMod namespace.
def ZMod.term𝓕 E1 #
Lean.ParserDescr
The discrete Fourier transform on ℤ / N ℤ (with the counting measure), bundled as a linear
equivalence. Denoted as 𝓕 within the ZMod namespace.
def ZMod.«term𝓕⁻» E1 #
Lean.ParserDescr
The inverse Fourier transform on ZMod N.
theorem ZMod.dft_apply E0 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E)
(k : ZMod N), ZMod.dft Φ k = ∑ j, ZMod.stdAddChar (-(j * k)) • Φ j
theorem ZMod.dft_def E0 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E),
ZMod.dft Φ = fun k ↦ ∑ j, ZMod.stdAddChar (-(j * k)) • Φ j
theorem ZMod.invDFT_apply E0 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Ψ : ZMod N → E)
(k : ZMod N), ZMod.dft.symm Ψ k = (↑N)⁻¹ • ∑ j, ZMod.stdAddChar (j * k) • Ψ j
theorem ZMod.invDFT_def E0 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Ψ : ZMod N → E),
ZMod.dft.symm Ψ = fun k ↦ (↑N)⁻¹ • ∑ j, ZMod.stdAddChar (j * k) • Ψ j
theorem ZMod.invDFT_apply' E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Ψ : ZMod N → E)
(k : ZMod N), ZMod.dft.symm Ψ k = (↑N)⁻¹ • ZMod.dft Ψ (-k)
theorem ZMod.invDFT_def' E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Ψ : ZMod N → E),
ZMod.dft.symm Ψ = fun k ↦ (↑N)⁻¹ • ZMod.dft Ψ (-k)
theorem ZMod.dft_apply_zero E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E),
ZMod.dft Φ 0 = ∑ j, Φ j
theorem ZMod.dft_eq_fourier E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_2} [inst_1 : NormedAddCommGroup E] [inst_2 : NormedSpace ℂ E] [CompleteSpace E]
(Φ : ZMod N → E) (k : ZMod N), ZMod.dft Φ k = Fourier.fourierIntegral ZMod.toCircle MeasureTheory.Measure.count Φ k
The discrete Fourier transform agrees with the general one (assuming the target space is a complete normed space).
theorem ZMod.dft_const_smul E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] {R : Type u_2}
[inst_3 : DistribSMul R E] [SMulCommClass R ℂ E] (r : R) (Φ : ZMod N → E), ZMod.dft (r • Φ) = r • ZMod.dft Φ
theorem ZMod.dft_smul_const E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] {R : Type u_2}
[inst_3 : Ring R] [inst_4 : Module ℂ R] [inst_5 : Module R E] [IsScalarTower ℂ R E] (Φ : ZMod N → R) (e : E),
(ZMod.dft fun j ↦ Φ j • e) = fun k ↦ ZMod.dft Φ k • e
theorem ZMod.dft_const_mul E1 #
∀ {N : ℕ} [inst : NeZero N] {R : Type u_2} [inst_1 : Ring R] [inst_2 : Algebra ℂ R] (r : R) (Φ : ZMod N → R),
(ZMod.dft fun j ↦ r * Φ j) = fun k ↦ r * ZMod.dft Φ k
theorem ZMod.dft_mul_const E1 #
∀ {N : ℕ} [inst : NeZero N] {R : Type u_2} [inst_1 : Ring R] [inst_2 : Algebra ℂ R] (Φ : ZMod N → R) (r : R),
(ZMod.dft fun j ↦ Φ j * r) = fun k ↦ ZMod.dft Φ k * r
theorem ZMod.dft_comp_neg E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E),
(ZMod.dft fun j ↦ Φ (-j)) = fun k ↦ ZMod.dft Φ (-k)
theorem ZMod.dft_dft E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E),
ZMod.dft (ZMod.dft Φ) = fun j ↦ ↑N • Φ (-j)
Fourier inversion formula, discrete case.
theorem ZMod.dft_comp_unitMul E1 #
∀ {N : ℕ} [inst : NeZero N] {E : Type u_1} [inst_1 : AddCommGroup E] [inst_2 : Module ℂ E] (Φ : ZMod N → E)
(u : (ZMod N)ˣ) (k : ZMod N), ZMod.dft (fun j ↦ Φ (↑u * j)) k = ZMod.dft Φ (↑u⁻¹ * k)
theorem ZMod.dft_even_iff E0 #
∀ {N : ℕ} [inst : NeZero N] {Φ : ZMod N → ℂ}, Function.Even (ZMod.dft Φ) ↔ Function.Even Φ
The discrete Fourier transform of Φ is even if and only if Φ itself is.
theorem ZMod.dft_odd_iff E0 #
∀ {N : ℕ} [inst : NeZero N] {Φ : ZMod N → ℂ}, Function.Odd (ZMod.dft Φ) ↔ Function.Odd Φ
The discrete Fourier transform of Φ is odd if and only if Φ itself is.
theorem DirichletCharacter.fourierTransform_eq_gaussSum_mulShift E1 #
∀ {N : ℕ} [inst : NeZero N] (χ : DirichletCharacter ℂ N) (k : ZMod N),
ZMod.dft (⇑χ) k = gaussSum χ (ZMod.stdAddChar.mulShift (-k))
theorem DirichletCharacter.IsPrimitive.fourierTransform_eq_inv_mul_gaussSum E1 #
∀ {N : ℕ} [inst : NeZero N] {χ : DirichletCharacter ℂ N},
χ.IsPrimitive → ∀ (k : ZMod N), ZMod.dft (⇑χ) k = χ⁻¹ (-k) * gaussSum χ ZMod.stdAddChar
For a primitive Dirichlet character χ, the Fourier transform of χ is a constant multiple
of χ⁻¹ (and the constant is essentially the Gauss sum).