Mathlib.Analysis.Absolute­Value­Moment­Prior­Duality

Best uniform polynomial approximation of absolute value on the unit interval, its finite-dimensional measure duality, symmetric moment-matched probability priors, and universal inverse-degree bounds.

Basic 4 core · 7 supporting This module defines the degree-K best uniform approximation error for x ↦ |x| on [-1,1] directly from real polynomials. ★ exists_bestPolynomialAbs

Best uniform polynomial approximation of the absolute-value function

This module defines the degree-K best uniform approximation error for x ↦ |x| on [-1,1] directly from real polynomials. It also records the order, attainment, and compact-interval characterizations used by the measure duality and rate modules.

def unitInterval reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

The unit interval is the closed set of real numbers from 1-1 through 11, inclusive.

Definition (Lean source)
unitInterval :
Set
Icc (-1) 1
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.unitInterval · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Basic.lean:30
def uniformApproxErrorAbs reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a real polynomial, its uniform absolute-value approximation error is the supremum, over every real number in the closed interval from 1-1 through 11, of the absolute difference between the polynomial's value and that number's absolute value.

Definition (Lean source)
p :
uniformApproxErrorAbs p :
sSup ((fun x : ℝ => abs (abs x - p.eval x)) '' unitInterval)
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.uniformApproxErrorAbs · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Basic.lean:33
def bestUniformApproxErrorAbs reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a nonnegative integer degree bound, the best uniform absolute-value approximation error is the infimum of the uniform errors of all real polynomials whose degree is at most that bound.

Definition (Lean source)
K :
bestUniformApproxErrorAbs K :
sInf {e : ℝ | ∃ p : Polynomial ℝ, p.natDegree ≤ K ∧ e = uniformApproxErrorAbs p}
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.bestUniformApproxErrorAbs · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Basic.lean:40
theorem exists_bestPolynomialAbs reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a polynomial degree limit, some admissible polynomial attains the best absolute-value approximation error.

Formal statement
K :
∃ p : Polynomial ℝ,
conclusion 1
p.natDegree ≤ K
Proof (Lean source)
theorem exists_bestPolynomialAbs (K : ℕ) : ∃ p : Polynomial ℝ, p.natDegree ≤ K ∧ uniformApproxErrorAbs p = bestUniformApproxErrorAbs K := by let V := boundedPolynomialFunctions K let f := absOnUnitInterval let R : ℝ := 2 * ‖f‖ + 1 let B : Set V := closedBall 0 R have hR : 0 ≤ R := by dsimp [R] positivity have hBcompact : IsCompact B := by exact ProperSpace.isCompact_closedBall 0 R have hzero : (0 : V) ∈ B := by simp [B, hR] have hcontinuous : Continuous (fun q : V => ‖f - (q : C(unitInterval, ℝ))‖) := by fun_prop obtain ⟨q, hqB, hqmin⟩ := hBcompact.exists_isMinOn ⟨0, hzero⟩ hcontinuous.continuousOn have hqzero : ‖f - (q : C(unitInterval, ℝ))‖ ≤ ‖f‖ := by simpa using hqmin hzero have hglobal (r : V) : ‖f - (q : C(unitInterval, ℝ))‖ ≤ ‖f - (r : C(unitInterval, ℝ))‖ := by by_cases hr : r ∈ B · exact hqmin hr · have hrnorm : R < ‖r‖ := by simpa [B, Metric.mem_closedBall, dist_zero_left, not_le] using hr have hdiff := norm_sub_norm_le (r : C(unitInterval, ℝ)) f have hlower : ‖f‖ ≤ ‖(r : C(unitInterval, ℝ)) - f‖ := by dsimp [R] at hrnorm change ‖(r : C(unitInterval, ℝ))‖ - ‖f‖ ≤ ‖(r : C(unitInterval, ℝ)) - f‖ at hdiff linarith rw [norm_sub_rev] at hlower exact hqzero.trans hlower obtain ⟨p, hpq⟩ := q.property have hpDegreeLE : (p : Polynomial ℝ) ∈ Polynomial.degreeLE ℝ K := by rw [← Polynomial.degreeLT_succ_eq_degreeLE] exact p.property have hpdeg : (p : Polynomial ℝ).natDegree ≤ K := Polynomial.natDegree_le_iff_degree_le.mpr (Polynomial.mem_degreeLE.mp hpDegreeLE) have hpq' : (p : Polynomial ℝ).toContinuousMapOn unitInterval = (q : C(unitInterval, ℝ)) := hpq have hminpoly : ∀ r : Polynomial ℝ, r.natDegree ≤ K → uniformApproxErrorAbs p ≤ uniformApproxErrorAbs r := by intro r hr have hrDegreeLE : r ∈ Polynomial.degreeLE ℝ K := Polynomial.mem_degreeLE.mpr (Polynomial.natDegree_le_iff_degree_le.mp hr) have hrDegreeLT : r ∈ Polynomial.degreeLT ℝ (K + 1) := by rw [Polynomial.degreeLT_succ_eq_degreeLE] simpa [Nat.succ_eq_add_one] using hrDegreeLE let rv : V := ⟨r.toContinuousMapOn unitInterval, ⟨⟨r, hrDegreeLT⟩, rfl⟩⟩ rw [uniformApproxErrorAbs_eq_norm, uniformApproxErrorAbs_eq_norm] simpa [f, hpq'] using hglobal rv refine ⟨p, hpdeg, le_antisymm ?_ ?_⟩ · rw [bestUniformApproxErrorAbs_eq_sInf] apply le_csInf · exact ⟨uniformApproxErrorAbs 0, 0, by simp⟩ · rintro e ⟨r, hr, rfl⟩ exact hminpoly r hr · rw [bestUniformApproxErrorAbs_eq_sInf] apply csInf_le · refine ⟨0, ?_⟩ rintro e ⟨r, -, rfl⟩ have h := ((uniformApproxErrorAbs_le_iff (p := r) (e := uniformApproxErrorAbs r)).mp (le_refl _)) 0 (by norm_num) exact (abs_nonneg _).trans h · exact ⟨p, hpdeg, rfl⟩
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.exists_bestPolynomialAbs · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Basic.lean:164 · uses bestUniformApproxErrorAbs , uniformApproxErrorAbs
7 supporting declarations (lemmas, instances)
Duality 6 core · 11 supporting This module packages the Hahn--Banach/Riesz extremal certificate for best uniform approximation of absolute value and converts its positive and negative parts into two symmetric probability measures. ★ exists_symmetric_momentMatched_absGap

Approximation duality and symmetric moment-matched priors

