Orthonormal systems, Fourier coefficients, trigonometric polynomials
DefinitionRudin_ch08_fourierRudin's Chapter 8 apparatus for Fourier series. A sequence is an orthonormal system on when for and (Definition 8.10), and the Fourier coefficients of relative to it are . For the trigonometric system one has , the partial sums , the norm , -periodicity, and trigonometric polynomials (Definition 8.9). Complex-valued integrals use the interval integral rather than the real-valued Riemann–Stieltjes integral of the Chapter 6 mission.
import Mathlib
/-!
# Rudin, Chapter 8 — orthonormal systems and Fourier series
Definitions transcribed from Walter Rudin, *Principles of Mathematical Analysis*, 3rd edition,
Chapter 8 (Definitions 8.9, 8.10, Section 8.13 and equation (86)).
The integrals of Chapter 8 are integrals of complex-valued functions over `[a, b]`; the
Riemann–Stieltjes integral built for Chapter 6 is real-valued, so Mathlib's interval integral
`∫ x in a..b, f x` is used instead. For the Riemann-integrable integrands Rudin considers, the
two agree, and Rudin himself notes that his hypothesis `f ∈ ℛ` can be weakened.
Mathlib has a Fourier theory on `AddCircle T`; Rudin works with `2π`-periodic functions on `ℝ`
and with general orthonormal systems on an interval, so those are set up here.
-/
namespace Rudin
/-- Rudin, Definition 8.10: `φ` is an **orthonormal system** on `[a, b]`. -/
def IsOrthonormalSystem (φ : ℕ → ℝ → ℂ) (a b : ℝ) : Prop :=
(∀ m n : ℕ, m ≠ n → (∫ x in a..b, φ n x * (starRingEnd ℂ) (φ m x)) = 0) ∧
∀ n : ℕ, (∫ x in a..b, ‖φ n x‖ ^ 2) = 1
/-- Rudin, Definition 8.10, equation (66): the `n`-th Fourier coefficient of `f` relative to an
orthonormal system `φ` on `[a, b]`. -/
noncomputable def genFourierCoeff (f : ℝ → ℂ) (φ : ℕ → ℝ → ℂ) (a b : ℝ) (n : ℕ) : ℂ :=
∫ x in a..b, f x * (starRingEnd ℂ) (φ n x)
/-- Rudin, Section 8.13: the `n`-th Fourier coefficient of a `2π`-periodic function with respect
to the trigonometric system, `cₙ = (1/2π) ∫_{-π}^{π} f(x) e^{-inx} dx`. -/
noncomputable def fourierCoeff (f : ℝ → ℂ) (n : ℤ) : ℂ :=
(1 / (2 * Real.pi) : ℂ) *
∫ x in (-Real.pi)..Real.pi, f x * Complex.exp (-(n : ℂ) * Complex.I * (x : ℂ))
/-- Rudin, Section 8.13, equation (77): the `N`-th partial sum `s_N(f; x)` of the Fourier series
of `f`. -/
noncomputable def fourierPartialSum (f : ℝ → ℂ) (N : ℕ) (x : ℝ) : ℂ :=
∑ n ∈ Finset.Icc (-(N : ℤ)) (N : ℤ),
fourierCoeff f n * Complex.exp ((n : ℂ) * Complex.I * (x : ℂ))
/-- Rudin, Chapter 8, equation (86): the `L²` norm `‖h‖₂ = ((1/2π) ∫_{-π}^{π} |h|²)^{1/2}`. -/
noncomputable def L2Norm (h : ℝ → ℂ) : ℝ :=
Real.sqrt ((1 / (2 * Real.pi)) * ∫ x in (-Real.pi)..Real.pi, ‖h x‖ ^ 2)
/-- `f` has period `2π`. -/
def HasPeriodTwoPi (f : ℝ → ℂ) : Prop :=
∀ x : ℝ, f (x + 2 * Real.pi) = f x
/-- Rudin, Definition 8.9: `P` is a **trigonometric polynomial**, a finite sum
`∑_{n=-N}^{N} cₙ e^{inx}`. -/
def IsTrigPolynomial (P : ℝ → ℂ) : Prop :=
∃ (N : ℕ) (c : ℤ → ℂ), ∀ x : ℝ,
P x = ∑ n ∈ Finset.Icc (-(N : ℤ)) (N : ℤ), c n * Complex.exp ((n : ℂ) * Complex.I * (x : ℂ))
end RudinRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Seven definitions concerning complex-valued functions on . All integrals are oriented interval integrals with respect to Lebesgue measure: they are when , and they take the value for integrands that are not integrable.
Orthonormal system. A family is an orthonormal system on when both: for all , ; and for every , (the second integrand is real-valued).
Generalized Fourier coefficient. , for and an arbitrary family — orthonormality is not required by the definition.
Trigonometric Fourier coefficient. For ,
Partial sum. For and ,
the sum over all integers with , so terms.
norm. , with the real square root, which returns on negative arguments.
Periodicity. has period means for every real .
Trigonometric polynomial. is a trigonometric polynomial when there exist and coefficients such that for every real (the coefficients outside are irrelevant).
These are definitions only; nothing is asserted about them.
Confirmed by the mission captain (proposal self-audit).