Mathlib.Analysis.Ehlich­Zeller­Mesh

Ehlich-Zeller mesh helpers: Chebyshev-Lobatto nodes, trigonometric transforms, mesh maxima, sup-norm transfer, and Bernstein/Szegő inequalities.

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_derivSzegő'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).

def czTrig reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

The trigonometric transform of a real polynomial R: czTrig R t = R(-cos t). For R of degree ≤ β this is an even trigonometric polynomial of degree ≤ β, and as t ranges over [0, π] the argument -cos t ranges over all of [-1, 1].

Definition (Lean source)
noncomputable def czTrig (R : Polynomial ℝ) (t : ℝ) : ℝ := R.eval (- cos t)
Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:46
def czSup reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

The sup-norm of the trigonometric transform of R over the compact interval [0, π]. By surjectivity of t ↦ -cos t this equals sup_{x∈[-1,1]} |R x|.

Definition (Lean source)
noncomputable def czSup (R : Polynomial ℝ) : ℝ := sSup ((fun t => |czTrig R t|) '' Icc 0 pi)
Causalean.Mathlib.Analysis.EhlichZellerMesh.czSup · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:51
theorem czTrig_szego_deriv reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

Szegő's differential inequality (the crux; not available in Mathlib). For a real polynomial of degree at most β and any real point t, the derivative of the polynomial's trigonometric transform at that point is bounded in absolute value by β times the square root of the sup-norm squared minus the transform's value at that point squared.