This module packages the Hahn--Banach/Riesz extremal certificate for best uniform approximation of absolute value and converts its positive and negative parts into two symmetric probability measures. The resulting structure is the consumer-facing moment-matched-prior API.

def IsSymmetric reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a Borel measure on the real line, symmetry about zero means that reflecting every point through zero leaves the measure unchanged.

Definition (Lean source)
ν :
IsSymmetric ν :
Prop
Measure.map (fun x : ℝ => -x) ν = ν
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.IsSymmetric · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:30
def IsSupportedOnUnitInterval reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a measure on the real line, support on the unit interval means that the complement of the closed interval from −1 to 1 has measure zero.

Definition (Lean source)
ν :
IsSupportedOnUnitInterval ν :
Prop
ν (unitIntervalᶜ) = 0
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.IsSupportedOnUnitInterval · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:34
structure AbsExtremalDecomposition reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

An extremal certificate given by two finite measures on the real line, labelled positive and negative. Each has mass 1/2, is symmetric and supported on [-1,1]; their degree-K moments agree, while their absolute first moments differ by E_K.

Definition (Lean source)
K :
positive :
negative :
finite_positive :
finite_negative :
positive_mass :
positive univ = (1 / 2 : ENNReal)
negative_mass :
negative univ = (1 / 2 : ENNReal)
positive_supported :
negative_supported :
positive_symmetric :
IsSymmetric positive
negative_symmetric :
IsSymmetric negative
moments_eq :
∀ j : ℕ
if
j ≤ K
then
∫ x : ℝ, x ^ j ∂positive = ∫ x : ℝ, x ^ j ∂negative
abs_gap :
(∫ x : ℝ, |x| ∂positive) - (∫ x : ℝ, |x| ∂negative) = bestUniformApproxErrorAbs K
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.AbsExtremalDecomposition · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:417
structure AbsMomentMatchedPriors reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

Two symmetric probability measures on [-1,1] whose moments match through degree K and whose absolute first moments have the oriented gap 2 E_K.

Definition (Lean source)
K :
ν₀ :
ν₁ :
probability₀ :
probability₁ :
supported₀ :
supported₁ :
symmetric₀ :
symmetric₁ :
moments_eq :
∀ j : ℕ
if
j ≤ K
then
∫ x : ℝ, x ^ j ∂ν₀ = ∫ x : ℝ, x ^ j ∂ν₁
abs_gap :
(∫ x : ℝ, |x| ∂ν₁) - (∫ x : ℝ, |x| ∂ν₀) = 2 * bestUniformApproxErrorAbs K
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.AbsMomentMatchedPriors · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:580
def toMomentMatchedPriors reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.AbsExtremalDecomposition

For a nonnegative moment-degree limit and an absolute-value extremal decomposition at that limit, the associated pair of moment-matched priors has first prior equal to twice the decomposition's negative measure and second prior equal to twice its positive measure.

Definition (Lean source)
K :
toMomentMatchedPriors D :
by let ν₀ : Measure ℝ := (2 : ENNReal) • D.negative let ν₁ : Measure ℝ := (2 : ENNReal) • D.positive refine { ν₀ := ν₀ ν₁ := ν₁ probability₀ := ?_ probability₁ := ?_ supported₀ := ?_ supported₁ := ?_ symmetric₀ := ?_ symmetric₁ := ?_ moments_eq := ?_ abs_gap := ?_ } · constructor simp only [ν₀, Measure.smul_apply, D.negative_mass] simpa [smul_eq_mul, div_eq_inv_mul] using (ENNReal.mul_inv_cancel (a := (2 : ENNReal)) (by norm_num) (by norm_num)) · constructor simp only [ν₁, Measure.smul_apply, D.positive_mass] simpa [smul_eq_mul, div_eq_inv_mul] using (ENNReal.mul_inv_cancel (a := (2 : ENNReal)) (by norm_num) (by norm_num)) · dsimp only [IsSupportedOnUnitInterval, ν₀] rw [Measure.smul_apply, D.negative_supported] simp · dsimp only [IsSupportedOnUnitInterval, ν₁] rw [Measure.smul_apply, D.positive_supported] simp · simpa [IsSymmetric, ν₀, Measure.map_smul] using congrArg ((2 : ENNReal) • ·) D.negative_symmetric · simpa [IsSymmetric, ν₁, Measure.map_smul] using congrArg ((2 : ENNReal) • ·) D.positive_symmetric · intro j hj simp only [ν₀, ν₁, integral_smul_measure, ENNReal.toReal_ofNat] rw [D.moments_eq j hj] · simp only [ν₀, ν₁, integral_smul_measure, ENNReal.toReal_ofNat, smul_eq_mul] linarith [D.abs_gap]
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.AbsExtremalDecomposition.toMomentMatchedPriors · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:597 · uses AbsExtremalDecomposition , AbsMomentMatchedPriors
theorem exists_symmetric_momentMatched_absGap reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

For a positive even degree, a symmetric moment-matched probability-prior pair with the exact absolute-moment gap exists. The positivity and evenness assumptions are not used by the proof; the same conclusion holds for every degree via exists_absExtremalDecomposition.

Formal statement
K :
_hK :
0 < K
_hEven :
Even K
Proof (Lean source)
theorem exists_symmetric_momentMatched_absGap {K : ℕ} (_hK : 0 < K) (_hEven : Even K) : Nonempty (AbsMomentMatchedPriors K) := by obtain ⟨D⟩ := exists_absExtremalDecomposition K exact ⟨D.toMomentMatchedPriors⟩
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.exists_symmetric_momentMatched_absGap · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Duality.lean:639 · uses AbsMomentMatchedPriors
11 supporting declarations (lemmas, instances)
Fejer 8 core · 20 supporting This module develops the periodic Fourier-analytic certificate used for the lower bound on uniform polynomial approximation of absolute value. ★ exists_fourierPoly_sinDouble

Fejér and de la Vallée--Poussin certificates

This module develops the periodic Fourier-analytic certificate used for the lower bound on uniform polynomial approximation of absolute value. It proves the multiplier and norm properties of normalized Fejér means, packages the de la Vallée--Poussin mean, and constructs a bounded cusp functional that annihilates the low Fourier modes coming from algebraic polynomials.

def oneSidedFourierSum reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a nonnegative integer order, the one-sided Fourier sum is the continuous complex-valued function on the circle obtained by summing the Fourier characters with integer frequencies from zero through one less than that order.

Definition (Lean source)
n :
oneSidedFourierSum n :
C(AddCircle pi, ℂ)
∑ r ∈ range n, fourier (r : ℤ)
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.oneSidedFourierSum · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:29
def fejerKernel reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a nonnegative integer order and a point on the circle of period π, the normalized Fejér kernel is the squared complex modulus of the one-sided Fourier sum at that point, divided by the order; at order zero, this quotient is defined to be zero.

