Theorem (exists_degree_le_isUniformApproxOn_minimaxError). A best approximation exists: for s compact and f continuous on s there is a real polynomial p of degree at most n with \lvert f(\mathbf{x}) - p(\mathbf{x}) \rvert \le E_n(f; s) on s. This is how a bound stated for an arbitrary approximant is restated with E_n. [Trefethen2019, Theorem 10.1]; [Rivlin1981, Ch. 1] (locators to check); there on [-1, 1] or an interval, here on any compact set, the empty set included.
Headline
Lean statement and details
NLAlib.exists_degree_le_isUniformApproxOn_minimaxError {f : ℝ → ℝ} {s : Set ℝ} (hs : IsCompact s)
(hf : ContinuousOn f s) (n : ℕ) :
∃ p,
p.degree ≤ ↑n ∧ Metric.IsUniformApproxOn (fun x ↦ Polynomial.eval x p) f s (minimaxError f s n)