Formal statement
R :
β :
:
R.natDegree ≤ β
t :
|deriv (czTrig R) t| ≤ (β : ℝ) * sqrt ((czSup R) ^ 2 - (czTrig R t) ^ 2)
Proof (Lean source)
theorem czTrig_szego_deriv (R : Polynomial ℝ) (β : ℕ) (hβ : R.natDegree ≤ β) (t : ℝ) : |deriv (czTrig R) t| ≤ (β : ℝ) * sqrt ((czSup R) ^ 2 - (czTrig R t) ^ 2) := by let S : Polynomial ℝ := R.comp (-(Polynomial.X : Polynomial ℝ)) have hS_eval (x : ℝ) : S.eval x = R.eval (-x) := by simp [S] have hS_degree : S.natDegree ≤ β := by calc S.natDegree ≤ R.natDegree * (-(Polynomial.X : Polynomial ℝ)).natDegree := by simpa [S] using (Polynomial.natDegree_comp_le (p := R) (q := -(Polynomial.X : Polynomial ℝ))) _ = R.natDegree := by simp _ ≤ β := hβ have hS_bound : ∀ u, |S.eval (cos u)| ≤ czSup R := by intro u let v : ℝ := arccos (cos u) have hv : v ∈ Icc (0 : ℝ) pi := ⟨Real.arccos_nonneg (cos u), Real.arccos_le_pi (cos u)⟩ have hcos : cos v = cos u := by exact Real.cos_arccos (Real.neg_one_le_cos u) (Real.cos_le_one u) calc |S.eval (cos u)| = |R.eval (-cos u)| := by rw [hS_eval] _ = |czTrig R v| := by simp [czTrig, hcos] _ ≤ czSup R := abs_czTrig_le_czSup R hv have hsq := szego_deriv_sq_bound S β hS_degree (czSup R) hS_bound t have hsq' : (deriv (czTrig R) t) ^ 2 + (β : ℝ) ^ 2 * (czTrig R t) ^ 2 ≤ (β : ℝ) ^ 2 * (czSup R) ^ 2 := by have hfun : czTrig R = fun s => S.eval (cos s) := funext fun s => by simp [czTrig, hS_eval] rw [hfun] exact hsq by_cases hβ0 : β = 0 · have hderiv_sq_nonpos : (deriv (czTrig R) t) ^ 2 ≤ 0 := by simpa [hβ0] using hsq' have hderiv_zero : deriv (czTrig R) t = 0 := by nlinarith [sq_nonneg (deriv (czTrig R) t)] simp [hβ0, hderiv_zero] · have hβpos : 0 < (β : ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hβ0 have hrad_nonneg : 0 ≤ (czSup R) ^ 2 - (czTrig R t) ^ 2 := by have hq_le : (β : ℝ) ^ 2 * (czTrig R t) ^ 2 ≤ (β : ℝ) ^ 2 * (czSup R) ^ 2 := by nlinarith [hsq', sq_nonneg (deriv (czTrig R) t)] have hβsq_pos : 0 < (β : ℝ) ^ 2 := sq_pos_of_pos hβpos nlinarith have hsq_bound : (deriv (czTrig R) t) ^ 2 ≤ ((β : ℝ) * sqrt ((czSup R) ^ 2 - (czTrig R t) ^ 2)) ^ 2 := by rw [mul_pow, Real.sq_sqrt hrad_nonneg] nlinarith [hsq'] exact abs_le_of_sq_le_sq hsq_bound (by positivity)
Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_szego_deriv · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:90 · uses czSup , czTrig
theorem czTrig_arccos_lipschitz reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

Arccos-Lipschitz reformulation of Szegő's inequality. For a real polynomial of degree at most β with a strictly positive trigonometric sup-norm on [0, π], and for any two points in [0, π], the arccosine of the polynomial's normalized trigonometric transform is β-Lipschitz between those two points: the difference of the two arccosine values is bounded by β times the distance between the points.

Formal statement
R :
β :
:
R.natDegree ≤ β
hM :
0 < czSup R
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|
Proof (Lean source)
theorem czTrig_arccos_lipschitz (R : Polynomial ℝ) (β : ℕ) (hβ : R.natDegree ≤ β) (hM : 0 < czSup R) {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 ε : ℕ → ℝ := fun n => 1 / ((n : ℝ) + 1) let lhsε : ℕ → ℝ := fun n => |arccos (czTrig R t / (czSup R + ε n)) - arccos (czTrig R s / (czSup R + ε n))| have hεpos (n : ℕ) : 0 < ε n := by dsimp [ε] positivity have hineq : ∀ n, lhsε n ≤ (β : ℝ) * |t - s| := by intro n simpa [lhsε, ε] using czTrig_arccos_lipschitz_regularized R β hβ (hδ := hεpos n) hs ht have hε_tendsto : Tendsto ε atTop (nhds 0) := by simpa [ε, Nat.cast_add, cast_one] using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)) have ht_arg_tendsto : Tendsto (fun n => czTrig R t / (czSup R + ε n)) atTop (nhds (czTrig R t / czSup R)) := by have hden : Tendsto (fun n => czSup R + ε n) atTop (nhds (czSup R)) := by simpa using tendsto_const_nhds.add hε_tendsto exact tendsto_const_nhds.div hden (ne_of_gt hM) have hs_arg_tendsto : Tendsto (fun n => czTrig R s / (czSup R + ε n)) atTop (nhds (czTrig R s / czSup R)) := by have hden : Tendsto (fun n => czSup R + ε n) atTop (nhds (czSup R)) := by simpa using tendsto_const_nhds.add hε_tendsto exact tendsto_const_nhds.div hden (ne_of_gt hM) have ht_acos_tendsto : Tendsto (fun n => arccos (czTrig R t / (czSup R + ε n))) atTop (nhds (arccos (czTrig R t / czSup R))) := Real.continuous_arccos.tendsto _ |>.comp ht_arg_tendsto have hs_acos_tendsto : Tendsto (fun n => arccos (czTrig R s / (czSup R + ε n))) atTop (nhds (arccos (czTrig R s / czSup R))) := Real.continuous_arccos.tendsto _ |>.comp hs_arg_tendsto have hlhs_tendsto : Tendsto lhsε atTop (nhds |arccos (czTrig R t / czSup R) - arccos (czTrig R s / czSup R)|) := by simpa [lhsε, Real.norm_eq_abs] using (ht_acos_tendsto.sub hs_acos_tendsto).norm exact le_of_tendsto_of_tendsto hlhs_tendsto tendsto_const_nhds (Filter.Eventually.of_forall hineq)
Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_arccos_lipschitz · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:269 · uses czSup , czTrig
theorem czTrig_maximizer_bound reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