Definition (Lean source)
n :
fejerKernel n t :
‖oneSidedFourierSum n t‖ ^ 2 / (n : ℝ)
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerKernel · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:33
def fejerMean reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a nonnegative integer order and a continuous complex-valued function on the circle of period π, the Fejér mean is the Haar integral of the function multiplied by the normalized Fejér kernel of that order.

Definition (Lean source)
n :
f :
C(AddCircle pi, ℂ)
fejerMean n f :
∫ t, (fejerKernel n t : ℂ) * f t ∂AddCircle.haarAddCircle
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMean · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:44
def fejerMeanCLM reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a positive integer order, the continuous-linear Fejér mean functional maps each continuous complex-valued function on the circle of period π to its Fejér mean of that order.

Definition (Lean source)
n :
hn :
0 < n
fejerMeanCLM n hn :
C(AddCircle pi, ℂ) →L[ℂ] ℂ
LinearMap.mkContinuous { toFun := fejerMean n map_add' := by intro f g rw [fejerMean, fejerMean] simp_rw [ContinuousMap.add_apply, mul_add] rw [integral_add] · rfl · exact (show Continuous (fun t : AddCircle pi => (fejerKernel n t : ℂ) * f t) by exact (Complex.continuous_ofReal.comp (continuous_fejerKernel n)).mul f.continuous).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) · exact (show Continuous (fun t : AddCircle pi => (fejerKernel n t : ℂ) * g t) by exact (Complex.continuous_ofReal.comp (continuous_fejerKernel n)).mul g.continuous).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) map_smul' := by intro c f rw [fejerMean, fejerMean] simp_rw [ContinuousMap.smul_apply, smul_eq_mul] rw [← integral_const_mul] apply integral_congr_ae filter_upwards [] with t simp ring } 1 (fun f => by simpa using fejerMean_norm_le n hn f ‖f‖ (fun t => ContinuousMap.norm_coe_le_norm f t))
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMeanCLM · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:233
def valleePoussinMeanCLM reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a positive integer order, the continuous-linear de la Vallée--Poussin mean maps a continuous complex-valued function on the circle of period π to twice its Fejér mean of order twice the given order, minus its Fejér mean of the given order.

Definition (Lean source)
n :
hn :
0 < n
valleePoussinMeanCLM n hn :
C(AddCircle pi, ℂ) →L[ℂ] ℂ
(2 : ℂ) • fejerMeanCLM (2 * n) (by omega) - fejerMeanCLM n hn
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.valleePoussinMeanCLM · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:275
def cuspFunctionalCLM reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a positive integer order, the continuous-linear cusp functional maps a continuous complex-valued function on the circle of period π to its value at zero minus its de la Vallée--Poussin mean of that order.

Definition (Lean source)
n :
hn :
0 < n
cuspFunctionalCLM n hn :
C(AddCircle pi, ℂ) →L[ℂ] ℂ
ContinuousMap.evalCLM ℂ (0 : AddCircle pi) - valleePoussinMeanCLM n hn
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctionalCLM · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:340
lemma exists_fourierPoly_sinDouble reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

For a polynomial of degree at most a positive order, there is a corresponding Fourier polynomial that agrees after sine composition and is annihilated by the cusp functional.

Formal statement
p :
n :
hn :
0 < n
hp :
p.natDegree ≤ n
∃ q : C(AddCircle pi, ℂ),
conclusion 1
t :
q (t : AddCircle pi) = (p.eval (sin (2 * t)) : ℝ)
conclusion 2
Proof (Lean source)
lemma exists_fourierPoly_sinDouble (p : Polynomial ℝ) (n : ℕ) (hn : 0 < n) (hp : p.natDegree ≤ n) : ∃ q : C(AddCircle Real.pi, ℂ), (∀ t : ℝ, q (t : AddCircle Real.pi) = (p.eval (sin (2 * t)) : ℝ)) ∧ cuspFunctionalCLM n hn q = 0 := by open Causalean.Mathlib.Analysis.BernsteinSzegoTrig in obtain ⟨a, b, hab⟩ := cosComp_isTrigPolyLE p n hp let A : ℕ → ℝ := fun k => a k * cos ((k : ℝ) * (Real.pi / 2)) + b k * sin ((k : ℝ) * (Real.pi / 2)) let B : ℕ → ℝ := fun k => a k * sin ((k : ℝ) * (Real.pi / 2)) - b k * cos ((k : ℝ) * (Real.pi / 2)) let q : C(AddCircle Real.pi, ℂ) := ∑ k ∈ range (n + 1), ((((A k : ℂ) - B k * I) / 2) • fourier (k : ℤ) + (((A k : ℂ) + B k * I) / 2) • fourier (-(k : ℤ))) refine ⟨q, ?_, ?_⟩ · intro t rw [show sin (2 * t) = cos (Real.pi / 2 - 2 * t) by rw [Real.cos_pi_div_two_sub]] rw [show p.eval (cos (Real.pi / 2 - 2 * t)) = ∑ k ∈ range (n + 1), (a k * cos ((k : ℝ) * (Real.pi / 2 - 2 * t)) + b k * sin ((k : ℝ) * (Real.pi / 2 - 2 * t))) from hab (Real.pi / 2 - 2 * t)] simp only [q, ContinuousMap.sum_apply, ContinuousMap.add_apply, ContinuousMap.smul_apply, smul_eq_mul] push_cast apply Finset.sum_congr rfl intro k hk rw [fourier_pair_eq] push_cast dsimp [A, B] push_cast rw [show (k : ℂ) * ((Real.pi : ℂ) / 2 - 2 * (t : ℂ)) = (k : ℂ) * ((Real.pi : ℂ) / 2) - 2 * (k : ℂ) * (t : ℂ) by ring, Complex.cos_sub, Complex.sin_sub] ring · simp only [q, map_sum, map_add, map_smul] apply Finset.sum_eq_zero intro k hk have hkn : k ≤ n := by have := Finset.mem_range.mp hk omega rw [cuspFunctional_fourier_nat n k hn hkn, cuspFunctional_fourier_neg_nat n k hn hkn] simp
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.exists_fourierPoly_sinDouble · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:522 · uses cuspFunctionalCLM
def circleDouble reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate

The circle-doubling map is the continuous map from the additive circle of period π to itself that sends each point to twice that point.

