Mathlib.Analysis.EhlichZellerMesh
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_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).
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)
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|.
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
Proof (Lean source)
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
Proof (Lean source)
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
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
czTrig_continuoustheorem — czTrig R is continuous (composition of the polynomial evaluation with t ↦ -cos t).Proof (Lean source)
-
czSup_attainedtheorem — 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, π].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 — czSup R is nonnegative (it is a supremum of absolute values).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 — Every trigonometric value is bounded by the sup-norm: |czTrig R t| ≤ czSup R for all t ∈ [0, π].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 — 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 β.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
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.
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.
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)
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
Proof (Lean source)
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
Proof (Lean source)
9 supporting declarations (lemmas, instances)
-
czTrig_at_meshParamtheorem — The trigonometric transform evaluated at the mesh parameter t = π j / k recovers the node value: czTrig R (π j / k) = R(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] -
exists_meshParam_closetheorem — 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.)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 [-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).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 — The mesh maximum lower-bounds every node value it ranges over.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 of the absolute values of a real polynomial at the Chebyshev–Lobatto nodes 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 negates its trigonometric transform at every point.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 unchanged the supremum of the absolute value of its trigonometric transform over the cosine interval.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 unchanged its mesh maximum at the Chebyshev–Lobatto nodes.Proof (Lean source)
lemma czMeshMax_neg (R : Polynomial ℝ) (k : ℕ) : czMeshMax (-R) k = czMeshMax R k := by simp [czMeshMax, Polynomial.eval_neg] -
meshParam_mem_Icclemma — For a positive mesh order, every valid Chebyshev–Lobatto mesh parameter lies in the interval from zero to π.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]