Maximizer node bound (the packaged output consumed by the mesh file). For a real polynomial of degree at most β with a strictly positive trigonometric sup-norm, suppose a point t₀ in [0, π] is a maximizer where the trigonometric transform attains the sup-norm, another point s also lies in [0, π], and the two points are close enough that β times their distance is at most π/2. Then the trigonometric transform at s is bounded below by the sup-norm times the cosine of β times the distance between the two points.

Formal statement
R :
β :
:
R.natDegree ≤ β
hM :
0 < czSup R
t₀ s :
ht₀ :
t₀ ∈ Icc 0 pi
hs :
s ∈ Icc 0 pi
hmax :
czTrig R t₀ = czSup R
hclose :
(β : ℝ) * |t₀ - s| ≤ pi / 2
czSup R * cos ((β : ℝ) * |t₀ - s|) ≤ czTrig R s
Proof (Lean source)
theorem czTrig_maximizer_bound (R : Polynomial ℝ) (β : ℕ) (hβ : R.natDegree ≤ β) (hM : 0 < czSup R) {t₀ s : ℝ} (ht₀ : t₀ ∈ Icc 0 pi) (hs : s ∈ Icc 0 pi) (hmax : czTrig R t₀ = czSup R) (hclose : (β : ℝ) * |t₀ - s| ≤ pi / 2) : czSup R * cos ((β : ℝ) * |t₀ - s|) ≤ czTrig R s := by let φ : ℝ → ℝ := fun u => arccos (czTrig R u / czSup R) have hφt₀ : φ t₀ = 0 := by unfold φ rw [hmax] rw [div_self (ne_of_gt hM)] exact Real.arccos_one have hLip := czTrig_arccos_lipschitz R β hβ hM ht₀ hs have hLip' : |φ s - φ t₀| ≤ (β : ℝ) * |s - t₀| := by simpa [φ] using hLip have hφs_le : φ s ≤ (β : ℝ) * |t₀ - s| := by have hnonneg : 0 ≤ φ s := by unfold φ exact Real.arccos_nonneg _ rw [hφt₀, sub_zero, abs_of_nonneg hnonneg] at hLip' rwa [abs_sub_comm] at hLip' have hx_le_pi : (β : ℝ) * |t₀ - s| ≤ pi := by linarith [Real.pi_nonneg] have hcos_le : cos ((β : ℝ) * |t₀ - s|) ≤ cos (φ s) := by exact Real.cos_le_cos_of_nonneg_of_le_pi (by unfold φ; exact Real.arccos_nonneg _) hx_le_pi hφs_le have hratio_abs : |czTrig R s / czSup R| ≤ 1 := by rw [abs_div, abs_of_pos hM] exact (div_le_one hM).2 (abs_czTrig_le_czSup R hs) have hcosφ : cos (φ s) = czTrig R s / czSup R := by unfold φ exact Real.cos_arccos (abs_le.mp hratio_abs).1 (abs_le.mp hratio_abs).2 have hmul := mul_le_mul_of_nonneg_left (hcos_le.trans_eq hcosφ) hM.le calc czSup R * cos ((β : ℝ) * |t₀ - s|) ≤ czSup R * (czTrig R s / czSup R) := hmul _ = czTrig R s := by field_simp [ne_of_gt hM]
Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_maximizer_bound · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:325 · uses czSup , czTrig
5 supporting declarations (lemmas, instances)
  • czTrig_continuous theorem — czTrig R is continuous (composition of the polynomial evaluation with t ↦ -cos t).
    R :
    Proof (Lean source)
    theorem czTrig_continuous (R : Polynomial ℝ) : Continuous (czTrig R) := by unfold czTrig fun_prop
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_continuous · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:56
  • czSup_attained theorem — The sup-norm czSup R is attained at some point of [0, π]: there is t₀ ∈ [0, π] with |czTrig R t₀| = czSup R. This is the extreme-value theorem applied to the continuous map |czTrig R| on the compact interval [0, π].
    R :
    ∃ t₀ ∈ Icc (0 : ℝ) pi, |czTrig R t₀| = czSup R
    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⟩
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czSup_attained · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:62
  • czSup_nonneg theorem — czSup R is nonnegative (it is a supremum of absolute values).
    R :
    0 ≤ czSup R
    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 _
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czSup_nonneg · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:75
  • abs_czTrig_le_czSup theorem — Every trigonometric value is bounded by the sup-norm: |czTrig R t| ≤ czSup R for all t ∈ [0, π].
    R :
    t :
    ht :
    t ∈ Icc (0 : ℝ) pi
    |czTrig R t| ≤ czSup R
    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)
    Causalean.Mathlib.Analysis.EhlichZellerMesh.abs_czTrig_le_czSup · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:81
  • czTrig_arccos_lipschitz_regularized theorem — For a real polynomial of degree at most β, the arccosine of its cosine-polynomial transform normalized by its supremum plus a positive constant is Lipschitz on [0, π] with constant β.
    R :
    β :
    :
    R.natDegree ≤ β
    δ :
    :
    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|
    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
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_arccos_lipschitz_regularized · Causalean/Mathlib/Analysis/EhlichZellerMesh/Bernstein.lean:153
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.EhlichZellerMesh.Bernstein.