Definition (Lean source)
circleDouble :
⟨fun t => 2 • t, continuous_nsmul 2⟩
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.circleDouble · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:575
20 supporting declarations (lemmas, instances)
  • instFactLtRealOfNatPi_causalean instance
    instFactLtRealOfNatPi_causalean :
    Fact (0 < pi)
    Proof (Lean source)
    local instance : Fact (0 < pi) := ⟨Real.pi_pos⟩
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.instFactLtRealOfNatPi_causalean · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:27
  • continuous_fejerKernel lemma — For a Fejér order, the normalized Fejér kernel is continuous.
    n :
    Proof (Lean source)
    lemma continuous_fejerKernel (n : ℕ) : Continuous (fejerKernel n) := by unfold fejerKernel oneSidedFourierSum fun_prop
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.continuous_fejerKernel · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:37
  • integral_fourier lemma — For a Fourier frequency, its Haar integral is one at frequency zero and zero otherwise.
    k :
    (∫ x : AddCircle pi, fourier k x ∂AddCircle.haarAddCircle) = if k = 0 then 1 else 0
    Proof (Lean source)
    lemma integral_fourier (k : ℤ) : (∫ x : AddCircle pi, fourier k x ∂AddCircle.haarAddCircle) = if k = 0 then 1 else 0 := by have h := congrFun (fourierCoeff_fourier (T := pi) k) 0 rw [fourierCoeff] at h simp only [neg_zero, fourier_zero, one_smul] at h by_cases hk : k = 0 · subst k simpa using h · simpa [hk, Ne.symm hk] using h
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.integral_fourier · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:48
  • fejer_integrand_expand lemma — For a Fejér order, Fourier frequency, and circle point, the kernel-weighted character has the stated finite Fourier expansion.
    n k :
    (fejerKernel n t : ℂ) * fourier (k : ℤ) t
    = (n : ℂ)⁻¹ * ∑ r ∈ range n, ∑ s ∈ range n, fourier ((r : ℤ) - (s : ℤ) + (k : ℤ)) t
    Proof (Lean source)
    lemma fejer_integrand_expand (n k : ℕ) (t : AddCircle pi) : (fejerKernel n t : ℂ) * fourier (k : ℤ) t = (n : ℂ)⁻¹ * ∑ r ∈ range n, ∑ s ∈ range n, fourier ((r : ℤ) - (s : ℤ) + (k : ℤ)) t := by rw [fejerKernel, Complex.sq_norm] simp only [Complex.ofReal_div, Complex.ofReal_natCast] rw [← Complex.mul_conj] simp only [oneSidedFourierSum, ContinuousMap.sum_apply, map_sum] simp_rw [← fourier_neg] simp_rw [div_eq_mul_inv, Finset.sum_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro r hr rw [Finset.sum_mul, Finset.sum_mul] apply Finset.sum_congr rfl intro s hs rw [← fourier_add] rw [show fourier ((r : ℤ) + -(s : ℤ)) t * (n : ℂ)⁻¹ * fourier (k : ℤ) t = (n : ℂ)⁻¹ * (fourier ((r : ℤ) + -(s : ℤ)) t * fourier (k : ℤ) t) by ring] rw [← fourier_add] congr 2
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejer_integrand_expand · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:63
  • fejerMean_fourier_nat lemma — For a positive Fejér order and a nonnegative frequency, the Fejér mean has the stated triangular multiplier.
    n k :
    hn :
    0 < n
    fejerMean n (fourier (k : ℤ)) = if k < n then ((n - k : ℕ) : ℝ) / n else 0
    Proof (Lean source)
    lemma fejerMean_fourier_nat (n k : ℕ) (hn : 0 < n) : fejerMean n (fourier (k : ℤ)) = if k < n then ((n - k : ℕ) : ℝ) / n else 0 := by rw [fejerMean] simp_rw [fejer_integrand_expand] have hfourier (j : ℤ) : Integrable (fourier j : AddCircle pi → ℂ) haarAddCircle := (fourier j).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) have hinner (r : ℕ) : Integrable (fun t : AddCircle pi => ∑ s ∈ range n, fourier ((r : ℤ) - (s : ℤ) + (k : ℤ)) t) haarAddCircle := (show Continuous (fun t : AddCircle pi => ∑ s ∈ range n, fourier ((r : ℤ) - (s : ℤ) + (k : ℤ)) t) by fun_prop).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) rw [integral_const_mul] rw [integral_finset_sum (range n) (fun r hr => hinner r)] simp_rw [integral_finset_sum (range n) (fun s hs => hfourier ((_ : ℤ) - (s : ℤ) + (k : ℤ)))] simp_rw [integral_fourier] have hinner_sum (r : ℕ) : (∑ s ∈ range n, if (r : ℤ) - (s : ℤ) + (k : ℤ) = 0 then (1 : ℂ) else 0) = if r + k < n then 1 else 0 := by by_cases h : r + k < n · rw [if_pos h, Finset.sum_eq_single (r + k)] · simp · intro b hb hne simp only [ite_eq_right_iff] intro heq have : b = r + k := by omega exact (hne this).elim · simp [h] · rw [if_neg h] apply Finset.sum_eq_zero intro b hb simp only [ite_eq_right_iff] intro heq have : b = r + k := by omega subst b exact (h (Finset.mem_range.mp hb)).elim simp_rw [hinner_sum] by_cases hk : k < n · rw [if_pos hk] have hset : filter (fun r => r + k < n) (range n) = range (n - k) := by ext r simp omega rw [← Finset.sum_filter, hset] simp field_simp · rw [if_neg hk] have hzero : (∑ r ∈ range n, if r + k < n then (1 : ℂ) else 0) = 0 := by apply Finset.sum_eq_zero intro r hr rw [if_neg] omega rw [hzero] simp
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMean_fourier_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:88
  • fejerMean_fourier_neg_nat lemma — For a positive Fejér order and a negative frequency magnitude, the Fejér mean has the same triangular multiplier.
    n k :
    hn :
    0 < n
    fejerMean n (fourier (-(k : ℤ))) = if k < n then ((n - k : ℕ) : ℝ) / n else 0
    Proof (Lean source)
    lemma fejerMean_fourier_neg_nat (n k : ℕ) (hn : 0 < n) : fejerMean n (fourier (-(k : ℤ))) = if k < n then ((n - k : ℕ) : ℝ) / n else 0 := by rw [fejerMean] simp_rw [fourier_neg] calc (∫ t, (fejerKernel n t : ℂ) * (starRingEnd ℂ) (fourier (k : ℤ) t) ∂AddCircle.haarAddCircle) = (starRingEnd ℂ) (∫ t, (fejerKernel n t : ℂ) * fourier (k : ℤ) t ∂AddCircle.haarAddCircle) := by rw [← integral_conj] congr 1 funext t simp _ = _ := by rw [← fejerMean, fejerMean_fourier_nat n k hn] split <;> simp
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMean_fourier_neg_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:154
  • integral_fejerKernel lemma — For a positive Fejér order, the normalized kernel integrates to one.
    n :
    hn :
    0 < n
    (∫ t, fejerKernel n t ∂AddCircle.haarAddCircle) = 1
    Proof (Lean source)
    lemma integral_fejerKernel (n : ℕ) (hn : 0 < n) : (∫ t, fejerKernel n t ∂AddCircle.haarAddCircle) = 1 := by have hcomplex := fejerMean_fourier_nat n 0 hn simp only [if_pos hn, Nat.cast_sub (zero_le _), cast_zero, sub_zero] at hcomplex have hker : Integrable (fejerKernel n) haarAddCircle := (continuous_fejerKernel n).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) have hmap := Complex.ofRealCLM.integral_comp_comm hker rw [show (fun t : AddCircle pi => Complex.ofRealCLM (fejerKernel n t)) = (fun t => (fejerKernel n t : ℂ)) by rfl] at hmap rw [fejerMean] at hcomplex simp only [fourier_zero, mul_one] at hcomplex have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [div_self hnR] at hcomplex have : ((∫ t, fejerKernel n t ∂AddCircle.haarAddCircle : ℝ) : ℂ) = 1 := by calc ((∫ t, fejerKernel n t ∂AddCircle.haarAddCircle : ℝ) : ℂ) = ∫ t, (fejerKernel n t : ℂ) ∂AddCircle.haarAddCircle := hmap.symm _ = 1 := hcomplex exact_mod_cast this
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.integral_fejerKernel · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:176
  • fejerMean_norm_le lemma — For a positive Fejér order, a continuous input, and a uniform norm bound, the Fejér mean obeys that bound.
    n :
    hn :
    0 < n
    f :
    C(AddCircle pi, ℂ)
    E :
    hE :
    ∀ t, ‖f t‖ ≤ E
    ‖fejerMean n f‖ ≤ E
    Proof (Lean source)
    lemma fejerMean_norm_le (n : ℕ) (hn : 0 < n) (f : C(AddCircle pi, ℂ)) (E : ℝ) (hE : ∀ t, ‖f t‖ ≤ E) : ‖fejerMean n f‖ ≤ E := by have hnonneg (t : AddCircle pi) : 0 ≤ fejerKernel n t := by exact div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) have hleft : Integrable (fun t : AddCircle pi => fejerKernel n t * ‖f t‖) haarAddCircle := (show Continuous (fun t : AddCircle pi => fejerKernel n t * ‖f t‖) by exact (continuous_fejerKernel n).mul (f.continuous.norm)).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) have hright : Integrable (fun t : AddCircle pi => fejerKernel n t * E) haarAddCircle := (show Continuous (fun t : AddCircle pi => fejerKernel n t * E) by exact (continuous_fejerKernel n).mul continuous_const).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) calc ‖fejerMean n f‖ ≤ ∫ t, ‖(fejerKernel n t : ℂ) * f t‖ ∂AddCircle.haarAddCircle := by exact norm_integral_le_integral_norm _ _ = ∫ t, fejerKernel n t * ‖f t‖ ∂AddCircle.haarAddCircle := by apply integral_congr_ae filter_upwards [] with t rw [norm_mul, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (hnonneg t)] _ ≤ ∫ t, fejerKernel n t * E ∂AddCircle.haarAddCircle := by apply integral_mono hleft hright intro t exact mul_le_mul_of_nonneg_left (hE t) (hnonneg t) _ = E := by rw [integral_mul_const, integral_fejerKernel n hn, one_mul]
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMean_norm_le · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:200
  • fejerMeanCLM_apply lemma — For a positive Fejér order and a continuous input, the packaged linear map equals the integral definition.
    n :
    hn :
    0 < n
    f :
    C(AddCircle pi, ℂ)
    fejerMeanCLM n hn f = fejerMean n f
    Proof (Lean source)
    @[simp] lemma fejerMeanCLM_apply (n : ℕ) (hn : 0 < n) (f : C(AddCircle pi, ℂ)) : fejerMeanCLM n hn f = fejerMean n f := rfl
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fejerMeanCLM_apply · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:268
  • valleePoussinMean_fourier_nat lemma — For a positive order and a frequency at most that order, the de la Vallée--Poussin mean preserves the nonnegative Fourier character.
    n k :
    hn :
    0 < n
    hk :
    k ≤ n
    valleePoussinMeanCLM n hn (fourier (k : ℤ)) = 1
    Proof (Lean source)
    lemma valleePoussinMean_fourier_nat (n k : ℕ) (hn : 0 < n) (hk : k ≤ n) : valleePoussinMeanCLM n hn (fourier (k : ℤ)) = 1 := by rw [valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply] rw [fejerMean_fourier_nat (2 * n) k (by omega), fejerMean_fourier_nat n k hn] by_cases hlt : k < n · rw [if_pos hlt, if_pos (by omega)] push_cast have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [Nat.cast_sub (by omega : k ≤ 2 * n), Nat.cast_sub (by omega : k ≤ n)] push_cast field_simp ring exact mul_inv_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hn) : (n : ℂ) ≠ 0) · have hkn : k = n := by omega subst k rw [if_neg (Nat.lt_irrefl _), if_pos (by omega)] push_cast have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [Nat.cast_sub (by omega : n ≤ 2 * n)] push_cast field_simp ring exact mul_inv_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hn) : (n : ℂ) ≠ 0)
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.valleePoussinMean_fourier_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:280
  • valleePoussinMean_fourier_neg_nat lemma — For a positive order and a frequency magnitude at most that order, the de la Vallée--Poussin mean preserves the negative Fourier character.
    n k :
    hn :
    0 < n
    hk :
    k ≤ n
    valleePoussinMeanCLM n hn (fourier (-(k : ℤ))) = 1
    Proof (Lean source)
    lemma valleePoussinMean_fourier_neg_nat (n k : ℕ) (hn : 0 < n) (hk : k ≤ n) : valleePoussinMeanCLM n hn (fourier (-(k : ℤ))) = 1 := by rw [valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply] rw [fejerMean_fourier_neg_nat (2 * n) k (by omega), fejerMean_fourier_neg_nat n k hn] by_cases hlt : k < n · rw [if_pos hlt, if_pos (by omega)] push_cast have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [Nat.cast_sub (by omega : k ≤ 2 * n), Nat.cast_sub (by omega : k ≤ n)] push_cast field_simp ring exact mul_inv_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hn) : (n : ℂ) ≠ 0) · have hkn : k = n := by omega subst k rw [if_neg (Nat.lt_irrefl _), if_pos (by omega)] push_cast have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [Nat.cast_sub (by omega : n ≤ 2 * n)] push_cast field_simp ring exact mul_inv_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hn) : (n : ℂ) ≠ 0)
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.valleePoussinMean_fourier_neg_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:310
  • cuspFunctional_fourier_nat lemma — For a positive order and a nonnegative frequency at most that order, the cusp functional annihilates the Fourier character.
    n k :
    hn :
    0 < n
    hk :
    k ≤ n
    cuspFunctionalCLM n hn (fourier (k : ℤ)) = 0
    Proof (Lean source)
    lemma cuspFunctional_fourier_nat (n k : ℕ) (hn : 0 < n) (hk : k ≤ n) : cuspFunctionalCLM n hn (fourier (k : ℤ)) = 0 := by simp [cuspFunctionalCLM, valleePoussinMean_fourier_nat n k hn hk, fourier_eval_zero]
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:347
  • cuspFunctional_fourier_neg_nat lemma — For a positive order and a negative frequency magnitude at most that order, the cusp functional annihilates the Fourier character.
    n k :
    hn :
    0 < n
    hk :
    k ≤ n
    cuspFunctionalCLM n hn (fourier (-(k : ℤ))) = 0
    Proof (Lean source)
    lemma cuspFunctional_fourier_neg_nat (n k : ℕ) (hn : 0 < n) (hk : k ≤ n) : cuspFunctionalCLM n hn (fourier (-(k : ℤ))) = 0 := by simp [cuspFunctionalCLM, valleePoussinMean_fourier_neg_nat n k hn hk, fourier_eval_zero]
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_neg_nat · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:354
  • cuspFunctional_fourier_nat_nonneg lemma — For a positive order and a nonnegative frequency, the real part of the cusp multiplier is nonnegative.
    n k :
    hn :
    0 < n
    0 ≤ (cuspFunctionalCLM n hn (fourier (k : ℤ))).re
    Proof (Lean source)
    lemma cuspFunctional_fourier_nat_nonneg (n k : ℕ) (hn : 0 < n) : 0 ≤ (cuspFunctionalCLM n hn (fourier (k : ℤ))).re := by rw [cuspFunctionalCLM, valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousMap.evalCLM_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply, fourier_eval_zero] rw [fejerMean_fourier_nat (2 * n) k (by omega), fejerMean_fourier_nat n k hn] by_cases hk2 : k < 2 * n · rw [if_pos hk2] by_cases hk : k < n · rw [if_pos hk] simp only [Complex.sub_re, Complex.one_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, mul_zero, zero_mul, sub_zero] norm_num push_cast rw [Nat.cast_sub (by omega : k ≤ 2 * n), Nat.cast_sub (by omega : k ≤ n)] push_cast have hnR : (0 : ℝ) < n := by exact_mod_cast hn field_simp nlinarith · rw [if_neg hk] simp only [Complex.sub_re, Complex.one_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, mul_zero, zero_mul, sub_zero] norm_num push_cast rw [Nat.cast_sub (by omega : k ≤ 2 * n)] push_cast have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hkR : (n : ℝ) ≤ k := by exact_mod_cast Nat.le_of_not_gt hk field_simp nlinarith · rw [if_neg hk2, if_neg (by omega : ¬ k < n)] norm_num
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_nat_nonneg · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:363
  • cuspFunctional_fourier_neg_nat_nonneg lemma — For a positive order and a negative frequency magnitude, the real part of the cusp multiplier is nonnegative.
    n k :
    hn :
    0 < n
    0 ≤ (cuspFunctionalCLM n hn (fourier (-(k : ℤ)))).re
    Proof (Lean source)
    lemma cuspFunctional_fourier_neg_nat_nonneg (n k : ℕ) (hn : 0 < n) : 0 ≤ (cuspFunctionalCLM n hn (fourier (-(k : ℤ)))).re := by rw [cuspFunctionalCLM, valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousMap.evalCLM_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply, fourier_eval_zero] rw [fejerMean_fourier_neg_nat (2 * n) k (by omega), fejerMean_fourier_neg_nat n k hn] by_cases hk2 : k < 2 * n · rw [if_pos hk2] by_cases hk : k < n · rw [if_pos hk] simp only [Complex.sub_re, Complex.one_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, mul_zero, zero_mul, sub_zero] norm_num push_cast rw [Nat.cast_sub (by omega : k ≤ 2 * n), Nat.cast_sub (by omega : k ≤ n)] push_cast have hnR : (0 : ℝ) < n := by exact_mod_cast hn field_simp nlinarith · rw [if_neg hk] simp only [Complex.sub_re, Complex.one_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, mul_zero, zero_mul, sub_zero] norm_num push_cast rw [Nat.cast_sub (by omega : k ≤ 2 * n)] push_cast have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hkR : (n : ℝ) ≤ k := by exact_mod_cast Nat.le_of_not_gt hk field_simp nlinarith · rw [if_neg hk2, if_neg (by omega : ¬ k < n)] norm_num
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_neg_nat_nonneg · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:400
  • cuspFunctional_fourier_nat_high lemma — For a positive order and a nonnegative frequency at least twice that order, the cusp functional has multiplier one.
    n k :
    hn :
    0 < n
    hk :
    2 * n ≤ k
    cuspFunctionalCLM n hn (fourier (k : ℤ)) = 1
    Proof (Lean source)
    lemma cuspFunctional_fourier_nat_high (n k : ℕ) (hn : 0 < n) (hk : 2 * n ≤ k) : cuspFunctionalCLM n hn (fourier (k : ℤ)) = 1 := by rw [cuspFunctionalCLM, valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousMap.evalCLM_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply, fourier_eval_zero] rw [fejerMean_fourier_nat (2 * n) k (by omega), fejerMean_fourier_nat n k hn, if_neg (by omega : ¬ k < 2 * n), if_neg (by omega : ¬ k < n)] norm_num
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_nat_high · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:437
  • cuspFunctional_fourier_neg_nat_high lemma — For a positive order and a negative frequency magnitude at least twice that order, the cusp functional has multiplier one.
    n k :
    hn :
    0 < n
    hk :
    2 * n ≤ k
    cuspFunctionalCLM n hn (fourier (-(k : ℤ))) = 1
    Proof (Lean source)
    lemma cuspFunctional_fourier_neg_nat_high (n k : ℕ) (hn : 0 < n) (hk : 2 * n ≤ k) : cuspFunctionalCLM n hn (fourier (-(k : ℤ))) = 1 := by rw [cuspFunctionalCLM, valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousMap.evalCLM_apply, ContinuousLinearMap.smul_apply, smul_eq_mul, fejerMeanCLM_apply, fourier_eval_zero] rw [fejerMean_fourier_neg_nat (2 * n) k (by omega), fejerMean_fourier_neg_nat n k hn, if_neg (by omega : ¬ k < 2 * n), if_neg (by omega : ¬ k < n)] norm_num
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_fourier_neg_nat_high · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:450
  • cuspFunctional_norm_apply_le lemma — For a positive order and a continuous input, the cusp functional is bounded by four times the uniform norm.
    n :
    hn :
    0 < n
    f :
    C(AddCircle pi, ℂ)
    ‖cuspFunctionalCLM n hn f‖ ≤ 4 * ‖f‖
    Proof (Lean source)
    lemma cuspFunctional_norm_apply_le (n : ℕ) (hn : 0 < n) (f : C(AddCircle pi, ℂ)) : ‖cuspFunctionalCLM n hn f‖ ≤ 4 * ‖f‖ := by rw [cuspFunctionalCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousMap.evalCLM_apply] calc ‖f 0 - valleePoussinMeanCLM n hn f‖ ≤ ‖f 0‖ + ‖valleePoussinMeanCLM n hn f‖ := norm_sub_le _ _ _ ≤ ‖f‖ + (2 * ‖f‖ + ‖f‖) := by gcongr · exact ContinuousMap.norm_coe_le_norm f 0 · rw [valleePoussinMeanCLM] simp only [ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, smul_eq_mul] calc ‖2 * fejerMeanCLM (2 * n) (by omega) f - fejerMeanCLM n hn f‖ ≤ ‖2 * fejerMeanCLM (2 * n) (by omega) f‖ + ‖fejerMeanCLM n hn f‖ := norm_sub_le _ _ _ ≤ 2 * ‖f‖ + ‖f‖ := by rw [norm_mul] norm_num gcongr · simpa [fejerMeanCLM] using fejerMean_norm_le (2 * n) (by omega) f ‖f‖ (fun t => ContinuousMap.norm_coe_le_norm f t) · simpa [fejerMeanCLM] using fejerMean_norm_le n hn f ‖f‖ (fun t => ContinuousMap.norm_coe_le_norm f t) _ = 4 * ‖f‖ := by ring
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.cuspFunctional_norm_apply_le · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:463
  • fourier_pair_eq lemma — For two real coefficients, a frequency, and a circle coordinate, the conjugate Fourier pair equals the corresponding real sine--cosine mode.
    A B :
    k :
    t :
    (((A : ℂ) - B * I) / 2) * fourier (k : ℤ) (t : AddCircle pi)
    + (((A : ℂ) + B * I) / 2) * fourier (-(k : ℤ)) (t : AddCircle pi)
    = ((A * cos (2 * k * t) + B * sin (2 * k * t) : ℝ) : ℂ)
    Proof (Lean source)
    lemma fourier_pair_eq (A B : ℝ) (k : ℕ) (t : ℝ) : (((A : ℂ) - B * I) / 2) * fourier (k : ℤ) (t : AddCircle Real.pi) + (((A : ℂ) + B * I) / 2) * fourier (-(k : ℤ)) (t : AddCircle Real.pi) = ((A * cos (2 * k * t) + B * sin (2 * k * t) : ℝ) : ℂ) := by rw [fourier_coe_apply, fourier_coe_apply] have hpi : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero rw [show 2 * (Real.pi : ℂ) * I * (((k : ℕ) : ℤ) : ℂ) * (t : ℂ) / Real.pi = ((2 * (k : ℝ) * t : ℝ) : ℂ) * I by field_simp push_cast ring] simp only [Int.cast_neg] rw [show 2 * (Real.pi : ℂ) * I * (-(((k : ℕ) : ℤ) : ℂ)) * (t : ℂ) / Real.pi = (-((2 * (k : ℝ) * t : ℝ) : ℂ)) * I by field_simp push_cast ring] rw [Complex.exp_mul_I, Complex.exp_mul_I] simp only [Complex.cos_neg, Complex.sin_neg] push_cast ring_nf rw [Complex.I_sq] ring
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fourier_pair_eq · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:494
  • fourier_comp_circleDouble lemma — For a Fourier frequency, composition with circle doubling doubles that frequency.
    j :
    (fourier j).comp circleDouble = fourier (2 * j)
    Proof (Lean source)
    lemma fourier_comp_circleDouble (j : ℤ) : (fourier j).comp circleDouble = fourier (2 * j) := by ext t simp only [ContinuousMap.comp_apply, circleDouble, fourier_apply] congr 2 change j • (2 • t) = (2 * j) • t change j • ((2 : ℤ) • t) = _ rw [← mul_zsmul, mul_comm]
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.FejerCertificate.fourier_comp_circleDouble · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Fejer.lean:579
Rate 1 core · 2 supporting This module proves explicit, non-sharp universal upper and lower bounds for the best degree-K uniform approximation error of x ↦ |x| on [-1,1]. ★ bestUniformApproxErrorAbs_order

