Mathlib.Analysis.Approximation.Chebyshev
Quantitative theory of uniform approximation by real polynomials.
Basic 4 core · 4 supporting This module defines the compact-interval uniform approximation problem and proves that a continuous target admits a best real-polynomial approximant under a degree bound. ★ exists_bestPolynomial
Uniform polynomial approximation on compact intervals
This module defines the compact-interval uniform approximation problem and proves that a continuous target admits a best real-polynomial approximant under a degree bound.
The interval supremum norm of a real function for endpoints r and s is the supremum of the function's absolute values over the closed interval from r to s.
The uniform approximation error of a real polynomial against a real target function for endpoints r and s is the interval supremum norm of the target minus the polynomial on the closed interval from r to s.
Definition (Lean source)
The best uniform approximation error of a real target function for endpoints r and s and a degree bound L is the infimum of the uniform approximation errors over all real polynomials of degree at most L.
Definition (Lean source)
For endpoints with r strictly less than s, a target function continuous on the closed interval between them, and any degree bound L, there is a real polynomial of degree at most L whose uniform approximation error equals the best uniform approximation error for that degree bound.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
intervalSupNorm_le_ifftheorem — For a function that is continuous on the closed interval from r to s with r at most s, the interval supremum norm is at most a number C exactly when the function is at most C in absolute value at every point of the interval.hypothesesconclusionintervalSupNorm g r s ≤ C ↔ ∀ x ∈ Icc r s, |g x| ≤ CProof (Lean source)
theorem intervalSupNorm_le_iff {g : ℝ → ℝ} {r s C : ℝ} (hg : ContinuousOn g (Icc r s)) (hrs : r ≤ s) : intervalSupNorm g r s ≤ C ↔ ∀ x ∈ Icc r s, |g x| ≤ C := by -- Proof plan: apply `IsCompact.exists_sSup_image_eq_and_ge` to `x ↦ |g x|`, -- then unfold the image in `intervalSupNorm`. unfold intervalSupNorm constructor · intro h x hx exact (le_csSup (isCompact_Icc.bddAbove_image hg.abs) ⟨x, hx, rfl⟩).trans h · intro h apply csSup_le · exact ⟨|g r|, ⟨r, ⟨le_rfl, hrs⟩, rfl⟩⟩ · rintro y ⟨x, hx, rfl⟩ exact h x hx -
uniformApproxError_nonnegtheorem — For any real polynomial, the uniform approximation error against any target function on any interval is nonnegative.Proof (Lean source)
theorem uniformApproxError_nonneg {f : ℝ → ℝ} {r s : ℝ} (Q : Polynomial ℝ) : 0 ≤ uniformApproxError f r s Q := by -- Proof plan: split on boundedness of the residual image. In the bounded -- case compare the supremum with the residual at `r`; in the unbounded case -- use the convention for `sSup` of an unbounded real set. unfold uniformApproxError intervalSupNorm apply Real.sSup_nonneg rintro y ⟨x, hx, rfl⟩ exact abs_nonneg _ -
bestUniformApproxError_letheorem — For a real polynomial of degree at most L, the best uniform approximation error for degree bound L is at most the uniform approximation error of that polynomial.hypothesesconclusionbestUniformApproxError f r s L ≤ uniformApproxError f r s QProof (Lean source)
theorem bestUniformApproxError_le {f : ℝ → ℝ} {r s : ℝ} {L : ℕ} {Q : Polynomial ℝ} (hQ : Q.natDegree ≤ L) : bestUniformApproxError f r s L ≤ uniformApproxError f r s Q := by unfold bestUniformApproxError apply csInf_le · refine ⟨0, ?_⟩ rintro e ⟨P, -, rfl⟩ exact uniformApproxError_nonneg P · exact ⟨Q, hQ, rfl⟩ -
bestUniformApproxError_nonnegtheorem — For endpoints with r strictly less than s, a target function continuous on the closed interval between them, and any degree bound L, the best uniform approximation error is nonnegative.hypothesesconclusion0 ≤ bestUniformApproxError f r s LProof (Lean source)
theorem bestUniformApproxError_nonneg {f : ℝ → ℝ} {r s : ℝ} (hrs : r < s) (hf : ContinuousOn f (Icc r s)) (L : ℕ) : 0 ≤ bestUniformApproxError f r s L := by obtain ⟨Q, -, hQ⟩ := exists_bestPolynomial hrs hf L rw [← hQ] exact uniformApproxError_nonneg Q
Kernel_Part1 4 core · 13 supporting This module defines the raw and normalized fourth-power Jackson kernels, relates the raw kernel to Chebyshev polynomials, and proves the finite cosine and integral identities needed later. ★ jraw_nonneg
Algebraic and analytic foundations of the order-four Jackson kernel
This module defines the raw and normalized fourth-power Jackson kernels, relates the raw kernel
to Chebyshev polynomials, and proves the finite cosine and integral identities needed later. It
also establishes continuity, measurability, integrability, nonnegativity, and evenness of the raw
kernel. Exact mass, moment bounds, and trigonometric degree are proved in Kernel_Part2.
A nonnegative integer order and a real argument determine the raw order-four Jackson kernel, obtained from the fourth power of the Dirichlet sine quotient with its removable singularities filled continuously.
An integer order determines the raw Jackson mass, the integral of the raw kernel over the standard period from minus π to π.
An integer order and a real argument determine the normalized order-four Jackson kernel, equal to the raw kernel divided by its mass over the standard period. It is normalized for positive order; at order zero the raw kernel and its mass vanish and the value is zero by the division convention.
At integer order K and real argument t, the raw Jackson kernel is nonnegative.
Formal statement
Proof (Lean source)
13 supporting declarations (lemmas, instances)
-
jraw_eq_of_sin_ne_zerotheorem — At order K and argument t, if the sine of t / 2 is nonzero, then the raw Jackson kernel equals the fourth power of the ratio of the sine of K t / 2 to the sine of t / 2.hypotheses -
jraw_eq_of_sin_eq_zerotheorem — At order K and argument t, if the denominator sine vanishes, then the raw kernel equals K to the fourth power.Proof (Lean source)
theorem jraw_eq_of_sin_eq_zero (K : ℕ) {t : ℝ} (ht : sin (t / 2) = 0) : jraw K t = (K : ℝ) ^ 4 := by simp [jraw, ht] -
jraw_eq_chebyshevlemma — At a strictly positive kernel order and a real argument, the raw Jackson kernel equals the fourth power of the corresponding Chebyshev polynomial of the second kind evaluated at the half-angle cosine.hypothesesK :ℕhK :0 < Kt :ℝProof (Lean source)
lemma jraw_eq_chebyshev (K : ℕ) (hK : 0 < K) (t : ℝ) : jraw K t = ((U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2))) ^ 4 := by by_cases ht : sin (t / 2) = 0 · rw [jraw_eq_of_sin_eq_zero K ht] rcases Real.sin_eq_zero_iff_cos_eq.mp ht with hc | hc · rw [hc, Polynomial.Chebyshev.U_eval_one] norm_num congr 1 norm_cast omega · rw [hc, Polynomial.Chebyshev.U_eval_neg_one] norm_num have hcast : ((K - 1 : ℕ) : ℝ) + 1 = (K : ℝ) := by norm_cast omega rw [hcast, mul_pow, ← pow_mul] norm_num · rw [jraw_eq_of_sin_ne_zero K ht] congr 1 apply (div_eq_iff ht).2 have hu := Polynomial.Chebyshev.U_real_cos (t / 2) ((K - 1 : ℕ) : ℤ) have hn : K - 1 + 1 = K := by omega have harg : (((((K - 1 : ℕ) : ℤ) : ℝ)) + 1) * (t / 2) = (K : ℝ) * t / 2 := by have hcast : (((((K - 1 : ℕ) : ℤ) : ℝ)) + 1) = (K : ℝ) := by exact_mod_cast hn rw [hcast] ring exact (congrArg sin harg).symm.trans hu.symm -
exists_comp_sq_of_eval_neg_eqlemma — If a real polynomial takes the same value at every pair of opposite arguments, then it is a polynomial in the square variable, with the outer polynomial's degree at most half the original degree.hypothesesp :hp :∀ x : ℝ, p.eval (-x) = p.eval xconclusion∃ q : Polynomial ℝ,conclusion 1q.natDegree ≤ p.natDegree / 2conclusion 2p = q.comp (X ^ 2)Proof (Lean source)
lemma exists_comp_sq_of_eval_neg_eq (p : Polynomial ℝ) (hp : ∀ x : ℝ, p.eval (-x) = p.eval x) : ∃ q : Polynomial ℝ, q.natDegree ≤ p.natDegree / 2 ∧ p = q.comp (X ^ 2) := by have hpoly : p.comp (-X) = p := by apply Polynomial.funext intro x simpa [Polynomial.eval_comp] using hp x have hcoeff (i : ℕ) (hi : Odd i) : p.coeff i = 0 := by have h := congrArg (fun q : Polynomial ℝ => q.coeff i) hpoly rw [coeff_comp_neg_X, hi.neg_one_pow] at h linarith have heven (i : ℕ) (hi : i ∈ p.support) : Even i := by rcases Nat.even_or_odd i with h | h · exact h · exact ((Polynomial.mem_support_iff.mp hi) (hcoeff i h)).elim let q : Polynomial ℝ := ∑ i ∈ p.support, C (p.coeff i) * X ^ (i / 2) refine ⟨q, ?_, ?_⟩ · apply (Polynomial.natDegree_sum_le_of_forall_le _ _) intro i hi exact (Polynomial.natDegree_C_mul_X_pow_le _ _).trans (Nat.div_le_div_right (Polynomial.le_natDegree_of_mem_supp i hi) : i / 2 ≤ p.natDegree / 2) · rw [p.as_sum_support_C_mul_X_pow] simp only [q, Polynomial.sum_comp, Polynomial.mul_comp, Polynomial.C_comp, Polynomial.pow_comp, Polynomial.X_comp] apply Finset.sum_congr rfl intro i hi congr 1 rw [← pow_mul] congr 1 exact (Nat.two_mul_div_two_of_even (heven i hi)).symm -
cheb_U_sq_evallemma — At a nonnegative integer order and a real angle, the square of the corresponding Chebyshev polynomial of the second kind equals its finite cosine expansion.hypothesesn :ℕt :ℝProof (Lean source)
lemma cheb_U_sq_eval (n : ℕ) (t : ℝ) : (U ℝ (n : ℤ)).eval (cos (t / 2)) ^ 2 = (n + 1 : ℝ) + 2 * ∑ j ∈ range n, (n - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t) := by induction n with | zero => simp | succ n ih => have hd := congrArg (fun p : Polynomial ℝ => p.eval (cos (t / 2))) (cheb_U_sq_sub_real n) simp only [Polynomial.eval_sub, Polynomial.eval_pow] at hd calc (U ℝ ((n + 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2 = (U ℝ (n : ℤ)).eval (cos (t / 2)) ^ 2 + (U ℝ ((2 * n + 2 : ℕ) : ℤ)).eval (cos (t / 2)) := by linarith _ = ((n + 1 : ℝ) + 2 * ∑ j ∈ range n, (n - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) + (1 + 2 * ∑ j ∈ range (n + 1), cos (((j + 1 : ℕ) : ℝ) * t)) := by rw [ih] convert congrArg (fun z : ℝ => ((n + 1 : ℝ) + 2 * ∑ j ∈ range n, (n - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) + z) (cheb_U_even_eval (n + 1) t) using 1 <;> congr 3 <;> omega _ = (((n + 1 : ℕ) : ℝ) + 1) + 2 * ∑ j ∈ range (n + 1), ((((n + 1 : ℕ) : ℝ) - (j : ℝ)) * cos (((j + 1 : ℕ) : ℝ) * t)) := by have hcast : ((n + 1 : ℕ) : ℝ) = (n : ℝ) + 1 := by norm_num rw [hcast, Finset.sum_range_succ, Finset.sum_range_succ] have hsum : (∑ j ∈ range n, (n - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t)) + ∑ j ∈ range n, cos (((j + 1 : ℕ) : ℝ) * t) = ∑ j ∈ range n, (n + 1 - j : ℝ) * cos (((j + 1 : ℕ) : ℝ) * t) := by rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro j hj ring linear_combination 2 * hsum -
integral_cos_natlemma — For a strictly positive integer frequency, the cosine of that frequency has integral zero over the closed interval from negative π to π.Proof (Lean source)
lemma integral_cos_nat (n : ℕ) (hn : 0 < n) : (∫ t in Icc (-pi) pi, cos ((n : ℝ) * t)) = 0 := by rw [MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (a := -pi) (b := pi) (by linarith [Real.pi_pos] : -pi ≤ pi)] have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) rw [intervalIntegral.integral_comp_mul_left cos hn0, integral_cos] simp -
integral_const_Icclemma — For a real constant, its integral over the closed interval from negative π to π equals twice π times that constant.Proof (Lean source)
-
integral_sq_cos_sumlemma — Given a number of cosine terms, a constant coefficient, and a sequence of cosine coefficients, the integral over the closed interval from negative π to π of the squared finite cosine sum equals twice π times the squared constant coefficient plus π times the sum of the squared cosine coefficients.hypothesesN :ℕc :ℝa :ℕ → ℝProof (Lean source)
lemma integral_sq_cos_sum (N : ℕ) (c : ℝ) (a : ℕ → ℝ) : (∫ t in Icc (-pi) pi, (c + ∑ j ∈ range N, a j * cos (((j + 1 : ℕ) : ℝ) * t)) ^ 2) = 2 * pi * c ^ 2 + pi * ∑ j ∈ range N, (a j) ^ 2 := by let S : ℝ → ℝ := fun t => ∑ j ∈ range N, a j * cos (((j + 1 : ℕ) : ℝ) * t) have hcontS : Continuous S := by dsimp [S]; fun_prop have hzero : (∫ t in Icc (-pi) pi, S t) = 0 := by dsimp [S] calc (∫ t in Icc (-pi) pi, ∑ j ∈ range N, a j * cos (((j + 1 : ℕ) : ℝ) * t)) = ∑ j ∈ range N, ∫ t in Icc (-pi) pi, a j * cos (((j + 1 : ℕ) : ℝ) * t) := MeasureTheory.integral_finsetSum (range N) (by intro j hj exact (show Continuous (fun t : ℝ => a j * cos (((j + 1 : ℕ) : ℝ) * t)) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc) _ = 0 := by apply Finset.sum_eq_zero intro j hj rw [MeasureTheory.integral_const_mul, integral_cos_nat (j + 1) (by omega)] ring have hsq : (∫ t in Icc (-pi) pi, (S t) ^ 2) = pi * ∑ j ∈ range N, (a j) ^ 2 := by have hterm (i j : ℕ) : IntegrableOn (fun t : ℝ => (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t))) (Icc (-pi) pi) := by exact (show Continuous (fun t : ℝ => (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t))) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hexpand : (fun t => (S t) ^ 2) = fun t => ∑ i ∈ range N, ∑ j ∈ range N, (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t)) := by funext t dsimp [S] rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro i hi rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj ring rw [hexpand] calc (∫ t in Icc (-pi) pi, ∑ i ∈ range N, ∑ j ∈ range N, (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t))) = ∑ i ∈ range N, ∫ t in Icc (-pi) pi, ∑ j ∈ range N, (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t)) := MeasureTheory.integral_finsetSum (range N) (by intro i hi exact integrable_finsetSum (range N) (fun j hj => hterm i j)) _ = ∑ i ∈ range N, ∑ j ∈ range N, ∫ t in Icc (-pi) pi, (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t)) := by apply Finset.sum_congr rfl intro i hi exact MeasureTheory.integral_finsetSum (range N) (by intro j hj exact hterm i j) _ = pi * ∑ j ∈ range N, (a j) ^ 2 := by calc ∑ i ∈ range N, ∑ j ∈ range N, ∫ t in Icc (-pi) pi, (a i * a j) * (cos (((i + 1 : ℕ) : ℝ) * t) * cos (((j + 1 : ℕ) : ℝ) * t)) = ∑ i ∈ range N, ∑ j ∈ range N, (a i * a j) * (if i = j then pi else 0) := by apply Finset.sum_congr rfl intro i hi apply Finset.sum_congr rfl intro j hj rw [MeasureTheory.integral_const_mul, integral_cos_mul_cos (i + 1) (j + 1) (by omega) (by omega)] simp _ = pi * ∑ j ∈ range N, (a j) ^ 2 := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj rw [Finset.sum_eq_single j] · simp ring · intro b hb hbj simp [hbj.symm] · exact fun hnot => (hnot hj).elim have hconst : (∫ _t in Icc (-pi) pi, c ^ 2) = 2 * pi * c ^ 2 := by exact integral_const_Icc (c ^ 2) have hpoint : (fun t => (c + S t) ^ 2) = fun t => c ^ 2 + (2 * c) * S t + (S t) ^ 2 := by funext t ring rw [show (fun t => (c + ∑ j ∈ range N, a j * cos (((j + 1 : ℕ) : ℝ) * t)) ^ 2) = fun t => (c + S t) ^ 2 by rfl, hpoint] have hiConst : IntegrableOn (fun _t : ℝ => c ^ 2) (Icc (-pi) pi) := continuous_const.continuousOn.integrableOn_compact isCompact_Icc have hiLin : IntegrableOn (fun t => (2 * c) * S t) (Icc (-pi) pi) := (continuous_const.mul hcontS).continuousOn.integrableOn_compact isCompact_Icc have hiSq : IntegrableOn (fun t => (S t) ^ 2) (Icc (-pi) pi) := (hcontS.pow 2).continuousOn.integrableOn_compact isCompact_Icc calc (∫ t in Icc (-pi) pi, c ^ 2 + (2 * c) * S t + S t ^ 2) = (∫ t in Icc (-pi) pi, c ^ 2 + (2 * c) * S t) + ∫ t in Icc (-pi) pi, S t ^ 2 := by exact MeasureTheory.integral_add (hiConst.add hiLin) hiSq _ = ((∫ _t in Icc (-pi) pi, c ^ 2) + ∫ t in Icc (-pi) pi, (2 * c) * S t) + ∫ t in Icc (-pi) pi, S t ^ 2 := by rw [MeasureTheory.integral_add hiConst hiLin] _ = 2 * pi * c ^ 2 + pi * ∑ j ∈ range N, (a j) ^ 2 := by rw [MeasureTheory.integral_const_mul, hzero, hsq, hconst] ring -
sum_range_sub_sqlemma — For a nonnegative integer, the sum of the squared integers from one through that integer equals that integer times its successor times one more than twice it, divided by six.hypothesesn :ℕconclusion∑ j ∈ range n, ((n : ℝ) - (j : ℝ)) ^ 2 = (n : ℝ) * (n + 1) * (2 * n + 1) / 6Proof (Lean source)
lemma sum_range_sub_sq (n : ℕ) : ∑ j ∈ range n, ((n : ℝ) - (j : ℝ)) ^ 2 = (n : ℝ) * (n + 1) * (2 * n + 1) / 6 := by calc ∑ j ∈ range n, ((n : ℝ) - (j : ℝ)) ^ 2 = ∑ j ∈ range n, (((n - 1 - j : ℕ) : ℝ) + 1) ^ 2 := by apply Finset.sum_congr rfl intro j hj rw [Finset.mem_range] at hj have hnat : n - j = n - 1 - j + 1 := by omega rw [show (n : ℝ) - (j : ℝ) = ((n - j : ℕ) : ℝ) by rw [Nat.cast_sub (le_of_lt hj)]] norm_num [hnat] _ = ∑ j ∈ range n, ((j : ℝ) + 1) ^ 2 := Finset.sum_range_reflect (fun j : ℕ => ((j : ℝ) + 1) ^ 2) n _ = (n : ℝ) * (n + 1) * (2 * n + 1) / 6 := by induction n with | zero => norm_num | succ n ih => rw [Finset.sum_range_succ, ih] push_cast ring -
continuous_jrawtheorem — For integer order K, the raw Jackson kernel is continuous on the real line.Proof (Lean source)
@[fun_prop] theorem continuous_jraw (K : ℕ) : Continuous (jraw K) := by by_cases hK : K = 0 · subst K convert (continuous_const : Continuous (fun _ : ℝ => (0 : ℝ))) using 1 funext t simp [jraw] · have hKpos : 0 < K := Nat.pos_of_ne_zero hK rw [show jraw K = fun t => ((U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2))) ^ 4 by funext t exact jraw_eq_chebyshev K hKpos t] fun_prop -
measurable_jrawtheorem — For integer order K, the raw Jackson kernel is Borel measurable.Proof (Lean source)
@[measurability, fun_prop] theorem measurable_jraw (K : ℕ) : Measurable (jraw K) := by exact (continuous_jraw K).measurable -
integrableOn_jrawtheorem — For integer order K, the raw Jackson kernel is integrable over the standard period.Proof (Lean source)
theorem integrableOn_jraw (K : ℕ) : IntegrableOn (jraw K) (Icc (-pi) pi) := by exact (continuous_jraw K).continuousOn.integrableOn_compact isCompact_Icc -
jraw_eventheorem — For integer order K, the raw Jackson kernel is symmetric about zero.Proof (Lean source)
theorem jraw_even (K : ℕ) : Even (jraw K) := by intro t by_cases ht : sin (t / 2) = 0 · have hnt : sin (-t / 2) = 0 := by rw [show -t / 2 = -(t / 2) by ring, Real.sin_neg, ht, neg_zero] rw [jraw_eq_of_sin_eq_zero K hnt, jraw_eq_of_sin_eq_zero K ht] · have hnt : sin (-t / 2) ≠ 0 := by rw [show -t / 2 = -(t / 2) by ring, Real.sin_neg, neg_ne_zero] exact ht rw [jraw_eq_of_sin_ne_zero K hnt, jraw_eq_of_sin_ne_zero K ht] rw [show (K : ℝ) * -t / 2 = -((K : ℝ) * t / 2) by ring, show -t / 2 = -(t / 2) by ring, Real.sin_neg] have hs : sin (-(t / 2)) = -sin (t / 2) := Real.sin_neg _ rw [hs] congr 1 field_simp
Tensor 6 core · 9 supporting This module tensorizes the normalized Jackson kernel and proves its positivity, normalization, measurability, and product-integration properties on finite period boxes. ★ tensorJackson_integral_eq_one
Finite tensor Jackson convolution
This module tensorizes the normalized Jackson kernel and proves its positivity, normalization,
measurability, and product-integration properties on finite period boxes. It also develops the
associated convolution and its elementary identities. Polynomial extraction and quantitative
approximation bounds are provided by TensorExtraction.
A finite dimension determines the standard period box, whose coordinates all lie between minus π and π.
A finite dimension determines the normalized cube, whose coordinates all lie between minus one and one.
An integer kernel order, a finite dimension, and a point in period coordinates determine the tensor Jackson kernel, the product of the one-dimensional kernels across coordinates. For positive order it is a normalized kernel in every dimension. At order zero it inherits the degeneracy of the one-dimensional kernel in positive dimension and vanishes, while in dimension zero it is the empty product, equal to one with unit mass, for every order.
A finite dimension and a point in period coordinates determine the coordinatewise cosine point.
A finite dimension, an integer kernel order, a real function on normalized coordinates, and a point in period coordinates determine the tensor Jackson convolution, the kernel-weighted integral of the translated cosine lift over the period box. It is a kernel-weighted average for positive order when that integrand is integrable. The Bochner integral is zero for a non-integrable integrand, and at order zero in positive dimension the kernel vanishes and so does the convolution; in dimension zero the kernel is the empty product, equal to one.
Definition (Lean source)
For a finite dimension and integer order K that is strictly positive, the tensor Jackson kernel has unit mass over the period box.
Formal statement
Proof (Lean source)
9 supporting declarations (lemmas, instances)
-
cosPoint_mem_normalizedCubetheorem — For a finite dimension and a point in period coordinates, the coordinatewise cosine point lies in the normalized cube.Proof (Lean source)
theorem cosPoint_mem_normalizedCube {d : ℕ} (t : Fin d → ℝ) : cosPoint t ∈ normalizedCube d := by intro i exact ⟨Real.neg_one_le_cos (t i), Real.cos_le_one (t i)⟩ -
tensorJackson_nonnegtheorem — For a finite dimension, integer order K that is strictly positive, and a point in period coordinates, the tensor Jackson kernel is nonnegative.Proof (Lean source)
theorem tensorJackson_nonneg {d K : ℕ} (hK : 0 < K) (u : Fin d → ℝ) : 0 ≤ tensorJackson K d u := by exact Finset.prod_nonneg fun i _ ↦ jackson_nonneg K hK (u i) -
measurable_tensorJacksontheorem — For integer order K and a finite dimension, the tensor Jackson kernel is measurable.Proof (Lean source)
@[measurability, fun_prop] theorem measurable_tensorJackson (K d : ℕ) : Measurable (tensorJackson K d) := by unfold tensorJackson fun_prop -
integrableOn_tensorJacksontheorem — For integer order K and a finite dimension, the tensor Jackson kernel is integrable over the standard period box.Proof (Lean source)
theorem integrableOn_tensorJackson (K d : ℕ) : IntegrableOn (tensorJackson K d) (periodBox d) := by change Integrable (fun u : Fin d → ℝ ↦ ∏ i, jackson K (u i)) (volume.restrict (periodBox d)) rw [show periodBox d = Set.univ.pi (fun _ ↦ Icc (-pi) pi) by ext u simp only [periodBox, Set.mem_ofPred_eq, Set.mem_pi, Set.mem_univ, true_implies, Set.mem_Icc], volume_pi, Measure.restrict_pi_pi] exact Integrable.fintype_prod fun _ ↦ integrableOn_jackson K -
integral_periodBox_prodtheorem — Given a finite dimension, one integrand for each coordinate, the integral of their product over the period box equals the product of their one-dimensional integrals.hypothesesd :ℕg :Fin d → ℝ → ℝProof (Lean source)
theorem integral_periodBox_prod {d : ℕ} (g : Fin d → ℝ → ℝ) : (∫ u in periodBox d, ∏ i, g i (u i)) = ∏ i, ∫ t in Icc (-pi) pi, g i t := by rw [show periodBox d = Set.univ.pi (fun _ ↦ Icc (-pi) pi) by ext u simp only [periodBox, Set.mem_ofPred_eq, Set.mem_pi, Set.mem_univ, true_implies, Set.mem_Icc], volume_pi, Measure.restrict_pi_pi] exact MeasureTheory.integral_fintype_prod_eq_prod g -
tensorJackson_first_moment_eqtheorem — For a finite dimension, integer order K that is strictly positive, and a selected coordinate, the tensor kernel's absolute first moment in that coordinate equals the one-dimensional first moment.hypothesesconclusion(∫ u in periodBox d, |u i| * tensorJackson K d u)Proof (Lean source)
theorem tensorJackson_first_moment_eq {d K : ℕ} (hK : 0 < K) (i : Fin d) : (∫ u in periodBox d, |u i| * tensorJackson K d u) = ∫ t in Icc (-pi) pi, |t| * jackson K t := by classical let g : Fin d → ℝ → ℝ := fun j t ↦ (if j = i then |t| else 1) * jackson K t have hi : IntegrableOn (fun t : ℝ ↦ |t| * jackson K t) (Icc (-pi) pi) := ((continuous_abs.comp continuous_id).mul (continuous_jackson K)).continuousOn.integrableOn_compact isCompact_Icc have hg : ∀ j, IntegrableOn (g j) (Icc (-pi) pi) := by intro j by_cases hji : j = i · simpa [g, hji] using hi · simpa [g, hji] using integrableOn_jackson K rw [show (fun u : Fin d → ℝ ↦ |u i| * tensorJackson K d u) = fun u ↦ ∏ j, g j (u j) by funext u symm calc (∏ j, g j (u j)) = (∏ j, if j = i then |u j| else 1) * ∏ j, jackson K (u j) := by simp only [g, Finset.prod_mul_distrib] _ = |u i| * tensorJackson K d u := by simp [tensorJackson], integral_periodBox_prod g] have hmass : (∫ t in Icc (-pi) pi, jackson K t) = 1 := jackson_integral_eq_one K hK have hcoord : ∀ j, (∫ t in Icc (-pi) pi, g j t) = if j = i then (∫ t in Icc (-pi) pi, |t| * jackson K t) else 1 := by intro j by_cases hji : j = i <;> simp [g, hji, hmass] calc (∏ j, ∫ t in Icc (-pi) pi, g j t) = ∏ j, if j = i then (∫ t in Icc (-pi) pi, |t| * jackson K t) else 1 := Finset.prod_congr rfl fun j _ ↦ hcoord j _ = ∫ t in Icc (-pi) pi, |t| * jackson K t := by simp -
tensorJackson_second_moment_eqtheorem — For a finite dimension, integer order K that is strictly positive, and a selected coordinate, the tensor kernel's second moment in that coordinate equals the one-dimensional second moment.hypothesesconclusion(∫ u in periodBox d, (u i) ^ 2 * tensorJackson K d u)Proof (Lean source)
theorem tensorJackson_second_moment_eq {d K : ℕ} (hK : 0 < K) (i : Fin d) : (∫ u in periodBox d, (u i) ^ 2 * tensorJackson K d u) = ∫ t in Icc (-pi) pi, t ^ 2 * jackson K t := by classical let g : Fin d → ℝ → ℝ := fun j t ↦ (if j = i then t ^ 2 else 1) * jackson K t have hi : IntegrableOn (fun t : ℝ ↦ t ^ 2 * jackson K t) (Icc (-pi) pi) := ((continuous_id.pow 2).mul (continuous_jackson K)).continuousOn.integrableOn_compact isCompact_Icc have hg : ∀ j, IntegrableOn (g j) (Icc (-pi) pi) := by intro j by_cases hji : j = i · simpa [g, hji] using hi · simpa [g, hji] using integrableOn_jackson K rw [show (fun u : Fin d → ℝ ↦ (u i) ^ 2 * tensorJackson K d u) = fun u ↦ ∏ j, g j (u j) by funext u symm calc (∏ j, g j (u j)) = (∏ j, if j = i then (u j) ^ 2 else 1) * ∏ j, jackson K (u j) := by simp only [g, Finset.prod_mul_distrib] _ = (u i) ^ 2 * tensorJackson K d u := by simp [tensorJackson], integral_periodBox_prod g] have hmass : (∫ t in Icc (-pi) pi, jackson K t) = 1 := jackson_integral_eq_one K hK have hcoord : ∀ j, (∫ t in Icc (-pi) pi, g j t) = if j = i then (∫ t in Icc (-pi) pi, t ^ 2 * jackson K t) else 1 := by intro j by_cases hji : j = i <;> simp [g, hji, hmass] calc (∏ j, ∫ t in Icc (-pi) pi, g j t) = ∏ j, if j = i then (∫ t in Icc (-pi) pi, t ^ 2 * jackson K t) else 1 := Finset.prod_congr rfl fun j _ ↦ hcoord j _ = ∫ t in Icc (-pi) pi, t ^ 2 * jackson K t := by simp -
tensorConvolution_nonnegtheorem — For a finite dimension, integer order K that is strictly positive, a function that is nonnegative throughout the normalized cube, and a selected point in period coordinates, the tensor convolution is nonnegative at that point.hypothesesconclusion0 ≤ tensorConvolution K f xProof (Lean source)
theorem tensorConvolution_nonneg {d K : ℕ} (hK : 0 < K) {f : (Fin d → ℝ) → ℝ} (hf : ∀ z ∈ normalizedCube d, 0 ≤ f z) (x : Fin d → ℝ) : 0 ≤ tensorConvolution K f x := by rw [tensorConvolution] exact integral_nonneg fun u ↦ mul_nonneg (hf _ (cosPoint_mem_normalizedCube _)) (tensorJackson_nonneg hK u) -
tensorConvolution_consttheorem — For a finite dimension, integer order K that is strictly positive, a real constant, and a point in period coordinates, tensor convolution preserves the constant function.Proof (Lean source)
theorem tensorConvolution_const {d K : ℕ} (hK : 0 < K) (c : ℝ) (x : Fin d → ℝ) : tensorConvolution K (fun _ => c) x = c := by unfold tensorConvolution rw [integral_const_mul, tensorJackson_integral_eq_one hK, mul_one]
TrigPoly 3 core · 4 supporting A *real trigonometric polynomial of degree ≤ n* is a function f(t) = ∑_{k=0}^{n} (a k · cos (k t) + b k · sin (k t)). ★ card_zeros_le★ card_simple_add_double_le
Real trigonometric polynomials and their zero count
A real trigonometric polynomial of degree ≤ n is a function
f(t) = ∑_{k=0}^{n} (a k · cos (k t) + b k · sin (k t)). This file defines the
predicate IsTrigPolyLE n f, records elementary closure properties, and proves
the zero-count lemmas that drive the Szegő comparison:
* IsTrigPolyLE.card_zeros_le — a nonzero real trigonometric polynomial of
degree ≤ n has at most 2 n zeros in any half-open period.
* IsTrigPolyLE.card_simple_add_double_le — the multiplicity-refined form used
by the sharp Szegő proof: a further double zero is counted twice.
This is the crucial input to Szegő's inequality that is absent from Mathlib.
The proof substitutes z = e^{i t} so that f(t) = z^{-n} · P(z) for an
algebraic polynomial P : ℂ[X] of degree ≤ 2 n; zeros of f in one period are
roots of P on the unit circle, and Polynomial.card_roots_le_degree bounds
their number by 2 n.
## Standard reference Borwein–Erdős, Polynomials and Polynomial Inequalities (1995), §5.1; Powell, Approximation Theory and Methods, on trigonometric polynomials.
For a nonnegative integer degree bound and a real-valued function of a real argument, the assertion that the function is a real trigonometric polynomial of degree at most the bound means that it has a finite cosine-sine expansion through that degree.
Zero-count lemma for real trigonometric polynomials. If a real-valued function is a trigonometric polynomial with a chosen degree bound and is not identically zero, then any finite set in a specified half-open period whose points are all zeros has cardinality at most twice the degree bound.
Formal statement
Proof (Lean source)
Multiplicity-refined zero-count lemma. Suppose a real-valued function is a trigonometric polynomial with a chosen degree bound and is not identically zero. If a finite set in a specified half-open period consists only of zeros and a further point in that period but outside the set is both a zero and a stationary point, then the size of the finite set plus two for the double zero is at most twice the degree bound.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
isTrigPolyLE_consttheorem — The constant function with a chosen real value is, for any specified nonnegative degree bound, a real trigonometric polynomial within that bound; it uses only the zero-frequency term.hypothesesn :ℕc :ℝconclusionIsTrigPolyLE n (fun _ => c)Proof (Lean source)
theorem isTrigPolyLE_const (n : ℕ) (c : ℝ) : IsTrigPolyLE n (fun _ => c) := by refine ⟨fun k => if k = 0 then c else 0, fun _ => 0, ?_⟩ intro t simp -
monotheorem — A real trigonometric polynomial with one degree bound is, for a second degree bound, also a trigonometric polynomial within that second bound whenever the first bound does not exceed the second; the additional coefficients can be set to zero.hypothesesn m :ℕf :ℝ → ℝhf :IsTrigPolyLE n fhnm :n ≤ mconclusionIsTrigPolyLE m fProof (Lean source)
theorem IsTrigPolyLE.mono {n m : ℕ} {f : ℝ → ℝ} (hf : IsTrigPolyLE n f) (hnm : n ≤ m) : IsTrigPolyLE m f := by rcases hf with ⟨a, b, hf⟩ refine ⟨fun k => if k ≤ n then a k else 0, fun k => if k ≤ n then b k else 0, ?_⟩ intro t rw [hf t] calc (∑ k ∈ range (n + 1), (a k * cos ((k : ℝ) * t) + b k * sin ((k : ℝ) * t))) = ∑ k ∈ range (n + 1), ((if k ≤ n then a k else 0) * cos ((k : ℝ) * t) + (if k ≤ n then b k else 0) * sin ((k : ℝ) * t)) := by apply Finset.sum_congr rfl intro k hk have hk_le : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) simp [hk_le] _ = ∑ k ∈ range (m + 1), ((if k ≤ n then a k else 0) * cos ((k : ℝ) * t) + (if k ≤ n then b k else 0) * sin ((k : ℝ) * t)) := by apply Finset.sum_subset · rw [Finset.range_subset_range] exact Nat.succ_le_succ hnm · intro k _ hkn have hle : ¬ k ≤ n := by intro hk exact hkn (Finset.mem_range.mpr (Nat.lt_succ_of_le hk)) simp [hle] -
subtheorem — The pointwise difference of two real trigonometric polynomials with a common degree bound is a real trigonometric polynomial with the same bound, obtained by subtracting their coefficient sequences term by term.hypothesesn :ℕf g :ℝ → ℝhf :IsTrigPolyLE n fhg :IsTrigPolyLE n gconclusionIsTrigPolyLE n (fun t => f t - g t)Proof (Lean source)
theorem IsTrigPolyLE.sub {n : ℕ} {f g : ℝ → ℝ} (hf : IsTrigPolyLE n f) (hg : IsTrigPolyLE n g) : IsTrigPolyLE n (fun t => f t - g t) := by rcases hf with ⟨af, bf, hf⟩ rcases hg with ⟨ag, bg, hg⟩ refine ⟨fun k => af k - ag k, fun k => bf k - bg k, ?_⟩ intro t change f t - g t = _ rw [hf t, hg t] rw [← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro k _ ring -
exp_mul_I_injOn_Icolemma — In the half-open real interval of one full period beginning at a chosen point, two angles in that interval are equal if their unit-circle complex exponentials agree.hypothesesc s t :ℝconclusions = tProof (Lean source)
lemma exp_mul_I_injOn_Ico {c s t : ℝ} (hs : s ∈ Ico c (c + 2 * pi)) (ht : t ∈ Ico c (c + 2 * pi)) (h : exp ((s : ℂ) * I) = exp ((t : ℂ) * I)) : s = t := by rcases Complex.exp_eq_exp_iff_exists_int.mp h with ⟨m, hm⟩ have him : s = t + (m : ℝ) * (2 * pi) := by have := congrArg im hm simpa [Complex.ofReal_mul, Complex.ofReal_add, Complex.ofReal_intCast] using this have hdiff : s - t = (m : ℝ) * (2 * pi) := by linarith have hlt : -(2 * pi) < s - t ∧ s - t < 2 * pi := by constructor <;> linarith [hs.1, hs.2, ht.1, ht.2] have hpi : 0 < 2 * pi := by positivity have hm0 : m = 0 := by by_contra hmne have hle_abs : 2 * pi ≤ |(m : ℝ) * (2 * pi)| := by rw [abs_mul, abs_of_pos hpi] have : (1 : ℝ) ≤ |(m : ℝ)| := by exact_mod_cast Int.one_le_abs hmne nlinarith have hbounds : |s - t| < 2 * pi := by rw [abs_lt] exact hlt rw [hdiff] at hbounds linarith subst hm0 simpa using him
CoefficientEnvelopeFour 2 core · 1 supporting This module bounds the coefficient one-norm of the four-variable polynomial extracted from a uniformly bounded tensor Jackson convolution, while retaining coordinate and total-degree control. ★ tensorConvolution_exists_mvPolynomial_four_coeffBound
A four-dimensional coefficient envelope for Jackson approximation
This module bounds the coefficient one-norm of the four-variable polynomial extracted from a uniformly bounded tensor Jackson convolution, while retaining coordinate and total-degree control.
A finite dimension and a real multivariate polynomial determine its coefficient one-norm, the sum of the absolute values of all monomial coefficients.
Definition (Lean source)
For integer order K that is strictly positive, a function on four normalized coordinates that is continuous on the normalized cube, a nonnegative uniform bound B, and the corresponding bound on the function throughout the cube, there is a four-variable polynomial that reproduces the tensor convolution at the coordinatewise cosines of every point, has degree at most 2 (K − 1) in each variable and total degree at most 8 (K − 1), and whose coefficients have absolute values summing to at most 2 to the power 40 K + 20, times B.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
mvCoeffL1_le_boundedtheorem — For a polynomial in finitely many variables, a coordinatewise degree limit, and a nonnegative uniform bound on its normalized-cube values, the coefficient one-norm has an explicit dimension-dependent bound.hypothesesd n :ℕp :MvPolynomial (Fin d) ℝB :ℝhB :0 ≤ Bhcoord :∀ m ∈ p.support, ∀ i, m i ≤ nhbound :∀ x ∈ normalizedCube d, |eval x p| ≤ BconclusionmvCoeffL1 p ≤ ((2 : ℝ) * (n + 1) ^ 2 * (3 : ℝ) ^ n) ^ d * BProof (Lean source)
theorem mvCoeffL1_le_bounded {d n : ℕ} (p : MvPolynomial (Fin d) ℝ) (B : ℝ) (hB : 0 ≤ B) (hcoord : ∀ m ∈ p.support, ∀ i, m i ≤ n) (hbound : ∀ x ∈ normalizedCube d, |eval x p| ≤ B) : mvCoeffL1 p ≤ ((2 : ℝ) * (n + 1) ^ 2 * (3 : ℝ) ^ n) ^ d * B := by induction d generalizing B with | zero => have hx := hbound (fun i => elim0 i) (fun i => elim0 i) have hm (m : Fin 0 →₀ ℕ) : m = 0 := by apply Finsupp.ext intro i exact elim0 i simpa [mvCoeffL1, MvPolynomial.eval_eq, hm] using hx | succ d ih => classical let P := (MvPolynomial.finSuccEquiv ℝ d) p have hPdeg : P.natDegree ≤ n := by dsimp [P] rw [MvPolynomial.natDegree_finSuccEquiv] exact MvPolynomial.degreeOf_le_iff.mpr (fun m hm => hcoord m hm 0) have htail (i : ℕ) : ∀ m ∈ (P.coeff i).support, ∀ j, m j ≤ n := by intro m hm j have := hcoord (Finsupp.cons i m) (by rw [MvPolynomial.mem_support_iff, ← MvPolynomial.finSuccEquiv_coeff_coeff] exact MvPolynomial.mem_support_iff.mp hm) j.succ simpa using this have hcoeff_bound (i : ℕ) (hi : i < n + 1) (y : Fin d → ℝ) (hy : y ∈ normalizedCube d) : |eval y (P.coeff i)| ≤ (2 * (n + 1) * (3 : ℝ) ^ n) * B := by let r : Polynomial ℝ := Polynomial.map (eval y) P have hrdeg : r.natDegree ≤ n := Polynomial.natDegree_map_le.trans hPdeg have hrbound : ∀ x ∈ Icc (-1 : ℝ) 1, |r.eval x| ≤ B := by intro x hx dsimp [r] rw [← MvPolynomial.eval_eq_eval_mv_eval'] apply hbound intro j refine Fin.cases hx (fun k => hy k) j calc |eval y (P.coeff i)| = |r.coeff i| := by dsimp [r] rw [MvPolynomial.coeff_eval_eq_eval_coeff] _ ≤ polyCoeffL1 r := abs_poly_coeff_le_coeffL1 r i _ ≤ (2 * (n + 1) * (3 : ℝ) ^ n) * B := polyCoeffL1_le_bounded n r B hB hrdeg hrbound rw [mvCoeffL1_finSucc p hcoord] calc (∑ i ∈ range (n + 1), mvCoeffL1 (P.coeff i)) ≤ ∑ i ∈ range (n + 1), (((2 : ℝ) * (n + 1) ^ 2 * (3 : ℝ) ^ n) ^ d * ((2 * (n + 1) * (3 : ℝ) ^ n) * B)) := by apply Finset.sum_le_sum intro i hi apply ih (P.coeff i) ((2 * (n + 1) * (3 : ℝ) ^ n) * B) · positivity · exact htail i · exact hcoeff_bound i (Finset.mem_range.mp hi) _ = ((2 : ℝ) * (n + 1) ^ 2 * (3 : ℝ) ^ n) ^ (d + 1) * B := by rw [Finset.sum_const, Finset.card_range, pow_succ] ring
HeterogeneousTensor 6 core · 4 supporting This module defines product Jackson convolution for an arbitrary finite coordinate type with a separate order in every coordinate. ★ convolution_shifted
Heterogeneous tensor Jackson convolution
This module defines product Jackson convolution for an arbitrary finite coordinate type with a separate order in every coordinate. It establishes integrability, parameter measurability, and the period-box translation identity used by the algebraic extraction layer.
The normalized cube is the set of coordinate vectors with every entry between minus one and one. This set is specified coordinatewise.
The period box is the set of angle vectors with every entry between minus π and π. This set is specified coordinatewise.
An angle vector determines its coordinatewise cosine point. The point applies cosine in every coordinate.
Definition (Lean source)
A coordinate-specific order map and an angle vector determine the heterogeneous Jackson kernel. The kernel is the finite product of the one-dimensional Jackson kernels.
Definition (Lean source)
A coordinate-specific order map, a cube target, and a phase vector determine the heterogeneous Jackson convolution. The convolution integrates the translated cosine lift against the product kernel over the period box.
Definition (Lean source)
For a coordinate-specific positive order map, a measurable cube target, a real bound B such that the target is at most B in absolute value on the cube, and a phase vector x, the heterogeneous Jackson convolution at x equals the integral over the period box of the cosine lift of the target at v times the product kernel at x − v.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
integrableOn_convolution_integrandtheorem — For a coordinate-specific order map, a target function that is measurable, a real bound B such that the target is at most B in absolute value on the cube, and a phase vector, the heterogeneous Jackson integrand, the translated cosine lift of the target times the product kernel, is integrable on the period box.hypothesesι :sharedType u_1d :ι → ℕf :(ι → ℝ) → ℝhf :B :ℝhB :∀ x ∈ cube, |f x| ≤ Bx :ι → ℝconclusionIntegrableOn (fun u => f (cosPoint (x - u)) * kernel d u) periodBoxProof (Lean source)
theorem integrableOn_convolution_integrand (d : ι → ℕ) (f : (ι → ℝ) → ℝ) (hf : Measurable f) (B : ℝ) (hB : ∀ x ∈ cube, |f x| ≤ B) (x : ι → ℝ) : IntegrableOn (fun u => f (cosPoint (x - u)) * kernel d u) periodBox := by have hcos : Continuous (fun u : ι → ℝ => cosPoint (x - u)) := by unfold cosPoint fun_prop have hk : Continuous (kernel d) := by unfold kernel fun_prop (disch := exact continuous_jackson _) have hbox : IsCompact (periodBox (ι := ι)) := by exact isCompact_univ_pi (fun _ => isCompact_Icc) have hki : IntegrableOn (kernel d) periodBox := hk.continuousOn.integrableOn_compact hbox have hmeas : Measurable (fun u => f (cosPoint (x - u)) * kernel d u) := ((hf.comp hcos.measurable).mul hk.measurable) apply Integrable.mono' (hki.norm.const_mul B) hmeas.aestronglyMeasurable.restrict filter_upwards [ae_restrict_mem hbox.measurableSet] with u hu have hfB : |f (cosPoint (x - u))| ≤ B := hB _ (by intro i exact ⟨Real.neg_one_le_cos _, Real.cos_le_one _⟩) simpa [Real.norm_eq_abs, abs_mul] using mul_le_mul_of_nonneg_right hfB (abs_nonneg (kernel d u)) -
measurable_convolutiontheorem — A coordinate-specific order map, a parameter-indexed target, its joint measurability, and a fixed phase vector imply that the heterogeneous convolution is measurable in the parameter.hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕg :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)x :ι → ℝconclusionMeasurable (fun ω => convolution d (g ω) x)Proof (Lean source)
@[fun_prop] theorem measurable_convolution (d : ι → ℕ) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (x : ι → ℝ) : Measurable (fun ω => convolution d (g ω) x) := by have hcos : Measurable (fun u : ι → ℝ => cosPoint (x - u)) := by unfold cosPoint fun_prop have hk : Measurable (kernel d) := by unfold kernel fun_prop (disch := exact measurable_jackson _) have hpair : Measurable (fun z : Ω × (ι → ℝ) => (z.1, cosPoint (x - z.2))) := measurable_fst.prodMk (hcos.comp measurable_snd) have h : Measurable (fun z : Ω × (ι → ℝ) => g z.1 (cosPoint (x - z.2)) * kernel d z.2) := (hg.comp hpair).mul (hk.comp measurable_snd) simpa only [convolution] using (h.stronglyMeasurable.integral_prod_right' (ν := (volume.restrict periodBox))).measurable -
periodBox_integral_sub_eq_fintheorem — A finite dimension, a function on its phase vectors, its measurability, a uniform bound, the bound on every vector, coordinatewise periodicity, and a translation vector imply that reflection and translation leave the period-box integral unchanged.hypothesesconclusion(∫ u in periodBox, F (x - u)) = ∫ u in periodBox, F uProof (Lean source)
theorem periodBox_integral_sub_eq_fin (n : ℕ) (F : (Fin n → ℝ) → ℝ) (hF : Measurable F) (B : ℝ) (hB : ∀ y, |F y| ≤ B) (hper : ∀ i y, Periodic (fun t => F (update y i t)) (2 * pi)) (x : Fin n → ℝ) : (∫ u in periodBox, F (x - u)) = ∫ u in periodBox, F u := by classical have hsplit : ∀ {m : ℕ} (G : (Fin (m + 1) → ℝ) → ℝ), Measurable G → (∀ y, |G y| ≤ B) → (∫ u in periodBox, G u) = ∫ t in Icc (-pi) pi, ∫ v in periodBox, G (Fin.insertNth 0 t v) := by intro m G hG hGb let e : ℝ × (Fin m → ℝ) ≃ᵐ (Fin (m + 1) → ℝ) := (piFinSuccAbove (fun _ => ℝ) 0).symm have hem : MeasurePreserving e := (volume_preserving_piFinSuccAbove (fun _ : Fin (m + 1) => ℝ) 0).symm _ have he : e ⁻¹' periodBox = Icc (-pi) pi ×ˢ periodBox := by ext z simp only [Set.mem_preimage, periodBox, Set.mem_prod] constructor · intro h constructor · simpa [e] using h 0 (Set.mem_univ _) · intro i hi simpa [e] using h i.succ (Set.mem_univ _) · rintro ⟨h0, hs⟩ i intro _ refine Fin.cases ?_ (fun j => ?_) i · simpa [e] using h0 · simpa [e] using hs j (Set.mem_univ _) rw [← hem.setIntegral_preimage_emb e.measurableEmbedding, he, Measure.volume_eq_prod, setIntegral_prod] · rfl · have hm : Measurable (fun z : ℝ × (Fin m → ℝ) => G (Fin.insertNth 0 z.1 z.2)) := hG.comp (by fun_prop) have hc : IsCompact (Icc (-pi) pi ×ˢ periodBox (ι := Fin m)) := isCompact_Icc.prod (isCompact_univ_pi (fun _ => isCompact_Icc)) apply Measure.integrableOn_of_bounded (hc.measure_lt_top.ne) hm.aestronglyMeasurable filter_upwards with z simpa [Real.norm_eq_abs] using hGb (Fin.insertNth 0 z.1 z.2) induction n with | zero => congr 1 funext u congr 1 funext i exact elim0 i | succ m ih => have hsub : Measurable (fun u : Fin (m + 1) → ℝ => x - u) := by fun_prop rw [hsplit (fun u => F (x - u)) (hF.comp hsub) (fun y => hB _)] have hxsub (t : ℝ) (v : Fin m → ℝ) : x - Fin.insertNth 0 t v = Fin.insertNth 0 (x 0 - t) ((x ∘ succ) - v) := by funext i refine Fin.cases ?_ (fun j => ?_) i · simp · simp simp_rw [hxsub] have hinner (t : ℝ) : (∫ v in periodBox, F (Fin.insertNth 0 (x 0 - t) ((x ∘ succ) - v))) = ∫ v in periodBox, F (Fin.insertNth 0 (x 0 - t) v) := by let G : (Fin m → ℝ) → ℝ := fun v => F (Fin.insertNth 0 (x 0 - t) v) apply ih G · exact hF.comp (by fun_prop) · intro y exact hB _ · intro i y have hp := hper i.succ (Fin.insertNth 0 (x 0 - t) y) intro s change G (update y i (s + 2 * pi)) = G (update y i s) dsimp [G] have hu (r : ℝ) : Fin.insertNth 0 (x 0 - t) (update y i r) = (update (Fin.insertNth 0 (x 0 - t) y) i.succ r : Fin (m + 1) → ℝ) := by funext j refine Fin.cases ?_ (fun k => ?_) j · have hne : (0 : Fin (m + 1)) ≠ i.succ := ne_of_lt (Fin.succ_pos i) simp [update, hne] · by_cases hki : k = i · subst k simp · simp [hki] rw [hu, hu] exact hp s simp_rw [hinner] let A : ℝ → ℝ := fun s => ∫ v in periodBox, F (Fin.insertNth 0 s v) have hAp : Periodic A (2 * pi) := by intro s apply integral_congr_ae filter_upwards intro v have hp := hper 0 (Fin.insertNth 0 s v) s simpa using hp rw [show (fun t => ∫ v in periodBox, F (Fin.insertNth 0 (x 0 - t) v)) = fun t => A (x 0 - t) by rfl] rw [show (∫ t in Icc (-pi) pi, A (x 0 - t)) = ∫ t in (-pi)..pi, A (x 0 - t) by rw [intervalIntegral.integral_of_le (neg_le_self Real.pi_pos.le), ← integral_Icc_eq_integral_Ioc]] rw [intervalIntegral.integral_comp_sub_left] have hshift := hAp.intervalIntegral_add_eq (x 0 - pi) (-pi) have heq : (∫ t in (x 0 - pi)..(x 0 - -pi), A t) = ∫ t in (-pi)..pi, A t := by convert hshift using 1 <;> ring rw [heq] rw [intervalIntegral.integral_of_le (neg_le_self Real.pi_pos.le), ← integral_Icc_eq_integral_Ioc] rw [hsplit F hF hB] -
periodBox_integral_sub_eqtheorem — A function on finitely many phase coordinates, its measurability, a uniform bound, the bound on every vector, coordinatewise periodicity, and a translation vector imply that reflection and translation leave the period-box integral unchanged.hypothesesι :sharedType u_1F :(ι → ℝ) → ℝhF :B :ℝhB :∀ y, |F y| ≤ Bx :ι → ℝconclusion(∫ u in periodBox, F (x - u)) = ∫ u in periodBox, F uProof (Lean source)
theorem periodBox_integral_sub_eq (F : (ι → ℝ) → ℝ) (hF : Measurable F) (B : ℝ) (hB : ∀ y, |F y| ≤ B) (hper : ∀ i y, Periodic (fun t => F (update y i t)) (2 * pi)) (x : ι → ℝ) : (∫ u in periodBox, F (x - u)) = ∫ u in periodBox, F u := by classical let e : Fin (card ι) ≃ ι := (Fintype.equivFin ι).symm let p : (Fin (card ι) → ℝ) ≃ᵐ (ι → ℝ) := MeasurableEquiv.piCongrLeft (fun _ : ι => ℝ) e have hp (u : Fin (card ι) → ℝ) (i : Fin (card ι)) : p u (e i) = u i := by simp [p, MeasurableEquiv.coe_piCongrLeft] have hbox : p ⁻¹' periodBox = periodBox := by ext u constructor · intro hu i _ exact hp u i ▸ hu (e i) (Set.mem_univ _) · intro hu i _ obtain ⟨j, rfl⟩ := e.surjective i rw [hp] exact hu j (Set.mem_univ _) have hmp : MeasurePreserving p := volume_measurePreserving_piCongrLeft (fun _ : ι => ℝ) e have htrans (H : (ι → ℝ) → ℝ) : (∫ u in periodBox, H u) = ∫ v in periodBox, H (p v) := by rw [← hmp.setIntegral_preimage_emb p.measurableEmbedding, hbox] let G : (Fin (card ι) → ℝ) → ℝ := fun u => F (p u) have hG : Measurable G := hF.comp p.measurable have hGb : ∀ y, |G y| ≤ B := fun y => hB (p y) have hupdate (y : Fin (card ι) → ℝ) (i : Fin (card ι)) (t : ℝ) : p (update y i t) = update (p y) (e i) t := by funext j obtain ⟨k, rfl⟩ := e.surjective j simp [hp, update, e.injective.eq_iff] have hGp : ∀ i y, Periodic (fun t => G (update y i t)) (2 * pi) := by intro i y t change F (p (update y i (t + 2 * pi))) = F (p (update y i t)) rw [hupdate, hupdate] exact hper (e i) (p y) t let x' : Fin (card ι) → ℝ := p.symm x have hsub (u : Fin (card ι) → ℝ) : p (x' - u) = x - p u := by funext i obtain ⟨j, rfl⟩ := e.surjective i rw [hp] change x' j - u j = x (e j) - p u (e j) rw [hp] congr 1 rw [htrans (fun u => F (x - u)), htrans F] change (∫ u in periodBox, F (x - p u)) = ∫ u in periodBox, G u simp_rw [← hsub] exact periodBox_integral_sub_eq_fin (card ι) G hG B hGb hGp x'
PairingRearrangement 6 core · 3 supporting This module proves the finite adjacent-pair rearrangement inequality, defines the Chebyshev chord list, and identifies its paired product with the complex root-distance product. ★ adjacentPairProduct_le_of_perm_sorted
Pairing rearrangements and Chebyshev chord products
This module proves the finite adjacent-pair rearrangement inequality, defines the Chebyshev chord list, and identifies its paired product with the complex root-distance product.
The consecutive-pair product of a list of real numbers with an additive constant t multiplies, over successive pairs of entries a and b of the list, the quantity a b + t; a final unpaired entry contributes no factor, and the empty list gives one.
Definition (Lean source)
For a nonnegative constant t and a list of real numbers that has even length, is sorted in decreasing order, and has only nonnegative entries, every rearrangement of the list has consecutive-pair product at most that of the sorted list itself; the consecutive-pair product multiplies, over successive pairs of entries, the product of the pair plus t.
Formal statement
Proof (Lean source)
A degree and index determine the corresponding Chebyshev root angle, equal to the odd multiple (2k+1)π/(2L).
Definition (Lean source)
The k-th Chebyshev cosine root for degree L and index k is the cosine of the angle (2k + 1) π / (2L); for k from 0 to L − 1 these are the roots of the degree-L Chebyshev polynomial of the first kind.
Definition (Lean source)
The squared chord length at an angle θ is two minus twice the cosine of θ, the squared distance from the point 1 to the point of the unit circle with argument θ.
Definition (Lean source)
For a degree L and an angle θ, this is the list of 2L squared chord lengths obtained by listing, for each of the L Chebyshev root angles in turn, the squared chord length at θ plus that root angle followed by the squared chord length at θ minus it.
Definition (Lean source)
3 supporting declarations (lemmas, instances)
-
crossingPairProduct_le_adjacentPairProductlemma — For four real numbers a, b, c, d that are decreasing, b at most a, c at most b, and d at most c, and a nonnegative constant t, the product (a c + t)(b d + t) from the crossing pairs is at most the product (a b + t)(c d + t) from the adjacent pairs.hypothesesa b c d t :ℝht :0 ≤ thab :b ≤ ahbc :c ≤ bhcd :d ≤ cconclusion(a * c + t) * (b * d + t) ≤ (a * b + t) * (c * d + t)Proof (Lean source)
lemma crossingPairProduct_le_adjacentPairProduct {a b c d t : ℝ} (ht : 0 ≤ t) (hab : b ≤ a) (hbc : c ≤ b) (hcd : d ≤ c) : (a * c + t) * (b * d + t) ≤ (a * b + t) * (c * d + t) := by have had : d ≤ a := hcd.trans (hbc.trans hab) have hnonneg : 0 ≤ t * (a - d) * (b - c) := mul_nonneg (mul_nonneg ht (sub_nonneg.mpr had)) (sub_nonneg.mpr hbc) calc (a * c + t) * (b * d + t) ≤ (a * c + t) * (b * d + t) + t * (a - d) * (b - c) := le_add_of_nonneg_right hnonneg _ = (a * b + t) * (c * d + t) := by ring -
nestedPairProduct_le_adjacentPairProductlemma — For four real numbers a, b, c, d that are decreasing, b at most a, c at most b, and d at most c, and a nonnegative constant t, the product (a d + t)(b c + t) from the outer and inner pairs is at most the product (a b + t)(c d + t) from the adjacent pairs.hypothesesa b c d t :ℝht :0 ≤ thab :b ≤ ahbc :c ≤ bhcd :d ≤ cconclusion(a * d + t) * (b * c + t) ≤ (a * b + t) * (c * d + t)Proof (Lean source)
lemma nestedPairProduct_le_adjacentPairProduct {a b c d t : ℝ} (ht : 0 ≤ t) (hab : b ≤ a) (hbc : c ≤ b) (hcd : d ≤ c) : (a * d + t) * (b * c + t) ≤ (a * b + t) * (c * d + t) := by have hac : c ≤ a := hbc.trans hab have hbd : d ≤ b := hcd.trans hbc have hnonneg : 0 ≤ t * (a - c) * (b - d) := mul_nonneg (mul_nonneg ht (sub_nonneg.mpr hac)) (sub_nonneg.mpr hbd) calc (a * d + t) * (b * c + t) ≤ (a * d + t) * (b * c + t) + t * (a - c) * (b - d) := le_add_of_nonneg_right hnonneg _ = (a * b + t) * (c * d + t) := by ring -
adjacentPairProduct_chebyshevPairedChordListtheorem — For a degree L, an angle θ, and a height y, the consecutive-pair product of the paired chord list with additive constant 4y² equals the product, over the L Chebyshev cosine roots, of four times the squared distance from the complex point cos θ + i y to that root.Proof (Lean source)
theorem adjacentPairProduct_chebyshevPairedChordList (L : ℕ) (θ y : ℝ) : adjacentPairProduct (4 * y ^ 2) (chebyshevPairedChordList L θ) = ∏ k ∈ range L, 4 * ‖((Real.cos θ - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ ^ 2 := by have pair_identity (α : ℝ) : (2 - 2 * Real.cos (θ + α)) * (2 - 2 * Real.cos (θ - α)) + 4 * y ^ 2 = 4 * ‖((Real.cos θ - Real.cos α : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ ^ 2 := by rw [Complex.sq_norm, Complex.normSq_add_mul_I] rw [Real.cos_add, Real.cos_sub] nlinarith [Real.sin_sq_add_cos_sq θ, Real.sin_sq_add_cos_sq α] rw [chebyshevPairedChordList, adjacentPairProduct_flatMap_pairs] rw [Multiset.prod_map_toList] apply Finset.prod_congr rfl intro k hk rw [cosineChordSq, chebyshevZero] exact pair_identity (chebyshevRootAngle L k)
ParametricTensor 4 core · 4 supporting Bounded coordinatewise-degree real multivariate polynomials are represented in one fixed finite monomial basis. ★ continuous_tensorCoeffs_of_grid
Fixed-basis tensor-polynomial coefficients
Bounded coordinatewise-degree real multivariate polynomials are represented in one fixed finite monomial basis. Evaluation at a fixed tensor grid determines every coefficient, so a pointwise polynomial family has continuous coefficients when its grid values are continuous. This applies to a Jackson family even if each representative was initially chosen separately.
A tensor index, assigning each of the d coordinates a degree between 0 and D, determines its monomial exponent: the exponent vector whose entry in each coordinate is the index's value there.
A multivariate polynomial and tensor index determine the associated fixed-basis coefficient: the coefficient, in the polynomial, of the monomial whose exponent in each coordinate is the index's value there.
Definition (Lean source)
A finite tensor coefficient vector determines the multivariate polynomial synthesized in the fixed monomial basis: the sum, over all tensor indices with coordinatewise degrees at most D, of the vector's entry times the monomial with those exponents.
Definition (Lean source)
A parameter-indexed polynomial family whose members all have degree at most D in each variable, and whose value at every point of the integer tensor grid with coordinates in 0, …, D is continuous in the parameter, has, for each coefficient index, a monomial coefficient that varies continuously with the parameter.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
tensorPolynomial_tensorCoeffstheorem — A polynomial of coordinatewise degree at most D equals the synthesis of its fixed-basis coefficient vector. The support bound should be converted using degreeOf_le_iff, then as_sum.hypothesesconclusiontensorPolynomial (tensorCoeffs (D := D) p) = pProof (Lean source)
theorem tensorPolynomial_tensorCoeffs {d D : ℕ} (p : MvPolynomial (Fin d) ℝ) (hdeg : ∀ i, p.degreeOf i ≤ D) : tensorPolynomial (tensorCoeffs (D := D) p) = p := by classical have hinj : Injective (tensorExponent (d := d) (D := D)) := by intro a b h funext i apply Fin.ext have hi := congrArg (fun m : Fin d →₀ ℕ => m i) h simpa [tensorExponent] using hi apply MvPolynomial.ext intro m by_cases hb : ∀ i, m i ≤ D · let a : Fin d → Fin (D + 1) := fun i => ⟨m i, Nat.lt_succ_of_le (hb i)⟩ have ha : tensorExponent a = m := by apply Finsupp.ext intro i simp [a, tensorExponent] simp only [tensorPolynomial, tensorCoeffs, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] rw [Finset.sum_eq_single a] · simp [ha] · intro b _ hba have hne : tensorExponent b ≠ m := fun h => hba (hinj (h.trans ha.symm)) simp [hne] · intro h exact (h (Finset.mem_univ a)).elim · have hm : m ∉ p.support := by intro hmem apply hb intro i exact (MvPolynomial.degreeOf_le_iff.mp (hdeg i)) m hmem have hc : p.coeff m = 0 := MvPolynomial.notMem_support_iff.mp hm simp only [tensorPolynomial, tensorCoeffs, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] rw [Finset.sum_eq_zero] · exact hc.symm · intro a _ have hne : tensorExponent a ≠ m := by intro h apply hb intro i have hi := congrArg (fun n : Fin d →₀ ℕ => n i) h have hi' : (a i : ℕ) = m i := by simpa [tensorExponent] using hi exact hi' ▸ Nat.lt_succ_iff.mp (a i).isLt simp [hne] -
tensorPolynomial_eq_of_gridtheorem — Evaluation on the integer tensor grid determines a polynomial of coordinatewise degree at most D. Prove this by induction on the number of coordinates using univariate root bounds.hypothesesconclusionp = qProof (Lean source)
theorem tensorPolynomial_eq_of_grid {d D : ℕ} (p q : MvPolynomial (Fin d) ℝ) (hp : ∀ i, p.degreeOf i ≤ D) (hq : ∀ i, q.degreeOf i ≤ D) (hgrid : ∀ a : Fin d → Fin (D + 1), eval (fun i => (a i : ℝ)) p = eval (fun i => (a i : ℝ)) q) : p = q := by classical let S : Fin d → Finset ℝ := fun _ => Finset.univ.image (fun j : Fin (D + 1) => (j : ℝ)) have hcard (i : Fin d) : (S i).card = D + 1 := by dsimp [S] rw [Finset.card_image_of_injective] · simp · intro a b h change (a : ℝ) = (b : ℝ) at h apply Fin.ext exact_mod_cast h have hdeg' (i : Fin d) : (p - q).degreeOf i < (S i).card := by rw [hcard i] exact lt_of_le_of_lt (MvPolynomial.degreeOf_sub_le i p q) (Nat.lt_succ_of_le (max_le (hp i) (hq i))) have hzero : p - q = 0 := MvPolynomial.eq_zero_of_eval_zero_at_prod_finset (p - q) S hdeg' (by intro x hx have hchoice : ∀ i : Fin d, ∃ a : Fin (D + 1), (a : ℝ) = x i := by intro i obtain ⟨a, _, ha⟩ := Finset.mem_image.mp (hx i) exact ⟨a, ha⟩ choose a ha using hchoice have he := hgrid a have hxa : (fun i => (a i : ℝ)) = x := funext ha simpa [MvPolynomial.eval_sub, hxa] using sub_eq_zero.mpr he) exact sub_eq_zero.mp hzero -
measurable_tensorCoeffs_of_gridtheorem — The recovered coefficient of a degree-bounded polynomial family is measurable when its fixed-grid evaluations are continuous.hypothesesΛ :d D :ℕp :Λ → MvPolynomial (Fin d) ℝhdeg :∀ s i, (p s).degreeOf i ≤ Dhgrid :Continuous (fun s => eval (fun i => (a i : ℝ)) (p s))conclusionMeasurable (fun s => tensorCoeffs (D := D) (p s) a)Proof (Lean source)
theorem measurable_tensorCoeffs_of_grid {Λ : Type*} [TopologicalSpace Λ] [MeasurableSpace Λ] [BorelSpace Λ] {d D : ℕ} (p : Λ → MvPolynomial (Fin d) ℝ) (hdeg : ∀ s i, (p s).degreeOf i ≤ D) (hgrid : ∀ a : Fin d → Fin (D + 1), Continuous (fun s => eval (fun i => (a i : ℝ)) (p s))) (a : Fin d → Fin (D + 1)) : Measurable (fun s => tensorCoeffs (D := D) (p s) a) := by exact (continuous_tensorCoeffs_of_grid p hdeg hgrid a).measurable -
tensorCoeffs_l1_le_cube_boundtheorem — A polynomial bounded by B on the normalized tensor cube has a coefficient one-norm bounded exponentially in its coordinatewise degree. This is the deterministic envelope used for the Jackson coefficient path; the estimate is valid for every polynomial representative.hypothesesd D :ℕp :MvPolynomial (Fin d) ℝB :ℝhB :0 ≤ Bhdeg :∀ i, p.degreeOf i ≤ Dhbound :∀ x ∈ normalizedCube d, |eval x p| ≤ BconclusionmvCoeffL1 p ≤ ((2 : ℝ) * (D + 1) ^ 2 * (3 : ℝ) ^ D) ^ d * BProof (Lean source)
theorem tensorCoeffs_l1_le_cube_bound {d D : ℕ} (p : MvPolynomial (Fin d) ℝ) (B : ℝ) (hB : 0 ≤ B) (hdeg : ∀ i, p.degreeOf i ≤ D) (hbound : ∀ x ∈ normalizedCube d, |eval x p| ≤ B) : mvCoeffL1 p ≤ ((2 : ℝ) * (D + 1) ^ 2 * (3 : ℝ) ^ D) ^ d * B := by exact mvCoeffL1_le_bounded p B hB (fun m hm i => (MvPolynomial.degreeOf_le_iff.mp (hdeg i)) m hm) hbound
PolynomialOneNorm 4 core · 4 supporting The finite sum of absolute monomial coefficients is submultiplicative. ★ polynomialCoeffOneNorm_mul_le★ shiftedCheb_coeffL1_le
Coefficient one-norm of real polynomials
The finite sum of absolute monomial coefficients is submultiplicative. This gives the quantitative algebraic input for equispaced Lagrange basis bounds.
A real polynomial determines its coefficient one-norm, the sum of the absolute values of all its monomial coefficients.
Definition (Lean source)
Two real polynomials have a coefficient one-norm for their product no larger than the product of their coefficient one-norms.
Formal statement
Proof (Lean source)
For a natural degree r, the shifted first-kind Chebyshev polynomial is the degree-r Chebyshev polynomial of the first kind composed with the affine map x ↦ 1 − 2x, which carries the unit interval onto the interval from −1 to 1 with reversed orientation.
For a natural degree r, the coefficient one-norm of the shifted first-kind Chebyshev polynomial of degree r is at most 7 to the power r.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
polynomialCoeffOneNorm_X_sub_C_le_twotheorem — A linear factor X - x with x in the unit interval has coefficient one-norm at most two.hypothesesx :ℝhx0 :0 ≤ xhx1 :x ≤ 1conclusionpolynomialCoeffOneNorm (X - C x : Polynomial ℝ) ≤ 2Proof (Lean source)
theorem polynomialCoeffOneNorm_X_sub_C_le_two (x : ℝ) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) : polynomialCoeffOneNorm (X - C x : Polynomial ℝ) ≤ 2 := by have hd : (X - C x : Polynomial ℝ).natDegree < 2 := by exact lt_of_le_of_lt (natDegree_sub_le _ _) (by simp) rw [show polynomialCoeffOneNorm (X - C x : Polynomial ℝ) = ∑ k ∈ range 2, |(X - C x : Polynomial ℝ).coeff k| from (X - C x : Polynomial ℝ).sum_over_range' (fun _ => abs_zero) 2 hd] simp [Finset.sum_range_succ, abs_of_nonneg hx0] linarith -
polynomialCoeffOneNorm_rangelemma — For a real polynomial and truncation length, if the degree lies below that length, its coefficient one-norm is the corresponding finite range sum.hypothesesp :ℝ[X]m :ℕhp :p.natDegree < mconclusionpolynomialCoeffOneNorm p = ∑ i ∈ range m, |p.coeff i|Proof (Lean source)
lemma polynomialCoeffOneNorm_range (p : ℝ[X]) {m : ℕ} (hp : p.natDegree < m) : polynomialCoeffOneNorm p = ∑ i ∈ range m, |p.coeff i| := by change p.sum (fun _ c => |c|) = _ exact p.sum_over_range' (fun _ => abs_zero) m hp -
polynomialCoeffOneNorm_sub_lelemma — The coefficient one-norm of a difference is at most the sum of the coefficient one-norms of the two real polynomials.hypothesesp q :ℝ[X]conclusionProof (Lean source)
lemma polynomialCoeffOneNorm_sub_le (p q : ℝ[X]) : polynomialCoeffOneNorm (p - q) ≤ polynomialCoeffOneNorm p + polynomialCoeffOneNorm q := by let m := max p.natDegree q.natDegree + 1 rw [polynomialCoeffOneNorm_range (p - q) (lt_of_le_of_lt (natDegree_sub_le _ _) (lt_succ_self _)), polynomialCoeffOneNorm_range p (lt_of_le_of_lt (le_max_left _ _) (lt_succ_self _)), polynomialCoeffOneNorm_range q (lt_of_le_of_lt (le_max_right _ _) (lt_succ_self _)), ← Finset.sum_add_distrib] exact Finset.sum_le_sum fun i _ => by simpa only [coeff_sub] using abs_sub (p.coeff i) (q.coeff i) -
shiftedCheb_recurrencelemma — For a natural degree, the shifted Chebyshev polynomials satisfy the stated two-step recurrence, which controls their coefficient growth. The result is the two-step recurrence for shifted Chebyshev polynomials.Proof (Lean source)
lemma shiftedCheb_recurrence (r : ℕ) : shiftedCheb (r + 2) = 2 * (1 - C (2 : ℝ) * X) * shiftedCheb (r + 1) - shiftedCheb r := by unfold shiftedCheb push_cast rw [Polynomial.Chebyshev.T_add_two, Polynomial.sub_comp, Polynomial.mul_comp] simp
AffineFour 4 core · 7 supporting This module transports tensor Jackson approximation between the normalized cube and a rectangle with positive radii (the raw normalization and rectangle definitions accept any radii; the transport theorems assume positiv ★ affineJackson_approx_four
Affine Jackson approximation on four-dimensional rectangles
This module transports tensor Jackson approximation between the normalized cube and a rectangle with positive radii (the raw normalization and rectangle definitions accept any radii; the transport theorems assume positivity), preserving evaluation, degree, approximation, and coefficient bounds.
A finite dimension, a rectangle center, coordinate radii, and normalized coordinates determine the corresponding point under the center-plus-radius affine map.
A finite dimension, a rectangle center, coordinate radii, and a point in the rectangle's ambient space determine its normalized coordinates by subtracting the center and dividing coordinatewise by the radii. This is a normalization for positive radii, as assumed by the approximation results; a zero radius gives coordinate zero by the division convention.
A finite dimension, a center, and coordinate radii determine the closed centered rectangle consisting of points whose coordinatewise distance from the center does not exceed the corresponding radius. No sign condition is imposed on the radii; a negative radius makes the set empty, and the approximation results assume positive radii.
For integer order K that is strictly positive, a rectangle center, positive coordinate radii, a function, a nonnegative Lipschitz constant L, continuity on the centered rectangle, and the bound that the function changes between any two points of the rectangle by at most L times the sum of their coordinate differences divided by the radii, there is a four-variable polynomial of degree at most 2 (K − 1) in each variable and total degree at most 8 (K − 1) that approximates the function throughout the rectangle within one hundred twenty-eight times the Lipschitz constant divided by K.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
normalizedPoint_affinePointtheorem — For a finite dimension, a center, coordinate radii, and normalized coordinates, if every radius is positive, then normalizing the affine image recovers the original normalized coordinates.hypothesesconclusionnormalizedPoint c r (affinePoint c r z) = zProof (Lean source)
theorem normalizedPoint_affinePoint {d : ℕ} (c r z : Fin d → ℝ) (hr : ∀ i, 0 < r i) : normalizedPoint c r (affinePoint c r z) = z := by funext i simp only [normalizedPoint, affinePoint] field_simp [ne_of_gt (hr i)] ring -
affinePoint_normalizedPointtheorem — For a finite dimension, a center, coordinate radii, and a point, if every radius is positive, then applying the affine map to the normalized point recovers the original point.hypothesesconclusionaffinePoint c r (normalizedPoint c r y) = yProof (Lean source)
theorem affinePoint_normalizedPoint {d : ℕ} (c r y : Fin d → ℝ) (hr : ∀ i, 0 < r i) : affinePoint c r (normalizedPoint c r y) = y := by funext i simp only [affinePoint, normalizedPoint] field_simp [ne_of_gt (hr i)] ring -
affinePoint_mem_centeredRectangletheorem — For a finite dimension, a center, coordinate radii, and normalized coordinates, if every radius is strictly positive and the normalized point lies in the normalized cube, then its affine image lies in the centered rectangle.hypothesesconclusionaffinePoint c r z ∈ centeredRectangle c rProof (Lean source)
theorem affinePoint_mem_centeredRectangle {d : ℕ} (c r z : Fin d → ℝ) (hr : ∀ i, 0 < r i) (hz : z ∈ normalizedCube d) : affinePoint c r z ∈ centeredRectangle c r := by intro i simp only [affinePoint] rw [add_sub_cancel_left, abs_mul, abs_of_pos (hr i)] exact mul_le_of_le_one_right (le_of_lt (hr i)) (abs_le.mpr (hz i)) -
normalizedPoint_mem_normalizedCubetheorem — For a finite dimension, a center, coordinate radii, and a point, if every radius is positive and the point lies in the centered rectangle, then its normalized coordinates lie in the normalized cube.hypothesesconclusionnormalizedPoint c r y ∈ normalizedCube dProof (Lean source)
theorem normalizedPoint_mem_normalizedCube {d : ℕ} (c r y : Fin d → ℝ) (hr : ∀ i, 0 < r i) (hy : y ∈ centeredRectangle c r) : normalizedPoint c r y ∈ normalizedCube d := by intro i rw [show normalizedPoint c r y i = (y i - c i) / r i by rfl, Set.mem_Icc] apply abs_le.mp rw [abs_div, abs_of_pos (hr i), div_le_one (hr i)] exact hy i -
mvPolynomial_affine_substitution_fourtheorem — Given a four-variable polynomial, a center, coordinate radii that are strictly positive, a coordinate-degree limit n, and the fact that the polynomial has degree at most n in each variable, there is a four-variable polynomial whose value at every point equals the original polynomial at the normalized coordinates of that point, which has degree at most n in each variable and total degree at most that of the original, and whose coefficients have absolute values summing to at most the original's coefficient sum times the product over coordinates of the n-th power of the larger of one and (1 + |centre|) / radius.hypothesesq :MvPolynomial (Fin 4) ℝc r :Fin 4 → ℝn :ℕhr :∀ i, 0 < r ihqcoord :∀ m ∈ q.support, ∀ i, m i ≤ nconclusion∃ p : MvPolynomial (Fin 4) ℝ,conclusion 2m ∈ p.support :i :m i ≤ nconclusion 3p.totalDegree ≤ q.totalDegreeProof (Lean source)
theorem mvPolynomial_affine_substitution_four (q : MvPolynomial (Fin 4) ℝ) (c r : Fin 4 → ℝ) (n : ℕ) (hr : ∀ i, 0 < r i) (hqcoord : ∀ m ∈ q.support, ∀ i, m i ≤ n) : ∃ p : MvPolynomial (Fin 4) ℝ, (∀ y, eval y p = eval (normalizedPoint c r y) q) ∧ (∀ m ∈ p.support, ∀ i, m i ≤ n) ∧ p.totalDegree ≤ q.totalDegree ∧ mvCoeffL1 p ≤ mvCoeffL1 q * ∏ i : Fin 4, (max 1 ((1 + |c i|) / r i)) ^ n := by classical let g : Fin 4 → MvPolynomial (Fin 4) ℝ := fun i => (MvPolynomial.X i - MvPolynomial.C (c i)) * MvPolynomial.C (r i)⁻¹ let p := MvPolynomial.bind₁ g q have hp_sum : p = ∑ m ∈ q.support, MvPolynomial.bind₁ g (monomial m (q.coeff m)) := by dsimp [p] conv_lhs => rw [q.as_sum] simp only [map_sum] have hcoord_term (m : Fin 4 →₀ ℕ) (a : ℝ) (i : Fin 4) : (MvPolynomial.bind₁ g (monomial m a)).degreeOf i ≤ m i := by rw [MvPolynomial.bind₁_monomial] calc (MvPolynomial.C a * ∏ j ∈ m.support, g j ^ m j : MvPolynomial (Fin 4) ℝ).degreeOf i ≤ (MvPolynomial.C a : MvPolynomial (Fin 4) ℝ).degreeOf i + (∏ j ∈ m.support, g j ^ m j : MvPolynomial (Fin 4) ℝ).degreeOf i := MvPolynomial.degreeOf_mul_le _ _ _ _ ≤ 0 + ∑ j ∈ m.support, (g j ^ m j : MvPolynomial (Fin 4) ℝ).degreeOf i := by gcongr · simp · exact MvPolynomial.degreeOf_prod_le _ _ _ _ ≤ ∑ j ∈ m.support, m j * (if i = j then 1 else 0) := by simp only [zero_add] gcongr with j hj exact (MvPolynomial.degreeOf_pow_le _ _ _).trans (Nat.mul_le_mul_left _ (by dsimp [g] exact affineVariable_degreeOf_le c r i j)) _ = m i := by by_cases hi : i ∈ m.support · rw [Finset.sum_eq_single i] · simp · intro j hj hji simp [Ne.symm hji] · exact fun h => (h hi).elim · have hmi : m i = 0 := Finsupp.notMem_support_iff.mp hi rw [hmi] apply Finset.sum_eq_zero intro j hj have hji : i ≠ j := by intro hij subst j exact hi hj simp [hji] have htotal_term (m : Fin 4 →₀ ℕ) (a : ℝ) : (MvPolynomial.bind₁ g (monomial m a)).totalDegree ≤ m.sum fun _ e => e := by rw [MvPolynomial.bind₁_monomial] calc (MvPolynomial.C a * ∏ j ∈ m.support, g j ^ m j : MvPolynomial (Fin 4) ℝ).totalDegree ≤ (MvPolynomial.C a : MvPolynomial (Fin 4) ℝ).totalDegree + (∏ j ∈ m.support, g j ^ m j : MvPolynomial (Fin 4) ℝ).totalDegree := MvPolynomial.totalDegree_mul _ _ _ ≤ 0 + ∑ j ∈ m.support, (g j ^ m j : MvPolynomial (Fin 4) ℝ).totalDegree := by gcongr · simp · exact MvPolynomial.totalDegree_finsetProd _ _ _ ≤ ∑ j ∈ m.support, m j := by simp only [zero_add] gcongr with j hj exact (MvPolynomial.totalDegree_pow _ _).trans (by simpa [g] using Nat.mul_le_mul_left (m j) (affineVariable_totalDegree_le c r j)) _ = m.sum fun _ e => e := by rfl refine ⟨p, ?_, ?_, ?_, ?_⟩ · intro y dsimp [p] rw [← MvPolynomial.aeval_eq_eval, MvPolynomial.aeval_bind₁, MvPolynomial.aeval_eq_eval] apply congrArg (fun z => eval z q) funext i simp [g, normalizedPoint, div_eq_mul_inv] · intro m hm i apply (MvPolynomial.monomial_le_degreeOf i hm).trans rw [hp_sum] refine (MvPolynomial.degreeOf_sum_le i q.support (fun m => MvPolynomial.bind₁ g (monomial m (q.coeff m)))).trans ?_ exact Finset.sup_le fun m hm => (hcoord_term m (q.coeff m) i).trans (hqcoord m hm i) · rw [hp_sum] refine (MvPolynomial.totalDegree_finsetSum q.support (fun m => MvPolynomial.bind₁ g (monomial m (q.coeff m)))).trans ?_ exact Finset.sup_le fun m hm => (htotal_term m (q.coeff m)).trans (MvPolynomial.le_totalDegree hm) · let A : Fin 4 → ℝ := fun i => (1 + |c i|) / r i let M : Fin 4 → ℝ := fun i => max 1 (A i) have hA (i : Fin 4) : 0 ≤ A i := by dsimp [A] exact div_nonneg (by positivity) (le_of_lt (hr i)) have hAM (i : Fin 4) : A i ≤ M i := by exact le_max_right _ _ have hM (i : Fin 4) : 1 ≤ M i := by exact le_max_left _ _ have hg_l1 (i : Fin 4) : mvCoeffL1 (g i) ≤ A i := by dsimp [g, A] calc mvCoeffL1 ((MvPolynomial.X i - MvPolynomial.C (c i)) * MvPolynomial.C (r i)⁻¹ : MvPolynomial (Fin 4) ℝ) ≤ mvCoeffL1 (MvPolynomial.X i - MvPolynomial.C (c i) : MvPolynomial (Fin 4) ℝ) * mvCoeffL1 (MvPolynomial.C (r i)⁻¹ : MvPolynomial (Fin 4) ℝ) := mvCoeffL1_mul_le _ _ _ ≤ (mvCoeffL1 (MvPolynomial.X i : MvPolynomial (Fin 4) ℝ) + mvCoeffL1 (-MvPolynomial.C (c i) : MvPolynomial (Fin 4) ℝ)) * mvCoeffL1 (MvPolynomial.C (r i)⁻¹ : MvPolynomial (Fin 4) ℝ) := by apply mul_le_mul_of_nonneg_right · simpa [sub_eq_add_neg] using mvCoeffL1_add_le (MvPolynomial.X i : MvPolynomial (Fin 4) ℝ) (-MvPolynomial.C (c i)) · unfold mvCoeffL1 positivity _ = (1 + |c i|) / r i := by rw [mvCoeffL1_X, mvCoeffL1_neg, mvCoeffL1_C, mvCoeffL1_C, abs_inv, abs_of_pos (hr i)] simp [div_eq_mul_inv] have hterm_l1 (m : Fin 4 →₀ ℕ) (a : ℝ) : mvCoeffL1 (MvPolynomial.bind₁ g (monomial m a)) ≤ |a| * ∏ i ∈ m.support, A i ^ m i := by rw [MvPolynomial.bind₁_monomial] calc mvCoeffL1 (MvPolynomial.C a * ∏ i ∈ m.support, g i ^ m i) ≤ mvCoeffL1 (MvPolynomial.C a : MvPolynomial (Fin 4) ℝ) * mvCoeffL1 (∏ i ∈ m.support, g i ^ m i) := mvCoeffL1_mul_le _ _ _ ≤ |a| * ∏ i ∈ m.support, mvCoeffL1 (g i ^ m i) := by rw [mvCoeffL1_C] exact mul_le_mul_of_nonneg_left (mvCoeffL1_finsetProd_le _ _) (abs_nonneg a) _ ≤ |a| * ∏ i ∈ m.support, mvCoeffL1 (g i) ^ m i := by apply mul_le_mul_of_nonneg_left _ (abs_nonneg a) apply Finset.prod_le_prod · intro i hi unfold mvCoeffL1 positivity · intro i hi exact mvCoeffL1_pow_le _ _ _ ≤ |a| * ∏ i ∈ m.support, A i ^ m i := by apply mul_le_mul_of_nonneg_left _ (abs_nonneg a) apply Finset.prod_le_prod · intro i hi exact pow_nonneg (by unfold mvCoeffL1; positivity) _ · intro i hi exact pow_le_pow_left₀ (by unfold mvCoeffL1; positivity) (hg_l1 i) _ have hfactor (m : Fin 4 →₀ ℕ) (hm : m ∈ q.support) : (∏ i ∈ m.support, A i ^ m i) ≤ ∏ i : Fin 4, M i ^ n := by calc (∏ i ∈ m.support, A i ^ m i) ≤ ∏ i ∈ m.support, M i ^ n := by apply Finset.prod_le_prod · intro i hi exact pow_nonneg (hA i) _ · intro i hi exact (pow_le_pow_left₀ (hA i) (hAM i) _).trans (pow_le_pow_right₀ (hM i) (hqcoord m hm i)) _ ≤ ∏ i : Fin 4, M i ^ n := by apply Finset.prod_le_prod_of_subset_of_one_le (Finset.subset_univ _) · intro i hi positivity · intro i hi hnot exact one_le_pow₀ (hM i) rw [hp_sum] calc mvCoeffL1 (∑ m ∈ q.support, MvPolynomial.bind₁ g (monomial m (q.coeff m))) ≤ ∑ m ∈ q.support, mvCoeffL1 (MvPolynomial.bind₁ g (monomial m (q.coeff m))) := mvCoeffL1_finsetSum_le _ _ _ ≤ ∑ m ∈ q.support, |q.coeff m| * ∏ i : Fin 4, M i ^ n := by gcongr with m hm exact (hterm_l1 m (q.coeff m)).trans (mul_le_mul_of_nonneg_left (hfactor m hm) (abs_nonneg _)) _ = mvCoeffL1 q * ∏ i : Fin 4, M i ^ n := by rw [← Finset.sum_mul] rfl _ = mvCoeffL1 q * ∏ i : Fin 4, (max 1 ((1 + |c i|) / r i)) ^ n := by rfl -
affineJackson_exists_mvPolynomial_fourtheorem — For integer order K that is strictly positive, a rectangle center, positive coordinate radii, and a function that is continuous on the centered rectangle, there are two four-variable polynomials: one reproduces, at the coordinatewise cosines of every point, the order-K tensor convolution of the function expressed in normalized coordinates; the other equals the first evaluated at the normalized coordinates of its argument, has degree at most 2 (K − 1) in each variable, and has total degree at most 8 (K − 1).hypothesesK :ℕhK :0 < Kc r :Fin 4 → ℝhr :∀ i, 0 < r if :(Fin 4 → ℝ) → ℝhf :ContinuousOn f (centeredRectangle c r)conclusion∃ p q : MvPolynomial (Fin 4) ℝ,conclusion 3m ∈ p.support :i :m i ≤ 2 * (K - 1)conclusion 4p.totalDegree ≤ 8 * (K - 1)Proof (Lean source)
theorem affineJackson_exists_mvPolynomial_four {K : ℕ} (hK : 0 < K) (c r : Fin 4 → ℝ) (hr : ∀ i, 0 < r i) (f : (Fin 4 → ℝ) → ℝ) (hf : ContinuousOn f (centeredRectangle c r)) : ∃ p q : MvPolynomial (Fin 4) ℝ, (∀ y, eval y p = eval (normalizedPoint c r y) q) ∧ (∀ x, eval (cosPoint x) q = tensorConvolution K (fun z => f (affinePoint c r z)) x) ∧ (∀ m ∈ p.support, ∀ i, m i ≤ 2 * (K - 1)) ∧ p.totalDegree ≤ 8 * (K - 1) := by /- Pull `f` back along `affinePoint`, proving continuity on `normalizedCube 4` with `ContinuousOn.comp` and `affinePoint_mem_centeredRectangle`. Apply `tensorConvolution_exists_mvPolynomial`, then apply `mvPolynomial_affine_substitution_four` to its output with `n = 2 * (K - 1)`. The substitution evaluation identity is exactly the first conjunct; its support and total-degree conclusions, together with `4 * (2 * (K - 1)) = 8 * (K - 1)`, discharge the remaining conjuncts. -/ have haff : Continuous (affinePoint c r) := by apply continuous_pi intro i exact continuous_const.add (continuous_const.mul (continuous_apply i)) have hpull : ContinuousOn (fun z => f (affinePoint c r z)) (normalizedCube 4) := hf.comp haff.continuousOn (fun z hz => affinePoint_mem_centeredRectangle c r z hr hz) obtain ⟨q, hqeval, hqcoord, hqtotal⟩ := tensorConvolution_exists_mvPolynomial hK (fun z => f (affinePoint c r z)) hpull obtain ⟨p, hpeval, hpcoord, hptotal, _⟩ := mvPolynomial_affine_substitution_four q c r (2 * (K - 1)) hr hqcoord refine ⟨p, q, hpeval, hqeval, hpcoord, ?_⟩ omega -
affineJackson_coeffBound_fourtheorem — For integer order K that is strictly positive, a rectangle center, positive coordinate radii, a function, a nonnegative uniform bound B, continuity on the centered rectangle, and the corresponding uniform bound throughout the rectangle, there are two four-variable polynomials: one reproduces, at the coordinatewise cosines of every point, the order-K tensor convolution of the function expressed in normalized coordinates; the other equals the first evaluated at the normalized coordinates of its argument, has degree at most 2 (K − 1) in each variable and total degree at most 8 (K − 1), and has coefficients whose absolute values sum to at most 2 to the power 40 K + 20, times B, times the product over coordinates of the 2 (K − 1)-th power of the larger of one and (1 + |centre|) / radius.hypothesesK :ℕhK :0 < Kc r :Fin 4 → ℝhr :∀ i, 0 < r if :(Fin 4 → ℝ) → ℝB :ℝhB :0 ≤ Bhf :ContinuousOn f (centeredRectangle c r)hbound :∀ y ∈ centeredRectangle c r, |f y| ≤ Bconclusion∃ p q : MvPolynomial (Fin 4) ℝ,conclusion 3m ∈ p.support :i :m i ≤ 2 * (K - 1)conclusion 4p.totalDegree ≤ 8 * (K - 1)Proof (Lean source)
theorem affineJackson_coeffBound_four {K : ℕ} (hK : 0 < K) (c r : Fin 4 → ℝ) (hr : ∀ i, 0 < r i) (f : (Fin 4 → ℝ) → ℝ) (B : ℝ) (hB : 0 ≤ B) (hf : ContinuousOn f (centeredRectangle c r)) (hbound : ∀ y ∈ centeredRectangle c r, |f y| ≤ B) : ∃ p q : MvPolynomial (Fin 4) ℝ, (∀ y, eval y p = eval (normalizedPoint c r y) q) ∧ (∀ x, eval (cosPoint x) q = tensorConvolution K (fun z => f (affinePoint c r z)) x) ∧ (∀ m ∈ p.support, ∀ i, m i ≤ 2 * (K - 1)) ∧ p.totalDegree ≤ 8 * (K - 1) ∧ mvCoeffL1 p ≤ (2 : ℝ) ^ (40 * K + 20) * B * ∏ i : Fin 4, (max 1 ((1 + |c i|) / r i)) ^ (2 * (K - 1)) := by /- Pull `f` back along `affinePoint`; rectangle boundedness restricts to cube boundedness by `affinePoint_mem_centeredRectangle`. Obtain `q` from `tensorConvolution_exists_mvPolynomial_four_coeffBound`, then substitute it using `mvPolynomial_affine_substitution_four` at degree `2 * (K - 1)`. Combine the two coefficient inequalities by multiplication with the nonnegative finite product. Reuse the substitution support/total-degree conclusions and the tensor evaluation identity without reconstructing a different representative. -/ have haff : Continuous (affinePoint c r) := by apply continuous_pi intro i exact continuous_const.add (continuous_const.mul (continuous_apply i)) have hpull : ContinuousOn (fun z => f (affinePoint c r z)) (normalizedCube 4) := hf.comp haff.continuousOn (fun z hz => affinePoint_mem_centeredRectangle c r z hr hz) have hbound_pull : ∀ z ∈ normalizedCube 4, |f (affinePoint c r z)| ≤ B := by intro z hz exact hbound (affinePoint c r z) (affinePoint_mem_centeredRectangle c r z hr hz) obtain ⟨q, hqeval, hqcoord, hqtotal, hqcoeff⟩ := tensorConvolution_exists_mvPolynomial_four_coeffBound hK (fun z => f (affinePoint c r z)) B hB hpull hbound_pull obtain ⟨p, hpeval, hpcoord, hptotal, hpcoeff⟩ := mvPolynomial_affine_substitution_four q c r (2 * (K - 1)) hr hqcoord refine ⟨p, q, hpeval, hqeval, hpcoord, ?_, ?_⟩ · omega · have hfactor : 0 ≤ ∏ i : Fin 4, (max 1 ((1 + |c i|) / r i)) ^ (2 * (K - 1)) := by positivity exact hpcoeff.trans (mul_le_mul_of_nonneg_right hqcoeff hfactor)
Bernstein 5 core · 5 supporting For a real polynomial R of degree ≤ β, the substitution x = -cos t turns R into the *even trigonometric polynomial* czTrig R t = R.eval (-cos t) of degree ≤ β on [0, π]. ★ czTrig_szego_deriv★ czTrig_arccos_lipschitz★ czTrig_maximizer_bound
Bernstein / Szegő analytic core for the Ehlich–Zeller mesh inequality
For a real polynomial R of degree ≤ β, the substitution x = -cos t turns
R into the even trigonometric polynomial czTrig R t = R.eval (-cos t) of
degree ≤ β on [0, π]. This file isolates the genuinely analytic heart of the
Ehlich–Zeller argument, namely Bernstein's / Szegő's differential inequality for
trigonometric polynomials and its arccos-Lipschitz consequence.
Main declarations:
* czTrig, czSup — the trigonometric transform of R and its sup-norm on
[0, π].
* czTrig_continuous, czSup_attained — soft-analysis facts (continuity and
attainment of the sup on the compact interval [0, π]).
* czTrig_szego_deriv — Szegő's inequality: `|d/dt czTrig R t| ≤ β ·
√(M² − (czTrig R t)²) where M = czSup R`. This is the deep input; no such
lemma exists in Mathlib, so it is proved here from the trigonometric-polynomial
structure of czTrig R.
* czTrig_arccos_lipschitz — the Lipschitz reformulation: `t ↦ arccos(czTrig R t
/ M) is β-Lipschitz on [0, π]`.
* czTrig_maximizer_bound — the packaged output consumed by the mesh file: if
t₀ is a maximizer (czTrig R t₀ = M) and s is any point with
β·|t₀ − s| ≤ π/2, then M · cos(β·|t₀ − s|) ≤ czTrig R s.
These are stated for a general real polynomial R and a general degree bound
β; nothing is specialized to the downstream rollout objects.
## Standard reference Ehlich, H. & Zeller, K. (1964), Schwankung von Polynomen zwischen Gitterpunkten, Math. Z. 86, 41–44; Rivlin, The Chebyshev Polynomials (1974).
For a real polynomial and a real argument, the cosine-parametrized polynomial transform is the polynomial evaluated at . As the argument ranges over , its evaluation point ranges over all of .
Definition (Lean source)
For a real polynomial, the cosine-transform sup norm is the supremum of the absolute value of its cosine-parametrized transform over . Equivalently, it is the supremum of the polynomial's absolute value over .
Definition (Lean source)
Szegő's differential inequality. The cosine-parametrized transform of a real polynomial whose degree is at most a chosen bound, evaluated at any real angle, has derivative magnitude at most the degree bound times the square root of the sup-norm squared minus the squared transform value.
Formal statement
Proof (Lean source)
Arccos-Lipschitz reformulation of Szegő's inequality. The normalized cosine transform of a real polynomial with a chosen degree bound and strictly positive sup norm has arccosine values at any two specified angles in the interval from zero to π whose difference is bounded by the degree times the distance between those angles.
Formal statement
Proof (Lean source)
Maximizer node bound. For a real polynomial with a chosen degree bound and strictly positive cosine-transform sup norm, let one angle in the interval from zero to π be a point where the transform attains that norm and another angle in the same interval be close enough that the degree times their distance is at most π/2. Then the transform at the second angle is at least the sup norm times the cosine of the degree-scaled distance.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
czTrig_continuoustheorem — The cosine-parametrized transform of a real polynomial is continuous on the real line.Proof (Lean source)
@[fun_prop] theorem czTrig_continuous (R : Polynomial ℝ) : Continuous (czTrig R) := by unfold czTrig fun_prop -
czSup_attainedtheorem — The cosine-transform sup norm of a real polynomial is attained at some angle between zero and π. This is the extreme-value theorem applied to the continuous absolute transform on that compact interval.Proof (Lean source)
theorem czSup_attained (R : Polynomial ℝ) : ∃ t₀ ∈ Icc (0 : ℝ) pi, |czTrig R t₀| = czSup R := by classical have hK : IsCompact (Icc (0 : ℝ) pi) := isCompact_Icc have hne : (Icc (0 : ℝ) pi).Nonempty := ⟨0, by constructor <;> positivity⟩ have hcont : ContinuousOn (fun t => |czTrig R t|) (Icc (0 : ℝ) pi) := (czTrig_continuous R).abs.continuousOn rcases hK.exists_sSup_image_eq hne hcont with ⟨t₀, ht₀, hsup⟩ exact ⟨t₀, ht₀, hsup.symm⟩ -
czSup_nonnegtheorem — The cosine-transform sup norm of a real polynomial is nonnegative.Proof (Lean source)
theorem czSup_nonneg (R : Polynomial ℝ) : 0 ≤ czSup R := by rcases czSup_attained R with ⟨t₀, _ht₀, hsup⟩ rw [← hsup] exact abs_nonneg _ -
abs_czTrig_le_czSuptheorem — At any angle between zero and π, the absolute cosine-parametrized value of a real polynomial is bounded by its cosine-transform sup norm.Proof (Lean source)
theorem abs_czTrig_le_czSup (R : Polynomial ℝ) {t : ℝ} (ht : t ∈ Icc (0 : ℝ) pi) : |czTrig R t| ≤ czSup R := by classical unfold czSup refine le_csSup ?hbdd ⟨t, ht, rfl⟩ exact isCompact_Icc.bddAbove_image ((czTrig_continuous R).abs.continuousOn) -
czTrig_arccos_lipschitz_regularizedtheorem — The arccosine of the cosine transform of a real polynomial with a chosen degree bound, normalized by its sup norm plus a positive regularizer, is evaluated at any two specified angles in the interval from zero to π, with the difference of the resulting arccosine values bounded by the degree times their distance.hypothesesR :β :ℕhβ :R.natDegree ≤ βδ :ℝhδ :0 < δs t :ℝProof (Lean source)
theorem czTrig_arccos_lipschitz_regularized (R : Polynomial ℝ) (β : ℕ) (hβ : R.natDegree ≤ β) {δ : ℝ} (hδ : 0 < δ) {s t : ℝ} (hs : s ∈ Icc 0 pi) (ht : t ∈ Icc 0 pi) : |arccos (czTrig R t / (czSup R + δ)) - arccos (czTrig R s / (czSup R + δ))| ≤ (β : ℝ) * |t - s| := by let M : ℝ := czSup R let d : ℝ := M + δ have hM_nonneg : 0 ≤ M := by simpa [M] using czSup_nonneg R have hdpos : 0 < d := by dsimp [d, M]; linarith let f : ℝ → ℝ := fun u => arccos (czTrig R u / d) have hdiff_at (x : ℝ) (hx : x ∈ Icc (0 : ℝ) pi) : DifferentiableAt ℝ f x := by have hq_abs : |czTrig R x| ≤ M := by simpa [M] using abs_czTrig_le_czSup R hx have hinner_abs : |czTrig R x / d| < 1 := by rw [abs_div, abs_of_pos hdpos] exact (div_lt_one hdpos).2 (by dsimp [d, M]; linarith) have hne_neg : czTrig R x / d ≠ -1 := by intro h have : |czTrig R x / d| = 1 := by simp [h] linarith have hne_pos : czTrig R x / d ≠ 1 := by intro h have : |czTrig R x / d| = 1 := by simp [h] linarith have hinner_diff : DifferentiableAt ℝ (fun u => czTrig R u / d) x := by unfold czTrig fun_prop exact ((Real.hasDerivAt_arccos hne_neg hne_pos).comp x (DifferentiableAt.hasDerivAt hinner_diff)).differentiableAt have hderiv_bound (x : ℝ) (hx : x ∈ Icc (0 : ℝ) pi) : ‖deriv f x‖ ≤ (β : ℝ) := by have hq_abs : |czTrig R x| ≤ M := by simpa [M] using abs_czTrig_le_czSup R hx have hinner_abs : |czTrig R x / d| < 1 := by rw [abs_div, abs_of_pos hdpos] exact (div_lt_one hdpos).2 (by dsimp [d, M]; linarith) have hinner_sq_lt : (czTrig R x / d) ^ 2 < 1 := by simpa using (sq_lt_one_iff_abs_lt_one (czTrig R x / d)).2 hinner_abs have hinner_pos : 0 < 1 - (czTrig R x / d) ^ 2 := by linarith have hinner_nonneg : 0 ≤ 1 - (czTrig R x / d) ^ 2 := hinner_pos.le have hne_neg : czTrig R x / d ≠ -1 := by intro h have : |czTrig R x / d| = 1 := by simp [h] linarith have hne_pos : czTrig R x / d ≠ 1 := by intro h have : |czTrig R x / d| = 1 := by simp [h] linarith have hinner_diff : DifferentiableAt ℝ (fun u => czTrig R u / d) x := by unfold czTrig fun_prop have hcz_diff : DifferentiableAt ℝ (czTrig R) x := by unfold czTrig fun_prop have hinner_hasDeriv : HasDerivAt (fun u => czTrig R u / d) (deriv (czTrig R) x / d) x := (DifferentiableAt.hasDerivAt hcz_diff).div_const d have hf_hasDeriv : HasDerivAt f (-(1 / sqrt (1 - (czTrig R x / d) ^ 2)) * (deriv (czTrig R) x / d)) x := by simpa [f, Function.comp_def] using (Real.hasDerivAt_arccos hne_neg hne_pos).comp x hinner_hasDeriv have hderiv_eq : deriv f x = -(1 / sqrt (1 - (czTrig R x / d) ^ 2)) * (deriv (czTrig R) x / d) := hf_hasDeriv.deriv have hsqrtd_pos : 0 < sqrt (1 - (czTrig R x / d) ^ 2) := Real.sqrt_pos_of_pos hinner_pos have hden_eq : d * sqrt (1 - (czTrig R x / d) ^ 2) = sqrt (d ^ 2 - (czTrig R x) ^ 2) := by apply (sq_eq_sq₀ (mul_nonneg hdpos.le (Real.sqrt_nonneg _)) (Real.sqrt_nonneg _)).mp rw [mul_pow, Real.sq_sqrt hinner_nonneg] have hdiff_nonneg : 0 ≤ d ^ 2 - (czTrig R x) ^ 2 := by have hlt : |czTrig R x| < d := by dsimp [d, M]; linarith have hsq_lt : (czTrig R x) ^ 2 < d ^ 2 := by have hlt_abs : |czTrig R x| < |d| := by simpa [abs_of_pos hdpos] using hlt exact (sq_lt_sq (a := czTrig R x) (b := d)).2 hlt_abs linarith rw [Real.sq_sqrt hdiff_nonneg] field_simp [ne_of_gt hdpos] have hderiv_abs : |deriv f x| = |deriv (czTrig R) x| / (d * sqrt (1 - (czTrig R x / d) ^ 2)) := by rw [hderiv_eq, abs_mul, abs_neg, abs_div, abs_one, abs_of_pos hsqrtd_pos, abs_div, abs_of_pos hdpos] field_simp [ne_of_gt hsqrtd_pos, ne_of_gt hdpos] have hrad_le : sqrt (M ^ 2 - (czTrig R x) ^ 2) ≤ d * sqrt (1 - (czTrig R x / d) ^ 2) := by rw [hden_eq] apply Real.sqrt_le_sqrt dsimp [d] nlinarith [hM_nonneg, hδ] have hnum_le : |deriv (czTrig R) x| ≤ (β : ℝ) * (d * sqrt (1 - (czTrig R x / d) ^ 2)) := (czTrig_szego_deriv R β hβ x).trans (mul_le_mul_of_nonneg_left hrad_le (by positivity)) have hden_pos : 0 < d * sqrt (1 - (czTrig R x / d) ^ 2) := mul_pos hdpos hsqrtd_pos rw [Real.norm_eq_abs, hderiv_abs] exact (div_le_iff₀ hden_pos).2 (by simpa [mul_comm, mul_left_comm, mul_assoc] using hnum_le) have hmv := Convex.norm_image_sub_le_of_norm_deriv_le (f := f) (s := Icc (0 : ℝ) pi) (C := (β : ℝ)) hdiff_at hderiv_bound (convex_Icc (0 : ℝ) pi) hs ht simpa [f, d, M, Real.norm_eq_abs, abs_sub_comm] using hmv
HeterogeneousTensorInterpolation 7 core · 2 supporting This module gives an explicit finite tensor-grid interpolant for arbitrary finite coordinate types and coordinate-dependent degree bounds, together with coefficient and reproduction identities. ★ interpolate_eval
Heterogeneous tensor interpolation
This module gives an explicit finite tensor-grid interpolant for arbitrary finite coordinate types and coordinate-dependent degree bounds, together with coefficient and reproduction identities.
A coordinate-specific degree map determines the uniform interpolation degree. The degree is the sum of the coordinatewise Jackson degree bounds.
Definition (Lean source)
A coordinate-specific degree map determines the type of bounded tensor interpolation indices. An index chooses one grid position in every coordinate.
Definition (Lean source)
A coordinate-specific degree map and a tensor interpolation index determine the corresponding tensor-grid point. The point uses the fixed equispaced node in every coordinate.
Definition (Lean source)
A coordinate-specific degree map, a target coefficient index, and a grid-value index determine the tensor interpolation weight. The weight is the product of the one-dimensional recovery weights.
Definition (Lean source)
A coordinate-specific degree map and a tensor interpolation index determine the corresponding finitely supported monomial exponent. The exponent records the selected index in every coordinate.
Definition (Lean source)
A coordinate-specific degree map and values on its tensor grid determine the explicit tensor interpolation polynomial. The polynomial is the finite monomial sum with fixed-grid recovery coefficients.
Definition (Lean source)
A coordinate-specific degree map, a multivariate polynomial, its coordinatewise interpolation-degree bounds, and an evaluation point imply that interpolation from the fixed tensor grid reproduces the polynomial at that point.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
coeff_interpolatetheorem — A coordinate-specific degree map, tensor-grid values, and a requested tensor index imply that the interpolant coefficient is its finite weighted grid-value sum.hypothesesconclusion= ∑ b : GridIndex d, gridWeight d a b * v bProof (Lean source)
theorem coeff_interpolate (d : ι → ℕ) (v : GridIndex d → ℝ) (a : GridIndex d) : coeff (exponent d a) (interpolate d v) = ∑ b : GridIndex d, gridWeight d a b * v b := by classical have hinj : Injective (exponent d) := by intro a b h funext i apply Fin.ext have hi := congrArg (fun m : ι →₀ ℕ => m i) h simpa [exponent] using hi simp only [interpolate, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] rw [Finset.sum_eq_single a] · simp · intro b _ hba have hne : exponent d b ≠ exponent d a := fun h => hba (hinj h) simp [hne] · intro h exact (h (Finset.mem_univ a)).elim -
coeff_interpolate_eq_zerotheorem — A coordinate-specific degree map, tensor-grid values, a monomial exponent, and an exponent outside the interpolation box imply that the interpolant coefficient vanishes.hypothesesconclusioncoeff γ (interpolate d v) = 0Proof (Lean source)
theorem coeff_interpolate_eq_zero (d : ι → ℕ) (v : GridIndex d → ℝ) (γ : ι →₀ ℕ) (hγ : ∃ i, interpolationDegree d < γ i) : coeff γ (interpolate d v) = 0 := by classical obtain ⟨i, hi⟩ := hγ simp only [interpolate, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] apply Finset.sum_eq_zero intro a _ have hne : exponent d a ≠ γ := by intro h have heq := congrArg (fun m : ι →₀ ℕ => m i) h have hle : (a i : ℕ) ≤ interpolationDegree d := le_of_lt_succ (a i).isLt simp only [exponent, Finsupp.coe_equivFunOnFinite_symm] at heq omega simp [hne]
Interp 4 core · 2 supporting For the Szegő differential inequality one compares the trigonometric transform Q(t) = R(cos t) with the *comparison interpolant* at a base point t₀, S(t) = Q₀ · cos(β(t − t₀)) + (Q₁/β) · sin(β(t − t₀)), where Q₀ = Q(t₀) ★ szegoInterp_hasDerivAt★ szegoInterp_amplitude★ szegoInterp_abs_le
The Szegő comparison interpolant
For the Szegő differential inequality one compares the trigonometric transform
Q(t) = R(cos t) with the comparison interpolant at a base point t₀,
S(t) = Q₀ · cos(β(t − t₀)) + (Q₁/β) · sin(β(t − t₀)),
where Q₀ = Q(t₀) and Q₁ = Q'(t₀). For β ≥ 1 this S matches value and
derivative of Q at t₀, has constant amplitude A = √(Q₀² + (Q₁/β)²), and is
an "elementary wave" A · cos(β(t − t₀) − φ). This file collects those purely
analytic facts (no zero-counting); the trigonometric-polynomial membership of S
and the final comparison live in Szego.
szegoInterp— the interpolant.szegoInterp_self—S(t₀) = Q₀.szegoInterp_hasDerivAt—S'(t₀) = Q₁(forβ ≥ 1).szegoInterp_amplitude—S(t) = A · cos(β(t − t₀) − φ)for a phaseφ.szegoInterp_abs_le—|S(t)| ≤ A.
## Standard reference Szegő's inequality; Rivlin, The Chebyshev Polynomials (1974); DeVore–Lorentz, Constructive Approximation (1993), Ch. 4 (Bernstein–Szegő).
For a nonnegative integer frequency, a prescribed value, a prescribed derivative, a real base point, and a real argument, the Szegő comparison interpolant is .
The Szegő comparison interpolant built from a frequency, a prescribed value and derivative, and a base point reproduces the prescribed derivative at that base point, provided the frequency is at least one.
Formal statement
Proof (Lean source)
For a degree parameter and a prescribed value, derivative, and base point, the Szegő interpolant is a phase-shifted cosine wave whose amplitude is the Euclidean norm of its cosine and sine coefficients.
Formal statement
Proof (Lean source)
For a degree parameter β and values Q₀, Q₁, base point t₀, and evaluation point t, the Szegő interpolant's value is bounded in absolute value by its amplitude A = √(Q₀² + (Q₁/β)²).
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
szegoInterp_selftheorem — For a degree parameter β and a prescribed value, derivative, and base point, the Szegő interpolant reproduces its prescribed value at the base point.Proof (Lean source)
theorem szegoInterp_self (β : ℕ) (Q₀ Q₁ t₀ : ℝ) : szegoInterp β Q₀ Q₁ t₀ t₀ = Q₀ := by simp [szegoInterp] -
szegoInterp_amplitude_coretheorem — A cosine-sine wave with a real frequency, cosine and sine coefficients, and a base point can be expressed as a phase-shifted cosine wave whose amplitude is the Euclidean norm of the two coefficients.hypothesesω :ℝQ₀ q t₀ :ℝProof (Lean source)
theorem szegoInterp_amplitude_core (ω : ℝ) (Q₀ q t₀ : ℝ) : ∃ φ : ℝ, ∀ t, Q₀ * cos (ω * (t - t₀)) + q * sin (ω * (t - t₀)) = sqrt (Q₀ ^ 2 + q ^ 2) * cos (ω * (t - t₀) - φ) := by let z : ℂ := ⟨Q₀, q⟩ refine ⟨Complex.arg z, ?_⟩ intro t let x : ℝ := ω * (t - t₀) have hnorm : ‖z‖ = sqrt (Q₀ ^ 2 + q ^ 2) := by simp [z, Complex.norm_def, Complex.normSq_mk, pow_two] have hcos : ‖z‖ * cos (Complex.arg z) = Q₀ := by simp [z] have hsin : ‖z‖ * sin (Complex.arg z) = q := by simp [z] calc Q₀ * cos (ω * (t - t₀)) + q * sin (ω * (t - t₀)) = Q₀ * cos x + q * sin x := by simp [x] _ = (‖z‖ * cos (Complex.arg z)) * cos x + (‖z‖ * sin (Complex.arg z)) * sin x := by rw [hcos, hsin] _ = ‖z‖ * cos (x - Complex.arg z) := by rw [Real.cos_sub] ring _ = sqrt (Q₀ ^ 2 + q ^ 2) * cos (ω * (t - t₀) - Complex.arg z) := by rw [hnorm]
TrigExtraction 3 core · 3 supporting This module converts finite even trigonometric polynomials into ordinary polynomials in the cosine coordinate, proves the converse construction, and controls coefficient growth in the Chebyshev basis. ★ even_trigPoly_exists_polynomial
Extracting algebraic polynomials from even trigonometric polynomials
This module converts finite even trigonometric polynomials into ordinary polynomials in the cosine coordinate, proves the converse construction, and controls coefficient growth in the Chebyshev basis.
A frequency limit and a real-valued function determine the assertion that the function is a real trigonometric polynomial within that limit. It is an abbreviation of Causalean.Mathlib.Analysis.BernsteinSzegoTrig.IsTrigPolyLE, re-exposed in this namespace.
Definition (Lean source)
A real polynomial determines its coefficient one-norm, the sum of the absolute values of its nonzero coefficients.
Definition (Lean source)
Given a frequency limit and a real function, if the function is a trigonometric polynomial within that limit and is symmetric about zero, then it is an ordinary polynomial in the cosine coordinate with degree at most that limit.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
polynomial_cos_is_even_trigPolytheorem — Given a frequency limit and a real polynomial whose degree is at most that limit, composition with cosine is an even trigonometric polynomial within the same frequency limit.hypothesesProof (Lean source)
theorem polynomial_cos_is_even_trigPoly {n : ℕ} (p : Polynomial ℝ) (hp : p.natDegree ≤ n) : IsTrigPolyLE n (fun t => p.eval (cos t)) ∧ Even (fun t => p.eval (cos t)) := by refine ⟨Causalean.Mathlib.Analysis.BernsteinSzegoTrig.cosComp_isTrigPolyLE p n hp, ?_⟩ intro t simp -
chebyshev_coeffL1_letheorem — For a nonnegative integer index, the coefficient one-norm of the corresponding first-kind Chebyshev polynomial is at most three to that index.Proof (Lean source)
theorem chebyshev_coeffL1_le (n : ℕ) : polyCoeffL1 (T ℝ (n : ℤ)) ≤ (3 : ℝ) ^ n := by induction n using Nat.twoStepInduction with | zero => change polyCoeffL1 (T ℝ 0) ≤ 1 rw [Polynomial.Chebyshev.T_zero, polyCoeffL1_eq_sum_range_of_natDegree_lt (1 : Polynomial ℝ) (m := 1) (by simp)] simp | one => norm_num only [Nat.cast_one, pow_one] rw [Polynomial.Chebyshev.T_one, polyCoeffL1_eq_sum_range_of_natDegree_lt X (m := 2) (by simp)] norm_num [Finset.sum_range_succ, Polynomial.coeff_X] | more n hn hn1 => have hT : T ℝ ((n + 2 : ℕ) : ℤ) = (2 : ℝ) • (X * T ℝ ((n + 1 : ℕ) : ℤ)) - T ℝ (n : ℤ) := by convert Polynomial.Chebyshev.T_add_two ℝ (n : ℤ) using 1 · norm_num · simp only [Polynomial.smul_eq_C_mul] norm_num rw [Polynomial.C_ofNat] ring rw [hT] calc polyCoeffL1 ((2 : ℝ) • (X * T ℝ ((n + 1 : ℕ) : ℤ)) - T ℝ (n : ℤ)) ≤ polyCoeffL1 ((2 : ℝ) • (X * T ℝ ((n + 1 : ℕ) : ℤ))) + polyCoeffL1 (T ℝ (n : ℤ)) := polyCoeffL1_sub_le _ _ _ = 2 * polyCoeffL1 (T ℝ ((n + 1 : ℕ) : ℤ)) + polyCoeffL1 (T ℝ (n : ℤ)) := by rw [polyCoeffL1_smul, polyCoeffL1_X_mul] norm_num _ ≤ 2 * (3 : ℝ) ^ (n + 1) + (3 : ℝ) ^ n := by gcongr _ = 7 * (3 : ℝ) ^ n := by rw [pow_succ] ring _ ≤ 9 * (3 : ℝ) ^ n := by gcongr norm_num _ = (3 : ℝ) ^ (n + 2) := by rw [show n + 2 = (n + 1) + 1 by omega, pow_succ, pow_succ] ring -
cosine_sum_exists_polynomialtheorem — Given a frequency limit n and real cosine coefficients, there is a real polynomial of degree at most n whose value at the cosine of every angle t equals the cosine sum of the coefficients over frequencies 0 through n at t, and whose coefficients have absolute values summing to at most the sum over frequencies k of the absolute k-th coefficient times 3 to the power k.hypothesesn :ℕa :ℕ → ℝconclusion∃ p : Polynomial ℝ,p.natDegree ≤ nconclusion 2polyCoeffL1 p ≤ ∑ k ∈ range (n + 1), |a k| * (3 : ℝ) ^ kProof (Lean source)
theorem cosine_sum_exists_polynomial (n : ℕ) (a : ℕ → ℝ) : ∃ p : Polynomial ℝ, p.natDegree ≤ n ∧ (∀ t : ℝ, p.eval (cos t) = ∑ k ∈ range (n + 1), a k * cos ((k : ℝ) * t)) ∧ polyCoeffL1 p ≤ ∑ k ∈ range (n + 1), |a k| * (3 : ℝ) ^ k := by classical let p : Polynomial ℝ := ∑ k ∈ range (n + 1), C (a k) * T ℝ (k : ℤ) refine ⟨p, ?_, ?_, ?_⟩ · dsimp [p] apply Polynomial.natDegree_sum_le_of_forall_le intro k hk refine (Polynomial.natDegree_C_mul_le _ _).trans ?_ rw [Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] exact le_of_lt_succ (Finset.mem_range.mp hk) · intro t dsimp [p] rw [Polynomial.eval_finsetSum] apply Finset.sum_congr rfl intro k _ rw [Polynomial.eval_C_mul, Polynomial.Chebyshev.T_real_cos] norm_num · dsimp [p] calc polyCoeffL1 (∑ k ∈ range (n + 1), C (a k) * T ℝ (k : ℤ)) ≤ ∑ k ∈ range (n + 1), polyCoeffL1 (C (a k) * T ℝ (k : ℤ)) := polyCoeffL1_sum_le _ _ _ = ∑ k ∈ range (n + 1), |a k| * polyCoeffL1 (T ℝ (k : ℤ)) := by apply Finset.sum_congr rfl intro k _ rw [Polynomial.C_mul', polyCoeffL1_smul] _ ≤ ∑ k ∈ range (n + 1), |a k| * (3 : ℝ) ^ k := by exact Finset.sum_le_sum fun k _ => mul_le_mul_of_nonneg_left (chebyshev_coeffL1_le k) (abs_nonneg (a k))
AbsoluteValue 4 core · 10 supporting This module exposes the fixed even Chebyshev polynomial that approximates absolute value on the unit interval, together with its exact error, monomial-coefficient, and even-degree bounds. ★ absChebPoly_error_le★ absChebPoly_halfDegree_error_le★ absChebPoly_halfDegree_coeff_le
Explicit Chebyshev truncation for absolute value
This module exposes the fixed even Chebyshev polynomial that approximates absolute value on the unit interval, together with its exact error, monomial-coefficient, and even-degree bounds. The Fourier-series proof is reused from the general absolute-value approximation infrastructure.
A truncation length m determines the explicit even Chebyshev polynomial approximating absolute value on the interval from −1 to 1: the constant 2/π plus the sum over j from 1 to m of (4/π)·(−1)^(j+1)/(4j² − 1) times the first-kind Chebyshev polynomial of degree 2j, that is, the Chebyshev series of |x| truncated after m even modes.
Definition (Lean source)
For a truncation length m and a point x in the closed interval from −1 to 1, the truncated Chebyshev polynomial for absolute value differs from |x| by at most 2/(π(2m + 1)) in absolute value.
Formal statement
Proof (Lean source)
For an even natural degree D and a point x in the closed interval from −1 to 1, the truncated Chebyshev polynomial for absolute value with D/2 even modes differs from |x| by at most 2/(π(D + 1)) in absolute value.
Formal statement
Proof (Lean source)
For an even degree D and a monomial index k, the k-th monomial coefficient of the truncated Chebyshev polynomial for absolute value with D/2 even modes is at most 2^(3D/2) in absolute value.
Formal statement
Proof (Lean source)
10 supporting declarations (lemmas, instances)
-
absChebPoly_eqtheorem — A truncation length gives the constant two over π followed by its first even Chebyshev modes with their exact alternating coefficients.hypothesesm :ℕProof (Lean source)
theorem absChebPoly_eq (m : ℕ) : absChebPoly m = C (2 / pi) + ∑ j ∈ range m, C ((4 / pi) * (-1 : ℝ) ^ j / (4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1)) * T ℝ (2 * (j + 1) : ℕ) := by simp only [absChebPoly, absChebPoly, Polynomial.smul_eq_C_mul] -
absChebPoly_evaltheorem — A truncation length and argument give the value of the explicit truncation as its finite even Chebyshev expansion.hypothesesm :ℕx :ℝProof (Lean source)
theorem absChebPoly_eval (m : ℕ) (x : ℝ) : (absChebPoly m).eval x = 2 / pi + ∑ j ∈ range m, (4 / pi) * (-1 : ℝ) ^ j * (T ℝ (2 * (j + 1) : ℕ)).eval x / (4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1) := by exact absChebPoly_eval m x -
absChebPoly_natDegree_letheorem — A truncation length gives a polynomial whose degree is at most twice that length.Proof (Lean source)
theorem absChebPoly_natDegree_le (m : ℕ) : (absChebPoly m).natDegree ≤ 2 * m := absChebPoly_natDegree_le m -
absChebPoly_eq_sum_Icctheorem — A truncation length gives the same explicit polynomial written with one-based Chebyshev mode indices.hypothesesm :ℕProof (Lean source)
theorem absChebPoly_eq_sum_Icc (m : ℕ) : absChebPoly m = C (2 / pi) + ∑ v ∈ Icc 1 m, C ((4 / pi) * (-1 : ℝ) ^ (v + 1) / (4 * (v : ℝ) ^ 2 - 1)) * T ℝ (2 * v : ℕ) := by rw [absChebPoly_eq] congr 1 induction m with | zero => simp | succ m ih => rw [Finset.sum_range_succ, Finset.sum_Icc_succ_top (by omega)] rw [ih] have hsign : (-1 : ℝ) ^ (m + 1 + 1) = (-1 : ℝ) ^ m := by rw [pow_succ, pow_succ] ring simp only [hsign] -
absChebPoly_coeffOneNorm_letheorem — Any truncation length gives a polynomial whose monomial coefficient one-norm is at most two to the power three times that length.Proof (Lean source)
theorem absChebPoly_coeffOneNorm_le (m : ℕ) : polynomialCoeffOneNorm (absChebPoly m) ≤ (2 : ℝ) ^ (3 * m) := by classical have hadd (p q : Polynomial ℝ) : polynomialCoeffOneNorm (p + q) ≤ polynomialCoeffOneNorm p + polynomialCoeffOneNorm q := by let n := max p.natDegree q.natDegree + 1 rw [polynomialCoeffOneNorm_range (p + q) (m := n) (lt_of_le_of_lt (Polynomial.natDegree_add_le _ _) (lt_succ_self _)), polynomialCoeffOneNorm_range p (lt_of_le_of_lt (le_max_left _ _) (lt_succ_self _)), polynomialCoeffOneNorm_range q (lt_of_le_of_lt (le_max_right _ _) (lt_succ_self _)), ← Finset.sum_add_distrib] exact Finset.sum_le_sum fun i _ => by simpa only [Polynomial.coeff_add] using abs_add_le (p.coeff i) (q.coeff i) have hC (c : ℝ) : polynomialCoeffOneNorm (C c) = |c| := by rw [polynomialCoeffOneNorm_range _ (m := 1) (by simp)] simp have hmode (j : ℕ) : polynomialCoeffOneNorm (C ((4 / pi) * (-1 : ℝ) ^ j / (4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1)) * T ℝ (2 * (j + 1) : ℕ)) ≤ 3 * (8 : ℝ) ^ j := by have hj : (1 : ℝ) ≤ ((j + 1 : ℕ) : ℝ) := by exact_mod_cast Nat.succ_le_succ (zero_le j) have hd : 3 ≤ 4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1 := by nlinarith have hdpos : 0 < 4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1 := by linarith have hc : |(4 / pi) * (-1 : ℝ) ^ j / (4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1)| ≤ (1 / 2 : ℝ) := by rw [abs_div, abs_mul, abs_pow] norm_num only [abs_neg, abs_one, one_pow, mul_one] rw [abs_of_pos (by positivity : (0 : ℝ) < 4 / pi), abs_of_pos hdpos] apply (div_le_iff₀ hdpos).2 have hpi : 4 / pi ≤ (4 / 3 : ℝ) := div_le_div_of_nonneg_left (by norm_num) (by norm_num) Real.pi_gt_three.le linarith have hs : (1 + sqrt 2) ^ 2 ≤ (6 : ℝ) := by have hsq := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) have hnonneg := Real.sqrt_nonneg (2 : ℝ) have hroot : sqrt 2 ≤ (3 / 2 : ℝ) := by nlinarith nlinarith have hpow : (1 + sqrt 2) ^ (2 * (j + 1)) ≤ (6 : ℝ) ^ (j + 1) := by rw [pow_mul] exact pow_le_pow_left₀ (by positivity) hs _ calc polynomialCoeffOneNorm _ ≤ polynomialCoeffOneNorm (C ((4 / pi) * (-1 : ℝ) ^ j / (4 * ((j + 1 : ℕ) : ℝ) ^ 2 - 1))) * polynomialCoeffOneNorm (T ℝ (2 * (j + 1) : ℕ)) := polynomialCoeffOneNorm_mul_le _ _ _ ≤ (1 / 2 : ℝ) * (1 + sqrt 2) ^ (2 * (j + 1)) := by rw [hC] apply mul_le_mul hc (polynomialCoeffOneNorm_chebyshev_le (2 * (j + 1))) · change 0 ≤ ∑ k ∈ (T ℝ (2 * (j + 1) : ℕ)).support, |(T ℝ (2 * (j + 1) : ℕ)).coeff k| exact Finset.sum_nonneg fun _ _ => abs_nonneg _ · norm_num _ ≤ (1 / 2 : ℝ) * 6 ^ (j + 1) := mul_le_mul_of_nonneg_left hpow (by norm_num) _ ≤ 3 * (8 : ℝ) ^ j := by rw [pow_succ] have hp : (6 : ℝ) ^ j ≤ (8 : ℝ) ^ j := pow_le_pow_left₀ (by norm_num) (by norm_num) _ linarith have hall (n : ℕ) : polynomialCoeffOneNorm (absChebPoly n) ≤ (8 : ℝ) ^ n := by induction n with | zero => rw [absChebPoly_eq] simp only [Finset.range_zero, Finset.sum_empty, add_zero, pow_zero, hC] rw [abs_of_pos (by positivity : (0 : ℝ) < 2 / pi)] apply (div_le_iff₀ Real.pi_pos).2 linarith [Real.pi_gt_three] | succ n ih => have heq : absChebPoly (n + 1) = absChebPoly n + C ((4 / pi) * (-1 : ℝ) ^ n / (4 * ((n + 1 : ℕ) : ℝ) ^ 2 - 1)) * T ℝ (2 * (n + 1) : ℕ) := by rw [absChebPoly_eq, absChebPoly_eq, Finset.sum_range_succ] exact (add_assoc _ _ _).symm rw [heq] calc polynomialCoeffOneNorm _ ≤ polynomialCoeffOneNorm (absChebPoly n) + polynomialCoeffOneNorm _ := hadd _ _ _ ≤ (8 : ℝ) ^ n + 3 * (8 : ℝ) ^ n := add_le_add ih (hmode n) _ ≤ (8 : ℝ) ^ (n + 1) := by rw [pow_succ] nlinarith [pow_nonneg (by norm_num : (0 : ℝ) ≤ 8) n] calc polynomialCoeffOneNorm (absChebPoly m) ≤ (8 : ℝ) ^ m := hall m _ = (2 : ℝ) ^ (3 * m) := by rw [pow_mul]; norm_num -
absChebPoly_coeff_letheorem — Any truncation length and a monomial index give an absolute coefficient bound of two to the power three times the length.hypothesesm :ℕk :ℕconclusion|(absChebPoly m).coeff k| ≤ (2 : ℝ) ^ (3 * m)Proof (Lean source)
theorem absChebPoly_coeff_le (m : ℕ) (k : ℕ) : |(absChebPoly m).coeff k| ≤ (2 : ℝ) ^ (3 * m) := by classical have hb : |(absChebPoly m).coeff k| ≤ polynomialCoeffOneNorm (absChebPoly m) := by change |(absChebPoly m).coeff k| ≤ ∑ j ∈ (absChebPoly m).support, |(absChebPoly m).coeff j| by_cases hk : k ∈ (absChebPoly m).support · exact Finset.single_le_sum (fun j _ => abs_nonneg ((absChebPoly m).coeff j)) hk · have hzero : (absChebPoly m).coeff k = 0 := by simpa only [Polynomial.mem_support_iff, not_not] using hk rw [hzero, abs_zero] exact Finset.sum_nonneg (fun j _ => abs_nonneg ((absChebPoly m).coeff j)) exact hb.trans (absChebPoly_coeffOneNorm_le m) -
two_mul_halfDegreetheorem — An even natural degree has degree equal to twice its half-degree.hypothesesD :ℕhD :Even Dconclusion2 * (D / 2) = DProof (Lean source)
theorem two_mul_halfDegree (D : ℕ) (hD : Even D) : 2 * (D / 2) = D := by obtain ⟨m, hm⟩ := hD omega -
halfDegree_postheorem — A natural degree at least two has a positive half-degree.hypothesesD :ℕhD2 :2 ≤ Dconclusion1 ≤ D / 2Proof (Lean source)
theorem halfDegree_pos (D : ℕ) (hD2 : 2 ≤ D) : 1 ≤ D / 2 := by omega -
coefficientConstant_eq_rpowtheorem — An even natural degree has equal natural-power and real-power forms of the coefficient constant.hypothesesD :ℕhD :Even Dconclusion(2 : ℝ) ^ (3 * (D / 2)) = (2 : ℝ) ^ ((3 : ℝ) * (D : ℝ) / 2)Proof (Lean source)
theorem coefficientConstant_eq_rpow (D : ℕ) (hD : Even D) : (2 : ℝ) ^ (3 * (D / 2)) = (2 : ℝ) ^ ((3 : ℝ) * (D : ℝ) / 2) := by have hn := two_mul_halfDegree D hD have hr : (2 : ℝ) * (D / 2 : ℕ) = (D : ℝ) := by exact_mod_cast hn rw [show (3 : ℝ) * (D : ℝ) / 2 = ((3 * (D / 2) : ℕ) : ℝ) by push_cast linarith, Real.rpow_natCast] -
absChebPoly_halfDegree_natDegree_letheorem — An even natural degree gives a half-degree truncation whose degree is at most that degree.Proof (Lean source)
theorem absChebPoly_halfDegree_natDegree_le (D : ℕ) (hD : Even D) : (absChebPoly (D / 2)).natDegree ≤ D := by simpa only [two_mul_halfDegree D hD] using absChebPoly_natDegree_le (D / 2)
AffineFourBoundary 1 core · 4 supporting This module bounds the error of the canonical four-dimensional affine Jackson polynomial by coordinatewise boundary distance. ★ affineJackson_boundary_exists_four
Boundary-adaptive affine Jackson approximation in four dimensions
This module bounds the error of the canonical four-dimensional affine Jackson polynomial by coordinatewise boundary distance. It combines the existing positive-kernel moment estimates with a cosine displacement inequality and affine rectangle transport.
For a positive Jackson order K, a four-dimensional rectangle with center c and positive coordinate radii r, and a function f that is continuous on the rectangle and Lipschitz there with a constant L ≥ 0 with respect to the sum of coordinate distances, there are polynomials p and q in four variables such that: p at any point y equals q at the normalized coordinates (y − c)/r; q at the coordinatewise cosines of any angle vector equals the order-K tensor Jackson convolution of f composed with the affine map z ↦ c + r·z; every monomial of p has degree at most 2(K − 1) in each variable and p has total degree at most 8(K − 1); and at every point y of the rectangle, |p(y) − f(y)| is at most 32·L times the sum over the four coordinates i of √((y_i − (c_i − r_i))·((c_i + r_i) − y_i))/K + r_i/K².
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
abs_cos_add_sub_cos_letheorem — A base phase and phase displacement give a bound on the cosine displacement by its sine-weighted linear part and quadratic remainder. The estimate remains valid at endpoints, where the linear term vanishes.Proof (Lean source)
theorem abs_cos_add_sub_cos_le (theta t : ℝ) : |cos (theta + t) - cos theta| ≤ |sin theta| * |t| + t ^ 2 / 2 := by have hcos : |cos t - 1| ≤ t ^ 2 / 2 := by rw [abs_sub_comm, abs_of_nonneg (sub_nonneg.mpr (Real.cos_le_one t))] linarith [Real.one_sub_sq_div_two_le_cos (x := t)] calc |cos (theta + t) - cos theta| = |cos theta * (cos t - 1) - sin theta * sin t| := by rw [Real.cos_add] congr 1 ring _ ≤ |cos theta * (cos t - 1)| + |sin theta * sin t| := by simpa [sub_eq_add_neg] using (abs_add_le (cos theta * (cos t - 1)) (-(sin theta * sin t))) _ = |cos theta| * |cos t - 1| + |sin theta| * |sin t| := by rw [abs_mul, abs_mul] _ ≤ |sin theta| * |t| + t ^ 2 / 2 := by have h1 := mul_le_mul_of_nonneg_left hcos (abs_nonneg (cos theta)) have h2 := mul_le_mul_of_nonneg_left (Real.abs_sin_le_abs (x := t)) (abs_nonneg (sin theta)) have h3 := Real.abs_cos_le_one theta nlinarith [sq_nonneg t] -
radius_mul_abs_sin_arccos_eq_boundarytheorem — A rectangle center, positive coordinate radii, a point in the ambient space, and a selected coordinate identify the physical sine factor with the square root of the two face distances' product.hypothesesconclusion= sqrt ((y i - (c i - r i)) * ((c i + r i) - y i))Proof (Lean source)
theorem radius_mul_abs_sin_arccos_eq_boundary (c r y : Fin 4 → ℝ) (hr : ∀ i, 0 < r i) (i : Fin 4) : r i * |sin (arccos (normalizedPoint c r y i))| = sqrt ((y i - (c i - r i)) * ((c i + r i) - y i)) := by have hrad : (y i - (c i - r i)) * ((c i + r i) - y i) = (r i) ^ 2 * (1 - normalizedPoint c r y i ^ 2) := by simp only [normalizedPoint] field_simp [ne_of_gt (hr i)] ring rw [Real.sin_arccos, abs_of_nonneg (Real.sqrt_nonneg _), hrad, Real.sqrt_mul (sq_nonneg (r i)), Real.sqrt_sq (le_of_lt (hr i))] -
tensorConvolution_boundary_adaptivetheorem — A positive Jackson order, a function continuous on the normalized cube, nonnegative coordinate weights, and a nonnegative Lipschitz constant with its weighted coordinate bound, evaluated at a phase point, give a tensor Jackson error bound with a boundary-adaptive first-order term and a second-order remainder.hypothesesd K :ℕhK :0 < Kg :(Fin d → ℝ) → ℝhg :ContinuousOn g (normalizedCube d)r :Fin d → ℝhr :∀ i, 0 ≤ r iL :ℝhL :0 ≤ Lhlip :∀ x ∈ normalizedCube d, ∀ z ∈ normalizedCube d, |g x - g z| ≤ L * ∑ i, r i * |x i - z i|theta :Fin d → ℝconclusion|tensorConvolution K g theta - g (cosPoint theta)|Proof (Lean source)
theorem tensorConvolution_boundary_adaptive {d K : ℕ} (hK : 0 < K) (g : (Fin d → ℝ) → ℝ) (hg : ContinuousOn g (normalizedCube d)) (r : Fin d → ℝ) (hr : ∀ i, 0 ≤ r i) (L : ℝ) (hL : 0 ≤ L) (hlip : ∀ x ∈ normalizedCube d, ∀ z ∈ normalizedCube d, |g x - g z| ≤ L * ∑ i, r i * |x i - z i|) (theta : Fin d → ℝ) : |tensorConvolution K g theta - g (cosPoint theta)| ≤ L * ∑ i : Fin d, (32 * r i * |sin (theta i)| / (K : ℝ) + 32 * r i / (K : ℝ) ^ 2) := by classical have hcompact : IsCompact (periodBox d) := by rw [show periodBox d = {u | ∀ i, u i ∈ Icc (-pi) pi} by rfl] exact isCompact_pi_infinite fun _ ↦ isCompact_Icc have hcos : Continuous (fun u : Fin d → ℝ ↦ cosPoint (theta - u)) := by apply continuous_pi intro i change Continuous (fun u : Fin d → ℝ ↦ cos (theta i - u i)) fun_prop have hgcos : Continuous (fun u : Fin d → ℝ ↦ g (cosPoint (theta - u))) := by simpa [Function.comp_def] using hg.comp_continuous hcos (fun u ↦ cosPoint_mem_normalizedCube (theta - u)) have hkernel : Continuous (tensorJackson K d) := by unfold tensorJackson fun_prop have hconvInt : IntegrableOn (fun u : Fin d → ℝ ↦ g (cosPoint (theta - u)) * tensorJackson K d u) (periodBox d) := (hgcos.mul hkernel).continuousOn.integrableOn_compact hcompact have hconstInt : IntegrableOn (fun u : Fin d → ℝ ↦ g (cosPoint theta) * tensorJackson K d u) (periodBox d) := (continuous_const.mul hkernel).continuousOn.integrableOn_compact hcompact have hdiffInt : IntegrableOn (fun u : Fin d → ℝ ↦ (g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u) (periodBox d) := ((hgcos.sub continuous_const).mul hkernel).continuousOn.integrableOn_compact hcompact have hfirstInt (i : Fin d) : IntegrableOn (fun u : Fin d → ℝ ↦ |u i| * tensorJackson K d u) (periodBox d) := by exact ((continuous_abs.comp (continuous_apply i)).mul hkernel).continuousOn |>.integrableOn_compact hcompact have hsecondInt (i : Fin d) : IntegrableOn (fun u : Fin d → ℝ ↦ (u i) ^ 2 * tensorJackson K d u) (periodBox d) := by exact (((continuous_apply i).pow 2).mul hkernel).continuousOn |>.integrableOn_compact hcompact have htermInt (i : Fin d) : IntegrableOn (fun u : Fin d → ℝ ↦ (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u) (periodBox d) := by have hc : Continuous (fun u : Fin d → ℝ ↦ (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u) := by fun_prop exact hc.continuousOn.integrableOn_compact hcompact have hboundInt : IntegrableOn (fun u : Fin d → ℝ ↦ L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u) (periodBox d) := by have hc : Continuous (fun u : Fin d → ℝ ↦ L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u) := by fun_prop exact hc.continuousOn.integrableOn_compact hcompact have hdiff : tensorConvolution K g theta - g (cosPoint theta) = ∫ u in periodBox d, (g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u := by unfold tensorConvolution calc (∫ u in periodBox d, g (cosPoint (theta - u)) * tensorJackson K d u) - g (cosPoint theta) = (∫ u in periodBox d, g (cosPoint (theta - u)) * tensorJackson K d u) - g (cosPoint theta) * (∫ u in periodBox d, tensorJackson K d u) := by rw [tensorJackson_integral_eq_one hK, mul_one] _ = (∫ u in periodBox d, g (cosPoint (theta - u)) * tensorJackson K d u) - ∫ u in periodBox d, g (cosPoint theta) * tensorJackson K d u := by rw [integral_const_mul] _ = ∫ u in periodBox d, (g (cosPoint (theta - u)) * tensorJackson K d u - g (cosPoint theta) * tensorJackson K d u) := (integral_sub hconvInt hconstInt).symm _ = ∫ u in periodBox d, (g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u := by apply integral_congr_ae filter_upwards intro u ring rw [hdiff] calc |∫ u in periodBox d, (g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u| ≤ ∫ u in periodBox d, |(g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u| := abs_integral_le_integral_abs _ ≤ ∫ u in periodBox d, L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u := by apply setIntegral_mono hdiffInt.abs hboundInt intro u change |(g (cosPoint (theta - u)) - g (cosPoint theta)) * tensorJackson K d u| ≤ L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u rw [abs_mul, abs_of_nonneg (tensorJackson_nonneg hK u)] calc |g (cosPoint (theta - u)) - g (cosPoint theta)| * tensorJackson K d u ≤ (L * ∑ i, r i * |(cosPoint (theta - u)) i - (cosPoint theta) i|) * tensorJackson K d u := by exact mul_le_mul_of_nonneg_right (hlip _ (cosPoint_mem_normalizedCube _) _ (cosPoint_mem_normalizedCube _)) (tensorJackson_nonneg hK u) _ ≤ (L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2)) * tensorJackson K d u := by apply mul_le_mul_of_nonneg_right _ (tensorJackson_nonneg hK u) apply mul_le_mul_of_nonneg_left _ hL apply Finset.sum_le_sum intro i _ have hi := abs_cos_add_sub_cos_le (theta i) (-u i) simp only [cosPoint, Pi.sub_apply, abs_neg, neg_sq] at hi ⊢ convert mul_le_mul_of_nonneg_left hi (hr i) using 1 <;> ring_nf _ = L * ∑ i, (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u := by rw [mul_assoc, Finset.sum_mul] _ = L * ∑ i : Fin d, (r i * |sin (theta i)| * (∫ u in periodBox d, |u i| * tensorJackson K d u) + r i / 2 * (∫ u in periodBox d, (u i) ^ 2 * tensorJackson K d u)) := by rw [integral_const_mul] rw [integral_finsetSum univ (fun i _ ↦ htermInt i)] congr 1 apply Finset.sum_congr rfl intro i _ have heq (u : Fin d → ℝ) : (r i * |sin (theta i)| * |u i| + r i / 2 * (u i) ^ 2) * tensorJackson K d u = r i * |sin (theta i)| * (|u i| * tensorJackson K d u) + r i / 2 * ((u i) ^ 2 * tensorJackson K d u) := by ring simp_rw [heq] rw [integral_add, integral_const_mul, integral_const_mul] · exact (hfirstInt i).const_mul _ · exact (hsecondInt i).const_mul _ _ ≤ L * ∑ i : Fin d, (32 * r i * |sin (theta i)| / (K : ℝ) + 32 * r i / (K : ℝ) ^ 2) := by apply mul_le_mul_of_nonneg_left _ hL apply Finset.sum_le_sum intro i _ have hfirst := (tensorJackson_first_moment_eq hK i).le.trans (jackson_first_moment K hK) have hsecond := (tensorJackson_second_moment_eq hK i).le.trans (jackson_second_moment K hK) have hcoef1 : 0 ≤ r i * |sin (theta i)| := mul_nonneg (hr i) (abs_nonneg _) have hcoef2 : 0 ≤ r i / 2 := div_nonneg (hr i) (by norm_num) have h1 := mul_le_mul_of_nonneg_left hfirst hcoef1 have h2 := mul_le_mul_of_nonneg_left hsecond hcoef2 calc _ ≤ r i * |sin (theta i)| * (32 / (K : ℝ)) + r i / 2 * (64 / (K : ℝ) ^ 2) := add_le_add h1 h2 _ = _ := by ring -
affineJackson_boundary_adaptive_fourtheorem — A positive Jackson order, a centered rectangle with positive coordinate radii, a continuous physical-coordinate Lipschitz function, a polynomial pair realizing the canonical affine tensor convolution, and a point in that rectangle give a boundary-adaptive error bound for that same affine Jackson polynomial.hypothesesK :ℕhK :0 < Kc r :Fin 4 → ℝhr :∀ i, 0 < r if :(Fin 4 → ℝ) → ℝhf :ContinuousOn f (centeredRectangle c r)L :ℝhL :0 ≤ Lhlip :∀ y ∈ centeredRectangle c r,∀ z ∈ centeredRectangle c r, |f y - f z| ≤ L * ∑ i, |y i - z i|p q :MvPolynomial (Fin 4) ℝhpeval :hqeval :∀ x,y :Fin 4 → ℝhy :y ∈ centeredRectangle c rProof (Lean source)
theorem affineJackson_boundary_adaptive_four {K : ℕ} (hK : 0 < K) (c r : Fin 4 → ℝ) (hr : ∀ i, 0 < r i) (f : (Fin 4 → ℝ) → ℝ) (hf : ContinuousOn f (centeredRectangle c r)) (L : ℝ) (hL : 0 ≤ L) (hlip : ∀ y ∈ centeredRectangle c r, ∀ z ∈ centeredRectangle c r, |f y - f z| ≤ L * ∑ i, |y i - z i|) (p q : MvPolynomial (Fin 4) ℝ) (hpeval : ∀ y, eval y p = eval (normalizedPoint c r y) q) (hqeval : ∀ x, eval (cosPoint x) q = tensorConvolution K (fun z => f (affinePoint c r z)) x) (y : Fin 4 → ℝ) (hy : y ∈ centeredRectangle c r) : |eval y p - f y| ≤ 32 * L * ∑ i : Fin 4, (sqrt ((y i - (c i - r i)) * ((c i + r i) - y i)) / (K : ℝ) + r i / (K : ℝ) ^ 2) := by have haff : Continuous (affinePoint c r) := by apply continuous_pi intro i exact continuous_const.add (continuous_const.mul (continuous_apply i)) have hpull : ContinuousOn (fun z => f (affinePoint c r z)) (normalizedCube 4) := hf.comp haff.continuousOn (fun z hz => affinePoint_mem_centeredRectangle c r z hr hz) have hlip_pull : ∀ x ∈ normalizedCube 4, ∀ z ∈ normalizedCube 4, |f (affinePoint c r x) - f (affinePoint c r z)| ≤ L * ∑ i, r i * |x i - z i| := by intro x hx z hz have h := hlip (affinePoint c r x) (affinePoint_mem_centeredRectangle c r x hr hx) (affinePoint c r z) (affinePoint_mem_centeredRectangle c r z hr hz) have hcoord (i : Fin 4) : |affinePoint c r x i - affinePoint c r z i| = r i * |x i - z i| := by simp only [affinePoint] convert congrArg abs (show c i + r i * x i - (c i + r i * z i) = r i * (x i - z i) by ring) using 1 rw [abs_mul, abs_of_pos (hr i)] simpa only [hcoord] using h let theta : Fin 4 → ℝ := fun i => arccos (normalizedPoint c r y i) have hn := normalizedPoint_mem_normalizedCube c r y hr hy have hcos : cosPoint theta = normalizedPoint c r y := by funext i exact Real.cos_arccos (hn i).1 (hn i).2 have happ := tensorConvolution_boundary_adaptive hK (fun z => f (affinePoint c r z)) hpull r (fun i => le_of_lt (hr i)) L hL hlip_pull theta calc |eval y p - f y| = |tensorConvolution K (fun z => f (affinePoint c r z)) theta - f (affinePoint c r (cosPoint theta))| := by rw [hpeval y, ← hcos, hqeval theta, hcos, affinePoint_normalizedPoint c r y hr] _ ≤ L * ∑ i : Fin 4, (32 * r i * |sin (theta i)| / (K : ℝ) + 32 * r i / (K : ℝ) ^ 2) := happ _ = 32 * L * ∑ i : Fin 4, (sqrt ((y i - (c i - r i)) * ((c i + r i) - y i)) / (K : ℝ) + r i / (K : ℝ) ^ 2) := by have hterm (i : Fin 4) : 32 * r i * |sin (theta i)| / (K : ℝ) + 32 * r i / (K : ℝ) ^ 2 = 32 * (sqrt ((y i - (c i - r i)) * ((c i + r i) - y i)) / (K : ℝ) + r i / (K : ℝ) ^ 2) := by rw [show 32 * r i * |sin (theta i)| = 32 * (r i * |sin (theta i)|) by ring, radius_mul_abs_sin_arccos_eq_boundary c r y hr i] ring simp_rw [hterm] rw [← Finset.mul_sum] ring
Alternation 8 core · 5 supporting This module constructs normalized signed Lagrange weights, packages the classical alternation theorem as finite moment-dual certificates, and specializes the construction to pole-separated rational targets. ★ exists_alternationDualCertificate★ exists_finiteMomentDual★ exists_rationalFiniteMomentDual
Finite Chebyshev alternation and moment-dual certificates
This module constructs normalized signed Lagrange weights, packages the classical alternation theorem as finite moment-dual certificates, and specializes the construction to pole-separated rational targets.
The normalized Lagrange weight of a finite family of real nodes at an index i is the barycentric Lagrange weight of the i-th node divided by the sum of the absolute values of all the barycentric weights.
An alternation dual certificate for a target on an interval at a chosen degree records a best polynomial, ordered interval nodes, an alternating residual orientation, the associated Lagrange weights, and the facts that those weights alternate and are normalized, annihilate all relevant moments, and give the exact oriented target evaluation.
Definition (Lean source)
For endpoints with r strictly less than s, a target function continuous on the closed interval between them, and any degree bound L, there exists an alternation dual certificate: a best polynomial of degree at most L, L + 2 strictly increasing interval nodes at which its residual equioscillates, and the normalized Lagrange weights of those nodes, which alternate in sign, have absolute values summing to one, annihilate every monomial of degree at most L, and whose weighted sum of target values equals the best uniform error up to sign.
Formal statement
Proof (Lean source)
A finite moment dual certificate for a target on an interval at a chosen degree records strictly ordered nodes in the interval and normalized signed weights that annihilate moments through that degree and separate the target by exactly its best uniform approximation error.
Definition (Lean source)
From an alternation dual certificate one obtains a finite moment dual certificate for the same target, interval, and degree by keeping its nodes and weights and forgetting the best polynomial and the orientation.
Definition (Lean source)
For endpoints with r strictly less than s, a target function continuous on the closed interval between them, and any degree bound L, there exist L + 2 strictly increasing interval nodes and signed weights whose absolute values sum to one, which annihilate every monomial of degree at most L, and whose weighted sum of target values equals the best degree-L uniform approximation error in absolute value.
Formal statement
Proof (Lean source)
The rational target with parameter a at a point x is x divided by x + a.
Definition (Lean source)
For endpoints with r strictly less than s, a parameter a such that −a lies outside the closed interval between them, and any degree bound L, there exist L + 2 strictly increasing interval nodes and signed weights whose absolute values sum to one, which annihilate every monomial of degree at most L, and whose weighted sum of values of the rational target equals its best degree-L uniform approximation error in absolute value.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
sum_abs_normalizedLagrangeWeight_eq_onetheorem — For L + 2 pairwise distinct real nodes, the absolute values of the normalized Lagrange weights sum to one.hypothesesconclusion∑ i, |normalizedLagrangeWeight nodes i| = 1Proof (Lean source)
theorem sum_abs_normalizedLagrangeWeight_eq_one {L : ℕ} {nodes : Fin (L + 2) → ℝ} (hnodes : Injective nodes) : ∑ i, |normalizedLagrangeWeight nodes i| = 1 := by classical let Z := ∑ k : Fin (L + 2), |Lagrange.nodalWeight univ nodes k| have hweight : Lagrange.nodalWeight univ nodes (0 : Fin (L + 2)) ≠ 0 := Lagrange.nodalWeight_ne_zero hnodes.injOn (Finset.mem_univ _) have hZ : 0 < Z := by apply Finset.sum_pos' · exact fun k _ ↦ abs_nonneg _ · exact ⟨0, Finset.mem_univ _, abs_pos.mpr hweight⟩ change ∑ i, |Lagrange.nodalWeight univ nodes i / Z| = 1 simp_rw [abs_div, abs_of_pos hZ] simp_rw [div_eq_mul_inv] rw [← Finset.sum_mul] exact mul_inv_cancel₀ (ne_of_gt hZ) -
normalizedLagrangeWeight_alternatestheorem — For L + 2 strictly increasing real nodes and any index i, the normalized Lagrange weight at i equals (−1)^(L + 1 − i) times its own absolute value, so the weights alternate in sign.hypothesesconclusionnormalizedLagrangeWeight nodes i= (-1 : ℝ) ^ (L + 1 - (i : ℕ)) * |normalizedLagrangeWeight nodes i|Proof (Lean source)
theorem normalizedLagrangeWeight_alternates {L : ℕ} {nodes : Fin (L + 2) → ℝ} (hnodes : StrictMono nodes) (i : Fin (L + 2)) : normalizedLagrangeWeight nodes i = (-1 : ℝ) ^ (L + 1 - (i : ℕ)) * |normalizedLagrangeWeight nodes i| := by classical have hfactor (k : Fin (L + 2)) (hk : k ∈ (Finset.univ : Finset (Fin (L + 2))).erase i) : (nodes i - nodes k)⁻¹ = (if i < k then (-1 : ℝ) else 1) * |(nodes i - nodes k)⁻¹| := by by_cases hik : i < k · rw [if_pos hik, abs_of_neg] · ring · exact inv_neg''.mpr (sub_neg.mpr (hnodes hik)) · rw [if_neg hik, one_mul, abs_of_pos] have hki : k < i := lt_of_le_of_ne (le_of_not_gt hik) (Finset.ne_of_mem_erase hk) exact inv_pos.mpr (sub_pos.mpr (hnodes hki)) have hsign : (∏ k ∈ (Finset.univ : Finset (Fin (L + 2))).erase i, if i < k then (-1 : ℝ) else 1) = (-1 : ℝ) ^ (L + 1 - (i : ℕ)) := by rw [Finset.prod_ite] simp only [Finset.prod_const, one_pow, mul_one] have hfilter : ((Finset.univ : Finset (Fin (L + 2))).erase i).filter (fun k ↦ i < k) = Finset.Ioi i := by ext k simp only [mem_filter, Finset.mem_erase, Finset.mem_univ, Finset.mem_Ioi] constructor · exact fun h ↦ h.2 · exact fun h ↦ ⟨⟨ne_of_gt h, trivial⟩, h⟩ rw [hfilter, Fin.card_Ioi] rw [show L + 2 - 1 - (i : ℕ) = L + 1 - (i : ℕ) by omega] have hweight : Lagrange.nodalWeight Finset.univ nodes i = (-1 : ℝ) ^ (L + 1 - (i : ℕ)) * |Lagrange.nodalWeight Finset.univ nodes i| := by rw [Lagrange.nodalWeight] calc (∏ k ∈ Finset.univ.erase i, (nodes i - nodes k)⁻¹) = ∏ k ∈ Finset.univ.erase i, ((if i < k then (-1 : ℝ) else 1) * |(nodes i - nodes k)⁻¹|) := by apply Finset.prod_congr rfl intro k hk exact hfactor k hk _ = (∏ k ∈ Finset.univ.erase i, if i < k then (-1 : ℝ) else 1) * (∏ k ∈ Finset.univ.erase i, |(nodes i - nodes k)⁻¹|) := by rw [Finset.prod_mul_distrib] _ = (-1 : ℝ) ^ (L + 1 - (i : ℕ)) * |∏ k ∈ Finset.univ.erase i, (nodes i - nodes k)⁻¹| := by rw [hsign, Finset.abs_prod] let Z := ∑ k : Fin (L + 2), |Lagrange.nodalWeight Finset.univ nodes k| have hnodeInjective : Injective nodes := hnodes.injective have hweight_ne : Lagrange.nodalWeight Finset.univ nodes i ≠ 0 := Lagrange.nodalWeight_ne_zero hnodeInjective.injOn (Finset.mem_univ _) have hZ : 0 < Z := by apply Finset.sum_pos' · exact fun k _ ↦ abs_nonneg _ · exact ⟨i, Finset.mem_univ _, abs_pos.mpr hweight_ne⟩ change Lagrange.nodalWeight Finset.univ nodes i / Z = (-1 : ℝ) ^ (L + 1 - (i : ℕ)) * |Lagrange.nodalWeight Finset.univ nodes i / Z| rw [abs_div, abs_of_pos hZ] nth_rewrite 1 [hweight] ring -
sum_normalizedLagrangeWeight_mul_pow_eq_zerotheorem — For L + 2 pairwise distinct real nodes and an exponent j at most L, the sum over nodes of the normalized Lagrange weight times the j-th power of the node is zero.hypothesesconclusion∑ i, normalizedLagrangeWeight nodes i * nodes i ^ j = 0Proof (Lean source)
theorem sum_normalizedLagrangeWeight_mul_pow_eq_zero {L j : ℕ} {nodes : Fin (L + 2) → ℝ} (hnodes : Injective nodes) (hj : j ≤ L) : ∑ i, normalizedLagrangeWeight nodes i * nodes i ^ j = 0 := by classical let Z := ∑ k : Fin (L + 2), |Lagrange.nodalWeight Finset.univ nodes k| have hdegree : (X ^ j : Polynomial ℝ).degree < (Finset.univ : Finset (Fin (L + 2))).card := by rw [degree_X_pow] norm_cast simpa using (show j < L + 2 by omega) have hcoeff := Lagrange.coeff_eq_sum (s := (Finset.univ : Finset (Fin (L + 2)))) (v := nodes) hnodes.injOn (P := (X ^ j : Polynomial ℝ)) hdegree have hsum : ∑ i : Fin (L + 2), Lagrange.nodalWeight Finset.univ nodes i * nodes i ^ j = 0 := by simpa [Lagrange.nodalWeight, div_eq_mul_inv, Finset.prod_inv_distrib, mul_comm, ne_of_gt (lt_of_le_of_lt hj (lt_succ_self L))] using hcoeff.symm change ∑ i : Fin (L + 2), (Lagrange.nodalWeight Finset.univ nodes i / Z) * nodes i ^ j = 0 simp_rw [div_mul_eq_mul_div, div_eq_mul_inv] rw [← Finset.sum_mul, hsum, zero_mul] -
sum_normalizedLagrangeWeight_mul_eval_eq_zerotheorem — For L + 2 pairwise distinct real nodes and a real polynomial of degree at most L, the sum over nodes of the normalized Lagrange weight times the polynomial's value at the node is zero.hypothesesconclusion∑ i, normalizedLagrangeWeight nodes i * Q.eval (nodes i) = 0Proof (Lean source)
theorem sum_normalizedLagrangeWeight_mul_eval_eq_zero {L : ℕ} {nodes : Fin (L + 2) → ℝ} (hnodes : Injective nodes) {Q : Polynomial ℝ} (hQ : Q.natDegree ≤ L) : ∑ i, normalizedLagrangeWeight nodes i * Q.eval (nodes i) = 0 := by classical let Z := ∑ k : Fin (L + 2), |Lagrange.nodalWeight Finset.univ nodes k| have hdegree : Q.degree < (Finset.univ : Finset (Fin (L + 2))).card := by apply lt_of_le_of_lt Q.degree_le_natDegree norm_cast simpa using (show Q.natDegree < L + 2 by omega) have hcoeff := Lagrange.coeff_eq_sum (s := (Finset.univ : Finset (Fin (L + 2)))) (v := nodes) hnodes.injOn (P := Q) hdegree have hcoeffzero : Q.coeff (L + 1) = 0 := Q.coeff_eq_zero_of_natDegree_lt (by omega) have hsum : ∑ i : Fin (L + 2), Lagrange.nodalWeight Finset.univ nodes i * Q.eval (nodes i) = 0 := by simpa [Lagrange.nodalWeight, div_eq_mul_inv, Finset.prod_inv_distrib, mul_comm, hcoeffzero] using hcoeff.symm change ∑ i : Fin (L + 2), (Lagrange.nodalWeight Finset.univ nodes i / Z) * Q.eval (nodes i) = 0 simp_rw [div_mul_eq_mul_div, div_eq_mul_inv] rw [← Finset.sum_mul, hsum, zero_mul] -
continuousOn_rationalTargettheorem — If the point −a lies outside the closed interval from r to s, then the rational target with parameter a is continuous on that interval.Proof (Lean source)
theorem continuousOn_rationalTarget {a r s : ℝ} (hpole : -a ∉ Icc r s) : ContinuousOn (rationalTarget a) (Icc r s) := by unfold rationalTarget apply continuousOn_id.div (continuousOn_id.add continuousOn_const) intro x hx hzero apply hpole change x + a = 0 at hzero have hxa : x = -a := by linarith simpa [hxa] using hx
BasicBernsteinSzegoTrig 2 core · 0 supporting For a real polynomial R the function t ↦ R(cos t) is the *even trigonometric transform* of R. ★ hasDerivAt_cosComp★ deriv_cosComp
Bernstein / Szegő trigonometric transform: definitions and derivative
For a real polynomial R the function t ↦ R(cos t) is the even trigonometric
transform of R. This file records the elementary, fully-proved facts about
this transform that feed the sharp Szegő differential inequality
(Causalean.Mathlib.Analysis.Approximation.Chebyshev.Szego):
* hasDerivAt_cosComp, deriv_cosComp — the chain-rule derivative
d/dt R(cos t) = R'(cos t) · (-sin t).
Everything here is a direct consequence of Polynomial.hasDerivAt,
Real.hasDerivAt_cos and the composition rule; no deep input is used.
## Standard reference Szegő's / Bernstein's inequality for trigonometric polynomials; Rivlin, The Chebyshev Polynomials (1974); DeVore–Lorentz, Constructive Approximation Ch. 4.
For any real polynomial R and any point t, the map s ↦ R(cos s) has derivative R'(cos t) · (-sin t) at t.
Formal statement
Proof (Lean source)
For any real polynomial R and any point t, the derivative of s ↦ R(cos s) at t equals R'(cos t) · (-sin t).
Formal statement
Proof (Lean source)
ChebyshevChordGeometry 1 core · 3 supporting This module centers angles on the odd Chebyshev grid, proves the grid's cyclic symmetry and adjacent ordering, and derives the root-product domination used in the vertical-modulus argument. ★ exists_rootProduct_dominating_abscissa_past_chebyshevZeros
Finite chord geometry for Chebyshev roots
This module centers angles on the odd Chebyshev grid, proves the grid's cyclic symmetry and adjacent ordering, and derives the root-product domination used in the vertical-modulus argument.
Given a positive degree, a point of the unit interval, and a real height, some abscissa in that interval, weakly to the right of all degree-L Chebyshev roots, has at least as large a vertical root-distance product.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
exists_int_abs_sub_mul_pi_div_letheorem — Every real angle differs from an integer multiple of the step determined by a positive integer by at most half of that step.hypothesesL :ℕhL :0 < Lθ :ℝProof (Lean source)
theorem exists_int_abs_sub_mul_pi_div_le {L : ℕ} (hL : 0 < L) (θ : ℝ) : ∃ m : ℤ, |θ - (m : ℝ) * (pi / (L : ℝ))| ≤ pi / (2 * (L : ℝ)) := by -- Choose the nearest integer to `θ / (π/L)`. Mathlib's floor/round -- bounds give a remainder in `[-1/2,1/2]`; positivity of `π/L` then -- rescales that bound to the displayed interval. let d : ℝ := pi / (L : ℝ) have hd : 0 < d := div_pos Real.pi_pos (by exact_mod_cast hL) refine ⟨round (θ / d), ?_⟩ have hr : |θ / d - (round (θ / d) : ℝ)| ≤ (1 : ℝ) / 2 := abs_sub_round (θ / d) have heq : θ - (round (θ / d) : ℝ) * d = d * (θ / d - (round (θ / d) : ℝ)) := by field_simp rw [show pi / (L : ℝ) = d by rfl, heq, abs_mul, abs_of_pos hd] calc d * |θ / d - (round (θ / d) : ℝ)| ≤ d * ((1 : ℝ) / 2) := mul_le_mul_of_nonneg_left hr hd.le _ = pi / (2 * (L : ℝ)) := by dsimp [d] field_simp -
chebyshevPairedChordList_add_int_mul_pi_div_permtheorem — Shifting a real angle by an integer multiple of the step determined by a positive integer permutes the paired list of Chebyshev chord squares.hypothesesL :ℕhL :0 < Lθ :ℝm :ℤconclusionProof (Lean source)
theorem chebyshevPairedChordList_add_int_mul_pi_div_perm {L : ℕ} (hL : 0 < L) (θ : ℝ) (m : ℤ) : (chebyshevPairedChordList L (θ + (m : ℝ) * (pi / (L : ℝ)))).Perm (chebyshevPairedChordList L θ) := by induction m using Int.induction_on with | zero => simp | @succ i ih => have hstep := chebyshevPairedChordList_add_pi_div_perm hL (θ + (i : ℝ) * (pi / (L : ℝ))) have heq : θ + (((i : ℤ) + 1 : ℤ) : ℝ) * (pi / (L : ℝ)) = θ + (i : ℝ) * (pi / (L : ℝ)) + pi / (L : ℝ) := by norm_num ring rw [heq] exact hstep.trans ih | @pred i ih => have hstep := chebyshevPairedChordList_add_pi_div_perm hL (θ + ((-(i : ℤ) - 1 : ℤ) : ℝ) * (pi / (L : ℝ))) have heq : θ + ((-(i : ℤ) - 1 : ℤ) : ℝ) * (pi / (L : ℝ)) + pi / (L : ℝ) = θ + ((-(i : ℤ) : ℤ) : ℝ) * (pi / (L : ℝ)) := by norm_num ring rw [heq] at hstep exact hstep.symm.trans ih -
exists_sorted_chebyshevChordList_with_adjacentPairProduct_eq_of_centeredtheorem — For a positive degree L and an angle φ of absolute value at most π / (2L), the list of the 2L squared chord lengths, paired by Chebyshev root angle, can be rearranged into decreasing order in such a way that the product over consecutive pairs of (the product of the pair plus t) is unchanged, for any real additive term t.hypothesesconclusion∃ zs : List ℝ,conclusion 1zs.Perm (chebyshevPairedChordList L φ)conclusion 2zs.Pairwise (fun a b => b ≤ a)conclusion 3Proof (Lean source)
theorem exists_sorted_chebyshevChordList_with_adjacentPairProduct_eq_of_centered {L : ℕ} (hL : 0 < L) {φ t : ℝ} (hφ : |φ| ≤ pi / (2 * (L : ℝ))) : ∃ zs : List ℝ, zs.Perm (chebyshevPairedChordList L φ) ∧ zs.Pairwise (fun a b => b ≤ a) ∧ adjacentPairProduct t zs = adjacentPairProduct t (chebyshevPairedChordList L φ) := by let δ : ℝ := pi / (2 * (L : ℝ)) let u : ℝ := |φ| let a : ℕ → ℝ := fun k => cosineChordSq (chebyshevRootAngle L k + u) let b : ℕ → ℝ := fun k => cosineChordSq (chebyshevRootAngle L k - u) -- Reverse the roots, and put the larger circular distance first in each -- root block. At `u = δ`, neighboring blocks may tie. let zs := (List.range L).reverse.flatMap fun k => [a k, b k] have hLr : 0 < (L : ℝ) := by exact_mod_cast hL have hδ : 0 < δ := by dsimp [δ] positivity have hu0 : 0 ≤ u := abs_nonneg φ have huδ : u ≤ δ := hφ have hangle (k : ℕ) : chebyshevRootAngle L k = ((2 * k + 1 : ℕ) : ℝ) * δ := by simp only [chebyshevRootAngle, δ] ring have hcast (k : ℕ) : ((2 * k + 1 : ℕ) : ℝ) = 2 * (k : ℝ) + 1 := by push_cast ring have hδpi : 2 * (L : ℝ) * δ = pi := by dsimp [δ] field_simp have hbounds (k : ℕ) (hk : k < L) : 0 ≤ chebyshevRootAngle L k - u ∧ chebyshevRootAngle L k + u ≤ pi := by have hkcast : (k : ℝ) ≤ (L : ℝ) - 1 := by have hkn : k + 1 ≤ L := by omega have hkr : (k : ℝ) + 1 ≤ (L : ℝ) := by exact_mod_cast hkn linarith have hk0 : 0 ≤ (k : ℝ) := by positivity rw [hangle, hcast] constructor <;> nlinarith have hwithin (k : ℕ) (hk : k < L) : b k ≤ a k := by dsimp [a, b] apply cosineChordSq_mono_on_zero_pi · exact (hbounds k hk).1 · exact (hbounds k hk).2 · linarith have hcross (j k : ℕ) (hj : j < L) (hk : k < L) (hjk : j < k) : a j ≤ b k := by have hjk' : (j : ℝ) + 1 ≤ (k : ℝ) := by exact_mod_cast hjk dsimp [a, b] apply cosineChordSq_mono_on_zero_pi · have h := (hbounds j hj).1 rw [hangle, hcast] at h ⊢ nlinarith · have h := (hbounds k hk).2 rw [hangle, hcast] at h ⊢ nlinarith · rw [hangle, hangle, hcast, hcast] nlinarith have hsorted : zs.Pairwise (fun x y => y ≤ x) := by dsimp [zs] rw [List.pairwise_flatMap] constructor · intro k hk simp only [List.mem_reverse, List.mem_range] at hk simpa using hwithin k hk · rw [List.pairwise_reverse] have hrangePair : (List.range L).Pairwise (fun j k => j < k ∧ k < L) := by rw [List.pairwise_iff_getElem] intro i j hi hj hij simp only [List.length_range] at hi hj simp only [List.getElem_range] omega apply hrangePair.imp intro j k hjk x hx y hy have hj : j < L := lt_trans hjk.1 hjk.2 have hk : k < L := hjk.2 simp only [List.mem_cons, List.not_mem_nil, or_false] at hx hy rcases hx with rfl | rfl <;> rcases hy with rfl | rfl · exact (hcross j k hj hk hjk.1).trans (hwithin k hk) · exact (hwithin j hj).trans ((hcross j k hj hk hjk.1).trans (hwithin k hk)) · exact hcross j k hj hk hjk.1 · exact (hwithin j hj).trans (hcross j k hj hk hjk.1) -- Replacing `φ` by `|φ|` only swaps the two entries in each root block. have hpairs (k : ℕ) (hk : k < L) : [a k, b k].Perm [cosineChordSq (φ + chebyshevRootAngle L k), cosineChordSq (φ - chebyshevRootAngle L k)] := by by_cases hφ0 : 0 ≤ φ · have hu : u = φ := abs_of_nonneg hφ0 have ha : a k = cosineChordSq (φ + chebyshevRootAngle L k) := by dsimp [a] rw [hu] congr 1 <;> ring have hb : b k = cosineChordSq (φ - chebyshevRootAngle L k) := by dsimp [b] rw [hu] rw [show chebyshevRootAngle L k - φ = -(φ - chebyshevRootAngle L k) by ring] simp only [cosineChordSq] rw [Real.cos_neg] rw [ha, hb] · have hφ0' : φ ≤ 0 := le_of_not_ge hφ0 have hu : u = -φ := abs_of_nonpos hφ0' have ha : a k = cosineChordSq (φ - chebyshevRootAngle L k) := by dsimp [a] rw [hu] rw [show chebyshevRootAngle L k + -φ = -(φ - chebyshevRootAngle L k) by ring] simp only [cosineChordSq] rw [Real.cos_neg] have hb : b k = cosineChordSq (φ + chebyshevRootAngle L k) := by dsimp [b] rw [hu] congr 1 <;> ring rw [ha, hb] exact List.Perm.swap _ _ [] have hrange : (range L).val.toList.Perm (List.range L) := by refine (List.perm_ext_iff_of_nodup ?_ List.nodup_range).2 ?_ · rw [← Multiset.coe_nodup, Multiset.coe_toList] exact (range L).nodup · simp have hperm : zs.Perm (chebyshevPairedChordList L φ) := by dsimp [zs] rw [chebyshevPairedChordList] exact ((List.reverse_perm (List.range L)).flatMap (fun k hk => List.Perm.refl _)).trans <| hrange.symm.flatMap fun k hk => hpairs k (by simpa using hk) refine ⟨zs, hperm, hsorted, ?_⟩ rw [chebyshevPairedChordList] rw [adjacentPairProduct_flatMap_two, adjacentPairProduct_flatMap_two] rw [List.map_reverse, List.prod_reverse] rw [(hrange.symm.map (fun k => a k * b k + t)).prod_eq] congr 1 apply List.map_congr_left intro k hk have hp := (hpairs k (by simpa using hk)).prod_eq simpa [mul_comm, mul_left_comm, mul_assoc] using congrArg (fun z => z + t) hp
ChebyshevOneNorm 1 core · 0 supporting The Chebyshev recurrence gives the silver-ratio coefficient one-norm estimate used when a tensor Chebyshev expansion is converted to monomial coefficients. ★ polynomialCoeffOneNorm_chebyshev_le
Silver-ratio coefficient one-norm bound for Chebyshev polynomials
The Chebyshev recurrence gives the silver-ratio coefficient one-norm estimate used when a tensor Chebyshev expansion is converted to monomial coefficients.
For a natural-number order n, the sum of the absolute values of the monomial coefficients of the n-th first-kind Chebyshev polynomial is at most (1 + √2)ⁿ.
Formal statement
Proof (Lean source)
DuffinSchaeffer 2 core · 7 supporting This module proves the Chebyshev vertical-modulus and rootwise derivative comparisons, expresses differentiation in Chebyshev interpolation weights, and derives the real first-derivative bound on [-1,1] that follows from ★ duffinSchaeffer_derivative_le
A real first-derivative corollary of the Duffin--Schaeffer inequality
This module proves the Chebyshev vertical-modulus and rootwise derivative
comparisons, expresses differentiation in Chebyshev interpolation weights, and
derives the real first-derivative bound on [-1,1] that follows from the
Duffin--Schaeffer inequality.
The Chebyshev differentiation weight for degree L at a point x and node index i is the derivative at x of the Lagrange basis polynomial that equals one at the i-th of the L + 1 extremal Chebyshev nodes and zero at the others.
For a real polynomial of degree at most L with L positive and a nonnegative bound C, if the polynomial is at most C in absolute value at each of the L + 1 extremal Chebyshev nodes, then at every point between −1 and 1 its derivative is at most L² times C in absolute value.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
prod_norm_sub_chebyshevZero_le_endpointtheorem — For a positive degree L, a real x between −1 and 1, and any real height y, the product of the distances from the complex point x + i y to the L roots of the degree-L Chebyshev polynomial is at most the corresponding product of distances from the point 1 + i y.hypothesesProof (Lean source)
theorem prod_norm_sub_chebyshevZero_le_endpoint {L : ℕ} (hL : 0 < L) {x : ℝ} (hx : x ∈ Icc (-1) 1) (y : ℝ) : (∏ k ∈ range L, ‖((x - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖) ≤ ∏ k ∈ range L, ‖((1 - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ := by rcases exists_rootProduct_dominating_abscissa_past_chebyshevZeros hL hx y with ⟨x₀, hx₀, hzeros, hdom⟩ refine hdom.trans ?_ apply Finset.prod_le_prod · intro k hk positivity intro k hk exact vertical_rootDistance_le_endpoint (hzeros k hk) hx₀.2 -
norm_eval_chebyshev_eq_leadingCoeff_mul_rootProducttheorem — For any degree L and real numbers x and y, the modulus of the degree-L Chebyshev polynomial of the first kind at the complex point x + i y equals the modulus of its leading coefficient times the product of the distances from that point to its L cosine roots.hypothesesL :ℕx y :ℝProof (Lean source)
theorem norm_eval_chebyshev_eq_leadingCoeff_mul_rootProduct {L : ℕ} (x y : ℝ) : ‖(T ℂ (L : ℤ)).eval ((x : ℂ) + (y : ℂ) * Complex.I)‖ = ‖(T ℂ (L : ℤ)).leadingCoeff‖ * ∏ k ∈ range L, ‖((x - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ := by let z : ℂ := (x : ℂ) + (y : ℂ) * Complex.I let pR : ℝ[X] := T ℝ (L : ℤ) let pC : ℂ[X] := T ℂ (L : ℤ) have hinj : InjOn (fun k : ℕ => cos ((2 * (k : ℝ) + 1) * pi / (2 * (L : ℝ)))) (range L) := (range L).nodup_map_iff_injOn.mp (Polynomial.Chebyshev.roots_T_real_nodup L) have hcard : pR.roots.card = pR.natDegree := by dsimp [pR] rw [Polynomial.Chebyshev.roots_T_real, Finset.card_val, Finset.card_image_of_injOn hinj, Finset.card_range, Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] have hrootsMap : pR.roots.map ofReal = (pR.map Complex.ofRealHom).roots := by simpa using (Polynomial.roots_map_of_injective_of_card_eq_natDegree (p := pR) (f := Complex.ofRealHom) Complex.ofReal_injective hcard) have hmap : pR.map Complex.ofRealHom = pC := by dsimp [pR, pC] exact Polynomial.Chebyshev.map_T Complex.ofRealHom (L : ℤ) have hroots : pC.roots = (range L).val.map (fun k : ℕ => (chebyshevZero L k : ℂ)) := by rw [← hmap, ← hrootsMap] dsimp [pR] rw [Polynomial.Chebyshev.roots_T_real, Finset.image_val_of_injOn hinj, Multiset.map_map] congr 1 funext k apply congrArg ofReal apply congrArg cos norm_num [chebyshevZero, chebyshevRootAngle, Nat.cast_add, Nat.cast_mul] have hcardC : pC.roots.card = pC.natDegree := by rw [hroots, Multiset.card_map, Finset.card_val, Finset.card_range] dsimp [pC] rw [Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] have hfac := Polynomial.C_leadingCoeff_mul_prod_multiset_X_sub_C (p := pC) hcardC have heval := congrArg (eval z) hfac rw [eval_mul, eval_C, eval_multiset_prod, hroots] at heval simp only [Multiset.map_map, Function.comp_apply, eval_sub, eval_X, eval_C] at heval change pC.leadingCoeff * (∏ k ∈ range L, (z - (chebyshevZero L k : ℂ))) = pC.eval z at heval rw [← heval, norm_mul, Complex.norm_prod] congr 1 apply Finset.prod_congr rfl intro k hk congr 1 dsimp [z] push_cast ring -
norm_eval_chebyshev_le_endpoint_verticaltheorem — For a real x between −1 and 1 and any real height y, the modulus of the degree-L Chebyshev polynomial of the first kind at the complex point x + i y is at most its modulus at the point 1 + i y.hypothesesProof (Lean source)
theorem norm_eval_chebyshev_le_endpoint_vertical {L : ℕ} {x : ℝ} (hx : x ∈ Icc (-1) 1) (y : ℝ) : ‖(T ℂ (L : ℤ)).eval ((x : ℂ) + (y : ℂ) * I)‖ ≤ ‖(T ℂ (L : ℤ)).eval ((1 : ℂ) + (y : ℂ) * I)‖ := by by_cases hL : L = 0 · subst L simp have hLpos : 0 < L := Nat.pos_of_ne_zero hL calc ‖(T ℂ (L : ℤ)).eval ((x : ℂ) + (y : ℂ) * I)‖ = ‖(T ℂ (L : ℤ)).leadingCoeff‖ * ∏ k ∈ range L, ‖((x - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ := norm_eval_chebyshev_eq_leadingCoeff_mul_rootProduct x y _ ≤ ‖(T ℂ (L : ℤ)).leadingCoeff‖ * ∏ k ∈ range L, ‖((1 - chebyshevZero L k : ℝ) : ℂ) + (y : ℂ) * Complex.I‖ := mul_le_mul_of_nonneg_left (prod_norm_sub_chebyshevZero_le_endpoint hLpos hx y) (norm_nonneg _) _ = ‖(T ℂ (L : ℤ)).eval ((1 : ℂ) + (y : ℂ) * I)‖ := by simpa using (norm_eval_chebyshev_eq_leadingCoeff_mul_rootProduct (L := L) (1 : ℝ) y).symm -
abs_eval_derivative_le_chebyshev_at_roottheorem — For a positive degree L and a real polynomial of degree at most L whose absolute value is at most one at each of the L + 1 extremal Chebyshev nodes, at every real root of the degree-L Chebyshev polynomial the derivative of the polynomial is at most the derivative of the Chebyshev polynomial in absolute value.hypothesesL :ℕhL :0 < LQ :hQ :Q.natDegree ≤ Lhnodes :∀ iifi ≤ Lthen|Q.eval (node L i)| ≤ 1x :ℝhx :(T ℝ (L : ℤ)).eval x = 0conclusion|Q.derivative.eval x| ≤ |(T ℝ (L : ℤ)).derivative.eval x|Proof (Lean source)
theorem abs_eval_derivative_le_chebyshev_at_root {L : ℕ} (hL : 0 < L) (Q : Polynomial ℝ) (hQ : Q.natDegree ≤ L) (hnodes : ∀ i, i ≤ L → |Q.eval (Polynomial.Chebyshev.node L i)| ≤ 1) {x : ℝ} (hx : (T ℝ (L : ℤ)).eval x = 0) : |Q.derivative.eval x| ≤ |(T ℝ (L : ℤ)).derivative.eval x| := by classical let s := range (L + 1) let v := Polynomial.Chebyshev.node L let T : ℝ[X] := T ℝ (L : ℤ) let c : ℕ → ℝ := fun i ↦ (basis s v i).derivative.eval x have hQdegree : Q.degree < s.card := by simp only [s, Finset.card_range] exact lt_of_le_of_lt Q.degree_le_natDegree (by exact_mod_cast (Nat.lt_succ_of_le hQ)) have hTdegree : T.degree < s.card := by rw [show T.degree = (L : ℕ) by simp [T], show s.card = L + 1 by simp [s]] exact_mod_cast lt_succ_self L have hQinterp := Lagrange.eq_interpolate (Polynomial.Chebyshev.strictAntiOn_node L).injOn hQdegree have hTinterp := Lagrange.eq_interpolate (Polynomial.Chebyshev.strictAntiOn_node L).injOn hTdegree have hQder : Q.derivative.eval x = ∑ i ∈ s, Q.eval (v i) * c i := by calc Q.derivative.eval x = (Lagrange.interpolate s v (fun i ↦ Q.eval (v i))).derivative.eval x := by rw [← hQinterp] _ = ∑ i ∈ s, Q.eval (v i) * c i := by simp [Lagrange.interpolate_apply, eval_finsetSum, c] have hTder : T.derivative.eval x = ∑ i ∈ s, (-1 : ℝ) ^ i * c i := by calc T.derivative.eval x = (Lagrange.interpolate s v (fun i ↦ T.eval (v i))).derivative.eval x := by rw [← hTinterp] _ = ∑ i ∈ s, (-1 : ℝ) ^ i * c i := by rw [show (Lagrange.interpolate s v (fun i ↦ T.eval (v i))).derivative.eval x = ∑ i ∈ s, T.eval (v i) * c i by simp [Lagrange.interpolate_apply, eval_finsetSum, c]] apply Finset.sum_congr rfl intro i hi have hiL : i ≤ L := by simpa [s] using hi rw [show T.eval (v i) = (-1 : ℝ) ^ i by exact Polynomial.Chebyshev.eval_T_real_node (Finset.mem_Iic.mpr hiL)] have hsign : ∀ i ∈ s, 0 < (-1 : ℝ) ^ i * c i * T.derivative.eval x := by intro i hi have hiL : i ≤ L := by simpa [s] using hi exact negOnePow_mul_derivative_basis_mul_derivative_T_pos hL hx hiL have hD : T.derivative.eval x ≠ 0 := by intro hzero have := hsign 0 (by simp [s]) rw [hzero, mul_zero] at this exact lt_irrefl 0 this have hmass : ∑ i ∈ s, |c i| = |T.derivative.eval x| := by rcases lt_or_gt_of_ne hD with hneg | hpos · rw [abs_of_neg hneg, hTder, ← Finset.sum_neg_distrib] apply Finset.sum_congr rfl intro i hi have hci : (-1 : ℝ) ^ i * c i < 0 := by have := hsign i hi nlinarith calc |c i| = |(-1 : ℝ) ^ i * c i| := by rw [abs_mul, abs_neg_one_pow, one_mul] _ = -((-1 : ℝ) ^ i * c i) := abs_of_neg hci · rw [abs_of_pos hpos, hTder] apply Finset.sum_congr rfl intro i hi have hci : 0 < (-1 : ℝ) ^ i * c i := by have := hsign i hi nlinarith calc |c i| = |(-1 : ℝ) ^ i * c i| := by rw [abs_mul, abs_neg_one_pow, one_mul] _ = (-1 : ℝ) ^ i * c i := abs_of_pos hci calc |Q.derivative.eval x| = |∑ i ∈ s, Q.eval (v i) * c i| := by rw [hQder] _ ≤ ∑ i ∈ s, |Q.eval (v i) * c i| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i ∈ s, |c i| := by apply Finset.sum_le_sum intro i hi rw [abs_mul] have hiL : i ≤ L := by simpa [s] using hi calc |Q.eval (v i)| * |c i| ≤ 1 * |c i| := mul_le_mul_of_nonneg_right (by simpa [v] using hnodes i hiL) (abs_nonneg _) _ = |c i| := one_mul _ _ = |T.derivative.eval x| := hmass -
abs_eval_derivative_le_sq_of_chebyshev_root_controltheorem — For a positive degree L and a real polynomial of degree at most L, if at every real root of the degree-L Chebyshev polynomial the derivative of the polynomial is at most the derivative of the Chebyshev polynomial in absolute value, then at every point between −1 and 1 the derivative of the polynomial is at most L² in absolute value.hypothesesconclusion|Q.derivative.eval x| ≤ (L : ℝ) ^ 2Proof (Lean source)
theorem abs_eval_derivative_le_sq_of_chebyshev_root_control {L : ℕ} (hL : 0 < L) (Q : Polynomial ℝ) (hQ : Q.natDegree ≤ L) (hroots : ∀ z : ℝ, (T ℝ (L : ℤ)).eval z = 0 → |Q.derivative.eval z| ≤ |(T ℝ (L : ℤ)).derivative.eval z|) {x : ℝ} (hx : x ∈ Icc (-1) 1) : |Q.derivative.eval x| ≤ (L : ℝ) ^ 2 := by have hendpoint := abs_eval_derivative_le_chebyshev_endpoint_of_root_control hL Q hQ hroots (fun y ↦ norm_eval_chebyshev_le_endpoint_vertical hx y) rw [Polynomial.Chebyshev.derivative_T_eval_one] at hendpoint simpa [abs_of_nonneg (sq_nonneg (L : ℝ))] using hendpoint -
eval_derivative_eq_sum_chebyshevDerivativeWeighttheorem — For a real polynomial of degree at most L and any real point x, the derivative of the polynomial at x equals the sum, over the L + 1 extremal Chebyshev nodes, of the polynomial's value at the node times the Chebyshev differentiation weight for that node at x.hypothesesconclusionQ.derivative.eval xProof (Lean source)
theorem eval_derivative_eq_sum_chebyshevDerivativeWeight (Q : Polynomial ℝ) {L : ℕ} (hQ : Q.natDegree ≤ L) (x : ℝ) : Q.derivative.eval x = ∑ i ∈ range (L + 1), Q.eval (node L i) * chebyshevDerivativeWeight L x i := by classical have hdegree : Q.degree < (range (L + 1)).card := by rw [Finset.card_range] exact lt_of_le_of_lt Q.degree_le_natDegree (by exact_mod_cast (Nat.lt_succ_of_le hQ)) have hinterp := Lagrange.eq_interpolate (Polynomial.Chebyshev.strictAntiOn_node L).injOn hdegree calc Q.derivative.eval x = (Lagrange.interpolate (range (L + 1)) (node L) (fun i ↦ Q.eval (node L i))).derivative.eval x := by rw [← hinterp] _ = ∑ i ∈ range (L + 1), Q.eval (node L i) * chebyshevDerivativeWeight L x i := by simp [Lagrange.interpolate_apply, eval_finsetSum, chebyshevDerivativeWeight] -
sum_abs_chebyshevDerivativeWeight_le_sqtheorem — For a positive degree L and a point x between −1 and 1, the absolute values of the L + 1 Chebyshev differentiation weights at x sum to at most L².hypothesesconclusion∑ i ∈ range (L + 1), |chebyshevDerivativeWeight L x i| ≤ (L : ℝ) ^ 2Proof (Lean source)
theorem sum_abs_chebyshevDerivativeWeight_le_sq {L : ℕ} (hL : 0 < L) {x : ℝ} (hx : x ∈ Icc (-1) 1) : ∑ i ∈ range (L + 1), |chebyshevDerivativeWeight L x i| ≤ (L : ℝ) ^ 2 := by classical let s : Finset ℕ := range (L + 1) let v : ℕ → ℝ := Polynomial.Chebyshev.node L let c : ℕ → ℝ := fun i ↦ chebyshevDerivativeWeight L x i let ε : ℕ → ℝ := fun i ↦ if c i < 0 then -1 else 1 let P : Polynomial ℝ := Lagrange.interpolate s v ε have hinj : InjOn v s := Polynomial.Chebyshev.strictAntiOn_node L |>.injOn have hPdeg : P.natDegree ≤ L := by rw [Polynomial.natDegree_le_iff_degree_le] have hdegree := Lagrange.degree_interpolate_le ε hinj simpa [P, s] using hdegree have hPnodes : ∀ i, i ≤ L → |P.eval (Polynomial.Chebyshev.node L i)| ≤ 1 := by intro i hi have his : i ∈ s := by simp [s, hi] rw [show Polynomial.Chebyshev.node L i = v i from rfl] rw [show P.eval (v i) = ε i by exact Lagrange.eval_interpolate_at_node ε hinj his] simp only [ε] split <;> norm_num have hroot : ∀ z : ℝ, (T ℝ (L : ℤ)).eval z = 0 → |P.derivative.eval z| ≤ |(T ℝ (L : ℤ)).derivative.eval z| := by intro z hz exact abs_eval_derivative_le_chebyshev_at_root hL P hPdeg hPnodes hz have hPder : P.derivative.eval x = ∑ i ∈ s, ε i * c i := by rw [eval_derivative_eq_sum_chebyshevDerivativeWeight P hPdeg x] apply Finset.sum_congr rfl intro i hi rw [show P.eval (Polynomial.Chebyshev.node L i) = ε i by exact Lagrange.eval_interpolate_at_node ε hinj hi] have hmass : ∑ i ∈ s, |c i| = P.derivative.eval x := by rw [hPder] apply Finset.sum_congr rfl intro i hi by_cases hci : c i < 0 · simp [ε, hci, abs_of_neg hci] · have hci' : 0 ≤ c i := le_of_not_gt hci simp [ε, hci, abs_of_nonneg hci'] calc ∑ i ∈ range (L + 1), |chebyshevDerivativeWeight L x i| = P.derivative.eval x := by simpa [s, c] using hmass _ ≤ |P.derivative.eval x| := le_abs_self _ _ ≤ (L : ℝ) ^ 2 := abs_eval_derivative_le_sq_of_chebyshev_root_control hL P hPdeg hroot hx
Equioscillation 2 core · 1 supporting This module combines strict sign-matching perturbations with extremal sign polynomials to prove the necessity direction of Chebyshev's alternation theorem. ★ exists_equioscillationWitness
Equioscillation of best bounded-degree approximants
This module combines strict sign-matching perturbations with extremal sign polynomials to prove the necessity direction of Chebyshev's alternation theorem.
An equioscillation witness for a target on an interval at a chosen degree records a best polynomial, strictly ordered interval nodes, and an orientation under which the residual has the optimal magnitude with alternating signs.
Definition (Lean source)
For endpoints with r strictly less than s, a target function continuous on the closed interval between them, and any degree bound L, there exists an equioscillation witness: a best polynomial of degree at most L together with L + 2 strictly increasing points of the interval at which the residual equals the best uniform error in magnitude with alternating signs.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
exists_strict_uniformImprovementtheorem — For a function g continuous on the closed interval from r to s with r at most s whose supremum norm on that interval is strictly positive, if at every point of the interval where the absolute value of g equals that supremum norm, the product of g and a given polynomial is strictly positive, then some strictly positive multiple of the polynomial can be subtracted from g so that the supremum norm on the interval becomes strictly smaller.hypothesesg :ℝ → ℝr s :ℝhrs :r ≤ shg :ContinuousOn g (Icc r s)Q :hE :0 < intervalSupNorm g r shsign :∀ x ∈ Icc r sif|g x| = intervalSupNorm g r sthen0 < g x * Q.eval xconclusion∃ t : ℝ,conclusion 10 < tconclusion 2intervalSupNorm (fun x ↦ g x - t * Q.eval x) r s < intervalSupNorm g r sProof (Lean source)
theorem exists_strict_uniformImprovement {g : ℝ → ℝ} {r s : ℝ} (hrs : r ≤ s) (hg : ContinuousOn g (Icc r s)) {Q : Polynomial ℝ} (hE : 0 < intervalSupNorm g r s) (hsign : ∀ x ∈ Icc r s, |g x| = intervalSupNorm g r s → 0 < g x * Q.eval x) : ∃ t : ℝ, 0 < t ∧ intervalSupNorm (fun x ↦ g x - t * Q.eval x) r s < intervalSupNorm g r s := by let E := intervalSupNorm g r s let q : ℝ → ℝ := fun x ↦ Q.eval x let p : ℝ → ℝ := fun x ↦ g x * q x have hIcc_ne : (Icc r s).Nonempty := ⟨r, le_rfl, hrs⟩ have hq : Continuous q := Q.continuous have hp : ContinuousOn p (Icc r s) := hg.mul hq.continuousOn have habs_le : ∀ x ∈ Icc r s, |g x| ≤ E := by simpa [E] using (intervalSupNorm_le_iff hg hrs).mp (le_refl (intervalSupNorm g r s)) obtain ⟨xE, hxE, hEmax, -⟩ := isCompact_Icc.exists_sSup_image_eq_and_ge hIcc_ne hg.abs have hxE_eq : |g xE| = E := by simpa [E, intervalSupNorm] using hEmax.symm have hp_xE : 0 < p xE := by exact hsign xE hxE (by simpa [E] using hxE_eq) let B : Set ℝ := {x | x ∈ Icc r s ∧ p x ≤ 0} have hBcompact : IsCompact B := by apply IsCompact.of_isClosed_subset isCompact_Icc (isClosed_Icc.isClosed_le hp continuousOn_const) exact fun _ hx ↦ hx.1 have hc : ∃ c : ℝ, c < E ∧ ∀ x ∈ Icc r s, c ≤ |g x| → 0 < p x := by by_cases hBne : B.Nonempty · obtain ⟨xb, hxb, hxb_max⟩ := hBcompact.exists_isMaxOn hBne (hg.abs.mono (fun _ hx ↦ hx.1)) have hxb_lt : |g xb| < E := by apply lt_of_le_of_ne (habs_le xb hxb.1) intro heq have : 0 < p xb := hsign xb hxb.1 (by simpa [E] using heq) linarith [hxb.2] refine ⟨(|g xb| + E) / 2, by linarith, ?_⟩ intro x hx hcx by_contra hnot have hxB : x ∈ B := ⟨hx, le_of_not_gt hnot⟩ have hmax_le : |g x| ≤ |g xb| := hxb_max hxB linarith · refine ⟨E / 2, by linarith [hE], ?_⟩ intro x hx _ by_contra hnot exact hBne ⟨x, hx, le_of_not_gt hnot⟩ obtain ⟨c, hcE, hc⟩ := hc let A : Set ℝ := {x | x ∈ Icc r s ∧ c ≤ |g x|} have hAcompact : IsCompact A := by apply IsCompact.of_isClosed_subset isCompact_Icc (isClosed_Icc.isClosed_le continuousOn_const hg.abs) exact fun _ hx ↦ hx.1 have hxEA : xE ∈ A := ⟨hxE, by linarith [hxE_eq]⟩ obtain ⟨xm, hxm, hxm_min⟩ := hAcompact.exists_isMinOn ⟨xE, hxEA⟩ (hp.mono (fun _ hx ↦ hx.1)) let m := p xm have hm : 0 < m := by exact hc xm hxm.1 hxm.2 obtain ⟨xM, hxM, hxM_max⟩ := isCompact_Icc.exists_isMaxOn hIcc_ne hq.abs.continuousOn let M := |q xM| have hq_le : ∀ x ∈ Icc r s, |q x| ≤ M := by intro x hx exact hxM_max hx have hM : 0 < M := by have hqE_ne : q xE ≠ 0 := by intro hzero simp [p, hzero] at hp_xE have hqE_pos : 0 < |q xE| := abs_pos.mpr hqE_ne exact lt_of_lt_of_le hqE_pos (hq_le xE hxE) let t := min (m / M ^ 2) ((E - c) / (2 * M)) have ht₁ : 0 < m / M ^ 2 := div_pos hm (sq_pos_of_pos hM) have ht₂ : 0 < (E - c) / (2 * M) := div_pos (sub_pos.mpr hcE) (mul_pos (by norm_num) hM) have ht : 0 < t := lt_min ht₁ ht₂ refine ⟨t, ht, ?_⟩ unfold intervalSupNorm apply (isCompact_Icc.sSup_lt_iff_of_continuous hIcc_ne ((hg.sub (hq.const_mul t).continuousOn).abs) E).2 intro x hx have hgx := habs_le x hx have hqx := hq_le x hx by_cases hhigh : c ≤ |g x| · have hxA : x ∈ A := ⟨hx, hhigh⟩ have hmp : m ≤ p x := hxm_min hxA have htM : t ≤ m / M ^ 2 := min_le_left _ _ have hq_sq : q x ^ 2 ≤ M ^ 2 := by simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg (q x)) (abs_nonneg M)).2 (by simpa [abs_of_pos hM] using hqx) have hmove : t * q x ^ 2 < 2 * p x := by have hM_sq : 0 < M ^ 2 := sq_pos_of_pos hM have ht_bound : t * M ^ 2 ≤ m := by apply (le_div_iff₀ hM_sq).mp simpa [mul_comm] using htM nlinarith [mul_le_mul_of_nonneg_left hq_sq (le_of_lt ht)] have hsquares : (g x - t * q x) ^ 2 < E ^ 2 := by calc (g x - t * q x) ^ 2 = g x ^ 2 - 2 * t * p x + t ^ 2 * q x ^ 2 := by simp only [p] ring _ < g x ^ 2 := by nlinarith _ ≤ E ^ 2 := by simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg (g x)) (le_of_lt hE)).2 hgx rw [← sq_abs] at hsquares exact (sq_lt_sq₀ (abs_nonneg _) (le_of_lt hE)).mp hsquares · have htM : t ≤ (E - c) / (2 * M) := min_le_right _ _ have ht_bound : t * M ≤ (E - c) / 2 := by have htwoM : 0 < 2 * M := mul_pos (by norm_num) hM have := (le_div_iff₀ htwoM).mp htM nlinarith calc |g x - t * q x| ≤ |g x| + |t * q x| := abs_sub _ _ _ = |g x| + t * |q x| := by rw [abs_mul, abs_of_pos ht] _ ≤ |g x| + t * M := by gcongr _ < E := by have : |g x| < c := lt_of_not_ge hhigh nlinarith [sub_pos.mpr hcE]
EquispacedDistance 1 core · 2 supporting The two sides of a deleted grid point give separate factorial products. ★ equispacedDistance_erase_split
Products of distances on an equispaced finite grid
The two sides of a deleted grid point give separate factorial products. These finite-product identities isolate the arithmetic in the denominator of a Lagrange basis polynomial.
For a grid order D and a grid index j between 0 and D, the product of the distances |j − i| over all grid indices i other than j equals the product of j − i over i below j times the product of i − j over i from j + 1 to D.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
equispacedDistance_lower_factorialtheorem — The product of positive integer distances from j to the indices below it is j!.Proof (Lean source)
theorem equispacedDistance_lower_factorial (j : ℕ) : (∏ i ∈ range j, ((j : ℝ) - (i : ℝ))) = (j.factorial : ℝ) := by calc (∏ i ∈ range j, ((j : ℝ) - (i : ℝ))) = ∏ i ∈ range j, (((j - 1 - i + 1 : ℕ) : ℝ)) := by apply Finset.prod_congr rfl intro i hi have hij : i < j := Finset.mem_range.mp hi rw [← Nat.cast_sub (le_of_lt hij)] congr 1 omega _ = ∏ i ∈ range j, (((i + 1 : ℕ) : ℝ)) := Finset.prod_range_reflect (fun i : ℕ => ((i + 1 : ℕ) : ℝ)) j _ = (j.factorial : ℝ) := by norm_cast exact Finset.prod_range_add_one_eq_factorial j -
equispacedDistance_upper_factorialtheorem — The product of positive integer distances from j to the indices above it through D is (D-j)!.hypothesesD :ℕj :Fin (D + 1)conclusion(∏ i ∈ Ico ((j : ℕ) + 1) (D + 1), ((i : ℝ) - (j : ℝ)))= ((D - (j : ℕ)).factorial : ℝ)Proof (Lean source)
theorem equispacedDistance_upper_factorial (D : ℕ) (j : Fin (D + 1)) : (∏ i ∈ Ico ((j : ℕ) + 1) (D + 1), ((i : ℝ) - (j : ℝ))) = ((D - (j : ℕ)).factorial : ℝ) := by rw [Finset.prod_Ico_eq_prod_range] have hj : (j : ℕ) ≤ D := Nat.lt_succ_iff.mp j.isLt have hsub : D + 1 - ((j : ℕ) + 1) = D - (j : ℕ) := by omega rw [hsub] calc _ = ∏ i ∈ range (D - (j : ℕ)), (((i + 1 : ℕ) : ℝ)) := by apply Finset.prod_congr rfl intro i hi push_cast ring _ = ((D - (j : ℕ)).factorial : ℝ) := by norm_cast exact Finset.prod_range_add_one_eq_factorial _
EquispacedLagrange 3 core · 5 supporting Coefficients of a degree-bounded real polynomial are recovered from a fixed grid in the unit interval. ★ equispacedLagrange_coeff_recovery
Quantitative equispaced Lagrange interpolation
Coefficients of a degree-bounded real polynomial are recovered from a fixed grid in the unit interval. The sum of the absolute recovery weights has an exponential degree bound. These one-variable facts are the lower layer for tensor coefficient bounds.
A grid order D and node index j between 0 and D determine the equally spaced unit-interval node j/(D + 1).
Definition (Lean source)
A grid order D, coefficient index k, and node index j determine the Lagrange coefficient-recovery weight: the coefficient of the k-th power in the Lagrange basis polynomial that equals one at the j-th equally spaced node j/(D + 1) and zero at the other D nodes.
Definition (Lean source)
For a grid order D and a real polynomial of degree at most D, and a coefficient index k between 0 and D, the k-th monomial coefficient of the polynomial equals the sum over the D + 1 equally spaced nodes j/(D + 1) of the Lagrange recovery weight for k and j times the polynomial's value at that node.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
equispacedLagrange_denominator_abstheorem — The absolute product of distances from one equispaced node to all the other nodes is j! (D-j)! / (D+1)^D.hypothesesD :ℕj :Fin (D + 1)conclusion|∏ i ∈ (Finset.univ : Finset (Fin (D + 1))).erase j, (equispacedLagrangeNode D j - equispacedLagrangeNode D i)|= (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)) / (D + 1 : ℝ) ^ DProof (Lean source)
theorem equispacedLagrange_denominator_abs (D : ℕ) (j : Fin (D + 1)) : |∏ i ∈ (Finset.univ : Finset (Fin (D + 1))).erase j, (equispacedLagrangeNode D j - equispacedLagrangeNode D i)| = (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)) / (D + 1 : ℝ) ^ D := by have hden : (D + 1 : ℝ) ≠ 0 := by positivity have hcard : ((Finset.univ : Finset (Fin (D + 1))).erase j).card = D := by simp calc |∏ i ∈ (Finset.univ : Finset (Fin (D + 1))).erase j, (equispacedLagrangeNode D j - equispacedLagrangeNode D i)| = ∏ i ∈ (Finset.univ : Finset (Fin (D + 1))).erase j, |(j : ℝ) - (i : ℝ)| / (D + 1 : ℝ) := by rw [Finset.abs_prod] apply Finset.prod_congr rfl intro i _ rw [equispacedLagrangeNode, equispacedLagrangeNode, ← sub_div, abs_div, abs_of_nonneg (by positivity : (0 : ℝ) ≤ D + 1)] _ = (∏ i ∈ (Finset.univ : Finset (Fin (D + 1))).erase j, |(j : ℝ) - (i : ℝ)|) / (D + 1 : ℝ) ^ D := by rw [Finset.prod_div_distrib, Finset.prod_const, hcard] _ = _ := by rw [equispacedDistance_erase_split, equispacedDistance_lower_factorial, equispacedDistance_upper_factorial] -
equispacedLagrange_reciprocal_factorial_sumtheorem — The sum of reciprocal factorial pairs over the equispaced grid equals 2^D / D!.hypothesesD :ℕconclusion(∑ j : Fin (D + 1), 1 / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)))= (2 : ℝ) ^ D / (D.factorial : ℝ)Proof (Lean source)
theorem equispacedLagrange_reciprocal_factorial_sum (D : ℕ) : (∑ j : Fin (D + 1), 1 / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ))) = (2 : ℝ) ^ D / (D.factorial : ℝ) := by have hterm (k : ℕ) (hk : k ≤ D) : 1 / ((k.factorial : ℝ) * ((D - k).factorial : ℝ)) = (D.choose k : ℝ) / (D.factorial : ℝ) := by have h := Nat.choose_mul_factorial_mul_factorial hk have h' : (D.choose k : ℝ) * (k.factorial : ℝ) * ((D - k).factorial : ℝ) = (D.factorial : ℝ) := by exact_mod_cast h have hfac : (D.factorial : ℝ) ≠ 0 := by positivity have hkfac : (k.factorial : ℝ) ≠ 0 := by positivity have hsubfac : ((D - k).factorial : ℝ) ≠ 0 := by positivity apply (div_eq_div_iff (mul_ne_zero hkfac hsubfac) hfac).2 nlinarith [h'] calc _ = ∑ k ∈ range (D + 1), 1 / ((k.factorial : ℝ) * ((D - k).factorial : ℝ)) := by exact Fin.sum_univ_eq_sum_range (fun k : ℕ => (1 : ℝ) / ((k.factorial : ℝ) * ((D - k).factorial : ℝ))) (D + 1) _ = ∑ k ∈ range (D + 1), (D.choose k : ℝ) / (D.factorial : ℝ) := by apply Finset.sum_congr rfl intro k hk exact hterm k (le_of_lt_succ (Finset.mem_range.mp hk)) _ = _ := by rw [← Finset.sum_div] congr 1 exact_mod_cast Nat.sum_range_choose D -
equispacedLagrange_factorial_ratio_letheorem — The factorial ratio from the equispaced grid grows at most exponentially in its degree.hypothesesD :ℕconclusion(D + 1 : ℝ) ^ D / (D.factorial : ℝ) ≤ (4 : ℝ) ^ DProof (Lean source)
theorem equispacedLagrange_factorial_ratio_le (D : ℕ) : (D + 1 : ℝ) ^ D / (D.factorial : ℝ) ≤ (4 : ℝ) ^ D := by calc (D + 1 : ℝ) ^ D / (D.factorial : ℝ) ≤ ((2 * D).choose D : ℝ) := by have h : 2 * D + 1 - D = D + 1 := by omega simpa [h, Nat.cast_add] using (Nat.pow_le_choose (α := ℝ) D (2 * D)) _ ≤ (2 : ℝ) ^ (2 * D) := by exact_mod_cast Nat.choose_le_two_pow (2 * D) D _ = (4 : ℝ) ^ D := by rw [show (4 : ℝ) = 2 ^ 2 by norm_num, ← pow_mul] -
equispacedLagrange_basis_oneNormtheorem — At one equispaced node, the coefficient one-norm of the Lagrange basis polynomial is bounded by the factorial denominator of its interpolation formula.hypothesesD :ℕj :Fin (D + 1)conclusion(∑ k : Fin (D + 1), |equispacedLagrangeWeight D k j|)≤ (2 : ℝ) ^ D * (D + 1 : ℝ) ^ D / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ))Proof (Lean source)
theorem equispacedLagrange_basis_oneNorm (D : ℕ) (j : Fin (D + 1)) : (∑ k : Fin (D + 1), |equispacedLagrangeWeight D k j|) ≤ (2 : ℝ) ^ D * (D + 1 : ℝ) ^ D / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)) := by classical let s := (Finset.univ : Finset (Fin (D + 1))).erase j let v := equispacedLagrangeNode D have hscale (c : ℝ) (p : Polynomial ℝ) : polynomialCoeffOneNorm (C c * p) = |c| * polynomialCoeffOneNorm p := by rw [Polynomial.C_mul'] have hp : p.natDegree < p.natDegree + 1 := Nat.lt_succ_self _ have hcp : (c • p).natDegree < p.natDegree + 1 := lt_of_le_of_lt (Polynomial.natDegree_smul_le _ _) hp change polyCoeffL1 (c • p) = _ rw [show polyCoeffL1 (c • p) = ∑ k ∈ range (p.natDegree + 1), |(c • p).coeff k| from (c • p).sum_over_range' (fun _ => abs_zero) _ hcp, show polynomialCoeffOneNorm p = ∑ k ∈ range (p.natDegree + 1), |p.coeff k| from p.sum_over_range' (fun _ => abs_zero) _ hp] simp only [Polynomial.coeff_smul, smul_eq_mul, abs_mul, Finset.mul_sum] have hnonneg (p : Polynomial ℝ) : 0 ≤ polynomialCoeffOneNorm p := by change 0 ≤ p.sum (fun _ c => |c|) exact Finset.sum_nonneg fun _ _ => abs_nonneg _ have hnode (i : Fin (D + 1)) : 0 ≤ v i ∧ v i ≤ 1 := by have hi : (i : ℕ) ≤ D := Nat.lt_succ_iff.mp i.isLt have hi' : (i : ℝ) ≤ (D : ℝ) := by exact_mod_cast hi constructor · exact div_nonneg (by positivity) (by positivity) · apply (div_le_iff₀ (by positivity : (0 : ℝ) < D + 1)).2 linarith have hfactor (i : Fin (D + 1)) : polynomialCoeffOneNorm (Lagrange.basisDivisor (v j) (v i)) ≤ 2 * |v j - v i|⁻¹ := by rw [Lagrange.basisDivisor, hscale, abs_inv] calc |v j - v i|⁻¹ * polynomialCoeffOneNorm (X - C (v i)) ≤ |v j - v i|⁻¹ * 2 := mul_le_mul_of_nonneg_left (polynomialCoeffOneNorm_X_sub_C_le_two (v i) (hnode i).1 (hnode i).2) (by positivity) _ = _ := by ring have hprod (t : Finset (Fin (D + 1))) : polynomialCoeffOneNorm (∏ i ∈ t, Lagrange.basisDivisor (v j) (v i)) ≤ ∏ i ∈ t, (2 * |v j - v i|⁻¹) := by induction t using Finset.induction_on with | empty => change polynomialCoeffOneNorm (1 : Polynomial ℝ) ≤ 1 rw [show polynomialCoeffOneNorm (1 : Polynomial ℝ) = ∑ k ∈ range 1, |(1 : Polynomial ℝ).coeff k| from (1 : Polynomial ℝ).sum_over_range' (fun _ => abs_zero) 1 (by simp)] simp | @insert i t hi ih => simp only [Finset.prod_insert hi] calc polynomialCoeffOneNorm (Lagrange.basisDivisor (v j) (v i) * ∏ k ∈ t, Lagrange.basisDivisor (v j) (v k)) ≤ polynomialCoeffOneNorm (Lagrange.basisDivisor (v j) (v i)) * polynomialCoeffOneNorm (∏ k ∈ t, Lagrange.basisDivisor (v j) (v k)) := polynomialCoeffOneNorm_mul_le _ _ _ ≤ (2 * |v j - v i|⁻¹) * (∏ k ∈ t, (2 * |v j - v k|⁻¹)) := mul_le_mul (hfactor i) ih (hnonneg _) (by positivity) have hinj : Injective v := by intro a b hab have hden : (D + 1 : ℝ) ≠ 0 := by positivity dsimp [v, equispacedLagrangeNode] at hab have hab' : (a : ℝ) = (b : ℝ) := by field_simp [hden] at hab exact hab exact Fin.ext (Nat.cast_injective hab') have hdeg : (basis Finset.univ v j).natDegree < D + 1 := by rw [Lagrange.natDegree_basis hinj.injOn (Finset.mem_univ j)] simp have hsum : (∑ k : Fin (D + 1), |equispacedLagrangeWeight D k j|) = polynomialCoeffOneNorm (basis Finset.univ v j) := by rw [show polynomialCoeffOneNorm (basis Finset.univ v j) = ∑ k ∈ range (D + 1), |(basis Finset.univ v j).coeff k| from (basis Finset.univ v j).sum_over_range' (fun _ => abs_zero) _ hdeg] simpa only [equispacedLagrangeWeight, v] using (Fin.sum_univ_eq_sum_range (fun k : ℕ => |(basis Finset.univ v j).coeff k|) (D + 1)) rw [hsum] change polynomialCoeffOneNorm (∏ i ∈ s, Lagrange.basisDivisor (v j) (v i)) ≤ _ calc polynomialCoeffOneNorm (∏ i ∈ s, Lagrange.basisDivisor (v j) (v i)) ≤ ∏ i ∈ s, (2 * |v j - v i|⁻¹) := hprod s _ = (2 : ℝ) ^ D / |∏ i ∈ s, (v j - v i)| := by rw [Finset.prod_mul_distrib, Finset.prod_const] have hs : s.card = D := by simp [s] rw [hs, Finset.prod_inv_distrib, ← Finset.abs_prod, div_eq_mul_inv] _ = _ := by rw [equispacedLagrange_denominator_abs] have hfac : (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)) ≠ 0 := by positivity have hden : (D + 1 : ℝ) ≠ 0 := by positivity field_simp -
equispacedLagrange_weight_oneNormtheorem — The sum of the absolute values of all equispaced coefficient-recovery weights is at most 2^(4D+4).hypothesesD :ℕconclusion≤ (2 : ℝ) ^ (4 * D + 4)Proof (Lean source)
theorem equispacedLagrange_weight_oneNorm (D : ℕ) : (∑ k : Fin (D + 1), ∑ j : Fin (D + 1), |equispacedLagrangeWeight D k j|) ≤ (2 : ℝ) ^ (4 * D + 4) := by rw [Finset.sum_comm] calc (∑ j : Fin (D + 1), ∑ k : Fin (D + 1), |equispacedLagrangeWeight D k j|) ≤ ∑ j : Fin (D + 1), (2 : ℝ) ^ D * (D + 1 : ℝ) ^ D / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ)) := by exact Finset.sum_le_sum (fun j _ => equispacedLagrange_basis_oneNorm D j) _ = (2 : ℝ) ^ D * (D + 1 : ℝ) ^ D * (∑ j : Fin (D + 1), 1 / (((j : ℕ).factorial : ℝ) * ((D - (j : ℕ)).factorial : ℝ))) := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j _ ring _ = (2 : ℝ) ^ D * (D + 1 : ℝ) ^ D * ((2 : ℝ) ^ D / (D.factorial : ℝ)) := by rw [equispacedLagrange_reciprocal_factorial_sum] _ = (4 : ℝ) ^ D * ((D + 1 : ℝ) ^ D / (D.factorial : ℝ)) := by rw [show (4 : ℝ) = 2 * 2 by norm_num, mul_pow] ring _ ≤ (4 : ℝ) ^ D * (4 : ℝ) ^ D := by exact mul_le_mul_of_nonneg_left (equispacedLagrange_factorial_ratio_le D) (by positivity) _ ≤ (2 : ℝ) ^ (4 * D + 4) := by rw [show (4 : ℝ) = 2 ^ 2 by norm_num, ← pow_mul, ← pow_add] apply pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) omega
ExtremalSignPolynomial 2 core · 0 supporting A continuous function g on a compact interval [r, s] with positive supremum norm either attains its norm with alternating signs at L + 2 increasing points, or admits a polynomial Q of degree at most L with g(x)·Q(x) > 0 ★ exists_signPolynomial_of_no_alternatingExtrema
Sign polynomials for extremal residual sets
A continuous function g on a compact interval [r, s] with positive supremum norm either attains its norm with alternating signs at L + 2 increasing points, or admits a polynomial Q of degree at most L with g(x)·Q(x) > 0 at every point where |g| equals its supremum norm. This is the sign-change counting step in the necessity half of Chebyshev's alternation (equioscillation) theorem: such a Q, scaled small, could be subtracted from g to lower its supremum norm.
Main definitions
* IsAlternatingExtrema — g takes the values ±‖g‖, with alternating signs, at L + 2 strictly
increasing nodes of the interval.
Main results
* exists_signPolynomial_of_no_alternatingExtrema — if g has no L + 2 alternating extrema, there
is a polynomial of degree at most L having the sign of g on the whole extremal set.
A function g on the interval from r to s has alternating extrema of order L at L + 2 nodes with an orientation when the nodes are strictly increasing, all lie in the interval, the orientation is plus or minus one, and the value of g at the i-th node equals the orientation times (−1)^i times the supremum norm of g on the interval.
Definition (Lean source)
For endpoints with r strictly less than s, a function g continuous on the closed interval between them whose supremum norm there is strictly positive, and a degree bound L, if g has no L + 2 alternating extrema, for any nodes and orientation, then there is a polynomial of degree at most L whose product with g is strictly positive at every point of the interval where the absolute value of g equals its supremum norm.
Formal statement
Proof (Lean source)
HalfPlaneDerivativeComparison 1 core · 2 supporting This module combines root reflection with a half-plane boundary estimate to propagate derivative control at the real roots of a Chebyshev polynomial to a sharp endpoint comparison. ★ abs_eval_derivative_le_chebyshev_endpoint_of_root_control
Half-plane derivative comparison at Chebyshev roots
This module combines root reflection with a half-plane boundary estimate to propagate derivative control at the real roots of a Chebyshev polynomial to a sharp endpoint comparison.
For a positive degree L and a real polynomial of degree at most L whose derivative is at most that of the degree-L Chebyshev polynomial, in absolute value, at every real root of that Chebyshev polynomial, at a real point x for which the modulus of the Chebyshev polynomial at x + i y is at most its modulus at 1 + i y for every real y, the derivative of the polynomial at x is at most the absolute value of the derivative of the Chebyshev polynomial at one.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
exists_chebyshevRootReflectiontheorem — For a positive degree L, a real polynomial of degree at most L whose derivative is at most that of the degree-L Chebyshev polynomial, in absolute value, at every real root of that Chebyshev polynomial, and any real base point x, there is a complex polynomial of degree at most L whose modulus at every purely imaginary point i y equals the modulus of the Chebyshev polynomial at x + i y, and whose derivative at zero is at least the derivative of the original polynomial at x in absolute value.hypothesesL :ℕhL :0 < LQ :hQ :Q.natDegree ≤ Lhroots :x :ℝconclusion∃ R : Polynomial ℂ,R.natDegree ≤ Lconclusion 2|Q.derivative.eval x| ≤ ‖R.derivative.eval 0‖Proof (Lean source)
theorem exists_chebyshevRootReflection {L : ℕ} (hL : 0 < L) (Q : Polynomial ℝ) (hQ : Q.natDegree ≤ L) (hroots : ∀ z : ℝ, (T ℝ (L : ℤ)).eval z = 0 → |Q.derivative.eval z| ≤ |(T ℝ (L : ℤ)).derivative.eval z|) (x : ℝ) : ∃ R : Polynomial ℂ, R.natDegree ≤ L ∧ (∀ y : ℝ, ‖R.eval ((y : ℂ) * I)‖ = ‖(T ℂ (L : ℤ)).eval ((x : ℂ) + (y : ℂ) * I)‖) ∧ |Q.derivative.eval x| ≤ ‖R.derivative.eval 0‖ := by have hPnat : Q.derivative.natDegree < L := by refine lt_of_le_of_lt ((Polynomial.natDegree_derivative_le Q).trans (Nat.sub_le_sub_right hQ 1)) ?_ exact Nat.sub_lt hL Nat.zero_lt_one have hPdegree : Q.derivative.degree < (L : WithBot ℕ) := by by_cases hP : Q.derivative = 0 · simp [hP] · exact (Polynomial.natDegree_lt_iff_degree_lt hP).mp hPnat have hinterp : Q.derivative = Lagrange.interpolate (range L) (reflectionRoot L) (fun i => Q.derivative.eval (reflectionRoot L i)) := by apply Lagrange.eq_interpolate (reflectionRoot_injOn L) simpa using hPdegree refine ⟨reflectedRootProduct L x, reflectedRootProduct_natDegree_le L x, reflectedRootProduct_vertical_norm L x, ?_⟩ rw [hinterp, Lagrange.interpolate_apply, eval_finsetSum] simp only [eval_mul, eval_C] calc |∑ i ∈ range L, Q.derivative.eval (reflectionRoot L i) * (basis (range L) (reflectionRoot L) i).eval x| ≤ ∑ i ∈ range L, |Q.derivative.eval (reflectionRoot L i) * (basis (range L) (reflectionRoot L) i).eval x| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i ∈ range L, |(T ℝ (L : ℤ)).derivative.eval (reflectionRoot L i) * (basis (range L) (reflectionRoot L) i).eval x| := by apply Finset.sum_le_sum intro i hi rw [abs_mul, abs_mul] exact mul_le_mul_of_nonneg_right (hroots (reflectionRoot L i) (eval_chebyshev_T_reflectionRoot (Finset.mem_range.mp hi))) (abs_nonneg _) _ = ∑ i ∈ range L, |(T ℝ (L : ℤ)).leadingCoeff| * ∏ j ∈ (range L).erase i, |x - reflectionRoot L j| := by apply Finset.sum_congr rfl intro i hi rw [chebyshev_derivative_mul_lagrangeBasis (Finset.mem_range.mp hi), abs_mul, Finset.abs_prod] _ = |(T ℝ (L : ℤ)).leadingCoeff| * ∑ i ∈ range L, ∏ j ∈ (range L).erase i, |x - reflectionRoot L j| := by rw [Finset.mul_sum] _ = ‖(reflectedRootProduct L x).derivative.eval 0‖ := (reflectedRootProduct_derivative_norm L x).symm -
norm_eval_derivative_zero_le_chebyshev_endpoint_of_verticaltheorem — For a positive degree L and a complex polynomial of degree at most L, if at every purely imaginary point i y its modulus is at most the modulus of the degree-L Chebyshev polynomial at 1 + i y, then the modulus of its derivative at zero is at most the absolute value of the derivative of the Chebyshev polynomial at one.hypothesesL :ℕhL :0 < LR :hR :R.natDegree ≤ Lconclusion‖R.derivative.eval 0‖ ≤ |(T ℝ (L : ℤ)).derivative.eval 1|Proof (Lean source)
theorem norm_eval_derivative_zero_le_chebyshev_endpoint_of_vertical {L : ℕ} (hL : 0 < L) (R : Polynomial ℂ) (hR : R.natDegree ≤ L) (hvertical : ∀ y : ℝ, ‖R.eval ((y : ℂ) * I)‖ ≤ ‖(T ℂ (L : ℤ)).eval ((1 : ℂ) + (y : ℂ) * I)‖) : ‖R.derivative.eval 0‖ ≤ |(T ℝ (L : ℤ)).derivative.eval 1| := by let S : ℂ[X] := (T ℂ (L : ℤ)).comp (X + C 1) have hSnat : S.natDegree = L := by change ((T ℂ (L : ℤ)).comp (X + C 1)).natDegree = L rw [Polynomial.natDegree_comp, Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast, Polynomial.natDegree_X_add_C, mul_one] have hSdeg : 0 < S.degree := by rw [← Polynomial.natDegree_pos_iff_degree_pos, hSnat] exact hL have hdeg : R.degree ≤ S.degree := by have hSdegree : S.degree = (L : WithBot ℕ) := by rw [Polynomial.degree_eq_natDegree (ne_zero_of_degree_gt hSdeg), hSnat] rw [hSdegree] exact Polynomial.degree_le_of_natDegree_le hR have hSroots : ∀ z : ℂ, S.eval z = 0 → z.re < 0 := by intro z hz have ht : ((1 : ℂ) + z).re < 1 := by apply chebyshev_root_re_lt_one hL simpa [S, add_comm] using hz simpa using ht have hSderiv : S.derivative.eval 0 ≠ 0 := by simp [S, Polynomial.derivative_comp, Polynomial.Chebyshev.derivative_T_eval_one] exact_mod_cast (Nat.ne_of_gt hL) have hbound := norm_eval_derivative_zero_le_of_left_half_plane_roots R S hSdeg hdeg hSroots hSderiv (by simpa [S, add_comm] using hvertical) simpa [S, Polynomial.derivative_comp, Polynomial.Chebyshev.derivative_T_eval_one] using hbound
HeterogeneousTensorExtraction 1 core · 3 supporting This module extracts the coordinatewise trigonometric and even structure of heterogeneous product Jackson convolution and converts it into a multivariate polynomial with coordinatewise degree bounds. ★ convolution_exists_polynomial
Heterogeneous tensor Jackson extraction
This module extracts the coordinatewise trigonometric and even structure of heterogeneous product Jackson convolution and converts it into a multivariate polynomial with coordinatewise degree bounds.
For a coordinate-specific positive order map, a measurable cube target, and a real bound B such that the target is at most B in absolute value on the cube, there is a multivariate polynomial that reproduces the heterogeneous Jackson convolution at the coordinatewise cosines of every phase vector and whose degree in each variable is at most twice (that coordinate's order minus one).
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
convolution_coord_trigtheorem — For a coordinate-specific positive order map, a measurable cube target, a real bound B such that the target is at most B in absolute value on the cube, a selected coordinate, and a phase vector fixing the other coordinates, the heterogeneous Jackson convolution, as a function of the selected coordinate alone, is a trigonometric polynomial of degree at most twice (that coordinate's order minus one).hypothesesι :sharedType u_1d :ι → ℕhd :∀ i, 0 < d if :(ι → ℝ) → ℝhf :B :ℝhB :∀ x ∈ cube, |f x| ≤ Bi :ιx :ι → ℝconclusionIsTrigPolyLE (2 * (d i - 1)) (fun t => convolution d f (update x i t))Proof (Lean source)
theorem convolution_coord_trig (d : ι → ℕ) (hd : ∀ i, 0 < d i) (f : (ι → ℝ) → ℝ) (hf : Measurable f) (B : ℝ) (hB : ∀ x ∈ cube, |f x| ≤ B) (i : ι) (x : ι → ℝ) : IsTrigPolyLE (2 * (d i - 1)) (fun t => convolution d f (update x i t)) := by classical let J (j : ι) := jackson (d j) let n := 2 * (d i - 1) rcases jackson_isTrigPolyLE (d i) (hd i) with ⟨a, b, hab⟩ let P : (ι → ℝ) → ℝ := fun v => ∏ j ∈ Finset.univ.erase i, J j (x j - v j) let W : (ι → ℝ) → ℝ := fun v => f (cosPoint v) * P v let A : ℕ → ℝ := fun k => ∫ v in periodBox, W v * (a k * cos ((k : ℝ) * v i) - b k * sin ((k : ℝ) * v i)) let D : ℕ → ℝ := fun k => ∫ v in periodBox, W v * (a k * sin ((k : ℝ) * v i) + b k * cos ((k : ℝ) * v i)) refine ⟨A, D, fun t => ?_⟩ change convolution d f (update x i t) = _ rw [convolution_shifted d hd f hf B hB] have hcompact : IsCompact (periodBox (ι := ι)) := isCompact_univ_pi (fun _ => isCompact_Icc) have hP : Continuous P := by dsimp [P, J] fun_prop (disch := exact continuous_jackson _) obtain ⟨C, hC⟩ := hcompact.exists_bound_of_continuousOn hP.continuousOn have hCnonneg : 0 ≤ C := by apply le_trans (norm_nonneg (P (fun _ => 0))) apply hC intro j _ exact ⟨neg_nonpos.mpr Real.pi_pos.le, Real.pi_pos.le⟩ have hBnonneg : 0 ≤ B := by apply le_trans (abs_nonneg (f (cosPoint (fun _ => 0)))) apply hB intro j exact ⟨Real.neg_one_le_cos _, Real.cos_le_one _⟩ have hWm : Measurable W := by have hc : Measurable (cosPoint (ι := ι)) := by unfold cosPoint fun_prop exact (hf.comp hc).mul hP.measurable have hWbound (v : ι → ℝ) (hv : v ∈ periodBox) : ‖W v‖ ≤ B * C := by have hfbound : ‖f (cosPoint v)‖ ≤ B := by simpa [Real.norm_eq_abs] using hB (cosPoint v) (by intro j exact ⟨Real.neg_one_le_cos _, Real.cos_le_one _⟩) calc ‖W v‖ = ‖f (cosPoint v)‖ * ‖P v‖ := norm_mul _ _ _ ≤ B * ‖P v‖ := mul_le_mul_of_nonneg_right hfbound (norm_nonneg _) _ ≤ B * C := mul_le_mul_of_nonneg_left (hC v hv) hBnonneg have hint (q : (ι → ℝ) → ℝ) (hq : Continuous q) : IntegrableOn (fun v => W v * q v) periodBox := by obtain ⟨E, hE⟩ := hcompact.exists_bound_of_continuousOn hq.continuousOn have hEnonneg : 0 ≤ E := by apply le_trans (norm_nonneg (q (fun _ => 0))) apply hE intro j _ exact ⟨neg_nonpos.mpr Real.pi_pos.le, Real.pi_pos.le⟩ apply Measure.integrableOn_of_bounded (hcompact.measure_lt_top.ne) ((hWm.mul hq.measurable).aestronglyMeasurable) filter_upwards [ae_restrict_mem hcompact.measurableSet] with v hv calc ‖W v * q v‖ = ‖W v‖ * ‖q v‖ := norm_mul _ _ _ ≤ (B * C) * ‖q v‖ := mul_le_mul_of_nonneg_right (hWbound v hv) (norm_nonneg _) _ ≤ (B * C) * E := mul_le_mul_of_nonneg_left (hE v hv) (mul_nonneg hBnonneg hCnonneg) have hq1 (k : ℕ) : Continuous (fun v : ι → ℝ => a k * cos ((k : ℝ) * v i) - b k * sin ((k : ℝ) * v i)) := by fun_prop have hq2 (k : ℕ) : Continuous (fun v : ι → ℝ => a k * sin ((k : ℝ) * v i) + b k * cos ((k : ℝ) * v i)) := by fun_prop calc (∫ v in periodBox, f (cosPoint v) * kernel d (update x i t - v)) = ∫ v in periodBox, W v * J i (t - v i) := by apply integral_congr_ae filter_upwards with v dsimp [W, P, kernel] rw [← Finset.mul_prod_erase _ _ (Finset.mem_univ i)] have herase : (∏ j ∈ Finset.univ.erase i, J j (update x i t j - v j)) = ∏ j ∈ Finset.univ.erase i, J j (x j - v j) := by apply Finset.prod_congr rfl intro j hj have hji : j ≠ i := Finset.ne_of_mem_erase hj simp [update, hji] rw [herase] simp [update] ring _ = ∫ v in periodBox, ∑ k ∈ range (n + 1), (W v * (a k * cos ((k : ℝ) * v i) - b k * sin ((k : ℝ) * v i)) * cos ((k : ℝ) * t) + W v * (a k * sin ((k : ℝ) * v i) + b k * cos ((k : ℝ) * v i)) * sin ((k : ℝ) * t)) := by apply integral_congr_ae filter_upwards with v change W v * jackson (d i) (t - v i) = _ rw [hab (t - v i), Finset.mul_sum] apply Finset.sum_congr rfl intro k hk rw [show (k : ℝ) * (t - v i) = (k : ℝ) * t - (k : ℝ) * v i by ring, Real.cos_sub, Real.sin_sub] ring _ = ∑ k ∈ range (n + 1), (A k * cos ((k : ℝ) * t) + D k * sin ((k : ℝ) * t)) := by have hterm (k : ℕ) : IntegrableOn (fun v : ι → ℝ => W v * (a k * cos ((k : ℝ) * v i) - b k * sin ((k : ℝ) * v i)) * cos ((k : ℝ) * t) + W v * (a k * sin ((k : ℝ) * v i) + b k * cos ((k : ℝ) * v i)) * sin ((k : ℝ) * t)) periodBox := by exact (hint _ (hq1 k)).mul_const _ |>.add ((hint _ (hq2 k)).mul_const _) rw [integral_finsetSum (range (n + 1)) (fun k hk => hterm k)] apply Finset.sum_congr rfl intro k hk dsimp [A, D] rw [integral_add] · rw [integral_mul_const, integral_mul_const] · exact (hint _ (hq1 k)).mul_const _ · exact (hint _ (hq2 k)).mul_const _ -
convolution_coord_eventheorem — For a coordinate-specific order map, a cube target, a selected coordinate, and a phase vector fixing the other coordinates, the heterogeneous Jackson convolution is an even function of the selected coordinate.hypothesesι :sharedType u_1d :ι → ℕf :(ι → ℝ) → ℝi :ιx :ι → ℝProof (Lean source)
theorem convolution_coord_even (d : ι → ℕ) (f : (ι → ℝ) → ℝ) (i : ι) (x : ι → ℝ) : Even (fun t => convolution d f (update x i t)) := by classical let e : (ι → ℝ) ≃ᵐ (ι → ℝ) := MeasurableEquiv.piCongrRight fun j => if j = i then MeasurableEquiv.neg ℝ else MeasurableEquiv.refl ℝ have he_apply (u : ι → ℝ) : e u = update u i (-u i) := by funext j by_cases hji : j = i · subst j simp [e, MeasurableEquiv.piCongrRight, update] · simp [e, MeasurableEquiv.piCongrRight, update, hji] have hem : MeasurePreserving e volume volume := by rw [volume_pi] apply measurePreserving_pi intro j by_cases hji : j = i · subst j simpa [e] using Measure.measurePreserving_neg (volume : Measure ℝ) · simpa [e, hji] using MeasurePreserving.id (volume : Measure ℝ) have he_box : e ⁻¹' periodBox = periodBox (ι := ι) := by ext u simp only [Set.mem_preimage, periodBox, Set.mem_pi, Set.mem_univ, forall_true_left, he_apply, Set.mem_Icc] constructor <;> intro h j · by_cases hji : j = i · subst j have hi := h i simp [update] at hi constructor <;> linarith · simpa [update, hji] using h j · by_cases hji : j = i · subst j have hi := h i simp [update] constructor <;> linarith · simpa [update, hji] using h j intro t unfold convolution calc (∫ u in periodBox, f (cosPoint (update x i (-t) - u)) * kernel d u) = ∫ u in periodBox, f (cosPoint (update x i t - update u i (-u i))) * kernel d (update u i (-u i)) := by apply integral_congr_ae filter_upwards with u congr 1 · congr 1 funext j by_cases hji : j = i · subst j simp only [cosPoint, Pi.sub_apply, Function.update_self] rw [show -t - u i = -(t - -u i) by ring, Real.cos_neg] · simp [cosPoint, hji] · unfold kernel apply Finset.prod_congr rfl intro j hj by_cases hji : j = i · subst j simp only [Function.update_self] exact (jackson_even (d i) (u i)).symm · simp [update, hji] _ = ∫ u in periodBox, f (cosPoint (update x i t - u)) * kernel d u := by simpa only [he_apply, he_box] using (hem.setIntegral_preimage_emb e.measurableEmbedding (fun u => f (cosPoint (update x i t - u)) * kernel d u) periodBox) -
polynomial_of_coord_even_trigtheorem — A coordinate-specific degree map, a phase function, its coordinatewise trigonometric degree bounds, and its coordinatewise evenness imply that the phase function has a multivariate polynomial representation in coordinate cosines with the same bounds.hypothesesι :sharedType u_1d :ι → ℕq :(ι → ℝ) → ℝhtrig :∀ i x,IsTrigPolyLE (2 * (d i - 1)) (fun t => q (update x i t))Proof (Lean source)
theorem polynomial_of_coord_even_trig (d : ι → ℕ) (q : (ι → ℝ) → ℝ) (htrig : ∀ i x, IsTrigPolyLE (2 * (d i - 1)) (fun t => q (update x i t))) (heven : ∀ i x, Even (fun t => q (update x i t))) : ∃ p : MvPolynomial ι ℝ, (∀ x : ι → ℝ, eval (cosPoint x) p = q x) ∧ (∀ γ ∈ p.support, ∀ i, γ i ≤ 2 * (d i - 1)) := by classical let D : ι → ℕ := fun i => 2 * (d i - 1) have hfin : ∀ (N : ℕ) (D : Fin N → ℕ) (q : (Fin N → ℝ) → ℝ), (∀ i x, IsTrigPolyLE (D i) (fun t => q (update x i t))) → (∀ i x, Even (fun t => q (update x i t))) → ∃ p : MvPolynomial (Fin N) ℝ, (∀ x, eval (fun i => cos (x i)) p = q x) ∧ (∀ m ∈ p.support, ∀ i, m i ≤ D i) := by intro N induction N with | zero => intro D q ht he refine ⟨MvPolynomial.C (q 0), ?_, ?_⟩ · intro x rw [MvPolynomial.eval_C] exact congrArg q (Subsingleton.elim 0 x) · intro m hm i exact elim0 i | succ N ih => intro D q ht he have hpoly_degree (k : ℕ) (a b : Fin (N + 1)) (r : Polynomial ℝ) (hr : r.natDegree ≤ k) : (r.toMvPolynomial a).degreeOf b ≤ if b = a then k else 0 := by rw [r.as_sum_range_C_mul_X_pow' (lt_of_le_of_lt hr (lt_succ_self k))] simp only [map_sum, map_mul, map_pow, Polynomial.toMvPolynomial_C, Polynomial.toMvPolynomial_X] refine (MvPolynomial.degreeOf_sum_le b (range (k + 1)) (fun l => C (r.coeff l) * X a ^ l)).trans ?_ apply Finset.sup_le intro l hl refine (MvPolynomial.degreeOf_mul_le b _ _).trans ?_ rw [MvPolynomial.degreeOf_C] by_cases hba : b = a · subst b simp only [if_true, zero_add, MvPolynomial.degreeOf_X_self_pow] exact le_of_lt_succ (Finset.mem_range.mp hl) · rw [MvPolynomial.degreeOf_X_pow_of_ne l hba] simp let n := D 0 let node : Fin (n + 1) → ℝ := fun j => (j : ℝ) / (n + 1 : ℝ) let angle : Fin (n + 1) → ℝ := fun j => arccos (node j) have hnode_nonneg (j : Fin (n + 1)) : 0 ≤ node j := by dsimp [node] positivity have hnode_le_one (j : Fin (n + 1)) : node j ≤ 1 := by dsimp [node] rw [div_le_one (by positivity : (0 : ℝ) < n + 1)] exact_mod_cast (le_trans (le_of_lt_succ j.isLt) (le_add_right n 1)) have hcos_angle (j : Fin (n + 1)) : cos (angle j) = node j := by exact Real.cos_arccos (le_trans (by norm_num) (hnode_nonneg j)) (hnode_le_one j) have hnode_inj : Injective node := by intro j k hjk dsimp [node] at hjk have hden : (n + 1 : ℝ) ≠ 0 := by positivity have : (j : ℝ) = (k : ℝ) := (div_left_inj' hden).mp hjk exact Fin.ext (by exact_mod_cast this) let qtail : Fin (n + 1) → (Fin N → ℝ) → ℝ := fun j y => q (cons (angle j) y) have htail_trig (j : Fin (n + 1)) (i : Fin N) (y : Fin N → ℝ) : IsTrigPolyLE (D i.succ) (fun t => qtail j (update y i t)) := by have h := ht i.succ (cons (angle j) y) simpa only [qtail, Fin.cons_update] using h have htail_even (j : Fin (n + 1)) (i : Fin N) (y : Fin N → ℝ) : Even (fun t => qtail j (update y i t)) := by have h := he i.succ (cons (angle j) y) simpa only [qtail, Fin.cons_update] using h have hchoice (j : Fin (n + 1)) := ih (D ∘ succ) (qtail j) (htail_trig j) (htail_even j) let ptail : Fin (n + 1) → MvPolynomial (Fin N) ℝ := fun j => choose (hchoice j) have hptail (j : Fin (n + 1)) : (∀ y, eval (fun i => cos (y i)) (ptail j) = qtail j y) ∧ (∀ m ∈ (ptail j).support, ∀ i, m i ≤ D i.succ) := by exact Classical.choose_spec (hchoice j) let basis : Fin (n + 1) → Polynomial ℝ := fun j => Lagrange.basis Finset.univ node j let p : MvPolynomial (Fin (N + 1)) ℝ := ∑ j, MvPolynomial.rename succ (ptail j) * (basis j).toMvPolynomial 0 have hbdeg (j : Fin (n + 1)) : (basis j).natDegree ≤ n := by dsimp [basis] rw [Lagrange.natDegree_basis hnode_inj.injOn (Finset.mem_univ j), Finset.card_univ, Fintype.card_fin] omega have hrename_degree (j : Fin (n + 1)) (i : Fin (N + 1)) : (MvPolynomial.rename succ (ptail j)).degreeOf i ≤ if i = 0 then 0 else D i := by refine Fin.cases ?_ (fun k => ?_) i · simp only [if_true] apply MvPolynomial.degreeOf_le_iff.mpr intro m hm rw [MvPolynomial.support_rename_of_injective (Fin.succ_injective N)] at hm rcases Finset.mem_image.mp hm with ⟨m', hm', rfl⟩ have hnot : (0 : Fin (N + 1)) ∉ range succ := by rintro ⟨k, hk⟩ exact Fin.ne_of_gt (Fin.succ_pos k) hk rw [Finsupp.mapDomain_of_notMem_range m' 0 hnot] · simp only [Fin.succ_ne_zero, if_false] rw [MvPolynomial.degreeOf_rename_of_injective (Fin.succ_injective N)] exact MvPolynomial.degreeOf_le_iff.mpr (fun m hm => (hptail j).2 m hm k) refine ⟨p, ?_, ?_⟩ · intro x let sec : ℝ → ℝ := fun t => q (cons t (x ∘ succ)) have hu (t : ℝ) : update x 0 t = cons t (x ∘ succ) := by funext k refine Fin.cases ?_ (fun l => ?_) k <;> simp have hs_trig : IsTrigPolyLE n sec := by have h := ht 0 x convert h using 1 funext t dsimp [sec] exact congrArg q (hu t).symm have hs_even : Even sec := by have h := he 0 x intro t dsimp [sec] calc q (cons (-t) (x ∘ succ)) = q (update x 0 (-t)) := congrArg q (hu (-t)).symm _ = q (update x 0 t) := h t _ = q (cons t (x ∘ succ)) := congrArg q (hu t) rcases even_trigPoly_exists_polynomial hs_trig hs_even with ⟨r, hrdeg, hr⟩ have hr_degree : r.degree < (Finset.univ : Finset (Fin (n + 1))).card := by rw [Finset.card_univ, Fintype.card_fin, Nat.cast_add, Nat.cast_one] calc r.degree ≤ (r.natDegree : WithBot ℕ) := Polynomial.degree_le_natDegree _ < ((n + 1 : ℕ) : WithBot ℕ) := by exact_mod_cast (Nat.lt_succ_of_le hrdeg) have hinterp := Lagrange.eq_interpolate (s := (Finset.univ : Finset (Fin (n + 1)))) (v := node) hnode_inj.injOn hr_degree change eval (fun i => cos (x i)) p = q x rw [show q x = sec (x 0) by congr 1 funext k refine Fin.cases ?_ (fun l => ?_) k <;> simp] rw [← hr (x 0), hinterp] simp only [p, MvPolynomial.eval_sum, MvPolynomial.eval_mul, MvPolynomial.eval_rename, MvPolynomial.eval_toMvPolynomial, Lagrange.interpolate_apply, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C] apply Finset.sum_congr rfl intro j hj have hcos_tail : (fun i => cos (x i)) ∘ succ = (fun i => cos ((x ∘ succ) i)) := by rfl rw [hcos_tail, (hptail j).1] rw [show qtail j (x ∘ succ) = sec (angle j) by rfl, ← hr (angle j), hcos_angle] · intro m hm i refine (MvPolynomial.monomial_le_degreeOf i hm).trans ?_ dsimp [p] refine (MvPolynomial.degreeOf_sum_le i Finset.univ (fun j => MvPolynomial.rename succ (ptail j) * (basis j).toMvPolynomial 0)).trans ?_ apply Finset.sup_le intro j hj refine (MvPolynomial.degreeOf_mul_le i _ _).trans ?_ have hbd := hpoly_degree n (0 : Fin (N + 1)) i (basis j) (hbdeg j) have hrd := hrename_degree j i refine (add_le_add hrd hbd).trans ?_ refine Fin.cases ?_ (fun k => ?_) i <;> simp [n] let e : ι ≃ Fin (card ι) := Fintype.equivFin ι let q' : (Fin (card ι) → ℝ) → ℝ := fun x => q (x ∘ e) let D' : Fin (card ι) → ℕ := D ∘ e.symm have ht' (i : Fin (card ι)) (x : Fin (card ι) → ℝ) : IsTrigPolyLE (D' i) (fun t => q' (update x i t)) := by convert htrig (e.symm i) (x ∘ e) using 1 · simp [D', D] · funext t change q ((update x i t) ∘ e) = q (update (x ∘ e) (e.symm i) t) apply congrArg q funext j by_cases hji : e j = i · have hj : j = e.symm i := by simp [← hji] subst j simp [update] · have hj : j ≠ e.symm i := by intro h apply hji simpa [h] using e.apply_symm_apply i simp [update, hji, hj] have he' (i : Fin (card ι)) (x : Fin (card ι) → ℝ) : Even (fun t => q' (update x i t)) := by convert heven (e.symm i) (x ∘ e) using 1 funext t change q ((update x i t) ∘ e) = q (update (x ∘ e) (e.symm i) t) apply congrArg q funext j by_cases hji : e j = i · have hj : j = e.symm i := by simp [← hji] subst j simp [update] · have hj : j ≠ e.symm i := by intro h apply hji simpa [h] using e.apply_symm_apply i simp [update, hji, hj] rcases hfin (card ι) D' q' ht' he' with ⟨p', hp', hb'⟩ refine ⟨MvPolynomial.rename e.symm p', ?_, ?_⟩ · intro x rw [MvPolynomial.eval_rename] have hx : (cosPoint x) ∘ e.symm = fun i => cos ((x ∘ e.symm) i) := rfl rw [hx, hp'] exact congrArg q (funext fun i => by simp [e.symm_apply_apply]) · intro m hm i rw [MvPolynomial.support_rename_of_injective e.symm.injective] at hm rcases Finset.mem_image.mp hm with ⟨m', hm', rfl⟩ have h := hb' m' hm' (e i) simpa [D', D, Finsupp.mapDomain_apply e.symm.injective] using h
Kernel_Part2 1 core · 13 supporting Building on Kernel_Part1, this module computes the raw kernel's exact mass, proves that the normalized kernel has unit integral at positive order, derives explicit first- and second-moment bounds, and bounds its trigonom ★ jackson_second_moment
Normalization and moment bounds for the order-four Jackson kernel
Building on Kernel_Part1, this module computes the raw kernel's exact mass, proves that the
normalized kernel has unit integral at positive order, derives explicit first- and second-moment
bounds, and bounds its trigonometric degree.
For integer order K that is strictly positive, the normalized second moment is at most sixty-four divided by K squared.
Formal statement
Proof (Lean source)
13 supporting declarations (lemmas, instances)
-
jrawMass_eqtheorem — For integer order K that is strictly positive, the raw Jackson mass equals two π thirds times K times two K squared plus one.Proof (Lean source)
theorem jrawMass_eq (K : ℕ) (hK : 0 < K) : jrawMass K = (2 * pi / 3) * (K : ℝ) * (2 * (K : ℝ) ^ 2 + 1) := by have hcast : ((K - 1 : ℕ) : ℝ) = (K : ℝ) - 1 := by rw [Nat.cast_sub (Nat.one_le_iff_ne_zero.mpr (Nat.ne_of_gt hK))] norm_num have hfun : jraw K = fun t => ((K : ℝ) + ∑ j ∈ range (K - 1), (2 * (((K - 1 : ℕ) : ℝ) - (j : ℝ))) * cos (((j + 1 : ℕ) : ℝ) * t)) ^ 2 := by funext t rw [jraw_eq_chebyshev K hK t] rw [show (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 4 = ((U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 2) ^ 2 by ring] congr 1 rw [cheb_U_sq_eval (K - 1) t] have hsucc : K - 1 + 1 = K := by omega rw [hcast] rw [Finset.mul_sum] have hlead : (K : ℝ) - 1 + 1 = (K : ℝ) := by ring rw [hlead] apply congrArg ((K : ℝ) + ·) apply Finset.sum_congr rfl intro j hj ring rw [jrawMass, hfun, integral_sq_cos_sum] have hsum := sum_range_sub_sq (K - 1) have hcoeff : (∑ j ∈ range (K - 1), (2 * (((K - 1 : ℕ) : ℝ) - (j : ℝ))) ^ 2) = 4 * (((K - 1 : ℕ) : ℝ) * ((K - 1 : ℕ) + 1) * (2 * (K - 1 : ℕ) + 1) / 6) := by calc (∑ j ∈ range (K - 1), (2 * (((K - 1 : ℕ) : ℝ) - (j : ℝ))) ^ 2) = 4 * ∑ j ∈ range (K - 1), (((K - 1 : ℕ) : ℝ) - (j : ℝ)) ^ 2 := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj ring _ = _ := by rw [hsum] rw [hcoeff, hcast] push_cast ring -
jrawMass_lowertheorem — For integer order K that is strictly positive, the raw Jackson mass is at least four π thirds times K cubed.Proof (Lean source)
theorem jrawMass_lower (K : ℕ) (hK : 0 < K) : (4 * pi / 3) * (K : ℝ) ^ 3 ≤ jrawMass K := by rw [jrawMass_eq K hK] have hpi : 0 < pi := Real.pi_pos have hKR : (1 : ℝ) ≤ K := by exact_mod_cast hK nlinarith [sq_nonneg ((K : ℝ) - 1)] -
jrawMass_uppertheorem — For integer order K that is strictly positive, the raw Jackson mass is at most two π times K cubed.Proof (Lean source)
theorem jrawMass_upper (K : ℕ) (hK : 0 < K) : jrawMass K ≤ 2 * pi * (K : ℝ) ^ 3 := by rw [jrawMass_eq K hK] have hpi : 0 < pi := Real.pi_pos have hKR : (1 : ℝ) ≤ K := by exact_mod_cast hK have hsquare : 2 * (K : ℝ) ^ 2 + 1 ≤ 3 * (K : ℝ) ^ 2 := by nlinarith calc (2 * pi / 3) * (K : ℝ) * (2 * (K : ℝ) ^ 2 + 1) ≤ (2 * pi / 3) * (K : ℝ) * (3 * (K : ℝ) ^ 2) := by exact mul_le_mul_of_nonneg_left hsquare (by positivity) _ = 2 * pi * (K : ℝ) ^ 3 := by ring -
jrawMass_postheorem — For integer order K that is strictly positive, the raw Jackson mass is strictly positive.Proof (Lean source)
theorem jrawMass_pos (K : ℕ) (hK : 0 < K) : 0 < jrawMass K := by have hl := jrawMass_lower K hK have hpi : 0 < pi := Real.pi_pos have hKR : (0 : ℝ) < K := by exact_mod_cast hK exact lt_of_lt_of_le (by positivity) hl -
continuous_jacksontheorem — For integer order K, the normalized Jackson kernel is continuous on the real line.Proof (Lean source)
@[fun_prop] theorem continuous_jackson (K : ℕ) : Continuous (jackson K) := by unfold jackson fun_prop -
measurable_jacksontheorem — For integer order K, the normalized Jackson kernel is Borel measurable.Proof (Lean source)
@[measurability, fun_prop] theorem measurable_jackson (K : ℕ) : Measurable (jackson K) := by exact (continuous_jackson K).measurable -
integrableOn_jacksontheorem — For integer order K, the normalized Jackson kernel is integrable over the standard period.Proof (Lean source)
theorem integrableOn_jackson (K : ℕ) : IntegrableOn (jackson K) (Icc (-pi) pi) := by exact (continuous_jackson K).continuousOn.integrableOn_compact isCompact_Icc -
jackson_nonnegtheorem — At integer order K that is strictly positive and real argument t, the normalized Jackson kernel is nonnegative.Proof (Lean source)
theorem jackson_nonneg (K : ℕ) (hK : 0 < K) (t : ℝ) : 0 ≤ jackson K t := by exact div_nonneg (jraw_nonneg K t) (jrawMass_pos K hK).le -
jackson_integral_eq_onetheorem — For integer order K that is strictly positive, the normalized Jackson kernel has unit mass over the standard period. -
jackson_first_momenttheorem — For integer order K that is strictly positive, the normalized absolute first moment is at most thirty-two divided by K.Proof (Lean source)
theorem jackson_first_moment (K : ℕ) (hK : 0 < K) : (∫ t in Icc (-pi) pi, |t| * jackson K t) ≤ 32 / (K : ℝ) := by have hKR : (0 : ℝ) < K := by exact_mod_cast hK have hpoint (t : ℝ) : |t| ≤ (K : ℝ) / 4 * t ^ 2 + 1 / (K : ℝ) := by have hs := sq_nonneg ((K : ℝ) * |t| - 2) have ht2 : |t| ^ 2 = t ^ 2 := sq_abs t field_simp nlinarith have hiLeft : IntegrableOn (fun t => |t| * jackson K t) (Icc (-pi) pi) := (show Continuous (fun t => |t| * jackson K t) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc have hiRight : IntegrableOn (fun t => ((K : ℝ) / 4 * t ^ 2 + 1 / (K : ℝ)) * jackson K t) (Icc (-pi) pi) := (show Continuous (fun t => ((K : ℝ) / 4 * t ^ 2 + 1 / (K : ℝ)) * jackson K t) by fun_prop).continuousOn |>.integrableOn_compact isCompact_Icc calc (∫ t in Icc (-pi) pi, |t| * jackson K t) ≤ ∫ t in Icc (-pi) pi, ((K : ℝ) / 4 * t ^ 2 + 1 / (K : ℝ)) * jackson K t := by exact MeasureTheory.setIntegral_mono_on hiLeft hiRight measurableSet_Icc (fun t ht => mul_le_mul_of_nonneg_right (hpoint t) (jackson_nonneg K hK t)) _ = (K : ℝ) / 4 * (∫ t in Icc (-pi) pi, t ^ 2 * jackson K t) + (1 / (K : ℝ)) * (∫ t in Icc (-pi) pi, jackson K t) := by have hi₁ : IntegrableOn (fun t => (K : ℝ) / 4 * (t ^ 2 * jackson K t)) (Icc (-pi) pi) := (show Continuous (fun t => (K : ℝ) / 4 * (t ^ 2 * jackson K t)) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc have hi₂ : IntegrableOn (fun t => (1 / (K : ℝ)) * jackson K t) (Icc (-pi) pi) := (show Continuous (fun t => (1 / (K : ℝ)) * jackson K t) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc rw [show (fun t => ((K : ℝ) / 4 * t ^ 2 + 1 / (K : ℝ)) * jackson K t) = fun t => (K : ℝ) / 4 * (t ^ 2 * jackson K t) + (1 / (K : ℝ)) * jackson K t by funext t; ring] rw [MeasureTheory.integral_add hi₁ hi₂, MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul] _ ≤ (K : ℝ) / 4 * (24 / (K : ℝ) ^ 2) + (1 / (K : ℝ)) * 1 := by gcongr · exact jackson_second_moment_aux K hK · exact (jackson_integral_eq_one K hK).le _ ≤ 32 / (K : ℝ) := by field_simp nlinarith -
jraw_isTrigPolyLEtheorem — For integer order K that is strictly positive, the raw Jackson kernel is a real trigonometric polynomial with frequency at most twice the predecessor of K.Proof (Lean source)
theorem jraw_isTrigPolyLE (K : ℕ) (hK : 0 < K) : IsTrigPolyLE (2 * (K - 1)) (jraw K) := by let U : Polynomial ℝ := U ℝ ((K - 1 : ℕ) : ℤ) let p : Polynomial ℝ := U ^ 4 have hpneg : ∀ x : ℝ, p.eval (-x) = p.eval x := by intro x simp only [p, Polynomial.eval_pow, U] rw [Polynomial.Chebyshev.U_eval_neg] rw [mul_pow] have hsign : (((((K - 1 : ℕ) : ℤ)).negOnePow : ℤ) : ℝ) ^ 4 = 1 := by have habs : |(((((K - 1 : ℕ) : ℤ)).negOnePow : ℤ) : ℝ)| = 1 := by norm_cast exact Int.abs_negOnePow _ calc (((((K - 1 : ℕ) : ℤ)).negOnePow : ℤ) : ℝ) ^ 4 = |(((((K - 1 : ℕ) : ℤ)).negOnePow : ℤ) : ℝ) ^ 4| := by rw [abs_of_nonneg (by positivity)] _ = |(((((K - 1 : ℕ) : ℤ)).negOnePow : ℤ) : ℝ)| ^ 4 := by exact abs_pow _ _ _ = 1 := by rw [habs]; norm_num rw [hsign, one_mul] obtain ⟨q, hqdeg, hpq⟩ := exists_comp_sq_of_eval_neg_eq p hpneg let A : Polynomial ℝ := C (1 / 2 : ℝ) * (X + 1) let R : Polynomial ℝ := q.comp A have hAdeg : A.natDegree ≤ 1 := by dsimp [A] compute_degree have hpdeg : p.natDegree = 4 * (K - 1) := by dsimp [p, U] rw [Polynomial.natDegree_pow, Polynomial.Chebyshev.natDegree_U_natCast] have hRdeg : R.natDegree ≤ 2 * (K - 1) := by calc R.natDegree ≤ q.natDegree * A.natDegree := Polynomial.natDegree_comp_le _ ≤ q.natDegree * 1 := Nat.mul_le_mul_left _ hAdeg _ = q.natDegree := Nat.mul_one _ _ ≤ p.natDegree / 2 := hqdeg _ = 2 * (K - 1) := by rw [hpdeg]; omega apply (cosComp_isTrigPolyLE R (2 * (K - 1)) hRdeg).congr intro t rw [jraw_eq_chebyshev K hK t] have hhalf : cos (t / 2) ^ 2 = (cos t + 1) / 2 := by have hcos := Real.cos_two_mul (t / 2) rw [show 2 * (t / 2) = t by ring] at hcos nlinarith calc (U ℝ ((K - 1 : ℕ) : ℤ)).eval (cos (t / 2)) ^ 4 = p.eval (cos (t / 2)) := by simp [p, U] _ = q.eval (cos (t / 2) ^ 2) := by rw [hpq, Polynomial.eval_comp, Polynomial.eval_pow, Polynomial.eval_X] _ = q.eval ((cos t + 1) / 2) := by rw [hhalf] _ = R.eval (cos t) := by simp [R, A, Polynomial.eval_comp] congr 1 ring -
jackson_isTrigPolyLEtheorem — For integer order K that is strictly positive, the normalized Jackson kernel is a real trigonometric polynomial with frequency at most twice the predecessor of K.Proof (Lean source)
theorem jackson_isTrigPolyLE (K : ℕ) (hK : 0 < K) : IsTrigPolyLE (2 * (K - 1)) (jackson K) := by apply (const_mul (jrawMass K)⁻¹ (jraw_isTrigPolyLE K hK)).congr intro t simp [jackson, div_eq_mul_inv, mul_comm]
LobattoLagrange 1 core · 4 supporting For the Chebyshev–Lobatto nodes cos(iπ/N), i = 0, …, N, the sum of the absolute values of the Lagrange cardinal polynomials at a point x < −1 outside the grid equals |T_N(x)|, the absolute value of the degree-N Chebyshev ★ calibrated_chebyshev_exterior_le_cosh_two
Exterior Lagrange mass on Chebyshev–Lobatto grids
For the Chebyshev–Lobatto nodes cos(iπ/N), i = 0, …, N, the sum of the absolute values of the Lagrange cardinal polynomials at a point x < −1 outside the grid equals |T_N(x)|, the absolute value of the degree-N Chebyshev polynomial. By affine invariance of the cardinal polynomials, the grid moved to [a, 1] with 0 < a < 1 has cardinal mass |T_N(−(1 + a)/(1 − a))| at zero, and for a = K⁻² and N = K − 1 with K ≥ 2 this value is at most cosh 2. These identities bound how far polynomial extrapolation from [a, 1] to 0 can amplify sampled values.
Main results
* standard_exterior_basis_sign — for x < −1 the i-th cardinal value has sign (−1)^(N + i).
* standard_exterior_lagrange_abs_sum — Σ_i |ℓ_i(x)| = |T_N(x)| for x < −1.
* lagrange_basis_eval_affine_local — cardinal polynomials are unchanged when nodes and the
evaluation point undergo the same affine map with nonzero slope.
* shifted_chebyshev_lagrange_abs_sum — the cardinal mass at zero of the grid moved to [a, 1].
* calibrated_chebyshev_exterior_le_cosh_two — |T_(K−1)(−(1 + K⁻²)/(1 − K⁻²))| ≤ cosh 2.
For an integer scale K at least two, the Chebyshev polynomial of the first kind of degree K − 1, evaluated at the exterior point −(1 + K⁻²) / (1 − K⁻²), which lies to the left of −1, has absolute value at most cosh 2.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
standard_exterior_basis_signlemma — For a standard Lobatto grid of degree, an evaluation point left of -1, and a grid index, the absolute cardinal-basis value is the value with its common alternating sign exposed. The result is the alternating-sign identity for an exterior Lobatto cardinal value.hypothesesProof (Lean source)
lemma standard_exterior_basis_sign (N : ℕ) (x : ℝ) (hx : x < -1) (i : Fin (N + 1)) : |(basis Finset.univ (fun j : Fin (N + 1) => Polynomial.Chebyshev.node N j) i).eval x| = (-1 : ℝ) ^ N * ((-1 : ℝ) ^ (i : ℕ) * (basis Finset.univ (fun j : Fin (N + 1) => Polynomial.Chebyshev.node N j) i).eval x) := by let s := (Finset.univ : Finset (Fin (N + 1))).erase i let v : Fin (N + 1) → ℝ := fun j => Polynomial.Chebyshev.node N j let D : ℝ := ∏ j ∈ s, (v i - v j) let A : ℝ := ∏ j ∈ s, (x - v j) have hi : (i : ℕ) ≤ N := Nat.lt_succ_iff.mp i.isLt have hD : 0 < (-1 : ℝ) ^ (i : ℕ) * D := by have hleft : 0 < ∏ j ∈ Finset.Iio i, ((-1 : ℝ) * (v i - v j)) := by apply Finset.prod_pos intro j hj have hji : j < i := Finset.mem_Iio.mp hj exact mul_pos_of_neg_of_neg (by norm_num) (sub_neg.mpr (Polynomial.Chebyshev.node_lt hi hji)) rw [Finset.prod_mul_distrib, Finset.prod_const, Fin.card_Iio] at hleft have hright : 0 < ∏ j ∈ Finset.Ioi i, (v i - v j) := by apply Finset.prod_pos intro j hj have hij : i < j := Finset.mem_Ioi.mp hj exact sub_pos.mpr (Polynomial.Chebyshev.node_lt (Nat.lt_succ_iff.mp j.isLt) hij) have hunion : s = Finset.Iio i ∪ Finset.Ioi i := by ext j simp only [s, Finset.mem_erase, Finset.mem_univ, and_true, mem_union, Finset.mem_Iio, Finset.mem_Ioi] constructor · exact lt_or_gt_of_ne · exact fun h => h.elim (fun hji => ne_of_lt hji) (fun hij => ne_of_gt hij) have hdisjoint : Disjoint (Finset.Iio i) (Finset.Ioi i) := by exact Finset.disjoint_left.mpr (fun j hji hij => (Finset.mem_Iio.mp hji).asymm (Finset.mem_Ioi.mp hij)) dsimp [D] rw [hunion, Finset.prod_union hdisjoint, ← mul_assoc] exact mul_pos hleft hright have hA : 0 < (-1 : ℝ) ^ N * A := by have hpos : 0 < ∏ j ∈ s, -(x - v j) := by apply Finset.prod_pos intro j hj have hvj : -1 ≤ v j := (Polynomial.Chebyshev.node_mem_Icc).1 linarith have hcard : s.card = N := by simp [s] rw [Finset.prod_neg, hcard] at hpos exact hpos have heval : (basis Finset.univ v i).eval x = D⁻¹ * A := by rw [basis, Polynomial.eval_prod] simp only [Lagrange.basisDivisor, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_mul_distrib, ← Finset.prod_inv_distrib] have hsign : 0 < ((-1 : ℝ) ^ N * (-1 : ℝ) ^ (i : ℕ)) * (basis Finset.univ v i).eval x := by rw [heval] have hDi : 0 < ((-1 : ℝ) ^ (i : ℕ) * D)⁻¹ := inv_pos.mpr hD have hrewrite : ((-1 : ℝ) ^ (i : ℕ) * D)⁻¹ = (-1 : ℝ) ^ (i : ℕ) * D⁻¹ := by rw [mul_inv_rev] have hpow : ((-1 : ℝ) ^ (i : ℕ))⁻¹ = (-1 : ℝ) ^ (i : ℕ) := by rw [← inv_pow] norm_num rw [hpow] ring rw [hrewrite] at hDi nlinarith have habs := abs_of_pos hsign rw [abs_mul, abs_mul, abs_neg_one_pow, abs_neg_one_pow, one_mul, one_mul] at habs rw [habs, mul_assoc] -
standard_exterior_lagrange_abs_sumlemma — For a standard Lobatto grid of degree and an evaluation point left of -1, the sum of absolute cardinal-basis values equals the absolute value of the corresponding Chebyshev polynomial. The result is the exterior Lobatto cardinal-mass identity.hypothesesN :ℕx :ℝhx :x < -1Proof (Lean source)
lemma standard_exterior_lagrange_abs_sum (N : ℕ) (x : ℝ) (hx : x < -1) : (∑ i : Fin (N + 1), |(basis Finset.univ (fun j : Fin (N + 1) => Polynomial.Chebyshev.node N j) i).eval x|) = |(T ℝ (N : ℤ)).eval x| := by let v : Fin (N + 1) → ℝ := fun j => Polynomial.Chebyshev.node N j have hv : Injective v := by intro i j hij by_contra hne rcases lt_or_gt_of_ne hne with hij' | hji' · exact ne_of_gt (Polynomial.Chebyshev.node_lt (Nat.lt_succ_iff.mp j.isLt) hij') hij · exact ne_of_lt (Polynomial.Chebyshev.node_lt (Nat.lt_succ_iff.mp i.isLt) hji') hij have hdegree : (T ℝ (N : ℤ)).degree < ((Finset.univ : Finset (Fin (N + 1))).card : WithBot ℕ) := by rw [Polynomial.Chebyshev.degree_T, Int.natAbs_natCast] simp exact_mod_cast lt_succ_self N have hinterp := Lagrange.eq_interpolate (f := T ℝ (N : ℤ)) hv.injOn hdegree have heval := congrArg (fun p : ℝ[X] => p.eval x) hinterp have hsigned : (∑ i : Fin (N + 1), (-1 : ℝ) ^ (i : ℕ) * (basis Finset.univ v i).eval x) = (T ℝ (N : ℤ)).eval x := by rw [heval] simp only [Lagrange.interpolate_apply, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C] apply Finset.sum_congr rfl intro i _ rw [Polynomial.Chebyshev.eval_T_real_node (Finset.mem_Iic.mpr (Nat.lt_succ_iff.mp i.isLt))] calc (∑ i : Fin (N + 1), |(basis Finset.univ v i).eval x|) = ∑ i : Fin (N + 1), (-1 : ℝ) ^ N * ((-1 : ℝ) ^ (i : ℕ) * (basis Finset.univ v i).eval x) := by apply Finset.sum_congr rfl intro i _ exact standard_exterior_basis_sign N x hx i _ = (-1 : ℝ) ^ N * (∑ i : Fin (N + 1), (-1 : ℝ) ^ (i : ℕ) * (basis Finset.univ v i).eval x) := by rw [Finset.mul_sum] _ = (-1 : ℝ) ^ N * (T ℝ (N : ℤ)).eval x := by rw [hsigned] _ = |(T ℝ (N : ℤ)).eval x| := by have hnonneg : 0 ≤ (-1 : ℝ) ^ N * (T ℝ (N : ℤ)).eval x := by have h := Polynomial.Chebyshev.one_le_negOnePow_mul_eval_T_real (N : ℤ) (show x ≤ -1 by linarith) simpa using (show (0 : ℝ) ≤ (N : ℤ).negOnePow * (T ℝ (N : ℤ)).eval x by linarith) calc (-1 : ℝ) ^ N * (T ℝ (N : ℤ)).eval x = |(-1 : ℝ) ^ N * (T ℝ (N : ℤ)).eval x| := (abs_of_nonneg hnonneg).symm _ = _ := by rw [abs_mul, abs_neg_one_pow, one_mul] -
lagrange_basis_eval_affine_locallemma — For nodes that are injective on the interpolation set, a selected node in that set, and a nondegenerate affine change of scale, the transformed cardinal-basis evaluation equals the original evaluation. The result is invariance of the cardinal-basis evaluation under the affine change.hypothesesProof (Lean source)
lemma lagrange_basis_eval_affine_local {ι : Type*} [DecidableEq ι] {s : Finset ι} {v : ι → ℝ} (hv : InjOn v s) {i : ι} (hi : i ∈ s) (c r z : ℝ) (hr : r ≠ 0) : (basis s (fun j => c + r * v j) i).eval (c + r * z) = (basis s v i).eval z := by rw [basis, basis, Polynomial.eval_prod, Polynomial.eval_prod] apply Finset.prod_congr rfl intro j hj have hjmem : j ∈ s := (Finset.mem_erase.mp hj).2 have hji : j ≠ i := (Finset.mem_erase.mp hj).1 have hvne : v i ≠ v j := by intro h exact hji (hv hi hjmem h).symm simp only [Lagrange.basisDivisor, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_sub, Polynomial.eval_X] rw [show c + r * z - (c + r * v j) = r * (z - v j) by ring, show c + r * v i - (c + r * v j) = r * (v i - v j) by ring] field_simp [hr, hvne] -
shifted_chebyshev_lagrange_abs_sumlemma — For a Lobatto degree and a left endpoint strictly between zero and one, the cardinal mass of the grid shifted to [a,1] and evaluated at zero equals the stated exterior Chebyshev value. The result is the shifted-grid cardinal-mass identity at zero.hypothesesN :ℕa :ℝha0 :0 < aha1 :a < 1Proof (Lean source)
lemma shifted_chebyshev_lagrange_abs_sum (N : ℕ) (a : ℝ) (ha0 : 0 < a) (ha1 : a < 1) : (∑ i : Fin (N + 1), |(basis univ (fun j : Fin (N + 1) => (1 + a) / 2 + (1 - a) / 2 * Polynomial.Chebyshev.node N j) i).eval 0|) = |(T ℝ (N : ℤ)).eval (-(1 + a) / (1 - a))| := by let v : Fin (N + 1) → ℝ := fun j => Polynomial.Chebyshev.node N j let c : ℝ := (1 + a) / 2 let r : ℝ := (1 - a) / 2 let z : ℝ := -(1 + a) / (1 - a) have hr : r ≠ 0 := by dsimp [r]; positivity have hv : Injective v := by intro i j hij by_contra hne rcases lt_or_gt_of_ne hne with hij' | hji' · exact ne_of_gt (Polynomial.Chebyshev.node_lt (Nat.lt_succ_iff.mp j.isLt) hij') hij · exact ne_of_lt (Polynomial.Chebyshev.node_lt (Nat.lt_succ_iff.mp i.isLt) hji') hij have hz : c + r * z = 0 := by dsimp [c, r, z] field_simp [ne_of_gt (sub_pos.mpr ha1)] ring have hzlt : z < -1 := by dsimp [z] rw [div_lt_iff₀ (sub_pos.mpr ha1)] linarith rw [← standard_exterior_lagrange_abs_sum N z hzlt] apply Finset.sum_congr rfl intro i _ rw [← hz] exact congrArg abs (lagrange_basis_eval_affine_local hv.injOn (Finset.mem_univ i) c r z hr)
Markov 2 core · 5 supporting This module proves the sharp Markov derivative inequality on [-1,1] from the Duffin--Schaeffer bound and transports it affinely to arbitrary nondegenerate compact intervals. ★ markov_derivative_Icc
Markov's polynomial derivative inequality
This module proves the sharp Markov derivative inequality on [-1,1] from the
Duffin--Schaeffer bound and transports it affinely to arbitrary nondegenerate
compact intervals.
The pullback to the unit interval of a real polynomial for interval endpoints r and s is the polynomial composed with the affine map t ↦ ((s − r) / 2) t + (r + s) / 2, which carries the interval from −1 to 1 onto the interval from r to s.
Definition (Lean source)
For a real polynomial of degree at most L and endpoints with r strictly less than s, the supremum norm of its derivative on the interval from r to s is at most 2 L² / (s − r) times the supremum norm of the polynomial on that interval.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
eval_pullbackToUnitIntervaltheorem — For a real polynomial and real numbers r, s, and t, the pullback to the unit interval evaluated at t equals the original polynomial evaluated at ((s − r) / 2) t + (r + s) / 2.hypothesesQ :r s t :ℝconclusion(pullbackToUnitInterval Q r s).eval t = Q.eval (((s - r) / 2) * t + (r + s) / 2)Proof (Lean source)
theorem eval_pullbackToUnitInterval (Q : Polynomial ℝ) (r s t : ℝ) : (pullbackToUnitInterval Q r s).eval t = Q.eval (((s - r) / 2) * t + (r + s) / 2) := by simp [pullbackToUnitInterval] -
natDegree_pullbackToUnitInterval_letheorem — For a real polynomial and any interval endpoints r and s, the degree of the pullback to the unit interval is at most the degree of the original polynomial.Proof (Lean source)
theorem natDegree_pullbackToUnitInterval_le (Q : Polynomial ℝ) (r s : ℝ) : (pullbackToUnitInterval Q r s).natDegree ≤ Q.natDegree := by unfold pullbackToUnitInterval calc (Q.comp (C ((s - r) / 2) * X + C ((r + s) / 2))).natDegree ≤ Q.natDegree * (C ((s - r) / 2) * X + C ((r + s) / 2)).natDegree := Polynomial.natDegree_comp_le _ ≤ Q.natDegree * 1 := Nat.mul_le_mul_left _ Polynomial.natDegree_linear_le _ = Q.natDegree := by simp -
derivative_eval_pullbackToUnitIntervaltheorem — For a real polynomial and real numbers r, s, and t, the derivative of the pullback to the unit interval at t equals the half-length (s − r) / 2 times the derivative of the original polynomial at ((s − r) / 2) t + (r + s) / 2.hypothesesQ :r s t :ℝconclusion(pullbackToUnitInterval Q r s).derivative.eval t= ((s - r) / 2) * Q.derivative.eval (((s - r) / 2) * t + (r + s) / 2)Proof (Lean source)
theorem derivative_eval_pullbackToUnitInterval (Q : Polynomial ℝ) (r s t : ℝ) : (pullbackToUnitInterval Q r s).derivative.eval t = ((s - r) / 2) * Q.derivative.eval (((s - r) / 2) * t + (r + s) / 2) := by simp [pullbackToUnitInterval, Polynomial.derivative_comp] -
intervalSupNorm_pullbackToUnitIntervaltheorem — For a real polynomial and endpoints with r strictly less than s, the supremum norm of the pullback on the interval from −1 to 1 equals the supremum norm of the original polynomial on the interval from r to s.hypothesesconclusionintervalSupNorm (fun t => (pullbackToUnitInterval Q r s).eval t) (-1) 1= intervalSupNorm (fun x => Q.eval x) r sProof (Lean source)
theorem intervalSupNorm_pullbackToUnitInterval (Q : Polynomial ℝ) {r s : ℝ} (hrs : r < s) : intervalSupNorm (fun t => (pullbackToUnitInterval Q r s).eval t) (-1) 1 = intervalSupNorm (fun x => Q.eval x) r s := by apply le_antisymm · rw [intervalSupNorm_le_iff (pullbackToUnitInterval Q r s).continuous.continuousOn (by norm_num : (-1 : ℝ) ≤ 1)] intro t ht rw [eval_pullbackToUnitInterval] apply (intervalSupNorm_le_iff Q.continuous.continuousOn hrs.le).mp le_rfl have hhalf : 0 ≤ (s - r) / 2 := by linarith constructor · nlinarith [mul_le_mul_of_nonneg_left ht.1 hhalf] · nlinarith [mul_le_mul_of_nonneg_left ht.2 hhalf] · rw [intervalSupNorm_le_iff Q.continuous.continuousOn hrs.le] intro x hx let t : ℝ := (2 * x - (r + s)) / (s - r) have hden : 0 < s - r := sub_pos.mpr hrs have ht : t ∈ Icc (-1 : ℝ) 1 := by constructor · apply (le_div_iff₀ hden).2 linarith [hx.1] · apply (div_le_iff₀ hden).2 linarith [hx.2] have hmap : ((s - r) / 2) * t + (r + s) / 2 = x := by dsimp [t] field_simp [ne_of_gt hden] ring have hbound := (intervalSupNorm_le_iff (pullbackToUnitInterval Q r s).continuous.continuousOn (by norm_num : (-1 : ℝ) ≤ 1)).mp le_rfl t ht rw [eval_pullbackToUnitInterval, hmap] at hbound exact hbound -
markov_derivative_unitIntervaltheorem — For a real polynomial of degree at most L, the supremum norm of its derivative on the interval from −1 to 1 is at most L² times the supremum norm of the polynomial on that interval.hypothesesconclusionintervalSupNorm (fun x => Q.derivative.eval x) (-1) 1≤ (L : ℝ) ^ 2 * intervalSupNorm (fun x => Q.eval x) (-1) 1Proof (Lean source)
theorem markov_derivative_unitInterval (Q : Polynomial ℝ) (L : ℕ) (hQ : Q.natDegree ≤ L) : intervalSupNorm (fun x => Q.derivative.eval x) (-1) 1 ≤ (L : ℝ) ^ 2 * intervalSupNorm (fun x => Q.eval x) (-1) 1 := by rw [intervalSupNorm_le_iff Q.derivative.continuous.continuousOn (by norm_num)] intro x hx by_cases hLzero : L = 0 · subst L have hnat : Q.natDegree = 0 := Nat.eq_zero_of_le_zero hQ have hderiv : Q.derivative = 0 := Polynomial.derivative_eq_zero.mpr hnat simp [hderiv] · have hL : 0 < L := Nat.pos_of_ne_zero hLzero have hbound : ∀ y ∈ Icc (-1 : ℝ) 1, |Q.eval y| ≤ intervalSupNorm (fun z => Q.eval z) (-1) 1 := (intervalSupNorm_le_iff Q.continuous.continuousOn (by norm_num)).mp le_rfl have hC : 0 ≤ intervalSupNorm (fun z => Q.eval z) (-1) 1 := (abs_nonneg (Q.eval (node L 0))).trans (hbound _ Polynomial.Chebyshev.node_mem_Icc) exact duffinSchaeffer_derivative_le Q hL hQ hC (fun i _ ↦ hbound _ Polynomial.Chebyshev.node_mem_Icc) hx
Mesh 4 core · 9 supporting A real polynomial of degree ≤ β is uniformly controlled on [-1, 1] by its values on the k+1 Chebyshev–Lobatto nodes x_j = -cos(π j / k) (j = 0..k) as soon as the mesh is oversampled (β < k), with a norming constant of th ★ ehlichZeller_mesh_bound★ oversampled_norming
The Ehlich–Zeller Chebyshev–Lobatto mesh (norming) inequality
A real polynomial of degree ≤ β is uniformly controlled on [-1, 1] by its
values on the k+1 Chebyshev–Lobatto nodes x_j = -cos(π j / k) (j = 0..k)
as soon as the mesh is oversampled (β < k), with a norming constant of the form
sec(π β / (2k)) depending only on the oversampling ratio.
Main declarations:
* czNode k j — the j-th Chebyshev–Lobatto node -cos(π j / k) (for positive
k, the endpoints are x_0 = -1 and x_k = 1).
* ehlichZeller_mesh_bound — the mesh inequality
sup_{x∈[-1,1]} |R x| ≤ sec(π β / (2k)) · max_{0≤j≤k} |R(x_j)| for
R.natDegree ≤ β and β < k.
* oversampled_norming — the oversampling-ratio corollary: for c > 1, β ≥ 1
and k ≥ c·β, the constant K(c) = sec(π / (2c)) works uniformly in β.
Everything is stated for a general real polynomial R and general (β, k),
so the module is reusable (Mathlib-shaped) and not gerrymandered to any
downstream object. The analytic heart (Bernstein/Szegő) lives in
Causalean.Mathlib.Analysis.Approximation.Chebyshev.Bernstein.
## Standard reference Ehlich, H. & Zeller, K. (1964), Schwankung von Polynomen zwischen Gitterpunkten, Math. Z. 86, 41–44.
For a nonnegative mesh order and a nonnegative node index, the Chebyshev–Lobatto node is . When the mesh order is positive, the indices from zero through that order give its endpoints and as well as its intermediate nodes.
For a real polynomial and a nonnegative mesh order, the mesh maximum is the largest absolute value of the polynomial over all Chebyshev–Lobatto nodes with indices from zero through that order.
Definition (Lean source)
Ehlich–Zeller mesh inequality. The supremum absolute value on the unit interval of a real polynomial with a chosen degree bound is at most the secant of half the degree-to-mesh angle times its maximum absolute value on the Chebyshev–Lobatto mesh, provided the mesh order strictly exceeds the degree bound.
Formal statement
Proof (Lean source)
Oversampled Chebyshev–Lobatto norming. For an oversampling ratio greater than one, a positive degree bound, and a real polynomial satisfying that bound, any mesh order at least the ratio times the degree bound gives a unit-interval sup norm bounded by the mesh maximum times the secant of π divided by twice the ratio. Thus the norming constant depends only on the oversampling ratio.
Formal statement
Proof (Lean source)
9 supporting declarations (lemmas, instances)
-
czTrig_at_meshParamtheorem — Evaluating the cosine transform of a real polynomial at the parameter determined by a mesh order and node index recovers the polynomial's value at that mesh node.Proof (Lean source)
theorem czTrig_at_meshParam (R : Polynomial ℝ) (k j : ℕ) : czTrig R (pi * j / k) = R.eval (czNode k j) := by simp only [czTrig, czNode] -
exists_meshParam_closetheorem — Node-selection lemma. For a positive mesh order and an angle between zero and π, some mesh parameter is within half a mesh step of that angle. The mesh parameters partition the interval into equal subintervals, so every point is within a half-step of a node.hypothesesProof (Lean source)
theorem exists_meshParam_close (k : ℕ) (hk : 0 < k) {t₀ : ℝ} (ht₀ : t₀ ∈ Icc (0 : ℝ) Real.pi) : ∃ j ∈ range (k + 1), |t₀ - Real.pi * j / k| ≤ Real.pi / (2 * k) := by let x : ℝ := t₀ * k / Real.pi let n : ℤ := round x let j : ℕ := n.toNat have hkℝ : 0 < (k : ℝ) := by exact_mod_cast hk have hπpos : 0 < Real.pi := Real.pi_pos have hπne : Real.pi ≠ 0 := ne_of_gt hπpos have hkne : (k : ℝ) ≠ 0 := ne_of_gt hkℝ have hx_nonneg : 0 ≤ x := by dsimp [x] exact div_nonneg (mul_nonneg ht₀.1 hkℝ.le) hπpos.le have hx_le : x ≤ k := by dsimp [x] calc t₀ * (k : ℝ) / Real.pi ≤ Real.pi * (k : ℝ) / Real.pi := by gcongr exact ht₀.2 _ = k := by field_simp [hπne] have hn_nonneg : (0 : ℤ) ≤ n := by change (0 : ℤ) ≤ round x rw [round_eq] exact (Int.floor_nonneg).2 (by linarith) have hn_le : n ≤ (k : ℤ) := by change round x ≤ (k : ℤ) rw [round_eq, Int.floor_le_iff] change x + 1 / 2 < (k : ℝ) + 1 linarith have hj_le : j ≤ k := by dsimp [j] omega have hj_mem : j ∈ range (k + 1) := by rw [Finset.mem_range] exact Nat.lt_succ_of_le hj_le refine ⟨j, hj_mem, ?_⟩ have hj_cast : (j : ℝ) = (n : ℝ) := by dsimp [j] exact_mod_cast (Int.toNat_of_nonneg hn_nonneg) have hround : |x - (j : ℝ)| ≤ (1 : ℝ) / 2 := by simpa [hj_cast] using (abs_sub_round x) have hscale : t₀ - Real.pi * (j : ℝ) / k = (Real.pi / k) * (x - (j : ℝ)) := by dsimp [x] field_simp [hπne, hkne] calc |t₀ - Real.pi * (j : ℝ) / k| = |Real.pi / k| * |x - (j : ℝ)| := by rw [hscale, abs_mul] _ = (Real.pi / k) * |x - (j : ℝ)| := by rw [abs_of_nonneg (div_nonneg hπpos.le hkℝ.le)] _ ≤ (Real.pi / k) * ((1 : ℝ) / 2) := by exact mul_le_mul_of_nonneg_left hround (div_nonneg hπpos.le hkℝ.le) _ = Real.pi / (2 * k) := by field_simp [hkne] -
czMeshLHS_le_czSuptheorem — Sup transfer. The supremum absolute value of a real polynomial on the unit interval is bounded above by the sup norm of its cosine-parametrized transform on the interval from zero to π. This follows because the negative cosine maps that angle interval onto the unit interval.Proof (Lean source)
theorem czMeshLHS_le_czSup (R : Polynomial ℝ) : sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1) ≤ czSup R := by refine Real.sSup_le ?_ (czSup_nonneg R) rintro y ⟨x, hx, rfl⟩ let t := arccos (-x) have ht : t ∈ Icc (0 : ℝ) pi := ⟨Real.arccos_nonneg (-x), Real.arccos_le_pi (-x)⟩ have hcos : -cos t = x := by have hx₁ : -1 ≤ -x := by linarith [hx.2] have hx₂ : -x ≤ 1 := by linarith [hx.1] simp [t, Real.cos_arccos hx₁ hx₂] simpa [czTrig, hcos] using abs_czTrig_le_czSup R ht -
eval_node_le_czMeshMaxtheorem — For a real polynomial and mesh order and any indexed mesh node, the absolute value at that node is at most the mesh maximum.hypothesesProof (Lean source)
theorem eval_node_le_czMeshMax (R : Polynomial ℝ) (k : ℕ) {j : ℕ} (hj : j ∈ range (k + 1)) : |R.eval (czNode k j)| ≤ czMeshMax R k := by let s := range (k + 1) let f : ℕ → ℝ := fun j => |R.eval (czNode k j)| have hsne : s.Nonempty := ⟨0, by simp [s]⟩ let M : ℝ := max 0 (s.sup' hsne f) have hM_nonneg : 0 ≤ M := le_max_left _ _ have hval_le_M {i : ℕ} (hi : i ∈ s) : f i ≤ M := by exact (Finset.le_sup' f hi).trans (le_max_right _ _) have hinner_bound (i : ℕ) : (⨆ (_ : i ∈ s), f i) ≤ M := by exact Real.iSup_le (fun hi => hval_le_M hi) hM_nonneg have houter_bdd : BddAbove (range (fun i => ⨆ (_ : i ∈ s), f i)) := ⟨M, by rintro _ ⟨i, rfl⟩; exact hinner_bound i⟩ have hinner_bdd : BddAbove (range (fun _ : j ∈ s => f j)) := ⟨f j, by rintro _ ⟨hj, rfl⟩; rfl⟩ have hinner : f j ≤ ⨆ (_ : j ∈ s), f j := le_ciSup hinner_bdd hj have houter : f j ≤ ⨆ i, ⨆ (_ : i ∈ s), f i := le_ciSup_of_le houter_bdd j hinner simpa [czMeshMax, s, f] using houter -
czMeshMax_nonneglemma — The mesh maximum for a real polynomial at a chosen mesh order is nonnegative.Proof (Lean source)
lemma czMeshMax_nonneg (R : Polynomial ℝ) (k : ℕ) : 0 ≤ czMeshMax R k := by have hmem : 0 ∈ range (k + 1) := by simp exact (abs_nonneg (R.eval (czNode k 0))).trans (eval_node_le_czMeshMax R k hmem) -
czTrig_neglemma — Negating a real polynomial at any chosen angle negates the value of its cosine-parametrized transform.Proof (Lean source)
lemma czTrig_neg (R : Polynomial ℝ) (t : ℝ) : czTrig (-R) t = -czTrig R t := by simp [czTrig, Polynomial.eval_neg] -
czSup_neglemma — Negating a real polynomial leaves its cosine-transform sup norm unchanged.Proof (Lean source)
lemma czSup_neg (R : Polynomial ℝ) : czSup (-R) = czSup R := by apply congrArg sSup ext y constructor · rintro ⟨t, ht, rfl⟩ exact ⟨t, ht, by simp [czTrig_neg]⟩ · rintro ⟨t, ht, rfl⟩ exact ⟨t, ht, by simp [czTrig_neg]⟩ -
czMeshMax_neglemma — Negating a real polynomial leaves its maximum absolute value on a chosen mesh for any mesh order.Proof (Lean source)
lemma czMeshMax_neg (R : Polynomial ℝ) (k : ℕ) : czMeshMax (-R) k = czMeshMax R k := by simp [czMeshMax, Polynomial.eval_neg] -
meshParam_mem_Icclemma — At a positive mesh order, every valid node index determines a Chebyshev–Lobatto mesh parameter between zero and π.Proof (Lean source)
lemma meshParam_mem_Icc (k : ℕ) (hk : 0 < k) {j : ℕ} (hj : j ∈ range (k + 1)) : pi * j / k ∈ Icc (0 : ℝ) pi := by have hkℝ : 0 < (k : ℝ) := by exact_mod_cast hk have hkne : (k : ℝ) ≠ 0 := ne_of_gt hkℝ have hj_le : j ≤ k := le_of_lt_succ (Finset.mem_range.mp hj) constructor · positivity · calc pi * (j : ℝ) / k ≤ pi * (k : ℝ) / k := by gcongr _ = pi := by field_simp [hkne]
ParametricHeterogeneousTensor 2 core · 6 supporting This module constructs a canonical finite polynomial from a jointly measurable, bounded cube target and proves its convolution, coefficient, support, and finite-lift measurability APIs. ★ eval_polynomial
Parametric heterogeneous tensor Jackson polynomials
This module constructs a canonical finite polynomial from a jointly measurable, bounded cube target and proves its convolution, coefficient, support, and finite-lift measurability APIs.
A coordinate-specific order map, a parameter-indexed target, and a parameter value determine the canonical heterogeneous Jackson polynomial. The polynomial is the fixed tensor-grid interpolation polynomial built from the values, at the coordinatewise arccosines of the grid points, of the heterogeneous Jackson convolution of the target at that parameter value; it is an explicit formula, not an existentially chosen witness.
Definition (Lean source)
For a coordinate-specific positive order map, a jointly measurable target, a real bound B such that the target is at most B in absolute value on the cube for every parameter, a parameter value, and a point of the cube, evaluating the canonical polynomial at that point gives the heterogeneous Jackson convolution at the phase vector of coordinatewise arccosines of the point.
Formal statement
Proof (Lean source)
6 supporting declarations (lemmas, instances)
-
eval_cosPoint_polynomialtheorem — For a coordinate-specific positive order map, a jointly measurable target, a real bound B such that the target is at most B in absolute value on the cube for every parameter, a parameter value, and a phase vector, evaluating the canonical polynomial at the coordinatewise cosines of the phase vector gives the heterogeneous Jackson convolution of the target at that parameter and phase.hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕhd :∀ i, 0 < d ig :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)B :ℝhB :∀ ω xifx ∈ cubethen|g ω x| ≤ Bω :Ωx :ι → ℝconclusioneval (cosPoint x) (polynomial d g ω) = convolution d (g ω) xProof (Lean source)
theorem eval_cosPoint_polynomial (d : ι → ℕ) (hd : ∀ i, 0 < d i) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (B : ℝ) (hB : ∀ ω x, x ∈ cube → |g ω x| ≤ B) (ω : Ω) (x : ι → ℝ) : eval (cosPoint x) (polynomial d g ω) = convolution d (g ω) x := by classical have hf : Measurable (g ω) := by exact hg.comp (measurable_const.prodMk measurable_id) obtain ⟨p, hp, hbound⟩ := convolution_exists_polynomial d hd (g ω) hf B (hB ω) have hdegree : ∀ i, p.degreeOf i ≤ interpolationDegree d := by intro i apply MvPolynomial.degreeOf_le_iff.mpr intro γ hγ calc γ i ≤ 2 * (d i - 1) := hbound γ hγ i _ ≤ interpolationDegree d := by simpa only [interpolationDegree] using (Finset.single_le_sum (s := univ) (f := fun j => 2 * (d j - 1)) (fun j hj => zero_le _) (Finset.mem_univ i)) have hgrid (b : GridIndex d) : cosPoint (fun i => arccos (gridPoint d b i)) = gridPoint d b := by funext i have hbi : (b i : ℝ) ≤ interpolationDegree d := by exact_mod_cast le_of_lt_succ (b i).isLt have hlo : -1 ≤ gridPoint d b i := by dsimp [gridPoint, equispacedLagrangeNode] have hn : (0 : ℝ) ≤ (b i : ℝ) / (interpolationDegree d + 1) := by positivity linarith have hhi : gridPoint d b i ≤ 1 := by dsimp [gridPoint, equispacedLagrangeNode] rw [div_le_one (by positivity : (0 : ℝ) < interpolationDegree d + 1)] linarith exact Real.cos_arccos hlo hhi have hpoly : polynomial d g ω = interpolate d (fun b => eval (gridPoint d b) p) := by change interpolate d (fun b => convolution d (g ω) (fun i => arccos (gridPoint d b i))) = _ congr 1 funext b calc convolution d (g ω) (fun i => arccos (gridPoint d b i)) = eval (cosPoint (fun i => arccos (gridPoint d b i))) p := (hp _).symm _ = eval (gridPoint d b) p := by rw [hgrid] rw [hpoly, interpolate_eval d p hdegree, hp] -
coeff_polynomialtheorem — A coordinate-specific order map, a parameter-indexed target, a parameter value, and a tensor coefficient index imply that the canonical coefficient is its explicit finite weighted convolution sum.hypothesesconclusionProof (Lean source)
theorem coeff_polynomial (d : ι → ℕ) (g : Ω → (ι → ℝ) → ℝ) (ω : Ω) (a : GridIndex d) : coeff (exponent d a) (polynomial d g ω) = ∑ b : GridIndex d, gridWeight d a b * convolution d (g ω) (fun i => arccos (gridPoint d b i)) := by exact coeff_interpolate d _ a -
measurable_coeff_polynomialtheorem — A coordinate-specific order map, a parameter-indexed target, its joint measurability, and a monomial exponent imply that the corresponding canonical-polynomial coefficient is measurable in the parameter.hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕg :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)γ :ι →₀ ℕconclusionProof (Lean source)
@[fun_prop] theorem measurable_coeff_polynomial (d : ι → ℕ) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (γ : ι →₀ ℕ) : Measurable (fun ω => coeff γ (polynomial d g ω)) := by classical simp only [polynomial, interpolate, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] apply Finset.measurable_sum intro a _ split_ifs · apply Finset.measurable_sum intro b _ exact measurable_const.mul (measurable_convolution d g hg _) · exact measurable_const -
support_polynomialtheorem — For a coordinate-specific positive order map, a jointly measurable target, a real bound B such that the target is at most B in absolute value on the cube for every parameter, a parameter value, a monomial exponent appearing in the canonical polynomial, and a selected coordinate, the exponent in that coordinate is at most twice (that coordinate's order minus one).hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕhd :∀ i, 0 < d ig :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)B :ℝhB :∀ ω xifx ∈ cubethen|g ω x| ≤ Bω :Ωγ :ι →₀ ℕhγ :γ ∈ (polynomial d g ω).supporti :ιconclusionγ i ≤ 2 * (d i - 1)Proof (Lean source)
theorem support_polynomial (d : ι → ℕ) (hd : ∀ i, 0 < d i) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (B : ℝ) (hB : ∀ ω x, x ∈ cube → |g ω x| ≤ B) (ω : Ω) (γ : ι →₀ ℕ) (hγ : γ ∈ (polynomial d g ω).support) (i : ι) : γ i ≤ 2 * (d i - 1) := by classical have hf : Measurable (g ω) := by exact hg.comp (measurable_const.prodMk measurable_id) obtain ⟨p, hp, hbound⟩ := convolution_exists_polynomial d hd (g ω) hf B (hB ω) have hdegree : ∀ j, p.degreeOf j ≤ interpolationDegree d := by intro j apply MvPolynomial.degreeOf_le_iff.mpr intro δ hδ calc δ j ≤ 2 * (d j - 1) := hbound δ hδ j _ ≤ interpolationDegree d := by simpa only [interpolationDegree] using (Finset.single_le_sum (s := univ) (f := fun k => 2 * (d k - 1)) (fun k hk => zero_le _) (Finset.mem_univ j)) have hgrid (b : GridIndex d) : cosPoint (fun j => arccos (gridPoint d b j)) = gridPoint d b := by funext j have hb : (b j : ℝ) ≤ interpolationDegree d := by exact_mod_cast le_of_lt_succ (b j).isLt have hlo : -1 ≤ gridPoint d b j := by dsimp [gridPoint, equispacedLagrangeNode] have hn : (0 : ℝ) ≤ (b j : ℝ) / (interpolationDegree d + 1) := by positivity linarith have hhi : gridPoint d b j ≤ 1 := by dsimp [gridPoint, equispacedLagrangeNode] rw [div_le_one (by positivity : (0 : ℝ) < interpolationDegree d + 1)] linarith exact Real.cos_arccos hlo hhi have hpoly : polynomial d g ω = interpolate d (fun b => eval (gridPoint d b) p) := by change interpolate d (fun b => convolution d (g ω) (fun j => arccos (gridPoint d b j))) = _ congr 1 funext b calc convolution d (g ω) (fun j => arccos (gridPoint d b j)) = eval (cosPoint (fun j => arccos (gridPoint d b j))) p := (hp _).symm _ = eval (gridPoint d b) p := by rw [hgrid] have heq : polynomial d g ω = p := by apply MvPolynomial.funext intro x rw [hpoly, interpolate_eval d p hdegree] rw [heq] at hγ exact hbound γ hγ i -
measurable_coeff_sumtheorem — A coordinate-specific order map, a parameter-indexed target, its joint measurability, a finite monomial set, parameter-dependent weights, and their measurability on that set imply that the finite weighted canonical-coefficient sum is measurable.hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕg :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)S :Finset (ι →₀ ℕ)w :(ι →₀ ℕ) → Ω → ℝhw :∀ γ ∈ S, Measurable (w γ)conclusionProof (Lean source)
theorem measurable_coeff_sum (d : ι → ℕ) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (S : Finset (ι →₀ ℕ)) (w : (ι →₀ ℕ) → Ω → ℝ) (hw : ∀ γ ∈ S, Measurable (w γ)) : Measurable (fun ω => ∑ γ ∈ S, coeff γ (polynomial d g ω) * w γ ω) := by classical apply Finset.measurable_sum intro γ hγ exact (measurable_coeff_polynomial d g hg γ).mul (hw γ hγ) -
measurable_eval_polynomialtheorem — A coordinate-specific order map, a parameter-indexed target, its joint measurability, a parameter-dependent evaluation point, and its measurability imply that canonical-polynomial evaluation is measurable in the parameter.hypothesesι :sharedType u_1Ω :sharedType u_2d :ι → ℕg :Ω → (ι → ℝ) → ℝhg :Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)x :Ω → ι → ℝhx :conclusionProof (Lean source)
@[fun_prop] theorem measurable_eval_polynomial (d : ι → ℕ) (g : Ω → (ι → ℝ) → ℝ) (hg : Measurable (fun z : Ω × (ι → ℝ) => g z.1 z.2)) (x : Ω → ι → ℝ) (hx : Measurable x) : Measurable (fun ω => eval (x ω) (polynomial d g ω)) := by classical simp only [polynomial, interpolate, MvPolynomial.eval_sum, MvPolynomial.eval_monomial] apply Finset.measurable_sum intro a _ have hc : Measurable (fun ω : Ω => ∑ b : GridIndex d, gridWeight d a b * convolution d (g ω) (fun i => arccos (gridPoint d b i))) := by apply Finset.measurable_sum intro b _ exact measurable_const.mul (measurable_convolution d g hg _) have hm : Measurable (fun ω : Ω => (exponent d a).prod fun i n => x ω i ^ n) := by simpa only [MvPolynomial.eval_monomial, one_mul, Function.comp_def] using ((MvPolynomial.continuous_eval (monomial (exponent d a) (1 : ℝ))).measurable.comp hx) exact hc.mul hm
Szego 3 core · 5 supporting For a real polynomial R of degree ≤ β the even trigonometric polynomial Q(t) = R(cos t) satisfies the sharp Szegő inequality Q'(t)² + β² Q(t)² ≤ β² ‖Q‖∞², equivalently |Q'(t)| ≤ β · √(‖Q‖∞² − Q(t)²). ★ szegoInterp_isTrigPolyLE★ cosComp_isTrigPolyLE★ szego_deriv_sq_bound
The sharp Bernstein / Szegő differential inequality
For a real polynomial R of degree ≤ β the even trigonometric polynomial
Q(t) = R(cos t) satisfies the sharp Szegő inequality
Q'(t)² + β² Q(t)² ≤ β² ‖Q‖∞²,
equivalently |Q'(t)| ≤ β · √(‖Q‖∞² − Q(t)²). The deliverable is
* szego_deriv_sq_bound — with M any sup-bound of Q on the whole period,
(d/dt R(cos t))² + β² R(cos t)² ≤ β² M².
The proof is the classical Szegő comparison argument built on the zero-count
IsTrigPolyLE.card_zeros_le from TrigPoly. Fix t₀. The degree-β
trigonometric interpolant
S(t) = Q(t₀)·cos(β(t−t₀)) + (Q'(t₀)/β)·sin(β(t−t₀)) (szegoInterp) matches Q
and Q' at t₀ and has amplitude A = √(Q(t₀)² + (Q'(t₀)/β)²). If the
inequality failed at t₀, then A > M ≥ ‖Q‖∞, so Q − S (a degree-≤β trig
polynomial by IsTrigPolyLE.sub) would change sign at the 2β extrema of S,
producing > 2β zeros on a period and contradicting card_zeros_le.
## Standard reference Szegő's inequality; Rivlin, The Chebyshev Polynomials (1974); DeVore–Lorentz, Constructive Approximation (1993), Ch. 4 (Bernstein–Szegő).
For a degree parameter and a prescribed value, derivative, and base point, the Szegő interpolant is a real trigonometric polynomial of at most that degree.
Formal statement
Proof (Lean source)
The cosine-parametrized transform of a real polynomial is a real trigonometric polynomial with a chosen degree bound whenever the polynomial satisfies that degree bound.
Formal statement
Proof (Lean source)
The sharp Bernstein/Szegő differential inequality. If a real polynomial satisfies a chosen degree bound and its cosine-parametrized transform is uniformly bounded in absolute value by a real constant, then at every real angle, the squared derivative plus the degree squared times the squared transform value is at most the degree squared times the squared uniform bound.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
addtheorem — The pointwise sum of two real trigonometric polynomials with a common degree bound is a real trigonometric polynomial with the same degree bound.hypothesesn :ℕf g :ℝ → ℝhf :IsTrigPolyLE n fhg :IsTrigPolyLE n gconclusionIsTrigPolyLE n (fun t => f t + g t)Proof (Lean source)
theorem IsTrigPolyLE.add {n : ℕ} {f g : ℝ → ℝ} (hf : IsTrigPolyLE n f) (hg : IsTrigPolyLE n g) : IsTrigPolyLE n (fun t => f t + g t) := by rcases hf with ⟨a, b, ha⟩ rcases hg with ⟨c, d, hg⟩ refine ⟨fun k => a k + c k, fun k => b k + d k, ?_⟩ intro t change f t + g t = ∑ k ∈ range (n + 1), ((a k + c k) * cos ((k : ℝ) * t) + (b k + d k) * sin ((k : ℝ) * t)) rw [ha t, hg t, ← Finset.sum_add_distrib] refine Finset.sum_congr rfl ?_ intro k hk ring -
const_multheorem — Multiplying a real trigonometric polynomial with a chosen degree bound by a real scalar preserves that degree bound.hypothesesn :ℕf :ℝ → ℝc :ℝhf :IsTrigPolyLE n fconclusionIsTrigPolyLE n (fun t => c * f t)Proof (Lean source)
theorem IsTrigPolyLE.const_mul {n : ℕ} {f : ℝ → ℝ} (c : ℝ) (hf : IsTrigPolyLE n f) : IsTrigPolyLE n (fun t => c * f t) := by rcases hf with ⟨a, b, ha⟩ refine ⟨fun k => c * a k, fun k => c * b k, ?_⟩ intro t change c * f t = ∑ k ∈ range (n + 1), (c * a k * cos ((k : ℝ) * t) + c * b k * sin ((k : ℝ) * t)) rw [ha t, Finset.mul_sum] refine Finset.sum_congr rfl ?_ intro k hk ring -
congrtheorem — A real-valued function pointwise equal to a real trigonometric polynomial with a chosen degree bound is itself a trigonometric polynomial with that bound.hypothesesn :ℕf g :ℝ → ℝhf :IsTrigPolyLE n fhfg :∀ t, g t = f tconclusionIsTrigPolyLE n gProof (Lean source)
theorem IsTrigPolyLE.congr {n : ℕ} {f g : ℝ → ℝ} (hf : IsTrigPolyLE n f) (hfg : ∀ t, g t = f t) : IsTrigPolyLE n g := by rcases hf with ⟨a, b, ha⟩ exact ⟨a, b, fun t => by rw [hfg t, ha t]⟩ -
cos_nat_mul_isTrigPolyLEtheorem — The cosine wave at a nonnegative integer frequency is a real trigonometric polynomial whose degree is at most that frequency.Proof (Lean source)
theorem cos_nat_mul_isTrigPolyLE (n : ℕ) : IsTrigPolyLE n (fun t => cos ((n : ℝ) * t)) := by classical refine ⟨fun k => if k = n then 1 else 0, fun _ => 0, ?_⟩ intro t rw [Finset.sum_eq_single n] · simp · intro k hk hkn simp [hkn] · intro hn exact (hn (Finset.mem_range.mpr (lt_succ_self n))).elim -
szegoInterp_continuoustheorem — The Szegő interpolant determined by a frequency, prescribed value and derivative, and base point is continuous as a function of its argument.Proof (Lean source)
@[fun_prop] theorem szegoInterp_continuous (β : ℕ) (Q₀ Q₁ t₀ : ℝ) : Continuous (szegoInterp β Q₀ Q₁ t₀) := by unfold szegoInterp fun_prop
TensorChebyshev 4 core · 7 supporting Tensor products of first-kind Chebyshev polynomials in four variables: the basis, the polynomial with prescribed tensor coefficients, and the integral coefficient functional against the normalized product cosine kernel. ★ tensorChebyshev_coeff_recovery
Four-variable tensor Chebyshev polynomials
Tensor products of first-kind Chebyshev polynomials in four variables: the basis, the polynomial with prescribed tensor coefficients, and the integral coefficient functional against the normalized product cosine kernel. The file proves one-variable cosine orthogonality and finite spanning, recovery of the tensor coefficients of a coordinatewise degree-bounded polynomial, the factorization of monomial coefficients of a basis polynomial, and the resulting coefficient one-norm bound.
A degree bound and tensor index determine the corresponding four-variable tensor Chebyshev basis polynomial: the product, over the four variables, of the first-kind Chebyshev polynomial in that variable whose degree is the index's entry for that variable.
A degree bound and tensor coefficient vector determine their tensor Chebyshev polynomial: the sum, over all tensor indices, of the vector's entry times the corresponding tensor Chebyshev basis polynomial.
Definition (Lean source)
A degree bound, multivariate polynomial, and tensor index determine the matching product-cosine integral coefficient: the integral, over the box of four angles each between −π and π, of the polynomial evaluated at the cosines of the angles times the product over coordinates of the cosine of the index entry times the angle, multiplied by a normalizing factor of 1/(2π) for each zero index entry and 1/π for each nonzero one.
Every four-variable polynomial of coordinatewise degree at most D equals the tensor Chebyshev expansion of its explicit product-cosine integral coefficients.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
chebyshev_one_variable_cosine_orthogonalitytheorem — Normalized cosine integration on the full period recovers the coefficient of a single one-variable Chebyshev basis polynomial. The zero frequency has normalization 1/(2π), and every positive frequency has normalization 1/π.hypothesesk m :ℕProof (Lean source)
theorem chebyshev_one_variable_cosine_orthogonality (k m : ℕ) : (if k = 0 then (1 / (2 * pi) : ℝ) else 1 / pi) * (∫ u in Icc (-pi) pi, cos (k * u) * eval (cos u) (T ℝ (m : ℤ))) = if k = m then 1 else 0 := by let f : ℝ → ℝ := fun u => cos (k * u) * eval (cos u) (T ℝ (m : ℤ)) have hf : Continuous f := by fun_prop have heven (u : ℝ) : f (-u) = f u := by simp [f, mul_neg, Real.cos_neg] have hleft : (∫ u in -Real.pi..0, f u) = ∫ u in 0..pi, f u := by simpa only [neg_zero, neg_neg] using (intervalIntegral.integral_comp_neg (f := f) (a := 0) (b := pi)).symm.trans (intervalIntegral.integral_congr (fun u hu => heven u)) have hfull : (∫ u in Icc (-pi) pi, f u) = 2 * ∫ u in 0..pi, f u := by rw [MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith [Real.pi_pos])] rw [← intervalIntegral.integral_add_adjacent_intervals (hf.intervalIntegrable _ _) (hf.intervalIntegrable _ _), hleft] ring have hmeasure : (∫ u in 0..pi, f u) = ∫ x, (T ℝ (k : ℤ)).eval x * (T ℝ (m : ℤ)).eval x ∂Polynomial.Chebyshev.measureT := by rw [Polynomial.Chebyshev.integral_measureT_eq_integral_cos] apply intervalIntegral.integral_congr intro u hu simp only [f, Polynomial.Chebyshev.T_real_cos] congr 1 change (if k = 0 then (1 / (2 * pi) : ℝ) else 1 / pi) * (∫ u in Icc (-pi) pi, f u) = if k = m then 1 else 0 rw [hfull, hmeasure] by_cases hkm : k = m · subst m by_cases hk : k = 0 · subst k simp only [Nat.cast_zero] rw [Polynomial.Chebyshev.integral_eval_T_real_mul_self_measureT_zero] simp only [if_true] field_simp · rw [Polynomial.Chebyshev.integral_T_real_mul_self_measureT_of_ne_zero hk] simp only [if_neg hk] field_simp simp · simp [hkm, Polynomial.Chebyshev.integral_eval_T_real_mul_eval_T_real_measureT_of_ne hkm] -
chebyshev_one_variable_finite_spantheorem — A real polynomial of degree at most D is a finite linear combination of the first D+1 first-kind Chebyshev polynomials, with constant real coefficients.hypothesesProof (Lean source)
theorem chebyshev_one_variable_finite_span (D : ℕ) (p : Polynomial ℝ) (hdeg : p.natDegree ≤ D) : ∃ c : Fin (D + 1) → ℝ, p = ∑ k : Fin (D + 1), C (c k) * T ℝ ((k : ℕ) : ℤ) := by let S := Polynomial.Chebyshev.chebyshevTsequence ℝ have hcoeff : ∀ i < D + 1, IsUnit (S i).leadingCoeff := by intro i hi change IsUnit (T ℝ (i : ℤ)).leadingCoeff rw [Polynomial.Chebyshev.leadingCoeff_T] exact isUnit_iff_ne_zero.mpr (pow_ne_zero _ (by norm_num)) have hp : p ∈ span ℝ (S '' Iio (D + 1)) := by rw [S.span_degreeLT hcoeff, Polynomial.mem_degreeLT] by_cases hp0 : p = 0 · simp [hp0] · exact (Polynomial.natDegree_lt_iff_degree_lt hp0).mp (Nat.lt_succ_of_le hdeg) obtain ⟨c, hc⟩ := (Fintype.mem_span_image_iff_exists_fun ℝ).mp hp let e : Fin (D + 1) ≃ (Iio (D + 1) : Set ℕ) := (Fin.orderIsoSubtype).toEquiv refine ⟨fun k => c (e k), ?_⟩ rw [← hc] have he (k : Fin (D + 1)) : (e k).1 = k.1 := rfl simpa only [he, S, Polynomial.Chebyshev.chebyshevTsequence, Polynomial.smul_eq_C_mul] using (Fintype.sum_equiv e (fun k : Fin (D + 1) => c (e k) • S (e k).1) (fun i => c i • S i.1) (fun k => rfl)).symm -
tensorChebyshevCoefficient_basistheorem — Integrating a four-coordinate tensor Chebyshev basis against the normalized product cosine kernel yields one at the matching multi-index and zero at every other index.hypothesesconclusiontensorChebyshevCoefficient D (tensorChebyshevBasis D m) k = if k = m then 1 else 0Proof (Lean source)
theorem tensorChebyshevCoefficient_basis (D : ℕ) (k m : Fin 4 → Fin (D + 1)) : tensorChebyshevCoefficient D (tensorChebyshevBasis D m) k = if k = m then 1 else 0 := by have heval (u : Fin 4 → ℝ) : eval (fun i => cos (u i)) (tensorChebyshevBasis D m) = ∏ i : Fin 4, eval (cos (u i)) (T ℝ ((m i : ℕ) : ℤ)) := by simp [tensorChebyshevBasis, MvPolynomial.eval_toMvPolynomial] unfold tensorChebyshevCoefficient simp_rw [heval, ← Finset.prod_mul_distrib] rw [integral_periodBox_prod (fun (i : Fin 4) (u : ℝ) => cos ((k i : ℕ) * u) * eval (cos u) (T ℝ ((m i : ℕ) : ℤ))), ← Finset.prod_mul_distrib] simp_rw [chebyshev_one_variable_cosine_orthogonality] by_cases hkm : k = m · subst m simp · have hi : ∃ i : Fin 4, k i ≠ m i := by by_contra h apply hkm funext i exact of_not_not (not_exists.mp h i) obtain ⟨i, hi⟩ := hi rw [if_neg hkm] apply Finset.prod_eq_zero (Finset.mem_univ i) simp [Fin.val_ne_of_ne hi] -
tensorChebyshevBasis_monomial_spantheorem — Each bounded-degree tensor monomial is a finite real linear combination of the tensor Chebyshev basis polynomials with indices at most D in every coordinate.hypothesesconclusionProof (Lean source)
theorem tensorChebyshevBasis_monomial_span (D : ℕ) (a : Fin 4 → Fin (D + 1)) : ∃ c : (Fin 4 → Fin (D + 1)) → ℝ, monomial (tensorExponent a) (1 : ℝ) = tensorChebyshevPolynomial D c := by classical have hdeg (i : Fin 4) : (X ^ (a i : ℕ) : Polynomial ℝ).natDegree ≤ D := by simpa only [Polynomial.natDegree_X_pow] using (Nat.lt_succ_iff.mp (a i).isLt) choose c hc using fun i => chebyshev_one_variable_finite_span D (X ^ (a i : ℕ)) (hdeg i) refine ⟨fun k => ∏ i, c i (k i), ?_⟩ have hexp : (∑ i : Fin 4, Finsupp.single i (a i : ℕ)) = tensorExponent a := by ext i simp [tensorExponent, Finsupp.single_apply] have hmon : monomial (tensorExponent a) (1 : ℝ) = ∏ i : Fin 4, (X ^ (a i : ℕ) : Polynomial ℝ).toMvPolynomial i := by calc _ = monomial (∑ i : Fin 4, Finsupp.single i (a i : ℕ)) (∏ _i : Fin 4, (1 : ℝ)) := by simp [hexp] _ = ∏ i : Fin 4, monomial (Finsupp.single i (a i : ℕ)) (1 : ℝ) := by rw [MvPolynomial.monomial_sum_prod] _ = _ := by simp [MvPolynomial.X_pow_eq_monomial] rw [hmon] have hcoord (i : Fin 4) : (X ^ (a i : ℕ) : Polynomial ℝ).toMvPolynomial i = ∑ j : Fin (D + 1), C (c i j) * (T ℝ ((j : ℕ) : ℤ)).toMvPolynomial i := by have h := congrArg (fun p : Polynomial ℝ => p.toMvPolynomial i) (hc i) simpa only [map_sum, map_mul, Polynomial.toMvPolynomial_C] using h simp_rw [hcoord] rw [Fintype.prod_sum] simp only [Finset.prod_mul_distrib, ← map_prod] rfl -
tensorChebyshevBasis_finite_spantheorem — Every four-variable polynomial of coordinatewise degree at most D lies in the span of the tensor Chebyshev basis indexed by (Fin (D+1))^4.hypothesesconclusionProof (Lean source)
theorem tensorChebyshevBasis_finite_span (D : ℕ) (p : MvPolynomial (Fin 4) ℝ) (hdeg : ∀ i, p.degreeOf i ≤ D) : ∃ c : (Fin 4 → Fin (D + 1)) → ℝ, p = tensorChebyshevPolynomial D c := by classical choose c hc using fun a : Fin 4 → Fin (D + 1) => tensorChebyshevBasis_monomial_span D a refine ⟨fun k => ∑ a, tensorCoeffs (D := D) p a * c a k, ?_⟩ have hscale (a : Fin 4 → Fin (D + 1)) : monomial (tensorExponent a) (tensorCoeffs (D := D) p a) = C (tensorCoeffs (D := D) p a) * tensorChebyshevPolynomial D (c a) := by rw [← hc a] rw [MvPolynomial.C_mul_monomial] simp calc p = tensorPolynomial (tensorCoeffs (D := D) p) := (tensorPolynomial_tensorCoeffs p hdeg).symm _ = tensorChebyshevPolynomial D (fun k => ∑ a, tensorCoeffs (D := D) p a * c a k) := by unfold tensorPolynomial tensorChebyshevPolynomial simp_rw [hscale] simp only [tensorChebyshevPolynomial, Finset.mul_sum, ← mul_assoc, ← map_mul] rw [Finset.sum_comm] simp only [← Finset.sum_mul, ← map_sum] -
tensorChebyshevBasis_coeff_factorizationtheorem — Each fixed monomial coefficient of a four-variable tensor Chebyshev basis polynomial is the product of the corresponding one-variable Chebyshev coefficients.hypothesesconclusiontensorCoeffs (D := D) (tensorChebyshevBasis D k) aProof (Lean source)
theorem tensorChebyshevBasis_coeff_factorization (D : ℕ) (k a : Fin 4 → Fin (D + 1)) : tensorCoeffs (D := D) (tensorChebyshevBasis D k) a = ∏ i : Fin 4, (T ℝ ((k i : ℕ) : ℤ)).coeff (a i : ℕ) := by classical let p : Fin 4 → Polynomial ℝ := fun i => T ℝ ((k i : ℕ) : ℤ) have hpdeg (i : Fin 4) : (p i).natDegree < D + 1 := by simp only [p, Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] exact (k i).isLt have hto (i : Fin 4) : (p i).toMvPolynomial i = ∑ j : Fin (D + 1), C ((p i).coeff (j : ℕ)) * X i ^ (j : ℕ) := by have h := Polynomial.as_sum_range_C_mul_X_pow' (p i) (hpdeg i) have h' := congrArg (fun q : Polynomial ℝ => q.toMvPolynomial i) h simpa only [map_sum, map_mul, map_pow, Polynomial.toMvPolynomial_C, Polynomial.toMvPolynomial_X, ← Fin.sum_univ_eq_sum_range] using h' have hexp (b : Fin 4 → Fin (D + 1)) : (∑ i : Fin 4, Finsupp.single i (b i : ℕ)) = tensorExponent b := by ext i simp [tensorExponent, Finsupp.single_apply] have hmon (b : Fin 4 → Fin (D + 1)) : (∏ i : Fin 4, C ((p i).coeff (b i : ℕ)) * X i ^ (b i : ℕ)) = monomial (tensorExponent b) (∏ i : Fin 4, (p i).coeff (b i : ℕ)) := by calc _ = ∏ i : Fin 4, monomial (Finsupp.single i (b i : ℕ)) ((p i).coeff (b i : ℕ)) := by apply Finset.prod_congr rfl intro i hi simp [MvPolynomial.X_pow_eq_monomial, MvPolynomial.C_mul_monomial] _ = monomial (∑ i : Fin 4, Finsupp.single i (b i : ℕ)) (∏ i : Fin 4, (p i).coeff (b i : ℕ)) := by rw [MvPolynomial.monomial_sum_prod] _ = _ := by rw [hexp] have hinj : Injective (tensorExponent (d := 4) (D := D)) := by intro b c h funext i apply Fin.ext have hi := congrArg (fun m : Fin 4 →₀ ℕ => m i) h simpa [tensorExponent] using hi change (∏ i : Fin 4, (p i).toMvPolynomial i).coeff (tensorExponent a) = ∏ i : Fin 4, (p i).coeff (a i : ℕ) simp_rw [hto] rw [Fintype.prod_sum] simp_rw [hmon] simp only [MvPolynomial.coeff_sum] rw [Finset.sum_eq_single a] · simp · intro b hb hba have hne : tensorExponent b ≠ tensorExponent a := fun h => hba (hinj h) simp [MvPolynomial.coeff_monomial, hne] · intro ha exact (ha (Finset.mem_univ a)).elim -
tensorChebyshevBasis_coeff_oneNorm_letheorem — The sum of the absolute monomial coefficients of one four-variable tensor Chebyshev basis polynomial is at most (1+√2)^(4D) for every index bounded by D.hypothesesconclusion≤ (1 + sqrt 2) ^ (4 * D)Proof (Lean source)
theorem tensorChebyshevBasis_coeff_oneNorm_le (D : ℕ) (k : Fin 4 → Fin (D + 1)) : (∑ a : Fin 4 → Fin (D + 1), |tensorCoeffs (D := D) (tensorChebyshevBasis D k) a|) ≤ (1 + sqrt 2) ^ (4 * D) := by classical let r : ℝ := 1 + sqrt 2 have hr : 1 ≤ r := by dsimp [r]; linarith [Real.sqrt_nonneg 2] have hsum (i : Fin 4) : (∑ j : Fin (D + 1), |(T ℝ ((k i : ℕ) : ℤ)).coeff (j : ℕ)|) ≤ r ^ D := by let p := T ℝ ((k i : ℕ) : ℤ) have hdeg : p.natDegree < D + 1 := by simp only [p, Polynomial.Chebyshev.natDegree_T, Int.natAbs_natCast] exact (k i).isLt have heq : (∑ j : Fin (D + 1), |p.coeff (j : ℕ)|) = polynomialCoeffOneNorm p := by change _ = p.sum (fun _ c => |c|) rw [p.sum_over_range' (fun _ => abs_zero) (D + 1) hdeg] simp only [← Fin.sum_univ_eq_sum_range] calc _ = polynomialCoeffOneNorm p := heq _ ≤ r ^ (k i : ℕ) := polynomialCoeffOneNorm_chebyshev_le _ _ ≤ r ^ D := pow_le_pow_right₀ hr (le_of_lt_succ (k i).isLt) calc (∑ a : Fin 4 → Fin (D + 1), |tensorCoeffs (D := D) (tensorChebyshevBasis D k) a|) = ∑ a : Fin 4 → Fin (D + 1), ∏ i : Fin 4, |(T ℝ ((k i : ℕ) : ℤ)).coeff (a i : ℕ)| := by simp_rw [tensorChebyshevBasis_coeff_factorization, Finset.abs_prod] _ = ∏ i : Fin 4, ∑ j : Fin (D + 1), |(T ℝ ((k i : ℕ) : ℤ)).coeff (j : ℕ)| := by rw [Fintype.prod_sum] _ ≤ ∏ _i : Fin 4, r ^ D := by apply Finset.prod_le_prod · intro i hi positivity · intro i hi exact hsum i _ = r ^ (4 * D) := by simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] rw [← pow_mul, Nat.mul_comm]
TensorExtraction 1 core · 1 supporting This module proves the periodic translation and coordinatewise trigonometric structure of tensor Jackson convolution, extracts a multivariate algebraic polynomial, and derives its Lipschitz approximation error. ★ tensorConvolution_approx_lipschitz
Coordinatewise extraction of tensor Jackson convolutions
This module proves the periodic translation and coordinatewise trigonometric structure of tensor Jackson convolution, extracts a multivariate algebraic polynomial, and derives its Lipschitz approximation error.
For a strictly positive integer order K, a function of d variables, a nonnegative Lipschitz constant L, continuity on the normalized cube, the bound that the function changes between any two points of the cube by at most L times the sum of their absolute coordinate differences, and a point in period coordinates, tensor Jackson convolution approximates the cosine lift there within thirty-two times dimension times the Lipschitz constant divided by K.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
tensorConvolution_exists_mvPolynomialtheorem — For a strictly positive integer order K and a function of d variables that is continuous on the normalized cube, there is a multivariate polynomial that reproduces the tensor Jackson convolution at the coordinatewise cosines of every point, has degree at most 2 (K − 1) in each variable, and has total degree at most d times 2 (K − 1).hypothesesconclusion∃ p : MvPolynomial (Fin d) ℝ,conclusion 2m ∈ p.support :i :m i ≤ 2 * (K - 1)conclusion 3p.totalDegree ≤ d * (2 * (K - 1))Proof (Lean source)
theorem tensorConvolution_exists_mvPolynomial {d K : ℕ} (hK : 0 < K) (f : (Fin d → ℝ) → ℝ) (hf : ContinuousOn f (normalizedCube d)) : ∃ p : MvPolynomial (Fin d) ℝ, (∀ x : Fin d → ℝ, eval (cosPoint x) p = tensorConvolution K f x) ∧ (∀ m ∈ p.support, ∀ i, m i ≤ 2 * (K - 1)) ∧ p.totalDegree ≤ d * (2 * (K - 1)) := by apply exists_mvPolynomial_of_coord_even_trig (q := tensorConvolution K f) · exact fun i x => tensorConvolution_coord_trig hK f hf x i · intro i x t have h := tensorConvolution_coord_even (K := K) f hf (update x i t) i simpa [update] using h
TensorGridWeights 3 core · 2 supporting The tensor product of the equispaced one-variable Lagrange formulas recovers every coefficient of a bounded coordinatewise degree polynomial from values at one fixed grid. ★ tensorGrid_coeff_recovery
Fixed tensor interpolation grid
The tensor product of the equispaced one-variable Lagrange formulas recovers every coefficient of a bounded coordinatewise degree polynomial from values at one fixed grid. The total absolute weight is controlled by the corresponding one-variable bound.
A tensor-grid index determines the corresponding point in the unit cube, whose coordinate in each direction is the index's entry there divided by D + 1.
Definition (Lean source)
A target coefficient index and a tensor-grid index determine the corresponding tensor interpolation weight: the product, over coordinates, of the one-variable equispaced Lagrange coefficient-recovery weights for the two indices' entries in that coordinate.
Definition (Lean source)
A multivariate polynomial, a coordinatewise degree bound, and a monomial index give an exact recovery of that coefficient from fixed tensor-grid evaluations.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
tensorGridPoint_mem_cubetheorem — Every fixed tensor interpolation node lies in the normalized cube.Proof (Lean source)
theorem tensorGridPoint_mem_cube {d D : ℕ} (b : Fin d → Fin (D + 1)) : tensorGridPoint b ∈ normalizedCube d := by intro i change -1 ≤ (b i : ℝ) / (D + 1) ∧ (b i : ℝ) / (D + 1) ≤ 1 have hD : (0 : ℝ) < D + 1 := by positivity have hb : (b i : ℝ) ≤ D := by exact_mod_cast le_of_lt_succ (b i).isLt constructor · apply (le_div_iff₀ hD).2 nlinarith [show (0 : ℝ) ≤ (b i : ℝ) by positivity] · apply (div_le_iff₀ hD).2 nlinarith -
tensorGrid_weight_oneNorm_letheorem — The total absolute tensor interpolation weight is at most the dth power of the one-variable exponential bound 2^(4D+4).hypothesesd D :ℕconclusion≤ ((2 : ℝ) ^ (4 * D + 4)) ^ dProof (Lean source)
theorem tensorGrid_weight_oneNorm_le (d D : ℕ) : (∑ a : Fin d → Fin (D + 1), ∑ b : Fin d → Fin (D + 1), |tensorGridWeight a b|) ≤ ((2 : ℝ) ^ (4 * D + 4)) ^ d := by classical have hsum : (∑ a : Fin d → Fin (D + 1), ∑ b : Fin d → Fin (D + 1), |tensorGridWeight a b|) = ∏ i : Fin d, ∑ k : Fin (D + 1), ∑ j : Fin (D + 1), |equispacedLagrangeWeight D k j| := by simp_rw [tensorGridWeight, Finset.abs_prod] conv_lhs => arg 2 ext a rw [← Fintype.prod_sum (fun i : Fin d => fun j : Fin (D + 1) => |equispacedLagrangeWeight D (a i) j|)] exact (Fintype.prod_sum (fun i : Fin d => fun k : Fin (D + 1) => ∑ j : Fin (D + 1), |equispacedLagrangeWeight D k j|)).symm rw [hsum] calc (∏ i : Fin d, ∑ k : Fin (D + 1), ∑ j : Fin (D + 1), |equispacedLagrangeWeight D k j|) ≤ ∏ _i : Fin d, (2 : ℝ) ^ (4 * D + 4) := by apply Finset.prod_le_prod · intro i hi positivity · intro i hi exact equispacedLagrange_weight_oneNorm D _ = ((2 : ℝ) ^ (4 * D + 4)) ^ d := by simp