## Standard reference Ehlich, H. & Zeller, K. (1964), Schwankung von Polynomen zwischen Gitterpunkten, Math. Z. 86, 41–44.

def czNode reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

The j-th Chebyshev–Lobatto (extrema) node on [-1, 1] for a mesh of order k: czNode k j = -cos(π j / k). When 0 < k, the indices j = 0..k give k+1 points with endpoints czNode k 0 = -1 and czNode k k = 1.

Definition (Lean source)
noncomputable def czNode (k : ℕ) (j : ℕ) : ℝ := - cos (pi * j / k)
Causalean.Mathlib.Analysis.EhlichZellerMesh.czNode · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:40
def czMeshMax reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

The mesh maximum: max_{0 ≤ j ≤ k} |R(x_j)|, written as a bounded supremum over Finset.range (k+1). Since each summand is ≥ 0 and the index set is finite and nonempty, this is the ordinary finite maximum.

Definition (Lean source)
noncomputable def czMeshMax (R : Polynomial ℝ) (k : ℕ) : ℝ := ⨆ j ∈ range (k + 1), |R.eval (czNode k j)|
Causalean.Mathlib.Analysis.EhlichZellerMesh.czMeshMax · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:45
theorem ehlichZeller_mesh_bound reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

Ehlich–Zeller mesh (norming) inequality. For a real polynomial of degree at most β and a mesh order k strictly exceeding β, with Chebyshev–Lobatto nodes x_j = -cos(π j / k) for j = 0, …, k, the polynomial's supremum absolute value on [-1, 1] is bounded by the secant of π β / (2k) times the maximum of its absolute values at the mesh nodes.

Formal statement
R :
β k :
:
R.natDegree ≤ β
hk :
β < k
sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1)
≤ (1 / cos (pi * β / (2 * k))) * czMeshMax R k
Proof (Lean source)
theorem ehlichZeller_mesh_bound (R : Polynomial ℝ) (β k : ℕ) (hβ : R.natDegree ≤ β) (hk : β < k) : sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1) ≤ (1 / cos (pi * β / (2 * k))) * czMeshMax R k := by refine (czMeshLHS_le_czSup R).trans ?_ by_cases hzero : czSup R = 0 · rw [hzero] exact mul_nonneg (one_div_nonneg.mpr (mesh_cos_pos hk).le) (czMeshMax_nonneg R k) · have hM : 0 < czSup R := lt_of_le_of_ne (czSup_nonneg R) (by exact fun h => hzero h.symm) obtain ⟨t₀, ht₀, habs⟩ := czSup_attained R rcases abs_choice (czTrig R t₀) with hpos | hneg · have hmax : czTrig R t₀ = czSup R := by linarith exact ehlichZeller_mesh_bound_of_pos_max R β k hβ hk hM ht₀ hmax · have hmax_neg : czTrig (-R) t₀ = czSup (-R) := by rw [czTrig_neg, czSup_neg] linarith have hβneg : (-R).natDegree ≤ β := by simpa [Polynomial.natDegree_neg] using hβ have hMneg : 0 < czSup (-R) := by simpa [czSup_neg] using hM have hbound := ehlichZeller_mesh_bound_of_pos_max (-R) β k hβneg hk hMneg ht₀ hmax_neg simpa [czSup_neg, czMeshMax_neg] using hbound
Causalean.Mathlib.Analysis.EhlichZellerMesh.ehlichZeller_mesh_bound · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:267 · uses czMeshMax
theorem oversampled_norming reviewed
Causalean.Mathlib.Analysis.EhlichZellerMesh

