NLA-lib Explorer

NLAlib.exists_degree_le_or_alternatesOn

Library · theorem

The sign-block lemma behind the equioscillation theorem. Let e be continuous on [a, \mathbf{b}], E > 0 and \lvert e(a) \rvert = E. Either some real q of degree at most n has the sign of e at its extremal points, e(\mathbf{x})q(\mathbf{x}) > 0 at every \mathbf{x} \in [a, \mathbf{b}] with \lvert e(\mathbf{x}) \rvert = E, and the sign of e(a) to the left of a, e(a)q(\mathbf{x}) > 0 for every \mathbf{x} \le a; or e alternates at n + 2 points of \{\mathbf{x} \in [a, \mathbf{b}] : \lvert e(\mathbf{x}) \rvert = E\} with level E. The second clause of the first alternative is what makes the induction on n compose; the lemma is public so that the equioscillation theorem on compact sets and its weighted form reuse it. [Trefethen2019, Theorem 10.1] (the perturbation argument there, locator to check).

NLAlib.exists_degree_le_or_alternatesOn (n : ℕ) {e : ℝ → ℝ} {a b E : ℝ}
  (he : ContinuousOn e (Set.Icc a b)) (hE : 0 < E) (hab : a ≤ b) (hea : |e a| = E) :
  (∃ q,
      q.degree ≤ ↑n ∧
        (∀ x ∈ Set.Icc a b, |e x| = E → 0 < e x * Polynomial.eval x q) ∧
          ∀ x ≤ a, 0 < e a * Polynomial.eval x q) ∨
    AlternatesOn e {x | x ∈ Set.Icc a b ∧ |e x| = E} (n + 2) E

Full source on GitHub

Import NLAlib.Polynomial.Approximation.Equioscillation.