File: Mathlib/Analysis/Fourier/AddCircle.lean

full_name: AddCircle.haarAddCircle
code: /-- Haar measure on the additive circle, normalised to have total measure 1. -/
def haarAddCircle : Measure (AddCircle T) 
goal: MeasureTheory.Measure (AddCircle T)

full_name: AddCircle.instIsAddHaarMeasureRealHaarAddCircle
code: instance : IsAddHaarMeasure (@haarAddCircle T _) 
goal: AddCircle.haarAddCircle.IsAddHaarMeasure

full_name: AddCircle.instIsProbabilityMeasureRealHaarAddCircle
code: instance : IsProbabilityMeasure (@haarAddCircle T _) 
goal: MeasureTheory.IsProbabilityMeasure AddCircle.haarAddCircle

full_name: AddCircle.volume_eq_smul_haarAddCircle
code: theorem volume_eq_smul_haarAddCircle :
    (volume : Measure (AddCircle T)) = ENNReal.ofReal T • (@haarAddCircle T _) 
goal: MeasureTheory.volume = ENNReal.ofReal T • AddCircle.haarAddCircle

full_name: fourier
code: /-- The family of exponential monomials `fun x => exp (2 π i n x / T)`, parametrized by `n : ℤ` and
considered as bundled continuous maps from `ℝ / ℤ • T` to `ℂ`. -/
def fourier (n : ℤ) : C(AddCircle T, ℂ) 
goal: C(AddCircle T, ℂ)

full_name: fourier_apply
code: @[simp]
theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n • x :) 
goal: (fourier n) x = ↑(n • x).toCircle

full_name: fourier_coe_apply
code: theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
    fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.I * n * x / T) 
goal: (fourier n) ↑x = Complex.exp (2 * ↑π * Complex.I * ↑n * ↑x / ↑T)

full_name: fourier_coe_apply'
code: @[simp]
theorem fourier_coe_apply' {n : ℤ} {x : ℝ} :
    toCircle (n • (x : AddCircle T) :) = Complex.exp (2 * π * Complex.I * n * x / T) 
goal: ↑(AddCircle.toCircle (n • ↑x)) = Complex.exp (2 * ↑π * Complex.I * ↑n * ↑x / ↑T)

full_name: fourier_zero
code: theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 
goal: (fourier 0) x = 1

full_name: fourier_zero'
code: @[simp]
theorem fourier_zero' {x : AddCircle T} : @toCircle T 0 = (1 : ℂ) 
goal: ↑(AddCircle.toCircle 0) = 1

full_name: fourier_eval_zero
code: theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1 
goal: (fourier n) 0 = 1

full_name: fourier_one
code: theorem fourier_one {x : AddCircle T} : fourier 1 x = toCircle x 
goal: (fourier 1) x = ↑x.toCircle

full_name: fourier_neg
code: theorem fourier_neg {n : ℤ} {x : AddCircle T} : fourier (-n) x = conj (fourier n x) 
goal: (fourier (-n)) x = (starRingEnd ℂ) ((fourier n) x)

full_name: fourier_neg'
code: @[simp]
theorem fourier_neg' {n : ℤ} {x : AddCircle T} : @toCircle T (-(n • x)) = conj (fourier n x) 
goal: ↑(-(n • x)).toCircle = (starRingEnd ℂ) ((fourier n) x)

full_name: fourier_add
code: theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m+n) x = fourier m x * fourier n x 
goal: (fourier (m + n)) x = (fourier m) x * (fourier n) x

full_name: fourier_add'
code: @[simp]
theorem fourier_add' {m n : ℤ} {x : AddCircle T} :
    toCircle ((m + n) • x :) = fourier m x * fourier n x 
goal: ↑((m + n) • x).toCircle = (fourier m) x * (fourier n) x

full_name: fourier_norm
code: theorem fourier_norm [Fact (0 < T)] (n : ℤ) : ‖@fourier T n‖ = 1 
goal: ‖fourier n‖ = 1

full_name: fourier_add_half_inv_index
code: /-- For `n ≠ 0`, a translation by `T / 2 / n` negates the function `fourier n`. -/
theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : AddCircle T) :
    @fourier T n (x + ↑(T / 2 / n)) = -fourier n x 
goal: (fourier n) (x + ↑(T / 2 / ↑n)) = -(fourier n) x