Oversampled Chebyshev–Lobatto norming (constant depending only on the oversampling ratio). For an oversampling ratio strictly greater than one, a polynomial degree bound of at least one, a real polynomial whose degree does not exceed that bound, and a mesh order at least the oversampling ratio times the degree bound, the polynomial's supremum absolute value on [-1, 1] is bounded by the secant of π / (2c) times the maximum of its absolute values at the mesh nodes — a norming constant depending only on the oversampling ratio, uniformly in the degree bound.

Formal statement
R :
β k :
c :
hc :
1 < c
:
1 ≤ β
hβR :
R.natDegree ≤ β
hk :
(c * β) ≤ k
sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1)
≤ (1 / cos (pi / (2 * c))) * czMeshMax R k
Proof (Lean source)
theorem oversampled_norming (R : Polynomial ℝ) (β k : ℕ) (c : ℝ) (hc : 1 < c) (hβ : 1 ≤ β) (hβR : R.natDegree ≤ β) (hk : (c * β) ≤ k) : sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1) ≤ (1 / cos (pi / (2 * c))) * czMeshMax R k := by have hβposℝ : 0 < (β : ℝ) := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hβ) have hβ_lt_cβ : (β : ℝ) < c * β := by nlinarith [hc, hβposℝ] have hβ_lt_kℝ : (β : ℝ) < k := hβ_lt_cβ.trans_le hk have hk' : β < k := by exact_mod_cast hβ_lt_kℝ refine (ehlichZeller_mesh_bound R β k hβR hk').trans ?_ have hk_nat : 0 < k := by omega have hkℝ : 0 < (k : ℝ) := by exact_mod_cast hk_nat have hcpos : 0 < c := lt_trans zero_lt_one hc have hangle_le : pi * β / (2 * k) ≤ pi / (2 * c) := by field_simp [ne_of_gt hkℝ, ne_of_gt hcpos] nlinarith [Real.pi_pos, hk] have hsmall_lt : pi / (2 * c) < pi / 2 := by field_simp [ne_of_gt hcpos] nlinarith [Real.pi_pos, hc] have hsmall_nonneg : 0 ≤ pi / (2 * c) := by positivity have hsmall_le_pi : pi / (2 * c) ≤ pi := by linarith [hsmall_lt, Real.pi_pos] have hangle_nonneg : 0 ≤ pi * β / (2 * k) := by positivity have hcos_order : cos (pi / (2 * c)) ≤ cos (pi * β / (2 * k)) := Real.cos_le_cos_of_nonneg_of_le_pi hangle_nonneg hsmall_le_pi hangle_le have hcos_small_pos : 0 < cos (pi / (2 * c)) := Real.cos_pos_of_mem_Ioo ⟨by linarith [hsmall_nonneg, Real.pi_pos], hsmall_lt⟩ have hcoef : 1 / cos (pi * β / (2 * k)) ≤ 1 / cos (pi / (2 * c)) := one_div_le_one_div_of_le hcos_small_pos hcos_order exact mul_le_mul_of_nonneg_right hcoef (czMeshMax_nonneg R k)
Causalean.Mathlib.Analysis.EhlichZellerMesh.oversampled_norming · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:304 · uses czMeshMax
9 supporting declarations (lemmas, instances)
  • czTrig_at_meshParam theorem — The trigonometric transform evaluated at the mesh parameter t = π j / k recovers the node value: czTrig R (π j / k) = R(czNode k j).
    R :
    k j :
    czTrig R (pi * j / k) = R.eval (czNode k j)
    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]
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_at_meshParam · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:51
  • exists_meshParam_close theorem — Node-selection lemma. For k ≥ 1 and any t₀ ∈ [0, π] there is a mesh index j ≤ k whose parameter π j / k is within π / (2k) of t₀: |t₀ − π j / k| ≤ π / (2k). (The k mesh parameters partition [0, π] into subintervals of length π / k, so every point is within a half-step of a node.)
    k :
    hk :
    0 < k
    t₀ :
    ht₀ :
    t₀ ∈ Icc (0 : ℝ) pi
    ∃ j ∈ range (k + 1), |t₀ - pi * j / k| ≤ pi / (2 * k)
    Proof (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]
    Causalean.Mathlib.Analysis.EhlichZellerMesh.exists_meshParam_close · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:57
  • czMeshLHS_le_czSup theorem — Sup transfer. The [-1, 1] sup-norm of R equals the sup-norm of its trigonometric transform on [0, π]: since t ↦ -cos t maps [0, π] *onto* [-1, 1], sup_{x∈[-1,1]} |R x| ≤ czSup R (in fact with equality).
    R :
    sSup ((fun x => |R.eval x|) '' Icc (-1 : ℝ) 1) ≤ czSup R
    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
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czMeshLHS_le_czSup · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:117
  • eval_node_le_czMeshMax theorem — The mesh maximum lower-bounds every node value it ranges over.
    R :
    k :
    j :
    hj :
    j ∈ range (k + 1)
    |R.eval (czNode k j)| ≤ czMeshMax R k
    Proof (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
    Causalean.Mathlib.Analysis.EhlichZellerMesh.eval_node_le_czMeshMax · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:133
  • czMeshMax_nonneg lemma — The mesh maximum of the absolute values of a real polynomial at the Chebyshev–Lobatto nodes is nonnegative.
    R :
    k :
    0 ≤ czMeshMax R k
    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)
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czMeshMax_nonneg · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:155
  • czTrig_neg lemma — Negating a real polynomial negates its trigonometric transform at every point.
    R :
    t :
    czTrig (-R) t = -czTrig R t
    Proof (Lean source)
    lemma czTrig_neg (R : Polynomial ℝ) (t : ℝ) : czTrig (-R) t = -czTrig R t := by simp [czTrig, Polynomial.eval_neg]
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czTrig_neg · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:162
  • czSup_neg lemma — Negating a real polynomial leaves unchanged the supremum of the absolute value of its trigonometric transform over the cosine interval.
    R :
    czSup (-R) = czSup R
    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]⟩
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czSup_neg · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:167
  • czMeshMax_neg lemma — Negating a real polynomial leaves unchanged its mesh maximum at the Chebyshev–Lobatto nodes.
    R :
    k :
    czMeshMax (-R) k = czMeshMax R k
    Proof (Lean source)
    lemma czMeshMax_neg (R : Polynomial ℝ) (k : ℕ) : czMeshMax (-R) k = czMeshMax R k := by simp [czMeshMax, Polynomial.eval_neg]
    Causalean.Mathlib.Analysis.EhlichZellerMesh.czMeshMax_neg · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:179
  • meshParam_mem_Icc lemma — For a positive mesh order, every valid Chebyshev–Lobatto mesh parameter lies in the interval from zero to π.
    k :
    hk :
    0 < k
    j :
    hj :
    j ∈ range (k + 1)
    pi * j / k ∈ Icc (0 : ℝ) pi
    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 := Nat.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]
    Causalean.Mathlib.Analysis.EhlichZellerMesh.meshParam_mem_Icc · Causalean/Mathlib/Analysis/EhlichZellerMesh/Mesh.lean:185