Universal 1 / K bounds for approximation of absolute value

This module proves explicit, non-sharp universal upper and lower bounds for the best degree-K uniform approximation error of x ↦ |x| on [-1,1]. The upper bound comes from a truncated Chebyshev expansion, while the lower bound uses a bounded de la Vallée--Poussin Fourier certificate at the cusp. No sharp Bernstein constant is needed.

theorem bestUniformApproxErrorAbs_order reviewed
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality

There are universal positive constants that sandwich the best absolute-value approximation error between constant multiples of the reciprocal degree for every positive degree.

Formal statement
∃ c C : ℝ,
0 < c
c ≤ C
conclusion 1
K :
0 < K
c / (K : ℝ) ≤ bestUniformApproxErrorAbs K
bestUniformApproxErrorAbs K ≤ C / (K : ℝ)
Proof (Lean source)
theorem bestUniformApproxErrorAbs_order : ∃ c C : ℝ, 0 < c ∧ c ≤ C ∧ ∀ K : ℕ, 0 < K → c / (K : ℝ) ≤ bestUniformApproxErrorAbs K ∧ bestUniformApproxErrorAbs K ≤ C / (K : ℝ) := by refine ⟨1 / 100, 1, by norm_num, by norm_num, ?_⟩ intro K hK exact ⟨bestUniformApproxErrorAbs_lower K hK, bestUniformApproxErrorAbs_upper K hK⟩
Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.bestUniformApproxErrorAbs_order · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Rate.lean:685 · uses bestUniformApproxErrorAbs
2 supporting declarations (lemmas, instances)
  • bestUniformApproxErrorAbs_upper theorem — For a positive polynomial degree, the best absolute-value approximation error is at most one divided by that degree.
    K :
    hK :
    0 < K
    bestUniformApproxErrorAbs K ≤ 1 / (K : ℝ)
    Proof (Lean source)
    theorem bestUniformApproxErrorAbs_upper (K : ℕ) (hK : 0 < K) : bestUniformApproxErrorAbs K ≤ 1 / (K : ℝ) := by let m := K / 2 have hmdeg : 2 * m ≤ K := by dsimp [m] omega calc bestUniformApproxErrorAbs K ≤ uniformApproxErrorAbs (absChebPoly m) := bestUniformApproxErrorAbs_le_explicit (absChebPoly_natDegree_le m |>.trans hmdeg) _ ≤ 2 / (pi * (2 * (m : ℝ) + 1)) := by apply uniformApproxErrorAbs_le_iff.mpr intro x hx exact absChebPoly_error_le m hx _ ≤ 1 / (K : ℝ) := by have hKreal : (0 : ℝ) < K := by exact_mod_cast hK have hmreal : (0 : ℝ) < 2 * (m : ℝ) + 1 := by positivity have hnat : K ≤ 2 * m + 1 := by dsimp [m] omega have hnatreal : (K : ℝ) ≤ 2 * (m : ℝ) + 1 := by exact_mod_cast hnat have hprod : 2 * (K : ℝ) ≤ pi * (2 * (m : ℝ) + 1) := calc 2 * (K : ℝ) ≤ 2 * (2 * (m : ℝ) + 1) := mul_le_mul_of_nonneg_left hnatreal (by norm_num) _ ≤ pi * (2 * (m : ℝ) + 1) := mul_le_mul_of_nonneg_right Real.two_le_pi hmreal.le exact (div_le_div_iff₀ (mul_pos Real.pi_pos hmreal) hKreal).mpr (by simpa using hprod)
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.bestUniformApproxErrorAbs_upper · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Rate.lean:402
  • bestUniformApproxErrorAbs_lower theorem — For a positive polynomial degree, the cusp of absolute value forces the stated inverse-degree lower bound.
    K :
    hK :
    0 < K
    (1 / 100 : ℝ) / (K : ℝ) ≤ bestUniformApproxErrorAbs K
    Proof (Lean source)
    theorem bestUniformApproxErrorAbs_lower (K : ℕ) (hK : 0 < K) : (1 / 100 : ℝ) / (K : ℝ) ≤ bestUniformApproxErrorAbs K := by -- Symmetrizing a best approximant and using only a Markov derivative bound -- gives `K⁻²`, so a genuine inverse estimate is needed. A concrete route -- is the de la Vallée--Poussin certificate on `AddCircle pi`. For the -- normalized Fejér kernel `F_n(t) = n⁻¹ * ‖∑_{r < n} fourier r t‖²`, the -- kernel `V_n = 2 * F_(2*n) - F_n` has `L¹` norm at most `3` and Fourier -- multiplier exactly `1` on `|j| ≤ n`. Evaluation at the cusp minus -- convolution with `V_n` therefore has norm at most `4` and annihilates -- every even polynomial mode of degree at most `2*n`. The formula -- `fourierCoeff_sinCircle` makes its value on `|sin|` a positive tail; -- retaining only `2*n ≤ j < 4*n` gives a constant-over-`n` lower bound. -- Reduce odd `K` with `bestUniformApproxErrorAbs_two_mul_add_one`. -- Do not replace this with a coefficient-at-one-frequency estimate or with -- two shifted uniform grids: both give only `K⁻²` for `|cos|`. obtain ⟨p, hpdeg, hpbest⟩ := exists_bestPolynomialAbs K obtain ⟨q, hqeval, hqann⟩ := exists_fourierPoly_sinDouble p K hK hpdeg let residual : C(AddCircle pi, ℂ) := doubleSinCircle - q have hresidual_norm : ‖residual‖ ≤ uniformApproxErrorAbs p := by apply (ContinuousMap.norm_le_of_nonempty _).mpr intro z obtain ⟨t, ht, heq⟩ := AddCircle.eq_coe_Ioc z rw [← heq] change ‖doubleSinCircle (t : AddCircle pi) - q (t : AddCircle pi)‖ ≤ _ rw [doubleSinCircle_apply, hqeval] simp only [← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs] exact ((uniformApproxErrorAbs_le_iff (p := p) (e := uniformApproxErrorAbs p)).mp (le_refl _)) (sin (2 * t)) ⟨Real.neg_one_le_sin _, Real.sin_le_one _⟩ have hfunctional_residual : cuspFunctionalCLM K hK residual = cuspFunctionalCLM K hK doubleSinCircle := by simp only [residual, map_sub, hqann, sub_zero] have hcertificate : 1 / (16 * (K : ℝ)) ≤ ‖cuspFunctionalCLM K hK residual‖ := by calc 1 / (16 * (K : ℝ)) ≤ -(cuspFunctionalCLM K hK doubleSinCircle).re := cuspFunctional_doubleSinCircle_lower K hK _ ≤ |-(cuspFunctionalCLM K hK doubleSinCircle).re| := le_abs_self _ _ = |(cuspFunctionalCLM K hK doubleSinCircle).re| := abs_neg _ _ ≤ ‖cuspFunctionalCLM K hK doubleSinCircle‖ := Complex.abs_re_le_norm _ _ = ‖cuspFunctionalCLM K hK residual‖ := by rw [hfunctional_residual] have herror : 1 / (16 * (K : ℝ)) ≤ 4 * uniformApproxErrorAbs p := hcertificate.trans ((cuspFunctional_norm_apply_le K hK residual).trans (mul_le_mul_of_nonneg_left hresidual_norm (by norm_num))) have hKR : (0 : ℝ) < K := by exact_mod_cast hK have h64 : 1 / (64 * (K : ℝ)) ≤ uniformApproxErrorAbs p := by have hid : 1 / (64 * (K : ℝ)) = (1 / (16 * (K : ℝ))) / 4 := by field_simp ring rw [hid] linarith rw [← hpbest] exact (by rw [div_div] apply (div_le_div_iff₀ (by positivity : 0 < (100 : ℝ) * K) (by positivity : 0 < (64 : ℝ) * K)).2 nlinarith : (1 / 100 : ℝ) / K ≤ 1 / (64 * K)).trans h64
    Causalean.Mathlib.Analysis.AbsoluteValueMomentPriorDuality.bestUniformApproxErrorAbs_lower · Causalean/Mathlib/Analysis/AbsoluteValueMomentPriorDuality/Rate.lean:624