Mathlib.Analysis.Approximation.Chebyshev.Cosine­Projection

This package supplies the normalized cosine basis on the unit interval, its finite uniform-measure projection, an even Jackson approximant, and the constant-five Hölder L² error bound.

Definitions 10 core · 0 supporting Research-independent definitions for uniform design on [0,1].

Normalized cosine projection on the unit interval

Research-independent definitions for uniform design on [0,1]. Real functions are defined on the real line, but all regularity assumptions below concern only the closed unit interval. The extended norm uses a nonnegative integral, preserving infinite values; the real norm is used only after integrability has been established. The rank counts the constant mode: rank one means projection onto constants.

def uniformMeasure reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

Uniform probability on the unit interval is Lebesgue measure restricted to the closed interval from zero to one.

Definition (Lean source)
uniformMeasure :
volume.restrict (Icc 0 1)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.uniformMeasure · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:24
def cosineBasis reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The normalized cosine mode with index at position is one for the zero mode and square root of two times cosine of π times index times position otherwise.

Definition (Lean source)
j :
ℕ
x :
ℝ
cosineBasis j x :
ℝ
if j = 0 then 1 else sqrt 2 * cos (pi * (j : ℝ) * x)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosineBasis · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:28
def cosineCoefficient reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The coefficient of a function in mode is its uniform integral against that normalized mode.

Definition (Lean source)
f :
ℝ → ℝ
j :
ℕ
cosineCoefficient f j :
ℝ
∫ x, f x * cosineBasis j x ∂uniformMeasure
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosineCoefficient · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:34
def cosinePolynomial reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The cosine polynomial at rank with coefficients evaluated at position sums the modes with indices strictly below the rank.

Definition (Lean source)
k :
ℕ
a :
ℕ → ℝ
x :
ℝ
cosinePolynomial k a x :
ℝ
∑ j ∈ range k, a j * cosineBasis j x
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosinePolynomial · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:39
def cosineProjection reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The finite cosine projection of a function, at rank and position, uses its uniform cosine coefficients.

Definition (Lean source)
k :
ℕ
f :
ℝ → ℝ
x :
ℝ
cosineProjection k f x :
ℝ
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosineProjection · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:44
def InCosineSpan reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The cosine span condition for a function at rank means it equals a normalized cosine polynomial everywhere on the unit interval.

Definition (Lean source)
k :
ℕ
p :
ℝ → ℝ
InCosineSpan k p :
Prop
∃ a : ℕ → ℝ, ∀ x ∈ Icc (0 : ℝ) 1, p x = cosinePolynomial k a x
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.InCosineSpan · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:49
def l2Norm reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The real uniform L² norm of a function is the square root of the integral of its squared absolute value. For nonintegrable functions the real integral has Lean's default value; use the extended norm in that case.

Definition (Lean source)
g :
ℝ → ℝ
l2Norm g :
ℝ
sqrt (∫ x, |g x| ^ 2 ∂uniformMeasure)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.l2Norm · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:54
def extendedL2Norm reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The extended uniform L² norm of a function is the square root of the nonnegative integral of its squared absolute value.

Definition (Lean source)
g :
ℝ → ℝ
extendedL2Norm g :
ℝ≥0∞
(∫⁻ x, ofReal (|g x| ^ 2) ∂uniformMeasure) ^ (1 / 2 : ℝ)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.extendedL2Norm · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:60
def holderSeminorm reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The extended Hölder seminorm of a function, with exponent, is the supremum of its absolute increments divided by distance to that exponent, over distinct points in the closed unit interval.

Definition (Lean source)
f :
ℝ → ℝ
γ :
ℝ
holderSeminorm f γ :
ℝ≥0∞
⨆ x : Icc (0 : ℝ) 1, ⨆ z : Icc (0 : ℝ) 1, ⨆ (_h : x ≠ z), ofReal (|f x - f z| / |(x : ℝ) - z| ^ γ)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.holderSeminorm · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:65
def HasHolderBound reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A Hölder bound for a function, exponent, and constant is the increment inequality for every pair in the unit interval.

Definition (Lean source)
f :
ℝ → ℝ
γ H :
ℝ
x ∈ Set.Icc (0 : ℝ) 1 :
z ∈ Set.Icc (0 : ℝ) 1 :
HasHolderBound f γ H :
Prop
|f x - f z| ≤ H * |x - z| ^ γ
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.HasHolderBound · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Definitions.lean:72
Jackson­Error 2 core · 1 supporting Define the Jackson approximant and isolate its analytic error estimate from finite cosine expansion. ★ jacksonApproximant_error

Continuity and uniform error of the even Jackson convolution

Define the Jackson approximant and isolate its analytic error estimate from finite cosine expansion. This module depends only on the closed fold and moment layers; its proofs need no projection, orthogonality, or convolution-window expansion.

def jacksonApproximant reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The Jackson cosine approximant of a target, at order and position, convolves its even angular extension with the unit-mass order-four Jackson kernel.

Definition (Lean source)
K :
ℕ
f :
ℝ → ℝ
x :
ℝ
jacksonApproximant K f x :
ℝ
∫ t in Icc (-pi) pi, evenExtension f (pi * x - t) * jackson K t
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.jacksonApproximant · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/JacksonError.lean:21
theorem jacksonApproximant_error reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

For an exponent between zero and one, a nonnegative Hölder bound, a continuous target, and a positive order, the Jackson uniform error is bounded by the Hölder constant times (2/K)^γ, at every unit-interval point.

