Chapter 05 — Fourier Series

Proofs omitted. Hover over highlighted terms to see their Lean types.

Reading sections

5.1 — Periodic Functions

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Definition 5.1.1: Let L > 0. A function f : ℝ → ℂ is periodic with period L if for every x : ℝ, one has f (x + L) = f x.

def IsPeriodicWithPeriod (L : ℝ) (f : ℝ → ℂ) : Prop := 0 < L ∧ Function.Periodic f L

Lean source

Definition 5.1.2 (ℤ-periodic and Lℤ-periodic): A function f : ℝ → ℂ is ℤ-periodic iff it is 1-periodic, i.e. f (x + 1) = f x for all x : ℝ.

def IsZPeriodic (f : ℝ → ℂ) : Prop := Function.Periodic f 1

Lean source

A function is Lℤ-periodic when it is periodic with positive period L.

abbrev IsLZPeriodic (L : ℝ) (f : ℝ → ℂ) : Prop := IsPeriodicWithPeriod L f

Lean source

Definition 5.1.3 (Integer part and fractional part): for x : ℝ, [x] is the unique integer k : ℤ such that k ≤ x < k + 1.

noncomputable def integerPart (x : ℝ) : ℤ := Int.floor x

Lean source

The fractional part of x : ℝ, defined by {x} = x - [x].

noncomputable def fractionalPart (x : ℝ) : ℝ := x - (integerPart x : ℝ)

Lean source

Example 5.1.2: sin x, cos x, and exp(ix) are 2π-periodic, hence periodic with period 2πk for every integer k; the identity function is not periodic with positive period, while the constant function 1 is L-periodic for every L > 0.

theorem periodicity_examples_basic : IsPeriodicWithPeriod (2 * Real.pi) (fun x : ℝ => (Real.sin x : ℂ)) ∧ IsPeriodicWithPeriod (2 * Real.pi) (fun x : ℝ => (Real.cos x : ℂ)) ∧ IsPeriodicWithPeriod (2 * Real.pi) (fun x : ℝ => Complex.exp (x * Complex.I)) ∧ (∀ k : ℤ, Function.Periodic (fun x : ℝ => (Real.sin x : ℂ)) ((2 * Real.pi) * (k : ℝ))) ∧ (∀ k : ℤ, Function.Periodic (fun x : ℝ => (Real.cos x : ℂ)) ((2 * Real.pi) * (k : ℝ))) ∧ (∀ k : ℤ, Function.Periodic (fun x : ℝ => Complex.exp (x * Complex.I)) ((2 * Real.pi) * (k : ℝ))) ∧ (¬ ∃ L : ℝ, IsPeriodicWithPeriod L (fun x : ℝ => (x : ℂ))) ∧ (∀ L : ℝ, 0 < L → IsPeriodicWithPeriod L (fun _ : ℝ => (1 : ℂ)))

Lean source

Corollary 5.1.1 (kL-shift invariance): If f : ℝ → ℂ is L-periodic, then f (x + kL) = f x for all x : ℝ and k : ℤ. In particular, if f is 1-periodic, then f (x + k) = f x for all k : ℤ.

theorem periodic_integer_shift_invariance : (∀ {L : ℝ} {f : ℝ → ℂ}, IsPeriodicWithPeriod L f → ∀ x : ℝ, ∀ k : ℤ, f (x + (k : ℝ) * L) = f x) ∧ (∀ {f : ℝ → ℂ}, IsPeriodicWithPeriod 1 f → ∀ x : ℝ, ∀ k : ℤ, f (x + (k : ℝ)) = f x)

Lean source

The square-wave function on ℝ, defined by its fractional part: value 1 on the first half of each unit interval and 0 on the second half.

noncomputable def squareWave : ℝ → ℂ := fun x => if x - (Int.floor x : ℝ) < (1 / 2 : ℝ) then (1 : ℂ) else 0

Lean source

Example 5.1.4: For n : ℤ, the functions x ↦ cos(2πnx), x ↦ sin(2πnx), and x ↦ exp(2πinx) are all ℤ-periodic (equivalently 1-periodic). Another ℤ-periodic function is the square wave.

theorem zPeriodic_trig_modes_and_squareWave (n : ℤ) : IsZPeriodic (fun x : ℝ => (Real.cos (2 * Real.pi * (n : ℝ) * x) : ℂ)) ∧ IsZPeriodic (fun x : ℝ => (Real.sin (2 * Real.pi * (n : ℝ) * x) : ℂ)) ∧ IsZPeriodic (fun x : ℝ => Complex.exp (2 * Real.pi * (n : ℝ) * x * Complex.I)) ∧ IsZPeriodic squareWave

Lean source

Lemma 5.1.5a (Basic properties of C(ℝ/ℤ;ℂ) (a), Boundedness): if f : ℝ → ℂ is continuous and ℤ-periodic, then f is bounded.

lemma isZPeriodic_continuous_bounded {f : ℝ → ℂ} (hf_cont : Continuous f) (hf_per : IsZPeriodic f) : ∃ C : ℝ, ∀ x : ℝ, ‖f x‖ ≤ C

Lean source

Lemma 5.1.5b (Basic properties of C(ℝ/ℤ;ℂ) (b), vector space and algebra properties): if f, g : ℝ → ℂ are continuous and ℤ-periodic, then f + g, f - g, and f * g are continuous and ℤ-periodic; and for any scalar c : ℂ, c • f is continuous and ℤ-periodic.

lemma isZPeriodic_continuous_add_sub_mul_smul {f g : ℝ → ℂ} (hf : Continuous f ∧ IsZPeriodic f) (hg : Continuous g ∧ IsZPeriodic g) (c : ℂ) : (Continuous (f + g) ∧ IsZPeriodic (f + g)) ∧ (Continuous (f - g) ∧ IsZPeriodic (f - g)) ∧ (Continuous (f * g) ∧ IsZPeriodic (f * g)) ∧ (Continuous (c • f) ∧ IsZPeriodic (c • f))

Lean source

Lemma 5.1.5c (Basic properties of C(ℝ/ℤ;ℂ) (c), closure under uniform limits): if (fₙ) is a sequence of continuous ℤ-periodic functions converging uniformly to f, then f is continuous and ℤ-periodic.

lemma isZPeriodic_continuous_of_tendstoUniformly {f : ℝ → ℂ} {u : ℕ → ℝ → ℂ} (hcont : ∀ n : ℕ, Continuous (u n)) (hper : ∀ n : ℕ, IsZPeriodic (u n)) (hlim : TendstoUniformly u f Filter.atTop) : Continuous f ∧ IsZPeriodic f

Lean source

Helper for Example 5.1.2: periodicity is preserved when viewing a real-valued periodic function as complex-valued via coercion.

lemma helperForExample_5_1_2_realToComplex_periodic {g : ℝ → ℝ} {T : ℝ} (hg : Function.Periodic g T) : Function.Periodic (fun x : ℝ => (g x : ℂ)) T

Lean source

Helper for Example 5.1.2: base 2π-periodicity for sin, cos, and x ↦ exp(ix) in the ℝ → ℂ setting.

lemma helperForExample_5_1_2_base_periodic_trig_exp : Function.Periodic (fun x : ℝ => (Real.sin x : ℂ)) (2 * Real.pi) ∧ Function.Periodic (fun x : ℝ => (Real.cos x : ℂ)) (2 * Real.pi) ∧ Function.Periodic (fun x : ℝ => Complex.exp (x * Complex.I)) (2 * Real.pi)

Lean source

Helper for Example 5.1.2: if f is L-periodic, then it is periodic with period Lk for every integer k.

lemma helperForExample_5_1_2_periodic_mul_int_right {f : ℝ → ℂ} {L : ℝ} (hf : Function.Periodic f L) : ∀ k : ℤ, Function.Periodic f (L * (k : ℝ))

Lean source

Helper for Example 5.1.2: the identity map x ↦ x (viewed as ℝ → ℂ) is not periodic with any positive period.

lemma helperForExample_5_1_2_identity_not_periodic_with_positive_period : ¬ ∃ L : ℝ, IsPeriodicWithPeriod L (fun x : ℝ => (x : ℂ))

Lean source

Helper for Example 5.1.2: the constant function 1 is periodic with every positive period.

lemma helperForExample_5_1_2_constant_one_isPeriodicWithPeriod (L : ℝ) (hL : 0 < L) : IsPeriodicWithPeriod L (fun _ : ℝ => (1 : ℂ))

Lean source

Helper for Corollary 5.1.1: integer multiples of a period are also periods.

lemma helperForCorollary_5_1_1_intShift_ofPeriodic {L : ℝ} {f : ℝ → ℂ} (hLper : Function.Periodic f L) : ∀ x : ℝ, ∀ k : ℤ, f (x + (k : ℝ) * L) = f x

Lean source

Helper for Corollary 5.1.1: IsPeriodicWithPeriod implies integer-shift invariance by L.

lemma helperForCorollary_5_1_1_intShift_ofIsPeriodicWithPeriod {L : ℝ} {f : ℝ → ℂ} (hIsPer : IsPeriodicWithPeriod L f) : ∀ x : ℝ, ∀ k : ℤ, f (x + (k : ℝ) * L) = f x

Lean source

Helper for Corollary 5.1.1: specialization to unit period gives k-shift invariance.

lemma helperForCorollary_5_1_1_unitPeriodSpecialization {f : ℝ → ℂ} (hIsPer1 : IsPeriodicWithPeriod 1 f) : ∀ x : ℝ, ∀ k : ℤ, f (x + (k : ℝ)) = f x

Lean source

Helper for Lemma 5.1.5a: a continuous ℤ-periodic function has bounded range.

lemma helperForLemma_5_1_5a_boundedRange_of_continuous_periodic {f : ℝ → ℂ} (hf_cont : Continuous f) (hf_per : IsZPeriodic f) : Bornology.IsBounded (Set.range f)

Lean source

Helper for Lemma 5.1.5a: bounded range gives a uniform bound on values.

lemma helperForLemma_5_1_5a_exists_uniform_norm_bound_of_boundedRange {f : ℝ → ℂ} (hbounded : Bornology.IsBounded (Set.range f)) : ∃ C : ℝ, ∀ x : ℝ, ‖f x‖ ≤ C

Lean source

Helper for Lemma 5.1.5b: closure of continuous ℤ-periodic functions under addition.

lemma helperForLemma_5_1_5b_add_closed {f g : ℝ → ℂ} (hf : Continuous f ∧ IsZPeriodic f) (hg : Continuous g ∧ IsZPeriodic g) : Continuous (f + g) ∧ IsZPeriodic (f + g)

Lean source

