Partial sum of a Fourier series
DefinitionFejer_partialSumThe -th symmetric partial sum of the Fourier series of , .
import Mathlib
import Definitions.Def_Fejer_fourierCoeff
namespace Fejer
/-- The `N`-th (symmetric) partial sum of the Fourier series of `f`,
`S_N(f)(θ) = ∑_{n=-N}^{N} f̂(n) e^{inθ}`. -/
noncomputable def partialSum (f : ℝ → ℂ) (N : ℕ) (θ : ℝ) : ℂ :=
∑ n ∈ Finset.Icc (-(N : ℤ)) (N : ℤ), fourierCoeff f n * Complex.exp ((n : ℂ) * θ * Complex.I)
end Fejer
Read-back
What the Lean code literally says, in plain math · claude-sonnet-5
fourierCoeff f n
For an arbitrary function and an arbitrary integer , this quantity is defined as
i.e. one over times the integral, taken from to (in that orientation), of the product of with , where has been coerced to a complex number for the purposes of this exponent. The integral is Mathlib's total interval integral: if multiplied by is not interval-integrable on , the integral is assigned the junk value , so in that case. No hypothesis of continuity, integrability, or periodicity of is imposed or needed.
partialSum f N θ
For an arbitrary , an arbitrary natural number , and an arbitrary real number , this quantity is defined as the finite sum
where the summation index ranges over all integers satisfying , i.e. exactly terms are summed for every ( negative indices, the index , and positive indices). In the special case , the index set collapses to , so — independent of , and equal to (or under the same junk-value convention if that integral fails to exist). No continuity, integrability, or periodicity hypothesis on is assumed or required anywhere in this definition.
Confirmed by the mission captain (proposal self-audit).