Formal statement
K :
ℕ
f :
ℝ → ℝ
γ H x :
ℝ
hK :
0 < K
hf :
ContinuousOn f (Icc (0 : ℝ) 1)
hγ :
0 < γ
hγ1 :
γ ≤ 1
hH :
0 ≤ H
hholder :
hx :
x ∈ Icc (0 : ℝ) 1
|f x - jacksonApproximant K f x| ≤ H * (2 / (K : ℝ)) ^ γ
Proof (Lean source)
theorem jacksonApproximant_error {K : ℕ} {f : ℝ → ℝ} {γ H x : ℝ} (hK : 0 < K) (hf : ContinuousOn f (Icc (0 : ℝ) 1)) (hγ : 0 < γ) (hγ1 : γ ≤ 1) (hH : 0 ≤ H) (hholder : HasHolderBound f γ H) (hx : x ∈ Icc (0 : ℝ) 1) : |f x - jacksonApproximant K f x| ≤ H * (2 / (K : ℝ)) ^ γ := by have hext := continuous_evenExtension hf have hkernel := continuous_jackson K have hconv : Continuous (fun t => evenExtension f (pi * x - t) * jackson K t) := by fun_prop have hinc : Continuous (fun t => (f x - evenExtension f (pi * x - t)) * jackson K t) := by fun_prop have hpow : Continuous (fun t : ℝ => (|t| / pi) ^ γ) := (continuous_abs.div_const pi).rpow_const (fun _ => inr hγ.le) have hbound : Continuous (fun t => H * ((|t| / pi) ^ γ * jackson K t)) := continuous_const.mul (hpow.mul hkernel) have herr : f x - jacksonApproximant K f x = ∫ t in Icc (-pi) pi, (f x - evenExtension f (pi * x - t)) * jackson K t := by simp_rw [sub_mul] rw [integral_sub ((integrableOn_jackson K).const_mul (f x)) (hconv.continuousOn.integrableOn_compact isCompact_Icc), integral_const_mul, jackson_integral_eq_one K hK, mul_one] rfl rw [herr] calc _ ≤ ∫ t in Icc (-pi) pi, |(f x - evenExtension f (pi * x - t)) * jackson K t| := abs_integral_le_integral_abs _ ≤ ∫ t in Icc (-pi) pi, H * ((|t| / pi) ^ γ * jackson K t) := by apply setIntegral_mono_on (hinc.abs.continuousOn.integrableOn_compact isCompact_Icc) (hbound.continuousOn.integrableOn_compact isCompact_Icc) measurableSet_Icc intro t ht have hh := evenExtension_holder hγ hH hholder (pi * x) (pi * x - t) rw [evenExtension_pi_mul f hx, sub_sub_cancel] at hh rw [abs_mul, abs_of_nonneg (jackson_nonneg K hK t)] exact (mul_le_mul_of_nonneg_right hh (jackson_nonneg K hK t)).trans_eq (mul_assoc _ _ _) _ = H * ∫ t in Icc (-pi) pi, (|t| / pi) ^ γ * jackson K t := integral_const_mul _ _ _ ≤ _ := mul_le_mul_of_nonneg_left (jackson_holder_moment hK hγ hγ1) hH
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.jacksonApproximant_error · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/JacksonError.lean:40 · uses HasHolderBound , jacksonApproximant
1 supporting declaration (lemmas, instances)
Approximation 1 core · 1 supporting Use convolution of the even periodic extension against the existing Jackson kernel, defined in JacksonError. ★ exists_cosine_approximant

The even Jackson approximant in the cosine span

Use convolution of the even periodic extension against the existing Jackson kernel, defined in JacksonError. Finite-degree membership and uniform Hölder error are separate obligations: no spectral approximation result is assumed in the definition.

theorem exists_cosine_approximant reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

For a positive rank, a continuous target, an exponent between zero and one, and a nonnegative Hölder bound, there is a continuous rank-k cosine approximant with uniform error at most five times the Hölder constant times k⁻γ.

Formal statement
k :
ℕ
f :
ℝ → ℝ
γ H :
ℝ
hk :
1 ≤ k
hf :
ContinuousOn f (Icc (0 : ℝ) 1)
hγ :
0 < γ
hγ1 :
γ ≤ 1
hH :
0 ≤ H
hholder :
∃ p : ℝ → ℝ,
ContinuousOn p (Icc (0 : ℝ) 1)
conclusion 1
x ∈ Set.Icc (0 : ℝ) 1 :
|f x - p x| ≤ 5 * H * (k : ℝ) ^ (-γ)
Proof (Lean source)
theorem exists_cosine_approximant {k : ℕ} {f : ℝ → ℝ} {γ H : ℝ} (hk : 1 ≤ k) (hf : ContinuousOn f (Icc (0 : ℝ) 1)) (hγ : 0 < γ) (hγ1 : γ ≤ 1) (hH : 0 ≤ H) (hholder : HasHolderBound f γ H) : ∃ p : ℝ → ℝ, ContinuousOn p (Icc (0 : ℝ) 1) ∧ InCosineSpan k p ∧ ∀ x ∈ Icc (0 : ℝ) 1, |f x - p x| ≤ 5 * H * (k : ℝ) ^ (-γ) := by let K : ℕ := (k + 1) / 2 have hK : 0 < K := (matchedOrder_bounds hk).1 refine ⟨jacksonApproximant K f, (continuous_jacksonApproximant hf).continuousOn, inCosineSpan_mono (by have := (matchedOrder_bounds hk).2; omega) (jacksonApproximant_mem_span hK hf), ?_⟩ intro x hx calc _ ≤ H * (2 / (K : ℝ)) ^ γ := jacksonApproximant_error hK hf hγ hγ1 hH hholder hx _ ≤ H * (5 * (k : ℝ) ^ (-γ)) := mul_le_mul_of_nonneg_left (matchedOrder_constant_five hk hγ hγ1) hH _ = _ := by ring
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.exists_cosine_approximant · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Approximation.lean:58 · uses HasHolderBound , InCosineSpan
1 supporting declaration (lemmas, instances)
Convolution 2 core · 2 supporting Separate the change of integration window, removal of sine modes, and explicit convolution coefficients before attempting Jackson span membership. ★ angularConvolution_cosine_expansion

