Solution (source code)

= Solution

For real-valued $f\in C[-1,1]$, there is a unique <best uniform approximation> $p_*\in\mathcal P_n$, where $\mathcal P_n$ means degree at most $n$. If $E=\|f-p_*\|_\infty>0$, the <Chebyshev alternation theorem> characterizes it by the existence of $n+2$ ordered points
$$
-1\leq x_0<x_1<\cdots<x_{n+1}\leq1
$$
and a sign $\varepsilon\in\{-1,1\}$ such that
$$
\boxed{f(x_j)-p_*(x_j)=\varepsilon(-1)^jE,\qquad j=0,\ldots,n+1.}
$$
Conversely, a <polynomial> in $\mathcal P_n$ whose error has this alternation is the best one. If the best error is zero, $f$ itself is the exact <polynomial> approximant. The real-valued qualification matters: this sign-alternation formulation is not the corresponding criterion for arbitrary complex-valued approximation.

The obstruction to a strict improvement is concrete. If $q$ had smaller error at every alternation point, $q-p_*$ would have alternating strict signs there. The intermediate value theorem would give at least $n+1$ distinct zeros, impossible for a nonzero <polynomial> of degree at most $n$.