full_name: fourierSubalgebra
code: /-- The star subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` . -/
def fourierSubalgebra : StarSubalgebra ℂ C(AddCircle T, ℂ) 
goal: StarSubalgebra ℂ C(AddCircle T, ℂ)

full_name: fourierSubalgebra_coe
code: /-- The star subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is in fact the
linear span of these functions. -/
theorem fourierSubalgebra_coe :
    Subalgebra.toSubmodule (@fourierSubalgebra T).toSubalgebra = span ℂ (range (@fourier T)) 
goal: Subalgebra.toSubmodule fourierSubalgebra.toSubalgebra = Submodule.span ℂ (Set.range fourier)

full_name: fourierSubalgebra_separatesPoints
code: /-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ`
separates points. -/
theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoints 
goal: fourierSubalgebra.SeparatesPoints

full_name: fourierSubalgebra_closure_eq_top
code: /-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤ 
goal: fourierSubalgebra.topologicalClosure = ⊤

full_name: span_fourier_closure_eq_top
code: /-- The linear span of the monomials `fourier n` is dense in `C(AddCircle T, ℂ)`. -/
theorem span_fourier_closure_eq_top : (span ℂ (range <| @fourier T)).topologicalClosure = ⊤ 
goal: (Submodule.span ℂ (Set.range fourier)).topologicalClosure = ⊤

full_name: fourierLp
code: /-- The family of monomials `fourier n`, parametrized by `n : ℤ` and considered as
elements of the `Lp` space of functions `AddCircle T → ℂ`. -/
abbrev fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) : Lp ℂ p (@haarAddCircle T hT) 
goal: ↥(MeasureTheory.Lp ℂ p AddCircle.haarAddCircle)

full_name: coeFn_fourierLp
code: theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
    @fourierLp T hT p _ n =ᵐ[haarAddCircle] fourier n 
goal: ↑↑(fourierLp p n) =ᵐ[AddCircle.haarAddCircle] ⇑(fourier n)

