Mathlib.Analysis.Duality.MomentPrior
The best uniform error E_K of approximating x ↦ |x| on [−1, 1] by polynomials of degree at most K is of exact order 1/K: (1/100)/K ≤ E_K ≤ 1/K for every K ≥ 1.
Basic 4 core · 9 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.
The symmetric unit interval is the closed set of real numbers from through , inclusive.
For a real polynomial, its uniform absolute-value approximation error is the supremum, over every real number in the closed interval from through , of the absolute difference between the polynomial's value and that number's absolute value.
Definition (Lean source)
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)
For a polynomial degree limit, some admissible polynomial attains the best absolute-value approximation error.
Formal statement
Proof (Lean source)
9 supporting declarations (lemmas, instances)
-
uniformApproxErrorAbs_eq_sSuptheorem — For a real polynomial, its uniform absolute-value approximation error is the supremum of its pointwise residual on the unit interval.hypothesesp :conclusionProof (Lean source)
theorem uniformApproxErrorAbs_eq_sSup (p : Polynomial ℝ) : uniformApproxErrorAbs p = sSup ((fun x : ℝ => abs (abs x - p.eval x)) '' Icc (-1) 1) := by rfl -
uniformApproxErrorAbs_le_ifftheorem — For a real polynomial and a proposed error bound, the bound holds exactly when it bounds every residual on the unit interval.hypothesesp :e :ℝconclusionProof (Lean source)
theorem uniformApproxErrorAbs_le_iff {p : Polynomial ℝ} {e : ℝ} : uniformApproxErrorAbs p ≤ e ↔ ∀ x ∈ Icc (-1 : ℝ) 1, abs (abs x - p.eval x) ≤ e := by let f : ℝ → ℝ := fun x => abs (abs x - p.eval x) have hf : Continuous f := by fun_prop have hI : IsCompact (Icc (-1 : ℝ) 1) := isCompact_Icc have hIne : (Icc (-1 : ℝ) 1).Nonempty := ⟨0, by norm_num⟩ obtain ⟨x, hx, hmax, hge⟩ := hI.exists_sSup_image_eq_and_ge hIne hf.continuousOn constructor · intro h y hy exact (hge y hy).trans (hmax ▸ h) · intro h exact csSup_le (hIne.image f) (by rintro _ ⟨x, hx, rfl⟩ exact h x hx) -
bestUniformApproxErrorAbs_eq_sInftheorem — For a polynomial degree limit, the best absolute-value approximation error is the infimum over all admissible polynomial errors.hypothesesK :ℕconclusionProof (Lean source)
theorem bestUniformApproxErrorAbs_eq_sInf (K : ℕ) : bestUniformApproxErrorAbs K = sInf {e : ℝ | ∃ p : Polynomial ℝ, p.natDegree ≤ K ∧ e = uniformApproxErrorAbs p} := by rfl -
bestUniformApproxErrorAbs_nonnegtheorem — For a polynomial degree limit, the best approximation error cannot be negative.Proof (Lean source)
theorem bestUniformApproxErrorAbs_nonneg (K : ℕ) : 0 ≤ bestUniformApproxErrorAbs K := by rw [bestUniformApproxErrorAbs_eq_sInf] apply le_csInf · exact ⟨uniformApproxErrorAbs 0, 0, by simp⟩ · rintro e ⟨p, -, rfl⟩ have h := (uniformApproxErrorAbs_le_iff (p := p) (e := uniformApproxErrorAbs p)).mp (le_refl _) 0 (by norm_num) exact (abs_nonneg _).trans h -
bestUniformApproxErrorAbs_antitonetheorem — For two degree limits with the first no larger than the second, allowing the larger degree cannot increase the best error.Proof (Lean source)
theorem bestUniformApproxErrorAbs_antitone {K L : ℕ} (hKL : K ≤ L) : bestUniformApproxErrorAbs L ≤ bestUniformApproxErrorAbs K := by rw [bestUniformApproxErrorAbs_eq_sInf, bestUniformApproxErrorAbs_eq_sInf] apply csInf_le_csInf · refine ⟨0, ?_⟩ rintro e ⟨p, -, rfl⟩ have h := (uniformApproxErrorAbs_le_iff (p := p) (e := uniformApproxErrorAbs p)).mp (le_refl _) 0 (by norm_num) exact (abs_nonneg _).trans h · exact ⟨uniformApproxErrorAbs 0, 0, by simp⟩ · rintro e ⟨p, hp, rfl⟩ exact ⟨p, hp.trans hKL, rfl⟩ -
instCompactSpaceElemRealSymmUnitIntervalinstance — The symmetric closed unit interval is a compact space.instancegiven byisCompact_iff_compactSpace.mp isCompact_Icc -
instNonemptyElemRealSymmUnitIntervalinstance — The symmetric closed unit interval is nonempty.instancegiven by⟨⟨0, by norm_num [symmUnitInterval]⟩⟩ -
exists_bestPolynomialAbs_intervaltheorem — For a polynomial degree limit, some admissible polynomial bounds every absolute-value residual by the best error on the unit interval.Proof (Lean source)
theorem exists_bestPolynomialAbs_interval (K : ℕ) : ∃ p : Polynomial ℝ, p.natDegree ≤ K ∧ (∀ x ∈ Icc (-1 : ℝ) 1, abs (abs x - p.eval x) ≤ bestUniformApproxErrorAbs K) := by obtain ⟨p, hp, herr⟩ := exists_bestPolynomialAbs K refine ⟨p, hp, ?_⟩ exact (uniformApproxErrorAbs_le_iff (p := p) (e := bestUniformApproxErrorAbs K)).mp herr.le -
bestUniformApproxErrorAbs_two_mul_add_onetheorem — For a nonnegative integer, allowing the odd degree 2m+1 gives the same best error as degree 2m.hypothesesm :ℕconclusionbestUniformApproxErrorAbs (2 * m + 1) = bestUniformApproxErrorAbs (2 * m)Proof (Lean source)
theorem bestUniformApproxErrorAbs_two_mul_add_one (m : ℕ) : bestUniformApproxErrorAbs (2 * m + 1) = bestUniformApproxErrorAbs (2 * m) := by apply le_antisymm · exact bestUniformApproxErrorAbs_antitone (by omega) · obtain ⟨p, hp, herr⟩ := exists_bestPolynomialAbs (2 * m + 1) calc bestUniformApproxErrorAbs (2 * m) ≤ uniformApproxErrorAbs (evenPart p) := bestUniformApproxErrorAbs_le_uniform (evenPart_natDegree_le hp) _ ≤ uniformApproxErrorAbs p := uniformApproxErrorAbs_evenPart_le p _ = bestUniformApproxErrorAbs (2 * m + 1) := herr
Duality 6 core · 12 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.
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)
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)
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)
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)
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)
For a degree, a symmetric moment-matched probability-prior pair with the exact absolute-moment gap exists.
Formal statement
Proof (Lean source)
12 supporting declarations (lemmas, instances)
-
exists_absExtremalDecompositiontheorem — For a polynomial degree limit, a normalized extremal signed-measure decomposition exists.Proof (Lean source)
theorem exists_absExtremalDecomposition (K : ℕ) : Nonempty (AbsExtremalDecomposition K) := by obtain ⟨L, hL, hLone, hLpows, hLabs⟩ := exists_dual_abs_certificate K obtain ⟨P, N, hPone, hNone, hPN⟩ := exists_positive_half_split L hL hLone let forgetC : CompactlySupportedContinuousMap symmUnitInterval ℝ →ₗ[ℝ] C(symmUnitInterval, ℝ) := { toFun := fun f => f.toContinuousMap map_add' := by intro f g; ext x; rfl map_smul' := by intro c f; ext x; rfl } let Pc : CompactlySupportedContinuousMap symmUnitInterval ℝ →ₚ[ℝ] ℝ := { toLinearMap := P.toLinearMap.comp forgetC monotone' := by intro f g hfg exact P.monotone' (fun x => hfg x) } let Nc : CompactlySupportedContinuousMap symmUnitInterval ℝ →ₚ[ℝ] ℝ := { toLinearMap := N.toLinearMap.comp forgetC monotone' := by intro f g hfg exact N.monotone' (fun x => hfg x) } let μP : Measure symmUnitInterval := RealRMK.rieszMeasure Pc let μN : Measure symmUnitInterval := RealRMK.rieszMeasure Nc haveI : IsFiniteMeasure μP := by dsimp [μP]; infer_instance haveI : IsFiniteMeasure μN := by dsimp [μN]; infer_instance have hμP (c : C(symmUnitInterval, ℝ)) : ∫ x, c x ∂μP = P c := by let cc := CompactlySupportedContinuousMap.continuousMapEquiv c have h := RealRMK.integral_rieszMeasure Pc cc calc (∫ x, c x ∂μP) = ∫ x, cc x ∂RealRMK.rieszMeasure Pc := by simp [μP, cc] _ = Pc cc := h _ = P c := rfl have hμN (c : C(symmUnitInterval, ℝ)) : ∫ x, c x ∂μN = N c := by let cc := CompactlySupportedContinuousMap.continuousMapEquiv c have h := RealRMK.integral_rieszMeasure Nc cc calc (∫ x, c x ∂μN) = ∫ x, cc x ∂RealRMK.rieszMeasure Nc := by simp [μN, cc] _ = Nc cc := h _ = N c := rfl have hmassP : μP univ = (1 / 2 : ENNReal) := by have h := hμP (1 : C(symmUnitInterval, ℝ)) change (∫ _ : symmUnitInterval, (1 : ℝ) ∂μP) = P 1 at h rw [integral_const] at h simp only [smul_eq_mul, mul_one, hPone] at h have htr : (μP univ).toReal = ((1 / 2 : ENNReal)).toReal := by simpa [measureReal_def] using h rcases (ENNReal.toReal_eq_toReal_iff _ _).mp htr with h | h | h · exact h · exact False.elim (by simpa using h.2) · exact False.elim ((measure_ne_top μP univ) h.1) have hmassN : μN univ = (1 / 2 : ENNReal) := by have h := hμN (1 : C(symmUnitInterval, ℝ)) change (∫ _ : symmUnitInterval, (1 : ℝ) ∂μN) = N 1 at h rw [integral_const] at h simp only [smul_eq_mul, mul_one, hNone] at h have htr : (μN univ).toReal = ((1 / 2 : ENNReal)).toReal := by simpa [measureReal_def] using h rcases (ENNReal.toReal_eq_toReal_iff _ _).mp htr with h | h | h · exact h · exact False.elim (by simpa using h.2) · exact False.elim ((measure_ne_top μN univ) h.1) let positive := symmPush μP let negative := symmPush μN refine ⟨{ positive := positive negative := negative finite_positive := by constructor dsimp only [positive] rw [symmPush_mass μP hmassP] norm_num finite_negative := by constructor dsimp only [negative] rw [symmPush_mass μN hmassN] norm_num positive_mass := by exact symmPush_mass μP hmassP negative_mass := by exact symmPush_mass μN hmassN positive_supported := by exact symmPush_supported μP negative_supported := by exact symmPush_supported μN positive_symmetric := by exact symmPush_symmetric μP negative_symmetric := by exact symmPush_symmetric μN moments_eq := ?_ abs_gap := ?_ }⟩ · intro j hj let rpow : C(symmUnitInterval, ℝ) := ⟨fun x => (-(x : ℝ)) ^ j, by fun_prop⟩ have hrpow : rpow = (-1 : ℝ) ^ j • dualPow j := by ext x change (-(x : ℝ)) ^ j = (-1 : ℝ) ^ j * (x : ℝ) ^ j rw [neg_pow] have hLrpow : L rpow = 0 := by rw [hrpow, map_smul, hLpows j hj, smul_zero] have h₁ := hPN (dualPow j) have h₂ := hPN rpow have hp₁ : (∫ x : symmUnitInterval, (x : ℝ) ^ j ∂μP) = P (dualPow j) := hμP (dualPow j) have hp₂ : (∫ x : symmUnitInterval, (-(x : ℝ)) ^ j ∂μP) = P rpow := hμP rpow have hn₁ : (∫ x : symmUnitInterval, (x : ℝ) ^ j ∂μN) = N (dualPow j) := hμN (dualPow j) have hn₂ : (∫ x : symmUnitInterval, (-(x : ℝ)) ^ j ∂μN) = N rpow := hμN rpow have hp := integral_symmPush μP (fun x : ℝ => x ^ j) (by fun_prop) have hn := integral_symmPush μN (fun x : ℝ => x ^ j) (by fun_prop) change ∫ x : ℝ, x ^ j ∂positive = ∫ x : ℝ, x ^ j ∂negative dsimp only [positive, negative] rw [hp, hn] rw [hp₁, hp₂, hn₁, hn₂] rw [hLpows j hj] at h₁ rw [hLrpow] at h₂ linarith · let rabs : C(symmUnitInterval, ℝ) := ⟨fun x => |-(x : ℝ)|, by fun_prop⟩ have hrabs : rabs = dualAbs := by ext x; simp [rabs, dualAbs] have h₁ := hPN dualAbs have h₂ := hPN rabs have hp₁ : (∫ x : symmUnitInterval, |(x : ℝ)| ∂μP) = P dualAbs := hμP dualAbs have hp₂ : (∫ x : symmUnitInterval, |-(x : ℝ)| ∂μP) = P rabs := hμP rabs have hn₁ : (∫ x : symmUnitInterval, |(x : ℝ)| ∂μN) = N dualAbs := hμN dualAbs have hn₂ : (∫ x : symmUnitInterval, |-(x : ℝ)| ∂μN) = N rabs := hμN rabs have hp := integral_symmPush μP (fun x : ℝ => |x|) (by fun_prop) have hn := integral_symmPush μN (fun x : ℝ => |x|) (by fun_prop) change (∫ x : ℝ, |x| ∂positive) - (∫ x : ℝ, |x| ∂negative) = bestUniformApproxErrorAbs K dsimp only [positive, negative] rw [hp, hn] rw [hp₁, hp₂, hn₁, hn₂] rw [hrabs] at h₂ rw [hLabs] at h₁ h₂ rw [hrabs] linarith -
exists_symmetric_momentMatched_absGap_for_degreetheorem — For any degree, a symmetric moment-matched probability-prior pair with the exact absolute-moment gap exists.Proof (Lean source)
theorem exists_symmetric_momentMatched_absGap_for_degree (K : ℕ) : Nonempty (AbsMomentMatchedPriors K) := by obtain ⟨D⟩ := exists_absExtremalDecomposition K exact ⟨D.toMomentMatchedPriors⟩ -
priorZero_isProbabilityMeasuretheorem — For a packaged prior pair, its first prior is a probability measure.Proof (Lean source)
theorem priorZero_isProbabilityMeasure {K : ℕ} (P : AbsMomentMatchedPriors K) : IsProbabilityMeasure P.ν₀ := P.probability₀ -
priorOne_isProbabilityMeasuretheorem — For a packaged prior pair, its second prior is a probability measure.Proof (Lean source)
theorem priorOne_isProbabilityMeasure {K : ℕ} (P : AbsMomentMatchedPriors K) : IsProbabilityMeasure P.ν₁ := P.probability₁ -
priorZero_masstheorem — For a packaged prior pair, its first prior has total mass one.Proof (Lean source)
theorem priorZero_mass {K : ℕ} (P : AbsMomentMatchedPriors K) : P.ν₀ univ = 1 := by exact P.probability₀.measure_univ -
priorOne_masstheorem — For a packaged prior pair, its second prior has total mass one.Proof (Lean source)
theorem priorOne_mass {K : ℕ} (P : AbsMomentMatchedPriors K) : P.ν₁ univ = 1 := by exact P.probability₁.measure_univ -
priorZero_supportedtheorem — For a packaged prior pair, its first prior is supported on the unit interval.Proof (Lean source)
theorem priorZero_supported {K : ℕ} (P : AbsMomentMatchedPriors K) : IsSupportedOnUnitInterval P.ν₀ := P.supported₀ -
priorOne_supportedtheorem — For a packaged prior pair, its second prior is supported on the unit interval.Proof (Lean source)
theorem priorOne_supported {K : ℕ} (P : AbsMomentMatchedPriors K) : IsSupportedOnUnitInterval P.ν₁ := P.supported₁ -
priorZero_symmetrictheorem — For a packaged prior pair, its first prior is symmetric about zero.Proof (Lean source)
theorem priorZero_symmetric {K : ℕ} (P : AbsMomentMatchedPriors K) : IsSymmetric P.ν₀ := P.symmetric₀ -
priorOne_symmetrictheorem — For a packaged prior pair, its second prior is symmetric about zero.Proof (Lean source)
theorem priorOne_symmetric {K : ℕ} (P : AbsMomentMatchedPriors K) : IsSymmetric P.ν₁ := P.symmetric₁ -
prior_moments_eqtheorem — For a packaged prior pair and a moment order no larger than the degree limit, the two priors have equal moments of that order.hypothesesconclusion∫ x : ℝ, x ^ j ∂P.ν₀ = ∫ x : ℝ, x ^ j ∂P.ν₁Proof (Lean source)
theorem prior_moments_eq {K : ℕ} (P : AbsMomentMatchedPriors K) {j : ℕ} (hj : j ≤ K) : ∫ x : ℝ, x ^ j ∂P.ν₀ = ∫ x : ℝ, x ^ j ∂P.ν₁ := P.moments_eq j hj -
prior_absMoment_gaptheorem — For a packaged prior pair, the oriented difference in absolute first moments is twice the best approximation error.hypothesesK :ℕP :conclusion(∫ x : ℝ, |x| ∂P.ν₁) - (∫ x : ℝ, |x| ∂P.ν₀) = 2 * bestUniformApproxErrorAbs KProof (Lean source)
theorem prior_absMoment_gap {K : ℕ} (P : AbsMomentMatchedPriors K) : (∫ x : ℝ, |x| ∂P.ν₁) - (∫ x : ℝ, |x| ∂P.ν₀) = 2 * bestUniformApproxErrorAbs K := P.abs_gap
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.
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.
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.
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.
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)
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)
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)
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
Proof (Lean source)
The circle-doubling map is the continuous map from the additive circle of period π to itself that sends each point to twice that point.
20 supporting declarations (lemmas, instances)
-
continuous_fejerKernellemma — For a Fejér order, the normalized Fejér kernel is continuous.Proof (Lean source)
lemma continuous_fejerKernel (n : ℕ) : Continuous (fejerKernel n) := by unfold fejerKernel oneSidedFourierSum fun_prop -
integral_fourierlemma — For a Fourier frequency, its Haar integral is one at frequency zero and zero otherwise.hypothesesk :ℤ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 -
fejer_integrand_expandlemma — For a Fejér order, Fourier frequency, and circle point, the kernel-weighted character has the stated finite Fourier expansion.hypothesesProof (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 -
fejerMean_fourier_natlemma — For a Fejér order and a nonnegative frequency, the Fejér mean has the stated triangular multiplier.hypothesesn k :ℕconclusionfejerMean n (fourier (k : ℤ)) = if k < n then ((n - k : ℕ) : ℝ) / n else 0Proof (Lean source)
lemma fejerMean_fourier_nat (n k : ℕ) : 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 -
fejerMean_fourier_neg_natlemma — For a Fejér order and a negative frequency magnitude, the Fejér mean has the same triangular multiplier.hypothesesn k :ℕconclusionfejerMean n (fourier (-(k : ℤ))) = if k < n then ((n - k : ℕ) : ℝ) / n else 0Proof (Lean source)
lemma fejerMean_fourier_neg_nat (n k : ℕ) : 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] split <;> simp -
integral_fejerKernellemma — For a positive Fejér order, the normalized kernel integrates to one.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 simp only [if_pos hn, Nat.cast_sub (zero_le _), Nat.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 -
fejerMean_norm_lelemma — For a positive Fejér order, a continuous input, and a uniform norm bound, the Fejér mean obeys that bound.hypothesesconclusion‖fejerMean n f‖ ≤ EProof (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] -
fejerMeanCLM_applylemma — For a positive Fejér order and a continuous input, the packaged linear map equals the integral definition.Proof (Lean source)
@[simp] lemma fejerMeanCLM_apply (n : ℕ) (hn : 0 < n) (f : C(AddCircle pi, ℂ)) : fejerMeanCLM n hn f = fejerMean n f := rfl -
valleePoussinMean_fourier_natlemma — For a positive order and a frequency at most that order, the de la Vallée--Poussin mean preserves the nonnegative Fourier character.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, fejerMean_fourier_nat n k] 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) -
valleePoussinMean_fourier_neg_natlemma — For a positive order and a frequency magnitude at most that order, the de la Vallée--Poussin mean preserves the negative Fourier character.hypothesesn k :ℕhn :0 < nhk :k ≤ nconclusionvalleePoussinMeanCLM n hn (fourier (-(k : ℤ))) = 1Proof (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, fejerMean_fourier_neg_nat n k] 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) -
cuspFunctional_fourier_natlemma — For a positive order and a nonnegative frequency at most that order, the cusp functional annihilates the Fourier character.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] -
cuspFunctional_fourier_neg_natlemma — For a positive order and a negative frequency magnitude at most that order, the cusp functional annihilates the Fourier character.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] -
cuspFunctional_fourier_nat_nonneglemma — For a positive order and a nonnegative frequency, the real part of the cusp multiplier is nonnegative.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, fejerMean_fourier_nat n k] 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 -
cuspFunctional_fourier_neg_nat_nonneglemma — For a positive order and a negative frequency magnitude, the real part of the cusp multiplier is nonnegative.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, fejerMean_fourier_neg_nat n k] 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 -
cuspFunctional_fourier_nat_highlemma — For a positive order and a nonnegative frequency at least twice that order, the cusp functional has multiplier one.hypothesesn k :ℕhn :0 < nhk :2 * n ≤ kconclusioncuspFunctionalCLM n hn (fourier (k : ℤ)) = 1Proof (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, fejerMean_fourier_nat n k, if_neg (by omega : ¬ k < 2 * n), if_neg (by omega : ¬ k < n)] norm_num -
cuspFunctional_fourier_neg_nat_highlemma — For a positive order and a negative frequency magnitude at least twice that order, the cusp functional has multiplier one.hypothesesn k :ℕhn :0 < nhk :2 * n ≤ kconclusioncuspFunctionalCLM n hn (fourier (-(k : ℤ))) = 1Proof (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, fejerMean_fourier_neg_nat n k, if_neg (by omega : ¬ k < 2 * n), if_neg (by omega : ¬ k < n)] norm_num -
cuspFunctional_norm_apply_lelemma — For a positive order and a continuous input, the cusp functional is bounded by four times the uniform norm.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 -
fourier_pair_eqlemma — For two real coefficients, a frequency, and a circle coordinate, the conjugate Fourier pair equals the corresponding real sine--cosine mode.hypothesesA B :ℝ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 -
fourier_comp_circleDoublelemma — For a Fourier frequency, composition with circle doubling doubles that frequency.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]
Rate 3 core · 5 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.
A mode index j and real argument x determine the corresponding nonconstant term of the absolute-value Chebyshev series: (4/π)·(−1)^j·T(x)/(4(j+1)² − 1), where T is the Chebyshev polynomial of the first kind of degree 2(j+1).
A truncation length m determines the explicit even Chebyshev truncation of absolute value: the polynomial 2/π plus the sum over j from 0 to m − 1 of (4/π)·(−1)^j/(4(j+1)² − 1) times the Chebyshev polynomial of the first kind of degree 2(j+1).
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
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
absChebPoly_evallemma — The truncation at a real argument evaluates to the constant term plus the finite absolute-value Chebyshev series.Proof (Lean source)
lemma absChebPoly_eval (m : ℕ) (x : ℝ) : (absChebPoly m).eval x = 2 / pi + ∑ j ∈ range m, absChebTerm j x := by rw [absChebPoly, Polynomial.eval_add, Polynomial.eval_C] simp_rw [Polynomial.eval_finset_sum] congr 1 simp only [Polynomial.eval_smul] apply Finset.sum_congr rfl intro j hj simp [absChebTerm] ring -
absChebPoly_natDegree_lelemma — The explicit truncation with the specified length has degree at most twice that length.Proof (Lean source)
lemma absChebPoly_natDegree_le (m : ℕ) : (absChebPoly m).natDegree ≤ 2 * m := by apply (Polynomial.natDegree_add_le _ _).trans apply max_le · simp · apply Polynomial.natDegree_sum_le_of_forall_le intro j hj apply (Polynomial.natDegree_smul_le _ _).trans rw [Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] have hjlt : j < m := Finset.mem_range.mp hj omega -
absChebPoly_error_lelemma — The explicit truncation at an argument in the closed unit interval has absolute error at most two divided by pi times twice the truncation length plus one.hypothesesProof (Lean source)
lemma absChebPoly_error_le (m : ℕ) {x : ℝ} (hx : x ∈ Icc (-1 : ℝ) 1) : abs (abs x - (absChebPoly m).eval x) ≤ 2 / (pi * (2 * (m : ℝ) + 1)) := by have hs := hasSum_absChebTerm_real hx have hsplit := hs.summable.sum_add_tsum_nat_add m have herr : |x| - (absChebPoly m).eval x = ∑' j : ℕ, absChebTerm (j + m) x := by rw [absChebPoly_eval] linarith [hs.tsum_eq, hsplit] rw [herr] have hc : HasSum (fun j : ℕ => (4 / pi) * (1 / (4 * ((j + m + 1 : ℕ) : ℝ) ^ 2 - 1))) (2 / (pi * (2 * (m : ℝ) + 1))) := by have hc' := (hasSum_cheb_denominator_tail m).mul_left (4 / pi) have hpi : pi ≠ 0 := Real.pi_ne_zero have hm : 2 * (m : ℝ) + 1 ≠ 0 := by positivity rw [show (4 / pi) * (1 / (2 * (2 * (m : ℝ) + 1))) = 2 / (pi * (2 * (m : ℝ) + 1)) by field_simp [hpi, hm] ring] at hc' exact hc' have hnorm : Summable (fun j : ℕ => ‖absChebTerm (j + m) x‖) := by apply Summable.of_norm_bounded hc.summable intro j rw [Real.norm_eq_abs] simpa [Nat.add_assoc] using abs_absChebTerm_le (j + m) (abs_le.mpr hx) calc |∑' j : ℕ, absChebTerm (j + m) x| = ‖∑' j : ℕ, absChebTerm (j + m) x‖ := (Real.norm_eq_abs _).symm _ ≤ ∑' j : ℕ, ‖absChebTerm (j + m) x‖ := norm_tsum_le_tsum_norm hnorm _ ≤ ∑' j : ℕ, (4 / pi) * (1 / (4 * ((j + m + 1 : ℕ) : ℝ) ^ 2 - 1)) := Summable.tsum_le_tsum (fun j => by rw [Real.norm_eq_abs] simpa [Nat.add_assoc] using abs_absChebTerm_le (j + m) (abs_le.mpr hx)) hnorm hc.summable _ = 2 / (pi * (2 * (m : ℝ) + 1)) := hc.tsum_eq -
bestUniformApproxErrorAbs_uppertheorem — For a positive polynomial degree, the best absolute-value approximation error is at most one divided by that degree.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) -
bestUniformApproxErrorAbs_lowertheorem — For a positive polynomial degree, the cusp of absolute value forces the stated inverse-degree lower bound.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