Finite cosine expansion of even periodic convolution

Separate the change of integration window, removal of sine modes, and explicit convolution coefficients before attempting Jackson span membership. These are generic angular statements independent of the target's Hölder regularity and of the numerical Jackson moment bounds.

def angularConvolution reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

Angular convolution of a target and kernel at an angle integrates their translated product over the principal period.

Definition (Lean source)
g h :
ℝ → ℝ
θ :
ℝ
angularConvolution g h θ :
ℝ
∫ t in Icc (-pi) pi, g (θ - t) * h t
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.angularConvolution · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Convolution.lean:22
theorem angularConvolution_cosine_expansion reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A continuous even periodic target convolved with a finite cosine kernel has the explicit cosine expansion obtained by multiplying kernel coefficients by target cosine integrals, at every angle.

Formal statement
n :
ℕ
g h :
ℝ → ℝ
hg :
hgeven :
hgper :
Periodic g (2 * pi)
a :
ℕ → ℝ
hexp :
∀ t : ℝ, h t = ∑ j ∈ range (n + 1), a j * cos ((j : ℝ) * t)
θ :
ℝ
= ∑ j ∈ range (n + 1), (a j * ∫ t in Icc (-pi) pi, g t * cos ((j : ℝ) * t)) * cos ((j : ℝ) * θ)
Proof (Lean source)
theorem angularConvolution_cosine_expansion {n : ℕ} {g h : ℝ → ℝ} (hg : Continuous g) (hgeven : Even g) (hgper : Periodic g (2 * pi)) (a : ℕ → ℝ) (hexp : ∀ t : ℝ, h t = ∑ j ∈ range (n + 1), a j * cos ((j : ℝ) * t)) (θ : ℝ) : angularConvolution g h θ = ∑ j ∈ range (n + 1), (a j * ∫ t in Icc (-pi) pi, g t * cos ((j : ℝ) * t)) * cos ((j : ℝ) * θ) := by classical have hh : Continuous h := by have heq : h = fun t => ∑ j ∈ range (n + 1), a j * cos ((j : ℝ) * t) := funext hexp rw [heq] fun_prop have hhper : Periodic h (2 * pi) := by intro t rw [hexp, hexp] apply Finset.sum_congr rfl intro j hj rw [mul_add, Real.cos_add_nat_mul_two_pi] rw [angularConvolution_reverse hgper hhper θ] have hle : -pi ≤ pi := by linarith [Real.pi_pos] simp only [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hle] have hsine (j : ℕ) : (∫ t in -Real.pi..Real.pi, g t * sin ((j : ℝ) * t)) = 0 := by have href := intervalIntegral.integral_comp_neg (a := -pi) (b := pi) (fun t => g t * sin ((j : ℝ) * t)) simp only [show ∀ t, g (-t) = g t from hgeven, mul_neg, Real.sin_neg, mul_neg, intervalIntegral.integral_neg, neg_neg] at href linarith have hfun : (fun t => g t * h (θ - t)) = (fun t => ∑ j ∈ range (n + 1), (a j * (g t * cos ((j : ℝ) * t)) * cos ((j : ℝ) * θ) + a j * (g t * sin ((j : ℝ) * t)) * sin ((j : ℝ) * θ))) := by funext t rw [hexp, Finset.mul_sum] apply Finset.sum_congr rfl intro j hj rw [mul_sub, Real.cos_sub] ring rw [hfun, intervalIntegral.integral_finsetSum] · apply Finset.sum_congr rfl intro j hj rw [intervalIntegral.integral_add] · simp only [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, hsine, mul_zero, zero_mul, add_zero] · exact (show Continuous (fun t => a j * (g t * cos ((j : ℝ) * t)) * cos ((j : ℝ) * θ)) by fun_prop).intervalIntegrable _ _ · exact (show Continuous (fun t => a j * (g t * sin ((j : ℝ) * t)) * sin ((j : ℝ) * θ)) by fun_prop).intervalIntegrable _ _ · intro j hj exact (show Continuous (fun t => a j * (g t * cos ((j : ℝ) * t)) * cos ((j : ℝ) * θ) + a j * (g t * sin ((j : ℝ) * t)) * sin ((j : ℝ) * θ)) by fun_prop).intervalIntegrable _ _
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.angularConvolution_cosine_expansion · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Convolution.lean:86 · uses angularConvolution
2 supporting declarations (lemmas, instances)
  • angularConvolution_reverse theorem — Two periodic functions satisfy the reversed angular convolution formula at every angle.
    g h :
    ℝ → ℝ
    hgper :
    Periodic g (2 * pi)
    hhper :
    Periodic h (2 * pi)
    θ :
    ℝ
    angularConvolution g h θ = ∫ t in Icc (-pi) pi, g t * h (θ - t)
    Proof (Lean source)
    theorem angularConvolution_reverse {g h : ℝ → ℝ} (hgper : Periodic g (2 * pi)) (hhper : Periodic h (2 * pi)) (θ : ℝ) : angularConvolution g h θ = ∫ t in Icc (-pi) pi, g t * h (θ - t) := by have hle : -pi ≤ pi := by linarith [Real.pi_pos] simp only [angularConvolution, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hle] let f : ℝ → ℝ := fun t => g t * h (θ - t) have hfper : Periodic f (2 * pi) := by intro t dsimp [f] rw [hgper t] have ht : θ - (t + 2 * pi) = (θ - t) - 2 * pi := by ring rw [ht, hhper.sub_eq] have hcomp : (fun t => g (θ - t) * h t) = (fun t => f (θ - t)) := by funext t simp [f] rw [hcomp, intervalIntegral.integral_comp_sub_left] have hp := hfper.intervalIntegral_add_eq (θ - pi) (-pi) convert hp using 1 <;> congr 1 <;> ring
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.angularConvolution_reverse · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Convolution.lean:27
  • even_trigPoly_cosine theorem — An even real trigonometric polynomial has a finite expansion using only cosine modes, with the same degree bound.
    n :
    ℕ
    h :
    ℝ → ℝ
    hh :
    IsTrigPolyLE n h
    heven :
    ∃ a : ℕ → ℝ, ∀ t : ℝ, h t = ∑ j ∈ range (n + 1), a j * cos ((j : ℝ) * t)
    Proof (Lean source)
    theorem even_trigPoly_cosine {n : ℕ} {h : ℝ → ℝ} (hh : IsTrigPolyLE n h) (heven : Even h) : ∃ a : ℕ → ℝ, ∀ t : ℝ, h t = ∑ j ∈ range (n + 1), a j * cos ((j : ℝ) * t) := by classical rcases hh with ⟨a, b, hh⟩ refine ⟨a, fun t => ?_⟩ have ht := hh t have hnt := hh (-t) rw [heven t] at hnt simp only [mul_neg, Real.cos_neg, Real.sin_neg, mul_neg] at hnt have havg : h t + h t = ∑ j ∈ range (n + 1), 2 * (a j * cos ((j : ℝ) * t)) := by nth_rw 1 [ht] rw [hnt, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro j hj ring rw [← Finset.mul_sum] at havg linarith
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.even_trigPoly_cosine · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Convolution.lean:59
Fold 3 core · 10 supporting The fold arccos(cos(t))/π maps the line continuously into [0,1], agrees with t/π on [0,π], and is even and 2π-periodic. ★ fold_lipschitz

The even periodic extension of a unit-interval function

The fold arccos(cos(t))/π maps the line continuously into [0,1], agrees with t/π on [0,π], and is even and 2π-periodic. Its global Lipschitz bound is the independent geometric obligation behind Hölder extension; differentiating arccos at ±1 would incorrectly exclude the endpoints.

def fold reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The folded unit-interval position of an angle is its cosine's principal arccosine divided by π.

Definition (Lean source)
t :
ℝ
fold t :
ℝ
arccos (cos t) / pi
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.fold · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Fold.lean:20
def evenExtension reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The even periodic extension of an interval function at an angle evaluates that function at the folded position.

Definition (Lean source)
f :
ℝ → ℝ
t :
ℝ
evenExtension f t :
ℝ
f (fold t)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.evenExtension · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Fold.lean:24
theorem fold_lipschitz reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

Folded positions at two angles have distance at most angular distance divided by π.

Formal statement
s t :
ℝ
|fold s - fold t| ≤ |s - t| / pi
Proof (Lean source)
theorem fold_lipschitz (s t : ℝ) : |fold s - fold t| ≤ |s - t| / pi := by have h : |arccos (cos s) - arccos (cos t)| ≤ |s - t| := by rw [abs_le] have hst := arccos_cos_le_add s t have hts := arccos_cos_le_add t s rw [abs_sub_comm t s] at hts constructor <;> linarith simpa only [fold, ← sub_div, abs_div, abs_of_pos Real.pi_pos] using (div_le_div_of_nonneg_right h Real.pi_pos.le)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.fold_lipschitz · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Fold.lean:94 · uses fold
10 supporting declarations (lemmas, instances)
Main 1 core · 1 supporting The real finite-bound and extended-seminorm interfaces establish the constant-five uniform L² approximation rate for finite normalized cosine projections. ★ cosineProjection_error_le_seminorm

Constant-five Hölder approximation by the normalized cosine projection

The real finite-bound and extended-seminorm interfaces establish the constant-five uniform L² approximation rate for finite normalized cosine projections. The infinite-seminorm case is retained explicitly, so the public result has exactly the interval continuity, exponent, and rank assumptions required for nonparametric series approximation.

theorem cosineProjection_error_le_seminorm reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A continuous real function on the unit interval, an exponent between zero and one, and a positive rank give extended L² projection error at most five times the extended Hölder seminorm times k⁻γ, including infinite seminorm.

Formal statement
f :
ℝ → ℝ
γ :
ℝ
k :
ℕ
hf :
ContinuousOn f (Icc (0 : ℝ) 1)
hγ :
0 < γ
hγ1 :
γ ≤ 1
hk :
1 ≤ k
extendedL2Norm (fun x => f x - cosineProjection k f x)
≤ 5 * holderSeminorm f γ * ofReal ((k : ℝ) ^ (-γ))
Proof (Lean source)
theorem cosineProjection_error_le_seminorm {f : ℝ → ℝ} {γ : ℝ} {k : ℕ} (hf : ContinuousOn f (Icc (0 : ℝ) 1)) (hγ : 0 < γ) (hγ1 : γ ≤ 1) (hk : 1 ≤ k) : extendedL2Norm (fun x => f x - cosineProjection k f x) ≤ 5 * holderSeminorm f γ * ofReal ((k : ℝ) ^ (-γ)) := by by_cases htop : holderSeminorm f γ = ⊤ · exact extended_bound_of_seminorm_top hk htop · have hres : ContinuousOn (fun x => f x - cosineProjection k f x) (Icc (0 : ℝ) 1) := hf.sub (continuous_cosinePolynomial k (cosineCoefficient f)).continuousOn rw [extendedL2Norm_eq_ofReal hres] have hreal := cosineProjection_error_le hf hγ hγ1 hk (ENNReal.toReal_nonneg : 0 ≤ (holderSeminorm f γ).toReal) (hasHolderBound_seminorm hγ htop) calc _ ≤ ofReal (5 * (holderSeminorm f γ).toReal * (k : ℝ) ^ (-γ)) := ENNReal.ofReal_le_ofReal hreal _ = _ := by rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_mul (by norm_num), ENNReal.ofReal_toReal htop] norm_num
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosineProjection_error_le_seminorm · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Main.lean:37 · uses cosineProjection , extendedL2Norm , holderSeminorm
1 supporting declaration (lemmas, instances)
Moments 1 core · 5 supporting Reuse Causalean's unit-mass order-four kernel and exact mass. ★ jackson_holder_moment