Helper for Lemma 5.1.5b: closure of continuous ℤ-periodic functions under subtraction.

lemma helperForLemma_5_1_5b_sub_closed {f g : ℝ → ℂ} (hf : Continuous f ∧ IsZPeriodic f) (hg : Continuous g ∧ IsZPeriodic g) : Continuous (f - g) ∧ IsZPeriodic (f - g)

Lean source

Helper for Lemma 5.1.5b: closure of continuous ℤ-periodic functions under multiplication.

lemma helperForLemma_5_1_5b_mul_closed {f g : ℝ → ℂ} (hf : Continuous f ∧ IsZPeriodic f) (hg : Continuous g ∧ IsZPeriodic g) : Continuous (f * g) ∧ IsZPeriodic (f * g)

Lean source

Helper for Lemma 5.1.5b: closure of continuous ℤ-periodic functions under scalar multiplication.

lemma helperForLemma_5_1_5b_smul_closed {f : ℝ → ℂ} (c : ℂ) (hf : Continuous f ∧ IsZPeriodic f) : Continuous (c • f) ∧ IsZPeriodic (c • f)

Lean source

Helper for Lemma 5.1.5c: a uniform limit of eventually continuous maps is continuous.

lemma helperForLemma_5_1_5c_continuous_of_uniform_limit {f : ℝ → ℂ} {u : ℕ → ℝ → ℂ} (hlim : TendstoUniformly u f Filter.atTop) (hcont : ∀ n : ℕ, Continuous (u n)) : Continuous f

Lean source

Helper for Lemma 5.1.5c: periodicity of each approximant gives eventual equality of shifted evaluation sequences.

lemma helperForLemma_5_1_5c_eventuallyEq_shifted_sequence {u : ℕ → ℝ → ℂ} (hper : ∀ n : ℕ, IsZPeriodic (u n)) (x : ℝ) : (fun n : ℕ => u n (x + 1)) =ᶠ[Filter.atTop] (fun n : ℕ => u n x)

Lean source

Helper for Lemma 5.1.5c: the uniform limit inherits the unit-shift identity.

lemma helperForLemma_5_1_5c_shift_eq_of_uniform_limit {f : ℝ → ℂ} {u : ℕ → ℝ → ℂ} (hlim : TendstoUniformly u f Filter.atTop) (hper : ∀ n : ℕ, IsZPeriodic (u n)) (x : ℝ) : f (x + 1) = f x

Lean source

Helper for Lemma 5.1.5c: a uniform limit of ℤ-periodic functions is ℤ-periodic.

lemma helperForLemma_5_1_5c_isZPeriodic_of_uniform_limit {f : ℝ → ℂ} {u : ℕ → ℝ → ℂ} (hlim : TendstoUniformly u f Filter.atTop) (hper : ∀ n : ℕ, IsZPeriodic (u n)) : IsZPeriodic f

5.2 — Inner Products on Periodic Functions — Part 1

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Definition 5.2.1 (Inner product): for f, g ∈ C(ℝ/ℤ;ℂ) (modeled as continuous, ℤ-periodic functions ℝ → ℂ), define ⟪f, g⟫ = ∫ x in [0,1], f x * conj (g x) dx.

