Time-frequency analysis: translation, modulation, STFT, ambiguity function, Fourier transform
DefinitionFaulhuberTFA_BasicThis file fixes the notation of the lecture notes.
- is the Euclidean space with dot product , and is written .
- Translation and modulation of are and .
- The inner product is , linear in the first argument.
- Definition 2.2. The short-time Fourier transform of with window is
- Definition 3.2. The cross-ambiguity function and the (auto-)ambiguity function are
- Definition 0.1. The Fourier transform , extended from to all of .
- The standard Gaussian on and the box function on .
These are the objects of Chapters 2 and 3 of the notes; every theorem of this mission is stated in terms of them.
Formalization Note The Fourier transform is Mathlib's Fourier transform, which has exactly the normalisation above; it is applied to the class of and returned as a function (a representative), and is set to for , a case no theorem uses. The box function is written on , with identified with its single coordinate.
import Mathlib
/-!
Faulhuber, *Time-Frequency Analysis (Lecture Notes)*, arXiv:2204.01596 (2022):
notation of the Recap (p. 7), Definition 2.2 (p. 17), Definition 3.2 (p. 25), and the
functions `b₀`, `g₀` of Section 2 (p. 15–17).
-/
open MeasureTheory Complex
open scoped InnerProductSpace FourierTransform
noncomputable section
namespace FaulhuberTFA
/-- The Euclidean space `ℝ^d`; `⟪x, ω⟫_ℝ` is the dot product `x · ω`. -/
abbrev Rd (d : ℕ) := EuclideanSpace ℝ (Fin d)
variable {d : ℕ}
/-- The phase `e^{2πi s}`. -/
def ePhase (s : ℝ) : ℂ := Complex.exp (2 * Real.pi * Complex.I * (s : ℂ))
/-- Translation by `x`: `(T_x f)(t) = f(t - x)`. -/
def transl (x : Rd d) (f : Rd d → ℂ) : Rd d → ℂ := fun t => f (t - x)
/-- Modulation by `ω`: `(M_ω f)(t) = e^{2πi ω·t} f(t)`. -/
def modul (ω : Rd d) (f : Rd d → ℂ) : Rd d → ℂ := fun t => ePhase ⟪ω, t⟫_ℝ * f t
/-- The `L²` inner product `⟨f, g⟩ = ∫ f(t) \overline{g(t)} dt` (linear in the first slot). -/
def l2inner (f g : Rd d → ℂ) : ℂ := ∫ t, f t * starRingEnd ℂ (g t)
/-- Definition 2.2: the short-time Fourier transform of `f` with window `g`,
`V_g f(x, ω) = ∫ f(t) \overline{g(t - x)} e^{-2πi ω·t} dt`. -/
def stft (g f : Rd d → ℂ) (x ω : Rd d) : ℂ :=
∫ t, f t * starRingEnd ℂ (g (t - x)) * ePhase (-⟪ω, t⟫_ℝ)
/-- Definition 3.2: the cross-ambiguity function
`A(f, g)(x, ω) = ∫ f(t + x/2) \overline{g(t - x/2)} e^{-2πi ω·t} dt`. -/
def crossAmbiguity (f g : Rd d → ℂ) (x ω : Rd d) : ℂ :=
∫ t, f (t + (1 / 2 : ℝ) • x) * starRingEnd ℂ (g (t - (1 / 2 : ℝ) • x)) * ePhase (-⟪ω, t⟫_ℝ)
/-- Definition 3.2: the (auto-)ambiguity function `A f = A(f, f)`. -/
def ambiguity (f : Rd d → ℂ) (x ω : Rd d) : ℂ := crossAmbiguity f f x ω
open Classical in
/-- Definition 0.1: the Fourier transform `\hat f` of `f ∈ L²(ℝ^d)`, with the normalisation
`\hat f(ω) = ∫ f(x) e^{-2πi ω·x} dx`, extended to `L²` (Mathlib's `L²` Fourier transform);
returned as a function. Its value for `f ∉ L²` is irrelevant (set to `0`). -/
def fourierL2 (f : Rd d → ℂ) : Rd d → ℂ :=
if h : MemLp f 2 volume then
⇑((𝓕 (h.toLp f : Lp ℂ 2 (volume : Measure (Rd d)))) : Lp ℂ 2 (volume : Measure (Rd d)))
else 0
/-- The `d`-dimensional standard Gaussian `g₀(t) = 2^{d/4} e^{-π |t|²}` (Example 2.3). -/
def gauss0 (d : ℕ) : Rd d → ℂ := fun t => ((2 : ℝ) ^ ((d : ℝ) / 4) * Real.exp (-Real.pi * ‖t‖ ^ 2) : ℝ)
/-- The box function `b₀ = χ_{[-1/2, 1/2]}` on `ℝ` (p. 15), written on `ℝ^1`. -/
def box0 : Rd 1 → ℂ := fun t => if |t 0| ≤ 1 / 2 then 1 else 0
end FaulhuberTFA
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
This file contains only definitions; it asserts no theorem. Throughout, is an arbitrary natural number, and the case is allowed. All integrals are over with respect to Lebesgue measure. Every integral is the Bochner integral, which is defined to be whenever the integrand is not integrable, and no definition below assumes measurability or integrability of its inputs. When , is a single point carrying measure , so every integral is just the integrand evaluated at that point.
Euclidean space. denotes -tuples of reals indexed by , with the standard dot product and the Euclidean norm .
Phase. For real , the phase is
Translation. For and any function (no regularity required), translation is
Modulation. For and any , modulation is
pairing. For arbitrary , the pairing is
It is linear in and conjugate-linear in . It is a number defined for all functions, not only for . It equals whenever is not Lebesgue integrable.
Short-time Fourier transform. For arbitrary (the signal), (the window) and , the transform is
It is set to at any where this integrand is not integrable. Note the argument order: the window is the first input and the signal is the second.
Cross-ambiguity function. For arbitrary and , the cross-ambiguity function is
It is likewise wherever this integrand is not integrable.
Ambiguity function. This is the cross-ambiguity function with both inputs equal:
Fourier transform. For an arbitrary , is defined by cases:
- If is in , meaning a.e.-strongly measurable with , then is a function representing the Fourier transform of the equivalence class of . This transform is the library's unitary (Plancherel) Fourier transform on , with kernel convention , so that on nice functions it agrees with .
- Because it is a representative of an class, is determined only up to a Lebesgue-null set. Its individual pointwise values are an unspecified choice.
- It is not asserted to equal the pointwise integral at any particular , even when .
- If , then is the zero function.
Gaussian. The standard Gaussian is
It is real and positive, viewed as complex-valued. Here is a real power, and for the Gaussian is the constant on the one-point space.
Box function. The box function is defined only on , that is, on -tuples :
This is the indicator of the closed interval , so it takes the value at both endpoints.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.