Jackson moments sufficient for constant five

Reuse Causalean's unit-mass order-four kernel and exact mass. The existing public 64/K² bound loses too much when translated to rank. Instead the sine chord bound gives the raw weighted estimate, whose normalization is at most 3π²/(2K²). We retain the convenient weaker bound (2π/K)². Jensen at exponent γ/2 then gives the unit-coordinate γ-moment at most (2/K)^γ. For K=(k+1)/2, the rank factor is at most 4^γ ≤ 4 ≤ 5, including k=1.

Reference for conventions: Cambridge Part III Approximation Theory, Lecture 9 (2005), Definitions 9.3 and 9.5, Lemma 9.6, Theorem 9.8: https://www.damtp.cam.ac.uk/user/na/PartIIIat/b09.pdf . The source supplies the classical construction, not the explicit constant claimed here. All numerical bounds below remain formal proof obligations.

theorem jackson_holder_moment reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A positive order and an exponent between zero and one give a Jackson Hölder moment in unit coordinates at most (2/K)^γ.

Formal statement
K :
ℕ
γ :
ℝ
hK :
0 < K
hγ :
0 < γ
hγ1 :
γ ≤ 1
(∫ t in Icc (-pi) pi, (|t| / pi) ^ γ * jackson K t) ≤ (2 / (K : ℝ)) ^ γ
Proof (Lean source)
theorem jackson_holder_moment {K : ℕ} {γ : ℝ} (hK : 0 < K) (hγ : 0 < γ) (hγ1 : γ ≤ 1) : (∫ t in Icc (-pi) pi, (|t| / pi) ^ γ * jackson K t) ≤ (2 / (K : ℝ)) ^ γ := by let μ : Measure ℝ := volume.restrict (Icc (-pi) pi) let w : ℝ → ℝ≥0∞ := fun t => ofReal (jackson K t) let ν : Measure ℝ := μ.withDensity w have hw : Measurable w := (measurable_jackson K).ennreal_ofReal have hwtop : ∀ᵐ t ∂μ, w t < ∞ := Filter.Eventually.of_forall (fun t => ENNReal.ofReal_lt_top) have hnonneg : ∀ t, 0 ≤ jackson K t := jackson_nonneg K hK have hbridge (f : ℝ → ℝ) : (∫ t, f t ∂ν) = ∫ t in Icc (-pi) pi, f t * jackson K t := by rw [integral_withDensity_eq_integral_toReal_smul hw hwtop] simp only [w, ENNReal.toReal_ofReal (hnonneg _), smul_eq_mul, mul_comm] rfl have hν : ν univ = 1 := by change μ.withDensity w univ = 1 rw [withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ] change (∫⁻ t, ofReal (jackson K t) ∂μ) = 1 rw [← ofReal_integral_eq_lintegral_ofReal (integrableOn_jackson K) (Filter.Eventually.of_forall hnonneg), jackson_integral_eq_one K hK] norm_num let : IsProbabilityMeasure ν := ⟨hν⟩ let f : ℝ → ℝ := fun t => (|t| / pi) ^ 2 have hf : Continuous f := by dsimp [f]; fun_prop have hp : 0 < γ / 2 := by linarith have hpow : Continuous (fun t => f t ^ (γ / 2)) := hf.rpow_const (fun t => inr hp.le) have hfi : Integrable f ν := by apply (integrable_withDensity_iff_integrable_smul' hw hwtop).2 simpa only [w, ENNReal.toReal_ofReal (hnonneg _), smul_eq_mul, μ, IntegrableOn] using (show Continuous (fun t => jackson K t * f t) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hgi : Integrable ((fun x : ℝ => x ^ (γ / 2)) ∘ f) ν := by apply (integrable_withDensity_iff_integrable_smul' hw hwtop).2 simpa only [w, ENNReal.toReal_ofReal (hnonneg _), smul_eq_mul, Function.comp_def, μ, IntegrableOn] using (show Continuous (fun t => jackson K t * f t ^ (γ / 2)) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hj := (Real.concaveOn_rpow hp.le (by linarith : γ / 2 ≤ 1)).le_map_integral (Real.continuous_rpow_const hp.le).continuousOn isClosed_Ici (Filter.Eventually.of_forall (fun t => sq_nonneg (|t| / pi))) hfi hgi have hmoment : (∫ t, f t ∂ν) ≤ (2 / (K : ℝ)) ^ 2 := by rw [hbridge] have heq : (fun t => f t * jackson K t) = (fun t => (t ^ 2 * jackson K t) / pi ^ 2) := by funext t dsimp [f] rw [div_pow, sq_abs] ring rw [heq, integral_div] apply (div_le_iff₀ (sq_pos_of_pos Real.pi_pos)).2 convert jackson_second_moment_scaled hK using 1 <;> first | rfl | ring have hpower (x : ℝ) (hx : 0 ≤ x) : (x ^ 2) ^ (γ / 2) = x ^ γ := by rw [← Real.rpow_natCast, ← Real.rpow_mul hx] congr 1 ring calc _ = ∫ t, f t ^ (γ / 2) ∂ν := by rw [hbridge] apply integral_congr_ae exact Filter.Eventually.of_forall (fun t => by dsimp [f] rw [hpower _ (div_nonneg (abs_nonneg t) Real.pi_pos.le)]) _ ≤ (∫ t, f t ∂ν) ^ (γ / 2) := hj _ ≤ ((2 / (K : ℝ)) ^ 2) ^ (γ / 2) := Real.rpow_le_rpow (integral_nonneg (fun t => sq_nonneg _)) hmoment hp.le _ = _ := hpower _ (by positivity)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.jackson_holder_moment · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:184 · uses jackson
5 supporting declarations (lemmas, instances)
  • weighted_jraw_le_chebyshev theorem — On the principal period, at a positive kernel order, the raw squared-angle weighted kernel is bounded by π² times the squared Chebyshev sine quotient.
    K :
    ℕ
    hK :
    0 < K
    t :
    ℝ
    ht :
    t ∈ Icc (-pi) pi
    t ^ 2 * jraw K t
    ≤ pi ^ 2 * (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2
    Proof (Lean source)
    theorem weighted_jraw_le_chebyshev {K : ℕ} (hK : 0 < K) {t : ℝ} (ht : t ∈ Icc (-pi) pi) : t ^ 2 * jraw K t ≤ pi ^ 2 * (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2 := by have hhalf : |t / 2| ≤ pi / 2 := by rw [abs_div] norm_num exact div_le_div_of_nonneg_right (abs_le.mpr ht) (by norm_num) have hchord := Real.mul_abs_le_abs_sin hhalf have habs : |t| ≤ pi * |sin (t / 2)| := by have hpi := Real.pi_pos rw [abs_div] at hchord norm_num at hchord field_simp at hchord nlinarith have ht2 : t ^ 2 ≤ pi ^ 2 * sin (t / 2) ^ 2 := by have hs := mul_self_le_mul_self (abs_nonneg t) habs simpa [← pow_two, mul_pow, sq_abs] using hs let u := (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) have hu : u * sin (t / 2) = sin ((K : ℝ) * t / 2) := by have hc : (((K - 1 : ℕ) : ℤ) : ℝ) + 1 = (K : ℝ) := by exact_mod_cast (show K - 1 + 1 = K by omega) have hu := Polynomial.Chebyshev.U_real_cos (t / 2) ((K - 1 : ℕ) : ℤ) rw [hc] at hu simpa [u, mul_div_assoc] using hu have hs2 : sin ((K : ℝ) * t / 2) ^ 2 ≤ 1 := by nlinarith [Real.neg_one_le_sin ((K : ℝ) * t / 2), Real.sin_le_one ((K : ℝ) * t / 2)] have hbase : t ^ 2 * u ^ 2 ≤ pi ^ 2 := by calc _ ≤ (pi ^ 2 * sin (t / 2) ^ 2) * u ^ 2 := mul_le_mul_of_nonneg_right ht2 (sq_nonneg u) _ = pi ^ 2 * sin ((K : ℝ) * t / 2) ^ 2 := by rw [← hu]; ring _ ≤ pi ^ 2 := by nlinarith [sq_nonneg pi] rw [jraw_eq_chebyshev K hK t] change t ^ 2 * u ^ 4 ≤ pi ^ 2 * u ^ 2 calc _ = (t ^ 2 * u ^ 2) * u ^ 2 := by ring _ ≤ _ := mul_le_mul_of_nonneg_right hbase (sq_nonneg u)
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.weighted_jraw_le_chebyshev · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:32
  • integral_chebyshev_sq theorem — At a positive order, the squared Chebyshev sine quotient has period integral 2π times that order.
    K :
    ℕ
    hK :
    0 < K
    (∫ t in Icc (-pi) pi, (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2)
    = 2 * pi * (K : ℝ)
    Proof (Lean source)
    theorem integral_chebyshev_sq {K : ℕ} (hK : 0 < K) : (∫ t in Icc (-pi) pi, (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2) = 2 * pi * (K : ℝ) := by have hfun : (fun t : ℝ => (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2) = fun t => (K : ℝ) + 2 * ∑ j ∈ range (K - 1), ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t) := by funext t rw [cheb_U_sq_eval (K - 1) t] congr 2 norm_cast omega rw [hfun] have hiConst : IntegrableOn (fun _t : ℝ => (K : ℝ)) (Icc (-pi) pi) := continuous_const.continuousOn.integrableOn_compact isCompact_Icc have hiSum : IntegrableOn (fun t : ℝ => 2 * ∑ j ∈ range (K - 1), ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) (Icc (-pi) pi) := by exact (show Continuous (fun t : ℝ => 2 * ∑ j ∈ range (K - 1), ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc rw [MeasureTheory.integral_add hiConst hiSum, MeasureTheory.integral_const_mul] have hsum : (∫ t in Icc (-pi) pi, ∑ j ∈ range (K - 1), ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) = 0 := by calc _ = ∑ j ∈ range (K - 1), ∫ t in Icc (-pi) pi, ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t) := MeasureTheory.integral_finsetSum (range (K - 1)) (by intro j hj exact (show Continuous (fun t : ℝ => ((K - 1 : ℕ) - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc) _ = 0 := by apply Finset.sum_eq_zero intro j hj rw [MeasureTheory.integral_const_mul, integral_cos_nat (j + 1) (by omega)] ring rw [hsum] rw [integral_const_Icc] ring
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.integral_chebyshev_sq · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:82
  • jackson_second_moment_scaled theorem — At a positive kernel order, the Jackson squared-angle moment is at most the square of 2π divided by the order.
    K :
    ℕ
    hK :
    0 < K
    (∫ t in Icc (-pi) pi, t ^ 2 * jackson K t) ≤ (2 * pi / (K : ℝ)) ^ 2
    Proof (Lean source)
    theorem jackson_second_moment_scaled {K : ℕ} (hK : 0 < K) : (∫ t in Icc (-pi) pi, t ^ 2 * jackson K t) ≤ (2 * pi / (K : ℝ)) ^ 2 := by have hiLeft : IntegrableOn (fun t => t ^ 2 * jraw K t) (Icc (-pi) pi) := (show Continuous (fun t => t ^ 2 * jraw K t) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hiRight : IntegrableOn (fun t => pi ^ 2 * (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2) (Icc (-pi) pi) := (show Continuous (fun t => pi ^ 2 * (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hraw : (∫ t in Icc (-pi) pi, t ^ 2 * jraw K t) ≤ 2 * pi ^ 3 * (K : ℝ) := by calc _ ≤ ∫ t in Icc (-pi) pi, pi ^ 2 * (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2 := setIntegral_mono_on hiLeft hiRight measurableSet_Icc (fun t ht => weighted_jraw_le_chebyshev hK ht) _ = _ := by rw [integral_const_mul, integral_chebyshev_sq hK] ring have hmass := jrawMass_lower K hK have hmasspos := jrawMass_pos K hK have hKR : (0 : ℝ) < K := by exact_mod_cast hK rw [show (fun t => t ^ 2 * jackson K t) = (fun t => (t ^ 2 * jraw K t) / jrawMass K) by funext t; simp only [jackson]; ring, integral_div] apply (div_le_iff₀ hmasspos).2 calc _ ≤ 2 * pi ^ 3 * (K : ℝ) := hraw _ ≤ (2 * pi / (K : ℝ)) ^ 2 * ((4 * pi / 3) * (K : ℝ) ^ 3) := by field_simp nlinarith [Real.pi_pos] _ ≤ (2 * pi / (K : ℝ)) ^ 2 * jrawMass K := mul_le_mul_of_nonneg_left hmass (sq_nonneg _)
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.jackson_second_moment_scaled · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:136
  • matchedOrder_bounds theorem — For a positive rank, its matched Jackson order is positive and has degree strictly below rank.
    k :
    ℕ
    hk :
    1 ≤ k
    conclusion 1
    0 < (k + 1) / 2
    conclusion 2
    2 * ((k + 1) / 2 - 1) < k
    Proof (Lean source)
    theorem matchedOrder_bounds {k : ℕ} (hk : 1 ≤ k) : 0 < (k + 1) / 2 ∧ 2 * ((k + 1) / 2 - 1) < k := by omega
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.matchedOrder_bounds · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:262
  • matchedOrder_constant_five theorem — For a positive rank and an exponent between zero and one, the matched-order moment bound is at most five times rank to minus that exponent.
    k :
    ℕ
    γ :
    ℝ
    hk :
    1 ≤ k
    hγ :
    0 < γ
    hγ1 :
    γ ≤ 1
    (2 / (((k + 1) / 2 : ℕ) : ℝ)) ^ γ ≤ 5 * (k : ℝ) ^ (-γ)
    Proof (Lean source)
    theorem matchedOrder_constant_five {k : ℕ} {γ : ℝ} (hk : 1 ≤ k) (hγ : 0 < γ) (hγ1 : γ ≤ 1) : (2 / (((k + 1) / 2 : ℕ) : ℝ)) ^ γ ≤ 5 * (k : ℝ) ^ (-γ) := by have hkR : (0 : ℝ) < k := by exact_mod_cast (by omega : 0 < k) have hKR : (0 : ℝ) < ((k + 1) / 2 : ℕ) := by exact_mod_cast (matchedOrder_bounds hk).1 have hrank : (k : ℝ) ≤ 2 * (((k + 1) / 2 : ℕ) : ℝ) := by exact_mod_cast (by omega : k ≤ 2 * ((k + 1) / 2)) have hratio : 2 / (((k + 1) / 2 : ℕ) : ℝ) ≤ 4 / (k : ℝ) := by apply (div_le_div_iff₀ hKR hkR).2 linarith have hfour : (4 : ℝ) ^ γ ≤ 4 := by simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_le (by norm_num : (1 : ℝ) ≤ 4) hγ1 calc _ ≤ (4 / (k : ℝ)) ^ γ := Real.rpow_le_rpow (by positivity) hratio hγ.le _ = (4 : ℝ) ^ γ * (k : ℝ) ^ (-γ) := by rw [Real.div_rpow (by norm_num) hkR.le, Real.rpow_neg hkR.le, div_eq_mul_inv] _ ≤ 5 * (k : ℝ) ^ (-γ) := mul_le_mul_of_nonneg_right (hfour.trans (by norm_num)) (Real.rpow_nonneg hkR.le _)
    Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.matchedOrder_constant_five · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Moments.lean:268
Norms 1 core · 6 supporting These analytic bridges keep continuous-on-interval assumptions local, and identify the extended square-integral norm with the real square-root norm. ★ l2Norm_le_of_abs_le

Uniform measure and L² bridges

These analytic bridges keep continuous-on-interval assumptions local, and identify the extended square-integral norm with the real square-root norm. No spectral or Jackson arguments are used in this module.

theorem l2Norm_le_of_abs_le reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A function continuous on the interval whose absolute value is bounded there by a nonnegative constant has L² norm at most that constant.

Formal statement
g :
ℝ → ℝ
B :
ℝ
hg :
ContinuousOn g (Icc (0 : ℝ) 1)
hB0 :
0 ≤ B
hB :
∀ x ∈ Icc (0 : ℝ) 1, |g x| ≤ B
l2Norm g ≤ B
Proof (Lean source)
theorem l2Norm_le_of_abs_le {g : ℝ → ℝ} {B : ℝ} (hg : ContinuousOn g (Icc (0 : ℝ) 1)) (hB0 : 0 ≤ B) (hB : ∀ x ∈ Icc (0 : ℝ) 1, |g x| ≤ B) : l2Norm g ≤ B := by unfold l2Norm apply (Real.sqrt_le_iff).2 refine ⟨hB0, ?_⟩ have hi := integral_mono_ae (integrable_sq_of_continuousOn hg) (integrable_const (B ^ 2) : Integrable (fun _ : ℝ => B ^ 2) uniformMeasure) ((ae_restrict_iff' measurableSet_Icc).2 (ae_of_all _ fun x hx => pow_le_pow_left₀ (abs_nonneg (g x)) (hB x hx) 2)) simpa [uniformMeasure, Real.volume_Icc] using hi
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.l2Norm_le_of_abs_le · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Norms.lean:69 · uses l2Norm
6 supporting declarations (lemmas, instances)
Orthogonality 1 core · 5 supporting The orthogonal projection is the actual finite integral formula from Definitions. ★ cosineProjection_bestApproximation

Cosine orthogonality and explicit best approximation

The orthogonal projection is the actual finite integral formula from Definitions. The Pythagorean identity supplies best approximation against every rank-k cosine polynomial, without assuming that a separately chosen Hilbert projection agrees with the formula. No completeness of the infinite cosine system is needed.

theorem cosineProjection_bestApproximation reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

The projection of a continuous target has L² error no greater than any competitor that belongs to the same cosine span.

Formal statement
f p :
ℝ → ℝ
k :
ℕ
hf :
ContinuousOn f (Icc (0 : ℝ) 1)
hspan :
l2Norm (fun x => f x - cosineProjection k f x) ≤ l2Norm (fun x => f x - p x)
Proof (Lean source)
theorem cosineProjection_bestApproximation {f p : ℝ → ℝ} {k : ℕ} (hf : ContinuousOn f (Icc (0 : ℝ) 1)) (hspan : InCosineSpan k p) : l2Norm (fun x => f x - cosineProjection k f x) ≤ l2Norm (fun x => f x - p x) := by obtain ⟨a, ha⟩ := hspan have heq : (∫ x, |f x - p x| ^ 2 ∂uniformMeasure) = ∫ x, |f x - cosinePolynomial k a x| ^ 2 ∂uniformMeasure := by apply integral_congr_ae apply (ae_restrict_iff' measurableSet_Icc).2 exact ae_of_all _ (fun x hx => by dsimp only; rw [ha x hx]) unfold l2Norm apply Real.sqrt_le_sqrt rw [heq, cosineProjection_pythagoras k a hf] exact le_add_of_nonneg_right (integral_nonneg fun x => sq_nonneg _)
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.cosineProjection_bestApproximation · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Orthogonality.lean:184 · uses InCosineSpan , cosineProjection , l2Norm
5 supporting declarations (lemmas, instances)
Seminorm 1 core · 3 supporting The supremum definition is related to ordinary nonnegative increment bounds. ★ extended_bound_of_seminorm_top

Finite and infinite Hölder seminorm bridges

The supremum definition is related to ordinary nonnegative increment bounds. The headline theorem will split at infinity, never convert an infinite seminorm to a real number and silently replace it by zero.

theorem extended_bound_of_seminorm_top reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

With positive rank, an infinite Hölder seminorm makes the extended L² norm of any function at most five times that seminorm times k⁻γ, because the right-hand side is then infinite.

Formal statement
f g :
ℝ → ℝ
γ :
ℝ
k :
ℕ
hk :
1 ≤ k
hseminorm :
holderSeminorm f γ = ⊤
extendedL2Norm g ≤ 5 * holderSeminorm f γ * ofReal ((k : ℝ) ^ (-γ))
Proof (Lean source)
theorem extended_bound_of_seminorm_top {f g : ℝ → ℝ} {γ : ℝ} {k : ℕ} (hk : 1 ≤ k) (hseminorm : holderSeminorm f γ = ⊤) : extendedL2Norm g ≤ 5 * holderSeminorm f γ * ofReal ((k : ℝ) ^ (-γ)) := by rw [hseminorm, ENNReal.mul_top (by norm_num), ENNReal.top_mul (ne_of_gt (ENNReal.ofReal_pos.mpr (rank_rpow_pos hk γ)))] exact le_top
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.extended_bound_of_seminorm_top · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Seminorm.lean:57 · uses extendedL2Norm , holderSeminorm
3 supporting declarations (lemmas, instances)
Span 1 core · 1 supporting Zero padding of coefficient sequences embeds every finite normalized cosine span in each larger rank. ★ inCosineSpan_mono

Enlarging finite cosine spans

Zero padding of coefficient sequences embeds every finite normalized cosine span in each larger rank. The rank still counts the constant mode, with no positivity assumption needed for this algebraic inclusion.

theorem inCosineSpan_mono reviewed
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection

A function in a smaller cosine span belongs to every larger cosine span, whenever the ranks are ordered.

Formal statement
m n :
ℕ
p :
ℝ → ℝ
hmn :
m ≤ n
hp :
Proof (Lean source)
theorem inCosineSpan_mono {m n : ℕ} {p : ℝ → ℝ} (hmn : m ≤ n) (hp : InCosineSpan m p) : InCosineSpan n p := by rcases hp with ⟨a, ha⟩ refine ⟨fun j => if j < m then a j else 0, ?_⟩ intro x hx rw [cosinePolynomial_zero_pad hmn, ha x hx]
Causalean.Mathlib.Analysis.Approximation.Chebyshev.CosineProjection.inCosineSpan_mono · Causalean/Mathlib/Analysis/Approximation/Chebyshev/CosineProjection/Span.lean:36 · uses InCosineSpan
1 supporting declaration (lemmas, instances)