noncomputable def periodicInnerProduct (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ℂ := ∫ x in Set.Icc (0 : ℝ) 1, f.1 x * star (g.1 x)

Lean source

Orthogonality for continuous, 1-periodic complex-valued functions.

def periodicOrthogonal (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : Prop := periodicInnerProduct f g = 0

Lean source

The L^2 metric on continuous, 1-periodic complex-valued functions.

noncomputable def periodicL2Metric (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ℝ := Real.sqrt (∫ x in Set.Icc (0 : ℝ) 1, ‖f.1 x - g.1 x‖ ^ (2 : ℕ))

Lean source

Definition 5.2.2 (Orthogonality and the L^2 metric): for f, g ∈ C(ℝ/ℤ;ℂ) (modeled as continuous, 1-periodic functions ℝ → ℂ), (i) f and g are orthogonal iff ⟪f, g⟫ = 0; and (ii) d_{L^2}(f,g) = (∫_[0,1] ‖f(x) - g(x)‖^2 dx)^(1/2).

noncomputable def periodicOrthogonalityAndL2Metric : ({h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} → {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} → Prop) × ({h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} → {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} → ℝ) := (periodicOrthogonal, periodicL2Metric)

Lean source

Definition 5.2.3 (L^2-convergence): for a sequence (f_n) in C(ℝ/ℤ;ℂ) and f ∈ C(ℝ/ℤ;ℂ), (f_n) converges to f in L^2 when d_{L^2}(f_n, f) → 0 as n → ∞.

def periodicL2ConvergesTo (fSeq : ℕ → {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : Prop := Filter.Tendsto (fun n => periodicL2Metric (fSeq n) f) Filter.atTop (nhds (0 : ℝ))

Lean source

The constant function x ↦ 1 is continuous and 1-periodic.

lemma continuous_periodic_constOne : Continuous (fun _ : ℝ => (1 : ℂ)) ∧ Function.Periodic (fun _ : ℝ => (1 : ℂ)) 1

Lean source

The function x ↦ exp(2πix) is continuous and 1-periodic.

lemma continuous_periodic_expTwoPiI : Continuous (fun x : ℝ => Complex.exp (2 * Real.pi * Complex.I * x)) ∧ Function.Periodic (fun x : ℝ => Complex.exp (2 * Real.pi * Complex.I * x)) 1

Lean source

The 1-periodic function induced by the constant function x ↦ 1.

noncomputable def constOnePeriodicFunction : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := ⟨fun _ : ℝ => (1 : ℂ), continuous_periodic_constOne⟩

Lean source

The 1-periodic function induced by x ↦ exp(2πix).

noncomputable def expTwoPiIPeriodicFunction : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := ⟨fun x : ℝ => Complex.exp (2 * Real.pi * Complex.I * x), continuous_periodic_expTwoPiI⟩

Lean source

Example 5.2.3: let f(x) = 1 and g(x) = exp(2πix). Then ⟪f, g⟫ = 0.

theorem periodicInnerProduct_constOne_expTwoPiI : periodicInnerProduct constOnePeriodicFunction expTwoPiIPeriodicFunction = 0

Lean source

The L^2 norm on continuous, 1-periodic complex-valued functions induced by the inner product ⟪f, g⟫ = ∫_[0,1] f \overline{g}.

noncomputable def periodicL2Norm (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ℝ := Real.sqrt (periodicInnerProduct f f).re

Lean source

Example 5.2.6: for f(x) = exp(2πix), one has ‖f‖_2 = 1.

theorem expTwoPiIPeriodicFunction_l2Norm_eq_one : periodicL2Norm expTwoPiIPeriodicFunction = 1

Lean source

Lemma 5.2.7a (Basic properties of ‖·‖_2 (a), non-degeneracy): for f ∈ C(ℝ/ℤ; ℂ) (modeled as a continuous, 1-periodic function ℝ → ℂ), ‖f‖_2 = 0 iff f is the zero function.

lemma periodicL2Norm_eq_zero_iff (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicL2Norm f = 0 ↔ f.1 = 0

Lean source

Lemma 5.2.7b (Basic properties of ‖·‖_2 (b), Cauchy--Schwarz): for f, g ∈ C(ℝ/ℤ; ℂ) (modeled as continuous, 1-periodic functions ℝ → ℂ), |⟪f, g⟫| ≤ ‖f‖_2 ‖g‖_2.

lemma periodicInnerProduct_abs_le_periodicL2Norm_mul (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ‖periodicInnerProduct f g‖ ≤ periodicL2Norm f * periodicL2Norm g

Lean source

Lemma 5.2.5a (Properties of the inner product (a), Hermitian): if f, g ∈ C(ℝ/ℤ; ℂ) (modeled as continuous, 1-periodic functions ℝ → ℂ), then ⟪g, f⟫ = \overline{⟪f, g⟫}.

lemma periodicInnerProduct_hermitian (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicInnerProduct g f = star (periodicInnerProduct f g)

Lean source

Lemma 5.2.5b (Properties of the inner product (b), Positivity): if f ∈ C(ℝ/ℤ; ℂ) (modeled as a continuous, 1-periodic function ℝ → ℂ), then ⟪f, f⟫ is real and nonnegative, and ⟪f, f⟫ = 0 iff f is the zero function.

lemma periodicInnerProduct_positivity (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (0 : ℝ) ≤ (periodicInnerProduct f f).re ∧ (periodicInnerProduct f f).im = 0 ∧ (periodicInnerProduct f f = 0 ↔ f.1 = 0)

Lean source

The sum of two continuous, 1-periodic complex-valued functions is continuous and 1-periodic.

lemma continuous_periodic_add (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : Continuous (f.1 + g.1) ∧ Function.Periodic (f.1 + g.1) 1

Lean source

A scalar multiple of a continuous, 1-periodic complex-valued function is continuous and 1-periodic.

lemma continuous_periodic_smul (c : ℂ) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : Continuous (c • f.1) ∧ Function.Periodic (c • f.1) 1

Lean source

The pointwise sum in C(ℝ/ℤ; ℂ) modeled as continuous, 1-periodic functions ℝ → ℂ.

noncomputable def addPeriodicFunction (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := ⟨f.1 + g.1, continuous_periodic_add f g⟩

Lean source

Scalar multiplication in C(ℝ/ℤ; ℂ) modeled as continuous, 1-periodic functions ℝ → ℂ.

noncomputable def smulPeriodicFunction (c : ℂ) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := ⟨c • f.1, continuous_periodic_smul c f⟩

Lean source

Lemma 5.2.7c (Basic properties of ‖·‖_2 (c), triangle inequality): for f, g ∈ C(ℝ/ℤ; ℂ) (modeled as continuous, 1-periodic functions ℝ → ℂ), ‖f + g‖_2 ≤ ‖f‖_2 + ‖g‖_2.

lemma periodicL2Norm_add_le (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicL2Norm (addPeriodicFunction f g) ≤ periodicL2Norm f + periodicL2Norm g

Lean source

Lemma 5.2.7d (Basic properties of ‖·‖_2 (d), Pythagoras): for f, g ∈ C(ℝ/ℤ; ℂ) (modeled as continuous, 1-periodic functions ℝ → ℂ), if ⟪f, g⟫ = 0, then ‖f + g‖_2^2 = ‖f‖_2^2 + ‖g‖_2^2.

lemma periodicL2Norm_pythagoras (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hfg : periodicInnerProduct f g = 0) : periodicL2Norm (addPeriodicFunction f g) ^ (2 : ℕ) = periodicL2Norm f ^ (2 : ℕ) + periodicL2Norm g ^ (2 : ℕ)

Lean source

Lemma 5.2.7e (Basic properties of ‖·‖_2 (e), homogeneity): for f ∈ C(ℝ/ℤ; ℂ) (modeled as a continuous, 1-periodic function ℝ → ℂ) and c ∈ ℂ, ‖cf‖_2 = ‖c‖ ‖f‖_2.

lemma periodicL2Norm_smul (c : ℂ) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicL2Norm (smulPeriodicFunction c f) = ‖c‖ * periodicL2Norm f

Lean source

Helper for Example 5.2.3: rewrite the integrand as an exponential with negative coefficient.

lemma helperForExample_5_2_3_integrand_rewrite (x : ℝ) : (1 : ℂ) * star (Complex.exp (2 * Real.pi * Complex.I * x)) = Complex.exp ((-(2 * Real.pi * Complex.I)) * x)

Lean source

Helper for Example 5.2.3: the exponential coefficient is nonzero.

lemma helperForExample_5_2_3_coeff_ne_zero : ((-(2 * Real.pi * Complex.I)) : ℂ) ≠ 0

Lean source

Helper for Example 5.2.3: the endpoint value exp(-2πi) equals 1.

lemma helperForExample_5_2_3_exp_neg_twoPiI_eq_one : Complex.exp (-(2 * Real.pi * Complex.I)) = 1

Lean source

Helper for Example 5.2.3: the relevant exponential integral on [0,1] vanishes.

lemma helperForExample_5_2_3_interval_integral_exp_neg_twoPiI : ∫ x in Set.Icc (0 : ℝ) 1, Complex.exp ((-(2 * Real.pi * Complex.I)) * x) = 0

Lean source

Helper for Example 5.2.6: the self-inner-product integrand is identically 1.

lemma helperForExample_5_2_6_pointwise_selfInner_integrand_eq_one (x : ℝ) : Complex.exp (2 * Real.pi * Complex.I * x) * star (Complex.exp (2 * Real.pi * Complex.I * x)) = (1 : ℂ)

Lean source

Helper for Example 5.2.6: the self-inner product of exp(2πix) equals 1.

lemma helperForExample_5_2_6_innerProduct_self_eq_one : periodicInnerProduct expTwoPiIPeriodicFunction expTwoPiIPeriodicFunction = (1 : ℂ)

Lean source

Helper for Example 5.2.6: the real part of the self-inner product is 1.

lemma helperForExample_5_2_6_realpart_selfInner_eq_one : (periodicInnerProduct expTwoPiIPeriodicFunction expTwoPiIPeriodicFunction).re = 1

Lean source

Helper for Lemma 5.2.7a: rewrite Re ⟪f,f⟫ as an interval integral of normSq.

lemma helperForLemma_5_2_7a_re_eq_intervalIntegral_normSq (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct f f).re = ∫ x in (0 : ℝ)..1, Complex.normSq (f.1 x)

Lean source

Helper for Lemma 5.2.7a: a nonzero periodic function is nonzero at some point of the unit interval.

lemma helperForLemma_5_2_7a_exists_nonzero_in_unit_interval (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hne : f.1 ≠ 0) : ∃ x ∈ Set.Icc (0 : ℝ) 1, f.1 x ≠ 0

Lean source

Helper for Lemma 5.2.7a: if a periodic function is nonzero, then Re ⟪f,f⟫ is strictly positive.

lemma helperForLemma_5_2_7a_re_pos_of_nonzero (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hne : f.1 ≠ 0) : 0 < (periodicInnerProduct f f).re

Lean source

Helper for Lemma 5.2.7a: vanishing real part of the self-inner product is equivalent to the function being zero.

lemma helperForLemma_5_2_7a_re_eq_zero_iff_fun_zero (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct f f).re = 0 ↔ f.1 = 0

Lean source

Helper for Lemma 5.2.7a: ‖f‖_2 = 0 is equivalent to vanishing real part of the self-inner product.

lemma helperForLemma_5_2_7a_l2_eq_zero_iff_re_eq_zero (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicL2Norm f = 0 ↔ (periodicInnerProduct f f).re = 0

Lean source

Helper for Lemma 5.2.7b: continuity on [0,1] gives L² membership on the restricted measure.

lemma helperForLemma_5_2_7b_memLp_two_restrict_Icc (u : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : MeasureTheory.MemLp (fun x => u.1 x) 2 (MeasureTheory.volume.restrict (Set.Icc (0 : ℝ) 1))

Lean source

Helper for Lemma 5.2.7b: pointwise norm of the inner-product integrand factors.

lemma helperForLemma_5_2_7b_pointwise_norm_mul_star (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : ‖f.1 x * star (g.1 x)‖ = ‖f.1 x‖ * ‖g.1 x‖

Lean source

Helper for Lemma 5.2.7b: Hölder with p = q = 2 on [0,1] for norm-products.

lemma helperForLemma_5_2_7b_holder_norm_on_Icc (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ∫ x in Set.Icc (0 : ℝ) 1, ‖f.1 x‖ * ‖g.1 x‖ ≤ (∫ x in Set.Icc (0 : ℝ) 1, ‖f.1 x‖ ^ (2 : ℝ)) ^ (1 / (2 : ℝ)) * (∫ x in Set.Icc (0 : ℝ) 1, ‖g.1 x‖ ^ (2 : ℝ)) ^ (1 / (2 : ℝ))

Lean source

Helper for Lemma 5.2.7b: each Hölder L² factor is exactly periodicL2Norm.

lemma helperForLemma_5_2_7b_rhs_factor_eq_periodicL2Norm (u : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (∫ x in Set.Icc (0 : ℝ) 1, ‖u.1 x‖ ^ (2 : ℝ)) ^ (1 / (2 : ℝ)) = periodicL2Norm u

Lean source

Helper for Lemma 5.2.5a: swapping the two arguments in the integrand gives its complex conjugate pointwise.

lemma helperForLemma_5_2_5a_pointwise_swap_to_conj (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : g.1 x * star (f.1 x) = star (f.1 x * star (g.1 x))

Lean source

Helper for Lemma 5.2.5a: conjugation commutes with integration over [0,1].

lemma helperForLemma_5_2_5a_conj_of_setIntegral_Icc (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (∫ x in Set.Icc (0 : ℝ) 1, star (f.1 x * star (g.1 x))) = star (∫ x in Set.Icc (0 : ℝ) 1, f.1 x * star (g.1 x))

Lean source

Helper for Lemma 5.2.5b: rewrite ⟪f,f⟫ as the integral of normSq.

lemma helperForLemma_5_2_5b_self_eq_setIntegral_normSq (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicInnerProduct f f = ∫ x in Set.Icc (0 : ℝ) 1, ((Complex.normSq (f.1 x) : ℝ) : ℂ)

Lean source

Helper for Lemma 5.2.5b: the real part of ⟪f,f⟫ is an interval integral of normSq.

lemma helperForLemma_5_2_5b_re_eq_intervalIntegral_normSq (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct f f).re = ∫ x in (0 : ℝ)..1, Complex.normSq (f.1 x)

Lean source

Helper for Lemma 5.2.5b: a nonzero periodic function is nonzero at some point in one fundamental domain.

lemma helperForLemma_5_2_5b_exists_nonzero_in_unit_interval (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hne : f.1 ≠ 0) : ∃ x ∈ Set.Icc (0 : ℝ) 1, f.1 x ≠ 0

Lean source

Helper for Lemma 5.2.5b: a nonzero value on [0,1] forces strict positivity of Re ⟪f,f⟫.

lemma helperForLemma_5_2_5b_re_pos_of_exists_nonzero_in_unit_interval (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hExists : ∃ x ∈ Set.Icc (0 : ℝ) 1, f.1 x ≠ 0) : 0 < (periodicInnerProduct f f).re

Lean source

Helper for Lemma 5.2.5b: the imaginary part of ⟪f,f⟫ vanishes.

lemma helperForLemma_5_2_5b_self_im_eq_zero (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct f f).im = 0

Lean source

Helper for Lemma 5.2.7c: pointwise expansion of (f + g) * conj (f + g).

lemma helperForLemma_5_2_7c_pointwise_add_self_integrand_expand (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : ((f.1 + g.1) x) * star ((f.1 + g.1) x) = f.1 x * star (f.1 x) + f.1 x * star (g.1 x) + g.1 x * star (f.1 x) + g.1 x * star (g.1 x)

Lean source

Helper for Lemma 5.2.7c: expansion of ⟪f + g, f + g⟫ into diagonal and cross terms.

lemma helperForLemma_5_2_7c_inner_add_self_expand (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicInnerProduct (addPeriodicFunction f g) (addPeriodicFunction f g) = periodicInnerProduct f f + periodicInnerProduct f g + periodicInnerProduct g f + periodicInnerProduct g g

Lean source

Helper for Lemma 5.2.7c: diagonal terms satisfy Re ⟪u, u⟫ = ‖u‖_2^2.

lemma helperForLemma_5_2_7c_re_self_eq_sq_l2Norm (u : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct u u).re = periodicL2Norm u ^ (2 : ℕ)

Lean source

Helper for Lemma 5.2.7c: the real parts of the cross terms are bounded by 2 ‖f‖_2 ‖g‖_2.

lemma helperForLemma_5_2_7c_cross_re_sum_le_two_mul (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct f g).re + (periodicInnerProduct g f).re ≤ 2 * (periodicL2Norm f * periodicL2Norm g)

Lean source

Helper for Lemma 5.2.7c: the real part of ⟪f+g, f+g⟫ is bounded by (‖f‖_2 + ‖g‖_2)^2.

lemma helperForLemma_5_2_7c_re_addSelf_le_sq_sum (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct (addPeriodicFunction f g) (addPeriodicFunction f g)).re ≤ (periodicL2Norm f + periodicL2Norm g) ^ (2 : ℕ)

Lean source

Helper for Lemma 5.2.7d: orthogonality is preserved when swapping arguments by Hermitian symmetry.

lemma helperForLemma_5_2_7d_swap_inner_eq_zero_of_orthogonal (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hfg : periodicInnerProduct f g = 0) : periodicInnerProduct g f = 0

Lean source

Helper for Lemma 5.2.7d: the sum of the real parts of the two cross terms vanishes under orthogonality.

lemma helperForLemma_5_2_7d_cross_re_sum_eq_zero_of_orthogonal (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hfg : periodicInnerProduct f g = 0) : (periodicInnerProduct f g).re + (periodicInnerProduct g f).re = 0

Lean source

Helper for Lemma 5.2.7d: the real part of ⟪f+g, f+g⟫ equals the sum of the squared L^2 norms when ⟪f, g⟫ = 0.

lemma helperForLemma_5_2_7d_re_addSelf_eq_sq_sum_of_orthogonal (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hfg : periodicInnerProduct f g = 0) : (periodicInnerProduct (addPeriodicFunction f g) (addPeriodicFunction f g)).re = periodicL2Norm f ^ (2 : ℕ) + periodicL2Norm g ^ (2 : ℕ)

Lean source

Helper for Lemma 5.2.7e: pointwise scaling of normSq under scalar multiplication.

lemma helperForLemma_5_2_7e_pointwise_normSq_smul (c : ℂ) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : Complex.normSq ((smulPeriodicFunction c f).1 x) = (‖c‖ ^ (2 : ℕ)) * Complex.normSq (f.1 x)

Lean source

Helper for Lemma 5.2.7e: nonnegativity of the real part of ⟪f,f⟫.

lemma helperForLemma_5_2_7e_re_self_nonneg (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : 0 ≤ (periodicInnerProduct f f).re

Lean source

Helper for Lemma 5.2.7e: the real part of ⟪cf,cf⟫ scales by ‖c‖².

lemma helperForLemma_5_2_7e_re_inner_self_smul (c : ℂ) (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : (periodicInnerProduct (smulPeriodicFunction c f) (smulPeriodicFunction c f)).re = (‖c‖ ^ (2 : ℕ)) * (periodicInnerProduct f f).re

Lean source

Helper for Lemma 5.2.7e: pull ‖c‖² out of a square root.

lemma helperForLemma_5_2_7e_sqrt_mul_sq_norm (c : ℂ) {t : ℝ} (ht : 0 ≤ t) : Real.sqrt ((‖c‖ ^ (2 : ℕ)) * t) = ‖c‖ * Real.sqrt t

Lean source

Helper for Lemma 5.2.5c: the product integrand defining ⟪u, v⟫ is integrable on [0,1].

lemma helperForLemma_5_2_5c_integrableOn_mul_star (u v : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : MeasureTheory.IntegrableOn (fun x : ℝ => u.1 x * star (v.1 x)) (Set.Icc (0 : ℝ) 1)

Lean source

Helper for Lemma 5.2.5c: expand the additive integrand pointwise.

lemma helperForLemma_5_2_5c_addIntegrand_expand (f g h : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : ((f.1 + g.1) x) * star (h.1 x) = f.1 x * star (h.1 x) + g.1 x * star (h.1 x)

Lean source

Helper for Lemma 5.2.5c: factor a scalar from the first-slot integrand.

lemma helperForLemma_5_2_5c_smulIntegrand_factor (c : ℂ) (f g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) : (c • f.1) x * star (g.1 x) = c * (f.1 x * star (g.1 x))

5.2 — Inner Products on Periodic Functions — Part 2

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Lemma 5.2.5c (Properties of the inner product (c), linearity in the first variable): for f, g, h ∈ C(ℝ/ℤ; ℂ) and c ∈ ℂ, ⟪f + g, h⟫ = ⟪f, h⟫ + ⟪g, h⟫ and ⟪cf, g⟫ = c ⟪f, g⟫.

lemma periodicInnerProduct_linearity_first (f g h : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (c : ℂ) : periodicInnerProduct (addPeriodicFunction f g) h = periodicInnerProduct f h + periodicInnerProduct g h ∧ periodicInnerProduct (smulPeriodicFunction c f) g = c * periodicInnerProduct f g

Lean source

Lemma 5.2.5d (Properties of the inner product (d), antilinearity in the second variable): for f, g, h ∈ C(ℝ/ℤ; ℂ) and c ∈ ℂ, ⟪f, g + h⟫ = ⟪f, g⟫ + ⟪f, h⟫ and ⟪f, cg⟫ = \overline{c} ⟪f, g⟫.

lemma periodicInnerProduct_antilinearity_second (f g h : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (c : ℂ) : periodicInnerProduct f (addPeriodicFunction g h) = periodicInnerProduct f g + periodicInnerProduct f h ∧ periodicInnerProduct f (smulPeriodicFunction c g) = star c * periodicInnerProduct f g

Lean source

The L^∞ norm on continuous, 1-periodic complex-valued functions, taken as the supremum of ‖f(x)‖ on [0,1].

noncomputable def periodicLInftyNorm (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : ℝ := sSup (Set.range (fun x : Set.Icc (0 : ℝ) 1 => ‖f.1 x‖))

Lean source

Exercise 5.2.3: if f ∈ C(ℝ/ℤ; ℂ) is non-zero, then 0 < ‖f‖_2 ≤ ‖f‖_{L^∞}; conversely, for real numbers 0 < A ≤ B, there exists a non-zero f ∈ C(ℝ/ℤ; ℂ) with ‖f‖_2 = A and ‖f‖_{L^∞} = B.

theorem exercise_5_2_3 : (∀ f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, f.1 ≠ 0 → 0 < periodicL2Norm f ∧ periodicL2Norm f ≤ periodicLInftyNorm f) ∧ (∀ A B : ℝ, 0 < A → A ≤ B → ∃ f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, f.1 ≠ 0 ∧ periodicL2Norm f = A ∧ periodicLInftyNorm f = B)

Lean source

Helper for Lemma 5.2.5d: taking the star of periodicInnerProduct u v swaps the arguments.

lemma helperForLemma_5_2_5d_star_swap (u v : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : star (periodicInnerProduct u v) = periodicInnerProduct v u

Lean source

Helper for Exercise 5.2.3: 0 belongs to the fundamental interval [0,1].

lemma helperForExercise_5_2_3_zero_mem_Icc : (0 : ℝ) ∈ Set.Icc (0 : ℝ) 1

Lean source

Helper for Exercise 5.2.3: the L^∞-range set is bounded above.

lemma helperForExercise_5_2_3_lInftyRange_bddAbove (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : BddAbove (Set.range (fun x : Set.Icc (0 : ℝ) 1 => ‖f.1 x‖))

Lean source

Helper for Exercise 5.2.3: the L^∞-range set is nonempty.

lemma helperForExercise_5_2_3_lInftyRange_nonempty (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : Set.Nonempty (Set.range (fun x : Set.Icc (0 : ℝ) 1 => ‖f.1 x‖))

Lean source

Helper for Exercise 5.2.3: the periodic L^∞ norm is nonnegative.

lemma helperForExercise_5_2_3_lInfty_nonneg (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : 0 ≤ periodicLInftyNorm f

Lean source

Helper for Exercise 5.2.3: pointwise normSq is bounded by ‖f‖^2_{L^∞} on [0,1].

lemma helperForExercise_5_2_3_normSq_le_lInftySq (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (x : ℝ) (hx : x ∈ Set.Icc (0 : ℝ) 1) : Complex.normSq (f.1 x) ≤ periodicLInftyNorm f ^ (2 : ℕ)

Lean source

Helper for Exercise 5.2.3: a nonzero periodic continuous function has strictly positive L^2 norm.

lemma helperForExercise_5_2_3_nonzero_implies_l2_pos (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) (hne : f.1 ≠ 0) : 0 < periodicL2Norm f

Lean source

Helper for Exercise 5.2.3: always ‖f‖_2 ≤ ‖f‖_{L^∞}.

lemma helperForExercise_5_2_3_l2_le_lInfty (f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}) : periodicL2Norm f ≤ periodicLInftyNorm f

Lean source

Helper for Exercise 5.2.3: for real scalars, ‖A‖ as a complex norm is |A|.

lemma helperForExercise_5_2_3_complexNorm_ofReal (A : ℝ) : ‖(A : ℂ)‖ = |A|

Lean source

Helper for Exercise 5.2.3: scaling exp(2πix) by c gives L^∞ norm ‖c‖.

lemma helperForExercise_5_2_3_lInfty_smul_exp (c : ℂ) : periodicLInftyNorm (smulPeriodicFunction c expTwoPiIPeriodicFunction) = ‖c‖

Lean source

Helper for Exercise 5.2.3: diagonal converse case A = B.

lemma helperForExercise_5_2_3_exists_exact_norms_on_diagonal (A : ℝ) (hA : 0 < A) : ∃ f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, f.1 ≠ 0 ∧ periodicL2Norm f = A ∧ periodicLInftyNorm f = A

Lean source

Helper for Exercise 5.2.3: choose N,t with t^2 + (1 - t)^2 / N = r for any 0 < r < 1.

lemma helperForExercise_5_2_3_choose_parameters_for_ratio (r : ℝ) (hr0 : 0 < r) (hr1 : r < 1) : ∃ N : ℕ, 1 ≤ N ∧ ∃ t : ℝ, 0 ≤ t ∧ t ≤ 1 ∧ t ^ (2 : ℕ) + (1 - t) ^ (2 : ℕ) / N = r

Lean source

Helper for Exercise 5.2.3: the Fourier mode x ↦ exp(2πinx) is continuous and 1-periodic for every integer frequency n.

lemma continuous_periodic_expMode (n : ℤ) : Continuous (fun x : ℝ => Complex.exp (((n : ℂ) * (2 * Real.pi * Complex.I)) * (x : ℂ))) ∧ Function.Periodic (fun x : ℝ => Complex.exp (((n : ℂ) * (2 * Real.pi * Complex.I)) * (x : ℂ))) 1

Lean source

Helper for Exercise 5.2.3: integer Fourier modes as periodic continuous functions.

noncomputable def expModePeriodicFunction (n : ℤ) : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := ⟨fun x : ℝ => Complex.exp (((n : ℂ) * (2 * Real.pi * Complex.I)) * (x : ℂ)), continuous_periodic_expMode n⟩

Lean source

Helper for Exercise 5.2.3: every Fourier mode has unit pointwise magnitude.

lemma helperForExercise_5_2_3_expMode_norm_eq_one (n : ℤ) (x : ℝ) : ‖(expModePeriodicFunction n).1 x‖ = 1

Lean source

Helper for Exercise 5.2.3: Fourier modes have orthonormal inner products on [0,1].

lemma helperForExercise_5_2_3_expMode_inner (m n : ℤ) : periodicInnerProduct (expModePeriodicFunction m) (expModePeriodicFunction n) = if m = n then (1 : ℂ) else 0

Lean source

Helper for Exercise 5.2.3: every Fourier mode has L^2 norm squared equal to 1.

lemma helperForExercise_5_2_3_expMode_l2Sq_eq_one (n : ℤ) : periodicL2Norm (expModePeriodicFunction n) ^ (2 : ℕ) = (1 : ℝ)

Lean source

Helper for Exercise 5.2.3: partial sums of positive Fourier modes.

noncomputable def sumExpModes : ℕ → {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}

Lean source

Helper for Exercise 5.2.3: sumExpModes N is orthogonal to any higher mode.

lemma helperForExercise_5_2_3_sumExpModes_inner_of_lt (N k : ℕ) (hk : N < k) : periodicInnerProduct (sumExpModes N) (expModePeriodicFunction k) = 0

Lean source

Helper for Exercise 5.2.3: sumExpModes N is orthogonal to the next mode.

lemma helperForExercise_5_2_3_sumExpModes_inner_next (N : ℕ) : periodicInnerProduct (sumExpModes N) (expModePeriodicFunction (N + 1)) = 0

Lean source

Helper for Exercise 5.2.3: constant mode is orthogonal to sumExpModes N.

lemma helperForExercise_5_2_3_constMode_inner_sumExpModes (N : ℕ) : periodicInnerProduct (expModePeriodicFunction 0) (sumExpModes N) = 0

Lean source

Helper for Exercise 5.2.3: sumExpModes N has exact L^2 norm square N.

lemma helperForExercise_5_2_3_sumExpModes_l2Sq (N : ℕ) : periodicL2Norm (sumExpModes N) ^ (2 : ℕ) = (N : ℝ)

Lean source

Helper for Exercise 5.2.3: value of sumExpModes N at 0 is exactly N.

lemma helperForExercise_5_2_3_sumExpModes_value_zero (N : ℕ) : (sumExpModes N).1 (0 : ℝ) = (N : ℂ)

Lean source

Helper for Exercise 5.2.3: pointwise bound for partial Fourier sums.

lemma helperForExercise_5_2_3_sumExpModes_norm_le (N : ℕ) (x : ℝ) : ‖(sumExpModes N).1 x‖ ≤ (N : ℝ)

Lean source

Helper for Exercise 5.2.3: normalized average of the first N positive Fourier modes.

noncomputable def averageExpModesPeriodicFunction (N : ℕ) : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1} := smulPeriodicFunction ((1 / (N : ℝ)) : ℂ) (sumExpModes N)

Lean source

Helper for Exercise 5.2.3: exact profile of the normalized mode average, including orthogonality to the constant mode, exact L^2 square, exact L^∞, and value at 0.

lemma helperForExercise_5_2_3_average_modes_profile (N : ℕ) (hN : 1 ≤ N) : ∃ g : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, periodicInnerProduct (expModePeriodicFunction 0) g = 0 ∧ periodicL2Norm g ^ (2 : ℕ) = (1 : ℝ) / N ∧ periodicLInftyNorm g = 1 ∧ g.1 0 = 1

Lean source

Helper for Exercise 5.2.3: exact blended profile with prescribed t^2 + (1 - t)^2 / N, unit L^∞, and value 1 at zero.

lemma helperForExercise_5_2_3_blend_profile (N : ℕ) (hN : 1 ≤ N) (t : ℝ) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : ∃ u : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, periodicLInftyNorm u = 1 ∧ periodicL2Norm u ^ (2 : ℕ) = t ^ (2 : ℕ) + (1 - t) ^ (2 : ℕ) / N ∧ u.1 0 = 1

Lean source

Helper for Exercise 5.2.3: strict converse case A < B.

lemma helperForExercise_5_2_3_exists_exact_norms_strict (A B : ℝ) (hA : 0 < A) (hAB : A < B) : ∃ f : {h : ℝ → ℂ // Continuous h ∧ Function.Periodic h 1}, f.1 ≠ 0 ∧ periodicL2Norm f = A ∧ periodicLInftyNorm f = B

5.3 — Trigonometric Polynomials

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

The exponential mode x ↦ exp(2π i n x) is continuous and 1-periodic on ℝ.

lemma fourierCharacter_formula_continuous_periodic (n : ℤ) : Continuous (fun x : ℝ => Complex.exp (2 * Real.pi * Complex.I * (n : ℂ) * (x : ℂ))) ∧ Function.Periodic (fun x : ℝ => Complex.exp (2 * Real.pi * Complex.I * (n : ℂ) * (x : ℂ))) 1

Lean source

Definition 5.3.1 (Characters): for every integer n, define e_n ∈ C(ℝ/ℤ; ℂ) by e_n(x) = exp(2π i n x).

noncomputable def fourierCharacter (n : ℤ) : C(AddCircle (1 : ℝ), ℂ) := fourier (T := (1 : ℝ)) n

Lean source

Evaluation formula for the character e_n.

lemma fourierCharacter_apply (n : ℤ) (x : ℝ) : fourierCharacter n (x : AddCircle (1 : ℝ)) = Complex.exp (2 * Real.pi * Complex.I * (n : ℂ) * (x : ℂ))

Lean source

Lemma 5.3.5 (Characters are an orthonormal system): for integers n, m, the Fourier characters satisfy ⟪e_n, e_m⟫ = 1 when n = m and 0 otherwise, and ‖e_n‖_2 = 1, where e_k is viewed in L² as fourierLp (T := 1) (p := 2) k.

lemma fourierCharacter_orthonormal_system (n m : ℤ) : (inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) (fourierLp (T := (1 : ℝ)) (p := 2) m) = (if n = m then (1 : ℂ) else 0)) ∧ ‖fourierLp (T := (1 : ℝ)) (p := 2) n‖ = (1 : ℝ)

Lean source

Definition 5.3.2 (Trigonometric polynomials): a function f ∈ C(ℝ/ℤ; ℂ) is a trigonometric polynomial if f = ∑_{n=-N}^{N} c_n e_n for some integer bound N ≥ 0 and coefficients c_n ∈ ℂ.

def IsTrigonometricPolynomial (f : C(AddCircle (1 : ℝ), ℂ)) : Prop := ∃ N : ℕ, ∃ c : ℤ → ℂ, f = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => c n • fourierCharacter n)

Lean source

Corollary 5.3.6: for a trigonometric polynomial f = ∑_{n=-N}^{N} c_n e_n, the Fourier coefficient at each n in the support interval is c_n, the coefficients outside that interval vanish, and ‖f‖_2^2 = ∑_{n=-N}^{N} |c_n|^2.

theorem trigonometricPolynomial_fourierCoefficients_and_normSq (N : ℕ) (c : ℤ → ℂ) : let f := Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => c n • fourierLp (T := (1 : ℝ)) (p := 2) n) (∀ n : ℤ, n ∈ Finset.Icc (-(N : ℤ)) (N : ℤ) → inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) f = c n) ∧ (∀ n : ℤ, n ∉ Finset.Icc (-(N : ℤ)) (N : ℤ) → inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) f = 0) ∧ ‖f‖ ^ (2 : ℕ) = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => ‖c n‖ ^ (2 : ℕ))

Lean source

Definition 5.3.7 (Fourier transform): for f ∈ C(ℝ/ℤ; ℂ), its Fourier transform is the function ℤ → ℂ sending n to the n-th Fourier coefficient ∫ x in (0 : ℝ)..1, f x * exp (-2π i n x).

noncomputable def fourierTransform (f : C(AddCircle (1 : ℝ), ℂ)) : ℤ → ℂ := fourierCoeff f

Lean source

For f ∈ C(ℝ/ℤ; ℂ), the Fourier series term family is n ↦ \hat f(n) e_n.

noncomputable def fourierSeriesOnAddCircle (f : C(AddCircle (1 : ℝ), ℂ)) : ℤ → C(AddCircle (1 : ℝ), ℂ) := fun n => (fourierTransform f n) • fourierCharacter n

Lean source

Definition 5.3.8 (Fourier inversion, Fourier series, and Plancherel formula): for f ∈ C(ℝ/ℤ; ℂ), the Fourier series is the formal family n ↦ \hat f(n) e_n; if f is a trigonometric polynomial, then f equals a finite sum of these Fourier-series terms; and in the same finite case one has the Parseval/Plancherel identity.

def fourierSeries_inversion_plancherel_onAddCircle (f : C(AddCircle (1 : ℝ), ℂ)) : Prop

Lean source

Bridge fourierTransform to the L² inner product with Fourier modes.

lemma fourierTransform_eq_inner_fourierLp_toLp (f : C(AddCircle (1 : ℝ), ℂ)) (n : ℤ) : fourierTransform f n = inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) (ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f)

Lean source

If f is a trigonometric polynomial, then f equals a finite sum of its Fourier-series terms (Fourier inversion in the finite case).

theorem trigonometricPolynomial_fourierInversion (f : C(AddCircle (1 : ℝ), ℂ)) (hf : IsTrigonometricPolynomial f) : ∃ s : Finset ℤ, (∀ n : ℤ, n ∉ s → fourierTransform f n = 0) ∧ f = Finset.sum s (fun n => fourierSeriesOnAddCircle f n)

Lean source

If f is a trigonometric polynomial, then the finite Parseval/Plancherel identity holds: the L² norm identity on AddCircle equals a finite sum of squared Fourier coefficients.

theorem trigonometricPolynomial_plancherel_formula (f : C(AddCircle (1 : ℝ), ℂ)) (hf : IsTrigonometricPolynomial f) : ∃ s : Finset ℤ, (∀ n : ℤ, n ∉ s → fourierTransform f n = 0) ∧ (∫ x : AddCircle (1 : ℝ), ‖f x‖ ^ (2 : ℕ) ∂(AddCircle.haarAddCircle : MeasureTheory.Measure (AddCircle (1 : ℝ)))) = Finset.sum s (fun n => ‖fourierTransform f n‖ ^ (2 : ℕ))

Lean source

Helper for Corollary 5.3.6: coefficient extraction on a finite support set.

lemma helperForCorollary_5_3_6_inner_on_support (s : Finset ℤ) (c : ℤ → ℂ) {n : ℤ} (hn : n ∈ s) : inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) (Finset.sum s (fun k => c k • fourierLp (T := (1 : ℝ)) (p := 2) k)) = c n

Lean source

Helper for Corollary 5.3.6: coefficient vanishing outside a finite support set.

lemma helperForCorollary_5_3_6_inner_off_support (s : Finset ℤ) (c : ℤ → ℂ) {n : ℤ} (hn : n ∉ s) : inner ℂ (fourierLp (T := (1 : ℝ)) (p := 2) n) (Finset.sum s (fun k => c k • fourierLp (T := (1 : ℝ)) (p := 2) k)) = 0

Lean source

Helper for Corollary 5.3.6: finite Parseval identity for a finite Fourier sum.

lemma helperForCorollary_5_3_6_normSq_finite_sum (s : Finset ℤ) (c : ℤ → ℂ) : ‖Finset.sum s (fun k => c k • fourierLp (T := (1 : ℝ)) (p := 2) k)‖ ^ (2 : ℕ) = Finset.sum s (fun k => ‖c k‖ ^ (2 : ℕ))

5.4 — Periodic Convolutions — Part 1

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Theorem 5.4.1 (Weierstrass approximation theorem for trigonometric polynomials): for every continuous function f : C(ℝ/ℤ; ℂ) and every ε > 0, there exists a trigonometric polynomial P such that ‖f - P‖ ≤ ε.

theorem exists_trigonometricPolynomial_uniform_approximation (f : C(AddCircle (1 : ℝ), ℂ)) (ε : ℝ) (hε : 0 < ε) : ∃ P : C(AddCircle (1 : ℝ), ℂ), IsTrigonometricPolynomial P ∧ ‖f - P‖ ≤ ε

Lean source

Continuity of the function underlying periodic convolution.

lemma periodicConvolution_continuous (f g : C(AddCircle (1 : ℝ), ℂ)) : Continuous (fun x : AddCircle (1 : ℝ) => ∫ y in Set.Icc (0 : ℝ) 1, f (y : AddCircle (1 : ℝ)) * g (x - (y : AddCircle (1 : ℝ))))

Lean source

Definition 5.4.2: for continuous f, g : C(ℝ/ℤ; ℂ), the periodic convolution is the continuous function on ℝ/ℤ given by (f * g)(x) = ∫ y ∈ [0,1], f(y) g(x - y) dy with y viewed in ℝ/ℤ.

noncomputable def periodicConvolution (f g : C(AddCircle (1 : ℝ), ℂ)) : C(AddCircle (1 : ℝ), ℂ) := ⟨(fun x : AddCircle (1 : ℝ) => ∫ y in Set.Icc (0 : ℝ) 1, f (y : AddCircle (1 : ℝ)) * g (x - (y : AddCircle (1 : ℝ)))), periodicConvolution_continuous f g⟩

Lean source

Lemma 5.4.4a (Basic properties of periodic convolution (a), Closure): if f, g ∈ C(ℝ/ℤ; ℂ), then f * g ∈ C(ℝ/ℤ; ℂ). In this file, f * g is represented by periodicConvolution f g.

lemma periodicConvolution_continuous_closure (f g : C(AddCircle (1 : ℝ), ℂ)) : Continuous (periodicConvolution f g)

Lean source

Lemma 5.4.4b (Basic properties of periodic convolution (b), Commutativity): for f, g : C(ℝ/ℤ; ℂ), one has f * g = g * f, represented here as periodicConvolution f g = periodicConvolution g f.

lemma periodicConvolution_comm (f g : C(AddCircle (1 : ℝ), ℂ)) : periodicConvolution f g = periodicConvolution g f

Lean source

Lemma 5.4.4c (Basic properties of periodic convolution (c), Bilinearity): for f, g, h : C(ℝ/ℤ; ℂ) and c : ℂ, one has f * (g + h) = f * g + f * h, (f + g) * h = f * h + g * h, and c (f * g) = (c f) * g = f * (c g), represented here using periodicConvolution.

lemma periodicConvolution_bilinearity (f g h : C(AddCircle (1 : ℝ), ℂ)) (c : ℂ) : periodicConvolution f (g + h) = periodicConvolution f g + periodicConvolution f h ∧ periodicConvolution (f + g) h = periodicConvolution f h + periodicConvolution g h ∧ c • periodicConvolution f g = periodicConvolution (c • f) g ∧ periodicConvolution (c • f) g = periodicConvolution f (c • g)

Lean source

Lemma 5.4.5: for f ∈ C(ℝ/ℤ; ℂ) and n ∈ ℤ, one has f * e_n = \hat f(n)e_n. More generally, for a trigonometric polynomial P = ∑_{k=-N}^{N} c_k e_k, periodic convolution acts termwise: f * P = ∑_{k=-N}^{N} \hat f(k)c_k e_k, hence f * P is trigonometric.

lemma periodicConvolution_fourierCharacter_and_trigSum (f : C(AddCircle (1 : ℝ), ℂ)) (n : ℤ) (N : ℕ) (c : ℤ → ℂ) : periodicConvolution f (fourierCharacter n) = (fourierTransform f n) • fourierCharacter n ∧ periodicConvolution f (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => c k • fourierCharacter k)) = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => (fourierTransform f k * c k) • fourierCharacter k) ∧ IsTrigonometricPolynomial (periodicConvolution f (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => c k • fourierCharacter k)))

Lean source

Definition 5.4.5 (Periodic approximation to the identity): for ε > 0 and 0 < δ < 1/2, a continuous periodic function f : C(ℝ/ℤ; ℂ) is a periodic (ε, δ) approximation to the identity iff (a) f(x) is real and nonnegative for all x, and ∫_[0,1] f = 1, and (b) |f(x)| < ε whenever δ ≤ |x| ≤ 1 - δ.

def IsPeriodicApproximationToIdentity (ε δ : ℝ) (f : C(AddCircle (1 : ℝ), ℂ)) : Prop := 0 < ε ∧ 0 < δ ∧ δ < (1 / 2 : ℝ) ∧ (∀ x : AddCircle (1 : ℝ), (f x).im = 0 ∧ 0 ≤ (f x).re) ∧ (∫ y in Set.Icc (0 : ℝ) 1, f (y : AddCircle (1 : ℝ))) = (1 : ℂ) ∧ ∀ x : ℝ, δ ≤ |x| → |x| ≤ 1 - δ → ‖f (x : AddCircle (1 : ℝ))‖ < ε

Lean source

Helper for Theorem 5.4.1: extract a Fourier-span element that approximates a target continuous function within a prescribed sup-norm error.

lemma helperForTheorem_5_4_1_dense_span_witness (f : C(AddCircle (1 : ℝ), ℂ)) (ε : ℝ) (hε : 0 < ε) : ∃ P : C(AddCircle (1 : ℝ), ℂ), P ∈ Submodule.span ℂ (Set.range (fourier (T := (1 : ℝ)))) ∧ ‖f - P‖ < ε

Lean source

Helper for Theorem 5.4.1: every element of the Fourier span has a finite Finsupp expansion in the characters fourierCharacter n.

lemma helperForTheorem_5_4_1_span_element_has_finsupp_expansion {P : C(AddCircle (1 : ℝ), ℂ)} (hP : P ∈ Submodule.span ℂ (Set.range (fourier (T := (1 : ℝ))))) : ∃ c : ℤ →₀ ℂ, P = c.sum (fun n a => a • fourierCharacter n)

Lean source

Helper for Theorem 5.4.1: the support of a finitely supported coefficient family is contained in a symmetric interval [-N, N], with N = c.support.sup Int.natAbs.

lemma helperForTheorem_5_4_1_support_in_symmetric_Icc (c : ℤ →₀ ℂ) : let N : ℕ := c.support.sup Int.natAbs ∀ n ∈ c.support, n ∈ Finset.Icc (-(N : ℤ)) (N : ℤ)

Lean source

Helper for Theorem 5.4.1: every finite Fourier-character expansion is a trigonometric polynomial in the sense of Definition 5.3.2.

lemma helperForTheorem_5_4_1_isTrig_of_finsupp_expansion (c : ℤ →₀ ℂ) : IsTrigonometricPolynomial (c.sum (fun n a => a • fourierCharacter n))

Lean source

Helper for Lemma 5.4.4b: rewrite the periodic-convolution integral on Set.Icc as an evaluation of convolution on AddCircle (1 : ℝ).

lemma helperForLemma_5_4_4b_eval_eq_addcircle_convolution (f g : C(AddCircle (1 : ℝ), ℂ)) (x : AddCircle (1 : ℝ)) : (∫ y in Set.Icc (0 : ℝ) 1, f (y : AddCircle (1 : ℝ)) * g (x - (y : AddCircle (1 : ℝ)))) = MeasureTheory.convolution (fun t : AddCircle (1 : ℝ) => f t) (fun t : AddCircle (1 : ℝ) => g t) (ContinuousLinearMap.mul ℂ ℂ) (MeasureTheory.volume : MeasureTheory.Measure (AddCircle (1 : ℝ))) x

Lean source

Helper for Lemma 5.4.4b: for complex-valued convolution, replacing mul by mul.flip does not change the result.

lemma helperForLemma_5_4_4b_mul_convolution_eq_flip_convolution (F G : AddCircle (1 : ℝ) → ℂ) : MeasureTheory.convolution G F (ContinuousLinearMap.mul ℂ ℂ) (MeasureTheory.volume : MeasureTheory.Measure (AddCircle (1 : ℝ))) = MeasureTheory.convolution G F (ContinuousLinearMap.mul ℂ ℂ).flip (MeasureTheory.volume : MeasureTheory.Measure (AddCircle (1 : ℝ)))

Lean source

Helper for Lemma 5.4.4b: convolution on AddCircle (1 : ℝ) with complex multiplication is commutative.

lemma helperForLemma_5_4_4b_addcircle_convolution_comm (F G : AddCircle (1 : ℝ) → ℂ) : MeasureTheory.convolution F G (ContinuousLinearMap.mul ℂ ℂ) (MeasureTheory.volume : MeasureTheory.Measure (AddCircle (1 : ℝ))) = MeasureTheory.convolution G F (ContinuousLinearMap.mul ℂ ℂ) (MeasureTheory.volume : MeasureTheory.Measure (AddCircle (1 : ℝ)))

Lean source

Helper for Lemma 5.4.5: factor a character at a difference into a product of an x-factor and a y-factor.

lemma helperForLemma_5_4_5_character_sub_factorization (n : ℤ) (x y : AddCircle (1 : ℝ)) : fourierCharacter n (x - y) = fourierCharacter n x * fourierCharacter (-n) y

Lean source

Helper for Lemma 5.4.5: identify the interval integral appearing in the character-convolution computation with the Fourier coefficient.

lemma helperForLemma_5_4_5_intervalIntegral_eq_fourierTransform (f : C(AddCircle (1 : ℝ), ℂ)) (n : ℤ) : (∫ y in Set.Icc (0 : ℝ) 1, f (y : AddCircle (1 : ℝ)) * fourierCharacter (-n) (y : AddCircle (1 : ℝ))) = fourierTransform f n

Lean source

Helper for Lemma 5.4.5: periodic convolution is scalar-linear in the second argument.

lemma helperForLemma_5_4_5_convolution_right_smul (f g : C(AddCircle (1 : ℝ), ℂ)) (c : ℂ) : periodicConvolution f (c • g) = c • periodicConvolution f g

Lean source

Helper for Lemma 5.4.5: each Fourier character is an eigenfunction of periodic convolution with eigenvalue equal to the corresponding Fourier coefficient of the left factor.

lemma helperForLemma_5_4_5_convolution_with_character (f : C(AddCircle (1 : ℝ), ℂ)) (n : ℤ) : periodicConvolution f (fourierCharacter n) = (fourierTransform f n) • fourierCharacter n

Lean source

Helper for Lemma 5.4.5: convolution with a trigonometric polynomial acts termwise on its Fourier expansion.

lemma helperForLemma_5_4_5_convolution_finite_fourier_sum (f : C(AddCircle (1 : ℝ), ℂ)) (N : ℕ) (c : ℤ → ℂ) : periodicConvolution f (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => c k • fourierCharacter k)) = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => (fourierTransform f k * c k) • fourierCharacter k)

5.4 — Periodic Convolutions — Part 2

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Lemma 5.4.6: for every ε > 0 and 0 < δ < 1/2, there exists a trigonometric polynomial P that is a periodic (ε, δ) approximation to the identity.

lemma exists_trigonometricPolynomial_isPeriodicApproximationToIdentity (ε δ : ℝ) (hε : 0 < ε) (hδ₀ : 0 < δ) (hδ₁ : δ < (1 / 2 : ℝ)) : ∃ P : C(AddCircle (1 : ℝ), ℂ), IsTrigonometricPolynomial P ∧ IsPeriodicApproximationToIdentity ε δ P

Lean source

Helper for Lemma 5.4.6: Fejér polynomial on AddCircle (1 : ℝ) with frequency cutoff N.

noncomputable def helperForLemma_5_4_6_fejerPolynomial (N : ℕ) : C(AddCircle (1 : ℝ), ℂ) := Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => ((((N + 1 - Int.natAbs k : ℕ) : ℂ) / ((N + 1 : ℕ) : ℂ))) • fourierCharacter k)

Lean source

Helper for Lemma 5.4.6: the Fejér polynomial is a trigonometric polynomial.

lemma helperForLemma_5_4_6_fejer_isTrig (N : ℕ) : IsTrigonometricPolynomial (helperForLemma_5_4_6_fejerPolynomial N)

Lean source

Helper for Lemma 5.4.6: character integral on [0,1] is 1 at frequency 0 and vanishes at nonzero frequencies.

lemma helperForLemma_5_4_6_intervalIntegral_fourierCharacter_eq_ite (k : ℤ) : (∫ y in Set.Icc (0 : ℝ) 1, fourierCharacter k (y : AddCircle (1 : ℝ))) = (if k = 0 then (1 : ℂ) else 0)

Lean source

Helper for Lemma 5.4.6: rewrite the Fejér mass integral as a weighted finite character-integral sum.

lemma helperForLemma_5_4_6_fejerIntegral_as_weightedCharacterSum (N : ℕ) : (∫ y in Set.Icc (0 : ℝ) 1, helperForLemma_5_4_6_fejerPolynomial N (y : AddCircle (1 : ℝ))) = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => ((((N + 1 - Int.natAbs k : ℕ) : ℂ) / ((N + 1 : ℕ) : ℂ)) * (∫ y in Set.Icc (0 : ℝ) 1, fourierCharacter k (y : AddCircle (1 : ℝ)))))

Lean source

Helper for Lemma 5.4.6: the Fejér polynomial has total mass 1 on [0,1].

lemma helperForLemma_5_4_6_fejer_mass_one (N : ℕ) : (∫ y in Set.Icc (0 : ℝ) 1, helperForLemma_5_4_6_fejerPolynomial N (y : AddCircle (1 : ℝ))) = (1 : ℂ)

Lean source

Helper for Lemma 5.4.6: Archimedean index choice turning an O((N+1)⁻¹) bound into a strict < ε estimate.

lemma helperForLemma_5_4_6_chooseIndexFromTailBound {ε C : ℝ} (hε : 0 < ε) (hC : 0 < C) : ∃ N : ℕ, C / (N + 1 : ℝ) < ε

Lean source

Helper for Lemma 5.4.6: convert an integer-difference equation between natural numbers into a nonnegative shift equation.

lemma helperForLemma_5_4_6_intDiff_eq_natShift (i j m : ℕ) : ((i : ℤ) - (j : ℤ) = (m : ℤ)) ↔ i = j + m

Lean source

Helper for Lemma 5.4.6: convert an integer-difference equation between natural numbers into a negative shift equation.

lemma helperForLemma_5_4_6_intDiff_eq_negNatShift (i j m : ℕ) : ((i : ℤ) - (j : ℤ) = - (m : ℤ)) ↔ j = i + m

Lean source

Helper for Lemma 5.4.6: count pairs (i,j) in range (N+1) × range (N+1) with i = j + m.

lemma helperForLemma_5_4_6_pairCount_nonnegShift (N m : ℕ) : ((Finset.product (Finset.range (N + 1)) (Finset.range (N + 1))).filter (fun p : ℕ × ℕ => p.1 = p.2 + m)).card = N + 1 - m

Lean source

Helper for Lemma 5.4.6: count pairs (i,j) in range (N+1) × range (N+1) with j = i + m.

lemma helperForLemma_5_4_6_pairCount_nonnegShift_swapped (N m : ℕ) : ((Finset.product (Finset.range (N + 1)) (Finset.range (N + 1))).filter (fun p : ℕ × ℕ => p.2 = p.1 + m)).card = N + 1 - m

Lean source

Helper for Lemma 5.4.6: the number of pairs in range (N+1) × range (N+1) with integer difference k is N+1-|k|.

lemma helperForLemma_5_4_6_pairCount_eq_weight (N : ℕ) (k : ℤ) : ((Finset.product (Finset.range (N + 1)) (Finset.range (N + 1))).filter (fun p : ℕ × ℕ => ((p.1 : ℤ) - (p.2 : ℤ) = k))).card = N + 1 - Int.natAbs k

Lean source

Helper for Lemma 5.4.6: integer differences of indices from range (N+1) lie in the symmetric interval [-N, N].

lemma helperForLemma_5_4_6_diff_mem_Icc (N i j : ℕ) (hi : i ∈ Finset.range (N + 1)) (hj : j ∈ Finset.range (N + 1)) : ((i : ℤ) - (j : ℤ)) ∈ Finset.Icc (-(N : ℤ)) (N : ℤ)

Lean source

Helper for Lemma 5.4.6: group the double range sum by fixed difference k = i - j.

lemma helperForLemma_5_4_6_doubleRangeSum_groupByDifference (N : ℕ) (z : ℂ) : Finset.sum (Finset.range (N + 1)) (fun i => Finset.sum (Finset.range (N + 1)) (fun j => z ^ i * star (z ^ j))) = Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => Finset.sum ((Finset.product (Finset.range (N + 1)) (Finset.range (N + 1))).filter (fun p : ℕ × ℕ => (p.1 : ℤ) - (p.2 : ℤ) = k)) (fun p => z ^ p.1 * star (z ^ p.2)))

Lean source

Helper for Lemma 5.4.6: on the fiber where i - j = k, the term z^i * conj(z^j) with z = exp(i 2π x) collapses to the k-mode exponential.

lemma helperForLemma_5_4_6_expTerm_onDifferenceFiber (x : ℝ) (i j : ℕ) (k : ℤ) (hDiff : ((i : ℤ) - (j : ℤ) = k)) : let z : ℂ := Complex.exp (Complex.I * (2 * Real.pi * x)) z ^ i * star (z ^ j) = Complex.exp (2 * Real.pi * Complex.I * (k : ℂ) * (x : ℂ))

Lean source

Helper for Lemma 5.4.6: convert the weighted k-sum on [-N,N] into the double-range geometric sum.

lemma helperForLemma_5_4_6_weightedIccSum_eq_doubleRangeSum (N : ℕ) (x : ℝ) : let z : ℂ := Complex.exp (Complex.I * (2 * Real.pi * x)) Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun k => (((N + 1 - Int.natAbs k : ℕ) : ℂ) * Complex.exp (2 * Real.pi * Complex.I * (k : ℂ) * (x : ℂ)))) = Finset.sum (Finset.range (N + 1)) (fun i => Finset.sum (Finset.range (N + 1)) (fun j => z ^ i * star (z ^ j)))

Lean source

Helper for Lemma 5.4.6: rewrite the weighted Fourier-coefficient sum for the Fejér kernel value into a normalized double geometric sum.

lemma helperForLemma_5_4_6_fejerCoeff_weightedSum_eq_doubleGeomSum (N : ℕ) (x : ℝ) : let z : ℂ := Complex.exp (Complex.I * (2 * Real.pi * x)) let D : ℂ := ((1 : ℂ) / ((N + 1 : ℕ) : ℂ)) * (Finset.sum (Finset.range (N + 1)) (fun i => Finset.sum (Finset.range (N + 1)) (fun j => z ^ i * star (z ^ j))) ) helperForLemma_5_4_6_fejerPolynomial N (x : AddCircle (1 : ℝ)) = D

Lean source

Helper for Lemma 5.4.6: the normalized double geometric sum equals the normalized squared geometric-sum norm, with vanishing imaginary part.

lemma helperForLemma_5_4_6_doubleGeomSum_eq_normSq_geomSum (N : ℕ) (z : ℂ) : let S : ℂ := Finset.sum (Finset.range (N + 1)) (fun j => z ^ j) let D : ℂ := ((1 : ℂ) / ((N + 1 : ℕ) : ℂ)) * (Finset.sum (Finset.range (N + 1)) (fun i => Finset.sum (Finset.range (N + 1)) (fun j => z ^ i * star (z ^ j))) ) D.re = ((1 : ℝ) / (N + 1 : ℝ)) * ‖S‖ ^ 2 ∧ D.im = 0

Lean source

Helper for Lemma 5.4.6: Fejér-kernel evaluation at a real point as a normalized squared geometric-sum norm, with vanishing imaginary part.

lemma helperForLemma_5_4_6_fejer_eval_eq_normSqGeometricSum (N : ℕ) (x : ℝ) : (helperForLemma_5_4_6_fejerPolynomial N (x : AddCircle (1 : ℝ))).re = ((1 : ℝ) / (N + 1 : ℝ)) * ‖Finset.sum (Finset.range (N + 1)) (fun j => (Complex.exp (Complex.I * (2 * Real.pi * x))) ^ j)‖ ^ 2 ∧ (helperForLemma_5_4_6_fejerPolynomial N (x : AddCircle (1 : ℝ))).im = 0

Lean source

Helper for Lemma 5.4.6: geometric-sum norm bound away from the resonance exp(2πix) = 1.

lemma helperForLemma_5_4_6_geomSum_norm_le_two_div_normExpSubOne (N : ℕ) (x : ℝ) (hx : Complex.exp (Complex.I * (2 * Real.pi * x)) ≠ 1) : ‖Finset.sum (Finset.range (N + 1)) (fun j => (Complex.exp (Complex.I * (2 * Real.pi * x))) ^ j)‖ ≤ 2 / ‖Complex.exp (Complex.I * (2 * Real.pi * x)) - 1‖

Lean source

Helper for Lemma 5.4.6: on the annulus δ ≤ |x| ≤ 1 - δ with 0 < δ < 1/2, the denominator ‖exp(2πix) - 1‖ is uniformly bounded below by a positive constant.

lemma helperForLemma_5_4_6_annulus_expSubOne_lowerBound {δ : ℝ} (hδ₀ : 0 < δ) (hδ₁ : δ < (1 / 2 : ℝ)) : ∃ mδ > 0, ∀ x : ℝ, δ ≤ |x| → |x| ≤ 1 - δ → mδ ≤ ‖Complex.exp (Complex.I * (2 * Real.pi * x)) - 1‖

Lean source

Helper for Lemma 5.4.6: combining the norm-square Fejér formula, geometric-sum denominator estimate, and annulus denominator lower bound gives the quantitative tail estimate.

lemma helperForLemma_5_4_6_fejer_tailBound_from_formula {δ mδ : ℝ} (hmδ : 0 < mδ) (hLower : ∀ x : ℝ, δ ≤ |x| → |x| ≤ 1 - δ → mδ ≤ ‖Complex.exp (Complex.I * (2 * Real.pi * x)) - 1‖) (N : ℕ) (x : ℝ) (hxδ : δ ≤ |x|) (hx1 : |x| ≤ 1 - δ) : ‖helperForLemma_5_4_6_fejerPolynomial N (x : AddCircle (1 : ℝ))‖ ≤ (4 / (mδ ^ 2)) / (N + 1 : ℝ)

Lean source

Helper for Lemma 5.4.6: Fejér kernels are pointwise real/nonnegative and satisfy uniform annulus decay ‖F_N(x)‖ ≤ Cδ/(N+1) when δ ≤ |x| ≤ 1-δ.

lemma helperForLemma_5_4_6_fejer_real_nonneg_and_tailBound {δ : ℝ} (hδ₀ : 0 < δ) (hδ₁ : δ < (1 / 2 : ℝ)) : (∀ N : ℕ, ∀ x : AddCircle (1 : ℝ), (helperForLemma_5_4_6_fejerPolynomial N x).im = 0 ∧ 0 ≤ (helperForLemma_5_4_6_fejerPolynomial N x).re) ∧ ∃ Cδ > 0, ∀ N : ℕ, ∀ x : ℝ, δ ≤ |x| → |x| ≤ 1 - δ → ‖helperForLemma_5_4_6_fejerPolynomial N (x : AddCircle (1 : ℝ))‖ ≤ Cδ / (N + 1 : ℝ)

Lean source

Helper for Lemma 5.4.6: quantitative Fejér-kernel concentration yields a periodic (ε, δ) approximation to the identity for some index.

lemma helperForLemma_5_4_6_exists_fejerPeriodicApproximation (ε δ : ℝ) (hε : 0 < ε) (hδ₀ : 0 < δ) (hδ₁ : δ < (1 / 2 : ℝ)) : ∃ N : ℕ, IsPeriodicApproximationToIdentity ε δ (helperForLemma_5_4_6_fejerPolynomial N)

5.5 — The Fourier and Plancherel Theorems

Lean authors: Zichen Wang, Wanli Ma, Shu Miao, Zaiwen Wen.

Source header

Theorem 5.5.1 (Fourier theorem): for every f ∈ C(ℝ/ℤ; ℂ), the symmetric Fourier partial sums ∑_{n=-N}^{N} \hat f(n) e_n converge to f in the L² metric, i.e. lim_{N→∞} ‖f - ∑_{n=-N}^{N} \hat f(n)e_n‖₂ = 0.

theorem fourier_series_tendsto_in_L2 (f : C(AddCircle (1 : ℝ), ℂ)) : Filter.Tendsto (fun N : ℕ => ‖(ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f) - (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourierLp (T := (1 : ℝ)) (p := 2) n)))‖) Filter.atTop (nhds (0 : ℝ))

Lean source

Theorem 5.5.3: let f ∈ C(ℝ/ℤ; ℂ). If ∑_{n∈ℤ} ‖\hat f(n)‖ converges, then the symmetric Fourier partial sums ∑_{n=-N}^{N} \hat f(n)e_n converge uniformly to f, i.e. lim_{N→∞} ‖f - ∑_{n=-N}^{N} \hat f(n)e_n‖∞ = 0 (with ‖·‖ the sup norm on C(ℝ/ℤ; ℂ)).

theorem fourier_series_tendsto_uniform_of_summable_fourierCoefficients (f : C(AddCircle (1 : ℝ), ℂ)) (habs : Summable (fun n : ℤ => ‖fourierCoeff f n‖)) : Filter.Tendsto (fun N : ℕ => ‖f - (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourier (T := (1 : ℝ)) n)))‖) Filter.atTop (nhds (0 : ℝ))

Lean source

Theorem 5.5.4 (Plancherel / Parseval): for any f ∈ C(ℝ/ℤ; ℂ), the series ∑_{n∈ℤ} |\hat f(n)|^2 converges and the L² norm identity ‖f‖₂^2 = ∑_{n=-∞}^{∞} |\hat f(n)|^2 holds.

theorem continuousMap_norm_sq_eq_tsum_sq_fourierCoeff (f : C(AddCircle (1 : ℝ), ℂ)) : Summable (fun n : ℤ => ‖fourierCoeff f n‖ ^ 2) ∧ ‖ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f‖ ^ 2 = ∑' n : ℤ, ‖fourierCoeff f n‖ ^ 2

Lean source

Helper for Theorem 5.5.1: the Fourier series of f viewed in L² has the expected coefficient formula and sums to toLp f.

lemma helperForTheorem_5_5_1_hasSum_fourier_series_toLp (f : C(AddCircle (1 : ℝ), ℂ)) : HasSum (fun n : ℤ => (fourierCoeff f n) • (fourierLp (T := (1 : ℝ)) (p := 2) n)) (ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f)

Lean source

Helper for Theorem 5.5.1: symmetric integer windows [-N, N] tend to atTop in Finset ℤ.

lemma helperForTheorem_5_5_1_tendsto_symmetricIntegerWindows : Filter.Tendsto (fun N : ℕ => Finset.Icc (-(N : ℤ)) (N : ℤ)) Filter.atTop Filter.atTop

Lean source

Helper for Theorem 5.5.1: symmetric Fourier partial sums converge to toLp f in L².

lemma helperForTheorem_5_5_1_tendsto_partialSums_in_Lp (f : C(AddCircle (1 : ℝ), ℂ)) : Filter.Tendsto (fun N : ℕ => Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourierLp (T := (1 : ℝ)) (p := 2) n))) Filter.atTop (nhds (ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f))

Lean source

Helper for Theorem 5.5.1: the L² norm of the Fourier approximation error tends to 0.

lemma helperForTheorem_5_5_1_normError_tendsto_zero (f : C(AddCircle (1 : ℝ), ℂ)) : Filter.Tendsto (fun N : ℕ => ‖(ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f) - (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourierLp (T := (1 : ℝ)) (p := 2) n)))‖) Filter.atTop (nhds (0 : ℝ))

Lean source

Helper for Theorem 5.5.3: absolute summability of Fourier coefficients implies summability of the coefficients themselves.

lemma helperForTheorem_5_5_3_summable_fourierCoeff (f : C(AddCircle (1 : ℝ), ℂ)) (habs : Summable (fun n : ℤ => ‖fourierCoeff f n‖)) : Summable (fun n : ℤ => fourierCoeff f n)

Lean source

Helper for Theorem 5.5.3: summable Fourier coefficients force symmetric Fourier partial sums to converge to f in C(ℝ/ℤ; ℂ).

lemma helperForTheorem_5_5_3_tendsto_symmetricPartialSums (f : C(AddCircle (1 : ℝ), ℂ)) (hcoeff : Summable (fun n : ℤ => fourierCoeff f n)) : Filter.Tendsto (fun N : ℕ => Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourier (T := (1 : ℝ)) n))) Filter.atTop (nhds f)

Lean source

Helper for Theorem 5.5.3: convergence of symmetric partial sums to f implies convergence of the sup-norm error to 0.

lemma helperForTheorem_5_5_3_normError_tendsto_zero (f : C(AddCircle (1 : ℝ), ℂ)) (hpartial : Filter.Tendsto (fun N : ℕ => Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourier (T := (1 : ℝ)) n))) Filter.atTop (nhds f)) : Filter.Tendsto (fun N : ℕ => ‖f - (Finset.sum (Finset.Icc (-(N : ℤ)) (N : ℤ)) (fun n => (fourierCoeff f n) • (fourier (T := (1 : ℝ)) n)))‖) Filter.atTop (nhds (0 : ℝ))

Lean source

Helper for Theorem 5.5.4: Parseval's HasSum identity for toLp f, with Fourier coefficients rewritten in terms of the original continuous map f.

lemma helperForTheorem_5_5_4_hasSum_sq_fourierCoeff_toLp (f : C(AddCircle (1 : ℝ), ℂ)) : HasSum (fun n : ℤ => ‖fourierCoeff f n‖ ^ 2) (∫ t : AddCircle (1 : ℝ), ‖(ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f) t‖ ^ 2 ∂AddCircle.haarAddCircle)

Lean source

Helper for Theorem 5.5.4: for toLp f, the square of the L² norm equals the integral of the pointwise squared norm.

lemma helperForTheorem_5_5_4_normSq_toLp_eq_integral_normSq (f : C(AddCircle (1 : ℝ), ℂ)) : ‖ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f‖ ^ 2 = ∫ t : AddCircle (1 : ℝ), ‖(ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f) t‖ ^ 2 ∂AddCircle.haarAddCircle

Lean source

Helper for Theorem 5.5.4: the Parseval tsum identity for continuous maps on AddCircle 1.

lemma helperForTheorem_5_5_4_tsum_sq_fourierCoeff_eq_normSq (f : C(AddCircle (1 : ℝ), ℂ)) : (∑' n : ℤ, ‖fourierCoeff f n‖ ^ 2) = ‖ContinuousMap.toLp (E := ℂ) 2 AddCircle.haarAddCircle ℂ f‖ ^ 2

Lean source

Helper for Theorem 5.5.4: summability of squared Fourier coefficients for continuous maps on AddCircle 1.

lemma helperForTheorem_5_5_4_summable_sq_fourierCoeff (f : C(AddCircle (1 : ℝ), ℂ)) : Summable (fun n : ℤ => ‖fourierCoeff f n‖ ^ 2)