full_name: span_fourierLp_closure_eq_top
code: /-- For each `1 ≤ p < ∞`, the linear span of the monomials `fourier n` is dense in
`Lp ℂ p haarAddCircle`. -/
theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
    (span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤ 
goal: (Submodule.span ℂ (Set.range (fourierLp p))).topologicalClosure = ⊤

full_name: orthonormal_fourier
code: /-- The monomials `fourier n` are an orthonormal set with respect to normalised Haar measure. -/
theorem orthonormal_fourier : Orthonormal ℂ (@fourierLp T _ 2 _) 
goal: Orthonormal ℂ (fourierLp 2)

full_name: fourierCoeff
code: /-- The `n`-th Fourier coefficient of a function `AddCircle T → E`, for `E` a complete normed
`ℂ`-vector space, defined as the integral over `AddCircle T` of `fourier (-n) t • f t`. -/
def fourierCoeff (f : AddCircle T → E) (n : ℤ) : E 
goal: E

full_name: fourierCoeff_eq_intervalIntegral
code: /-- The Fourier coefficients of a function on `AddCircle T` can be computed as an integral
over `[a, a + T]`, for any real `a`. -/
theorem fourierCoeff_eq_intervalIntegral (f : AddCircle T → E) (n : ℤ) (a : ℝ) :
    fourierCoeff f n = (1 / T) • ∫ x in a..a + T, @fourier T (-n) x • f x 
goal: fourierCoeff f n = (1 / T) • ∫ (x : ℝ) in a..a + T, (fourier (-n)) ↑x • f ↑x

full_name: fourierCoeff.const_smul
code: theorem fourierCoeff.const_smul (f : AddCircle T → E) (c : ℂ) (n : ℤ) :
    fourierCoeff (c • f :) n = c • fourierCoeff f n 
goal: fourierCoeff (c • f) n = c • fourierCoeff f n

full_name: fourierCoeff.const_mul
code: theorem fourierCoeff.const_mul (f : AddCircle T → ℂ) (c : ℂ) (n : ℤ) :
    fourierCoeff (fun x => c * f x) n = c * fourierCoeff f n 
goal: fourierCoeff (fun x => c * f x) n = c * fourierCoeff f n

full_name: fourierCoeffOn
code: /-- For a function on `ℝ`, the Fourier coefficients of `f` on `[a, b]` are defined as the
Fourier coefficients of the unique periodic function agreeing with `f` on `Ioc a b`. -/
def fourierCoeffOn {a b : ℝ} (hab : a < b) (f : ℝ → E) (n : ℤ) : E 
goal: E

full_name: fourierCoeffOn_eq_integral
code: theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab f n =
      (1 / (b - a)) • ∫ x in a..b, fourier (-n) (x : AddCircle (b - a)) • f x 
goal: fourierCoeffOn hab f n = (1 / (b - a)) • ∫ (x : ℝ) in a..b, (fourier (-n)) ↑x • f x

full_name: fourierCoeffOn.const_smul
code: theorem fourierCoeffOn.const_smul {a b : ℝ} (f : ℝ → E) (c : ℂ) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab (c • f) n = c • fourierCoeffOn hab f n 
goal: fourierCoeffOn hab (c • f) n = c • fourierCoeffOn hab f n

full_name: fourierCoeffOn.const_mul
code: theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab (fun x => c * f x) n = c * fourierCoeffOn hab f n 
goal: fourierCoeffOn hab (fun x => c * f x) n = c * fourierCoeffOn hab f n

full_name: fourierCoeff_liftIoc_eq
code: theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
    fourierCoeff (AddCircle.liftIoc T a f) n =
    fourierCoeffOn (lt_add_of_pos_right a hT.out) f n 
goal: fourierCoeff (AddCircle.liftIoc T a f) n = fourierCoeffOn ⋯ f n

full_name: fourierCoeff_liftIco_eq
code: theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
    fourierCoeff (AddCircle.liftIco T a f) n =
    fourierCoeffOn (lt_add_of_pos_right a hT.out) f n 
goal: fourierCoeff (AddCircle.liftIco T a f) n = fourierCoeffOn ⋯ f n

full_name: fourierBasis
code: /-- We define `fourierBasis` to be a `ℤ`-indexed Hilbert basis for `Lp ℂ 2 haarAddCircle`,
which by definition is an isometric isomorphism from `Lp ℂ 2 haarAddCircle` to `ℓ²(ℤ, ℂ)`. -/
def fourierBasis : HilbertBasis ℤ ℂ (Lp ℂ 2 <| @haarAddCircle T hT) 
goal: HilbertBasis ℤ ℂ ↥(MeasureTheory.Lp ℂ 2 AddCircle.haarAddCircle)

full_name: coe_fourierBasis
code: /-- The elements of the Hilbert basis `fourierBasis` are the functions `fourierLp 2`, i.e. the
monomials `fourier n` on the circle considered as elements of `L²`. -/
@[simp]
theorem coe_fourierBasis : ⇑(@fourierBasis T hT) = @fourierLp T hT 2 _ 
goal: (fun i => fourierBasis.repr.symm (lp.single 2 i 1)) = fourierLp 2

full_name: fourierBasis_repr
code: /-- Under the isometric isomorphism `fourierBasis` from `Lp ℂ 2 haarAddCircle` to `ℓ²(ℤ, ℂ)`, the
`i`-th coefficient is `fourierCoeff f i`, i.e., the integral over `AddCircle T` of
`fun t => fourier (-i) t * f t` with respect to the Haar measure of total mass 1. -/
theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
    fourierBasis.repr f i = fourierCoeff f i 
goal: ↑(fourierBasis.repr f) i = fourierCoeff (↑↑f) i

full_name: hasSum_fourier_series_L2
code: /-- The Fourier series of an `L2` function `f` sums to `f`, in the `L²` space of `AddCircle T`. -/
theorem hasSum_fourier_series_L2 (f : Lp ℂ 2 <| @haarAddCircle T hT) :
    HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f 
goal: HasSum (fun i => fourierCoeff (↑↑f) i • fourierLp 2 i) f

full_name: tsum_sq_fourierCoeff
code: /-- **Parseval's identity**: for an `L²` function `f` on `AddCircle T`, the sum of the squared
norms of the Fourier coefficients equals the `L²` norm of `f`. -/
theorem tsum_sq_fourierCoeff (f : Lp ℂ 2 <| @haarAddCircle T hT) :
    ∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2 = ∫ t : AddCircle T, ‖f t‖ ^ 2 ∂haarAddCircle 
goal: ∑' (i : ℤ), ‖fourierCoeff (↑↑f) i‖ ^ 2 = ∫ (t : AddCircle T), ‖↑↑f t‖ ^ 2 ∂AddCircle.haarAddCircle

full_name: fourierCoeff_toLp
code: theorem fourierCoeff_toLp (n : ℤ) :
    fourierCoeff (toLp (E := ℂ) 2 haarAddCircle ℂ f) n = fourierCoeff f n 
goal: fourierCoeff (↑↑((ContinuousMap.toLp 2 AddCircle.haarAddCircle ℂ) f)) n = fourierCoeff (⇑f) n

full_name: hasSum_fourier_series_of_summable
code: /-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series converges
uniformly to `f`. -/
theorem hasSum_fourier_series_of_summable (h : Summable (fourierCoeff f)) :
    HasSum (fun i => fourierCoeff f i • fourier i) f 
goal: HasSum (fun i => fourierCoeff (⇑f) i • fourier i) f

full_name: has_pointwise_sum_fourier_series_of_summable
code: /-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series of `f`
converges everywhere pointwise to `f`. -/
theorem has_pointwise_sum_fourier_series_of_summable (h : Summable (fourierCoeff f))
    (x : AddCircle T) : HasSum (fun i => fourierCoeff f i • fourier i x) (f x) 
goal: HasSum (fun i => fourierCoeff (⇑f) i • (fourier i) x) (f x)

full_name: hasDerivAt_fourier
code: theorem hasDerivAt_fourier (n : ℤ) (x : ℝ) :
    HasDerivAt (fun y : ℝ => fourier n (y : AddCircle T))
      (2 * π * I * n / T * fourier n (x : AddCircle T)) x 
goal: HasDerivAt (fun y => (fourier n) ↑y) (2 * ↑π * Complex.I * ↑n / ↑T * (fourier n) ↑x) x

full_name: hasDerivAt_fourier_neg
code: theorem hasDerivAt_fourier_neg (n : ℤ) (x : ℝ) :
    HasDerivAt (fun y : ℝ => fourier (-n) (y : AddCircle T))
      (-2 * π * I * n / T * fourier (-n) (x : AddCircle T)) x 
goal: HasDerivAt (fun y => (fourier (-n)) ↑y) (-2 * ↑π * Complex.I * ↑n / ↑T * (fourier (-n)) ↑x) x

full_name: has_antideriv_at_fourier_neg
code: theorem has_antideriv_at_fourier_neg (hT : Fact (0 < T)) {n : ℤ} (hn : n ≠ 0) (x : ℝ) :
    HasDerivAt (fun y : ℝ => (T : ℂ) / (-2 * π * I * n) * fourier (-n) (y : AddCircle T))
      (fourier (-n) (x : AddCircle T)) x 
goal: HasDerivAt (fun y => ↑T / (-2 * ↑π * Complex.I * ↑n) * (fourier (-n)) ↑y) ((fourier (-n)) ↑x) x

full_name: fourierCoeffOn_of_hasDeriv_right
code: /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
theorem fourierCoeffOn_of_hasDeriv_right {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
    {n : ℤ} (hn : n ≠ 0)
    (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivWithinAt f (f' x) (Ioi x) x)
    (hf' : IntervalIntegrable f' volume a b) :
    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) 
goal: fourierCoeffOn hab f n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((fourier (-n)) ↑a * (f b - f a) - (↑b - ↑a) * fourierCoeffOn hab f' n)

full_name: fourierCoeffOn_of_hasDerivAt_Ioo
code: /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
theorem fourierCoeffOn_of_hasDerivAt_Ioo {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
    {n : ℤ} (hn : n ≠ 0)
    (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivAt f (f' x) x)
    (hf' : IntervalIntegrable f' volume a b) :
    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) 
goal: fourierCoeffOn hab f n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((fourier (-n)) ↑a * (f b - f a) - (↑b - ↑a) * fourierCoeffOn hab f' n)

full_name: fourierCoeffOn_of_hasDerivAt
code: /-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
theorem fourierCoeffOn_of_hasDerivAt {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0)
    (hf : ∀ x, x ∈ [[a, b]] → HasDerivAt f (f' x) x) (hf' : IntervalIntegrable f' volume a b) :
    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n) 
goal: fourierCoeffOn hab f n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((fourier (-n)) ↑a * (f b - f a) - (↑b - ↑a) * fourierCoeffOn hab f' n)