Fourier series: angular frequencies, coefficients , average power
Definitionanalise_de_fourier_coreThis bundle fixes the notation of the book's chapters 3-5 for a period .
- The angular frequencies are for .
- For a real-valued , the trigonometric Fourier coefficients (eq. 3.23) are
- For a complex-valued , the exponential coefficients (eq. 4.8) are
- The average power of a periodic signal (Definição 5.1.1) is .
- The trigonometric polynomial of degree (Definição 3.2.1) is .
These five notions are shared by every statement of the mission, so the whole mission rests on this one model of the Fourier coefficients of a periodic signal.
Formalization Note. The coefficient indices range over , matching the book's extension (4.7) of to negative indices. Integrals are interval integrals over ; when the integrand is not integrable, or when , they take the default value , so every statement of the mission carries the hypothesis together with whatever integrability the book assumes.
import Mathlib
namespace AnaliseDeFourier
open MeasureTheory
/-- The `n`-th angular frequency of a `T`-periodic signal: `ω n = 2 * π * n / T`. -/
noncomputable def angFreq (T : ℝ) (n : ℤ) : ℝ := 2 * Real.pi * n / T
/-- The cosine Fourier coefficient `a n = (2 / T) * ∫ t in 0..T, f t * cos (ω n * t)`. -/
noncomputable def coeffA (T : ℝ) (f : ℝ → ℝ) (n : ℤ) : ℝ :=
(2 / T) * ∫ t in (0 : ℝ)..T, f t * Real.cos (angFreq T n * t)
/-- The sine Fourier coefficient `b n = (2 / T) * ∫ t in 0..T, f t * sin (ω n * t)`. -/
noncomputable def coeffB (T : ℝ) (f : ℝ → ℝ) (n : ℤ) : ℝ :=
(2 / T) * ∫ t in (0 : ℝ)..T, f t * Real.sin (angFreq T n * t)
/-- The exponential Fourier coefficient
`C n = (1 / T) * ∫ t in 0..T, f t * exp (-I * ω n * t)`, for `n : ℤ`. -/
noncomputable def coeffC (T : ℝ) (f : ℝ → ℂ) (n : ℤ) : ℂ :=
(1 / T) * ∫ t in (0 : ℝ)..T, f t * Complex.exp (-(Complex.I * (angFreq T n * t)))
/-- The average power of a `T`-periodic signal: `P f = (1 / T) * ∫ t in 0..T, ‖f t‖ ^ 2`. -/
noncomputable def avgPower (T : ℝ) (f : ℝ → ℂ) : ℝ :=
(1 / T) * ∫ t in (0 : ℝ)..T, ‖f t‖ ^ 2
/-- The trigonometric polynomial of degree `N` with coefficients `a` and `b`:
`a 0 / 2 + ∑ n ∈ [1, N], (a n * cos (ω n * t) + b n * sin (ω n * t))`. -/
noncomputable def trigPoly (T : ℝ) (a b : ℤ → ℝ) (N : ℕ) (t : ℝ) : ℝ :=
a 0 / 2 + ∑ n ∈ Finset.Icc 1 N,
(a (n : ℤ) * Real.cos (angFreq T (n : ℤ) * t) + b (n : ℤ) * Real.sin (angFreq T (n : ℤ) * t))
end AnaliseDeFourier
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - NON-BLIND: same agent that authored the statements
Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements of this proposal, at the explicit instruction of the proposal owner. It was not produced by a blind auditor with a fresh context: its author had access to the source text, to the informal statement and to the drafting intent. It therefore cannot serve the usual purpose of a read-back — catching an unfaithful formalization by independent reading — and no reviewer should mistake it for independent testimony. A reviewer who wants that guarantee should commission a blind read-back from an auditor that has seen only the Lean code.
This bundle introduces five notions, all depending on a real parameter (no positivity is assumed inside the definitions themselves).
Angular frequency. For a real and an integer , . If this is , since division by zero returns zero.
Cosine coefficient. For a real , a function and an integer ,
the integral being the oriented integral over the interval from to with respect to Lebesgue measure; if the integrand is not integrable the integral is , and if the whole expression is .
Sine coefficient. Likewise .
Exponential coefficient. For a real , a function and an integer ,
where the exponent is the complex number and the factor is the complex number obtained from the real . Negative and zero indices are allowed.
Average power. For a real and ,
a real number, with the modulus of a complex number.
Trigonometric polynomial. For a real , two functions , a natural number and a real ,
the sum ranging over the integers with (empty when , in which case the value is ), each index being read as an integer when fed to , and . The value never enters, and indices above never enter.
All five are noncomputable real- or complex-valued definitions; none of them carries any hypothesis, so each is a total function of its arguments and returns a junk value on degenerate input such as or a non-integrable integrand.