[proofplan]
Existence is supplied by the finite-dimensional existence theorem for best approximation in $C(K)$, applied to the [compact space](/page/Compact%20Space) $K = [a,b]$. For uniqueness, assume two distinct best approximants exist and take their midpoint $h$ and half-difference $w$. Convexity of the uniform norm shows that $h$ is again best; the Haar alternation lemma then gives $n+1$ alternating extremal points for the residual $f-h$. At each of those points the two residual inequalities for the original approximants force $w$ to vanish, contradicting the Haar property because $w$ is a nonzero element of the $n$-dimensional Haar space.
[/proofplan]
[step:Apply finite-dimensional existence of best uniform approximants]
Let $K := [a,b]$, regarded as a compact [topological space](/page/Topological%20Space) with its usual topology, and let $\|\cdot\|_\infty: C(K;\mathbb{R}) \to [0,\infty)$ be the uniform norm, defined for each $g \in C(K;\mathbb{R})$ by
\begin{align*}
\|g\|_\infty := \sup_{t \in K} |g(t)|.
\end{align*} Since $V$ is finite-dimensional, the finite-dimensional existence theorem for best approximation in $C(K)$ applies to the finite-dimensional subspace $V \subset C(K;\mathbb{R})$ (citing a result not yet in the wiki: finite-dimensional existence theorem for best approximation in $C(K)$). Hence, for each $f \in C([a,b];\mathbb{R})$, there exists at least one $v_0 \in V$ satisfying
\begin{align*}
\|f - v_0\|_\infty = \inf_{v \in V} \|f - v\|_\infty.
\end{align*}
[/step]
[step:Assume two best approximants and pass to their midpoint]
Fix $f \in C([a,b];\mathbb{R})$. Suppose, toward a contradiction, that $u,v \in V$ are distinct best approximants to $f$. Define the common minimal error $E \in [0,\infty)$ by
\begin{align*}
E := \|f-u\|_\infty = \|f-v\|_\infty = \inf_{z \in V} \|f-z\|_\infty.
\end{align*}
Define $h: [a,b] \to \mathbb{R}$ by
\begin{align*}
h(t) := \frac{u(t)+v(t)}{2}
\end{align*}
for every $t \in [a,b]$, and define $w: [a,b] \to \mathbb{R}$ by
\begin{align*}
w(t) := \frac{u(t)-v(t)}{2}
\end{align*}
for every $t \in [a,b]$.
Since $V$ is a real vector subspace of $C([a,b];\mathbb{R})$, both $h$ and $w$ lie in $V$. Since $u \ne v$, the function $w$ is nonzero. Also, if $E=0$, then $\|f-u\|_\infty=0$ and $\|f-v\|_\infty=0$, so $u=f=v$ on $[a,b]$, contradicting $u \ne v$. Hence $E>0$.
By convexity of the norm $\|\cdot\|_\infty$,
\begin{align*}
\|f-h\|_\infty \le \frac{1}{2}\|f-u\|_\infty + \frac{1}{2}\|f-v\|_\infty.
\end{align*}
Substituting the definition of $E$ gives
\begin{align*}
\|f-h\|_\infty \le E.
\end{align*}
Since $E$ is the infimum of $\|f-z\|_\infty$ over $z \in V$ and $h \in V$, we also have $E \le \|f-h\|_\infty$. Therefore
\begin{align*}
\|f-h\|_\infty = E,
\end{align*}
so $h$ is a best approximant to $f$ from $V$.
[/step]
[step:Use alternation for the residual of the midpoint]
Define the residual map $r: [a,b] \to \mathbb{R}$ by
\begin{align*}
r(t) := f(t)-h(t)
\end{align*}
for every $t \in [a,b]$.
Since $h$ is a best approximant to $f$ from the $n$-dimensional Haar space $V$, and since $\|r\|_\infty = E>0$, the [alternation lemma for Haar spaces](/theorems/6864) applies (citing a result not yet in the wiki: alternation lemma for Haar spaces). Thus there exist points
\begin{align*}
a \le t_0 < t_1 < \cdots < t_n \le b
\end{align*}
and a sign $\sigma \in \{-1,1\}$ such that, for every index $i \in \{0,\dots,n\}$,
\begin{align*}
r(t_i) = \sigma(-1)^i E.
\end{align*}
[guided]
The purpose of this step is to convert the abstract best-approximation property of $h$ into concrete pointwise information. We define the residual map $r: [a,b] \to \mathbb{R}$ by
\begin{align*}
r(t) := f(t)-h(t)
\end{align*}
for every $t \in [a,b]$.
Because $f,h \in C([a,b];\mathbb{R})$, the residual $r$ is continuous. From the previous step, $h$ is a best approximant to $f$ from $V$, and
\begin{align*}
\|r\|_\infty = \|f-h\|_\infty = E.
\end{align*}
We have already proved that $E>0$, so the residual is not the zero residual.
Now we invoke the alternation lemma for Haar spaces (citing a result not yet in the wiki: alternation lemma for Haar spaces). Its hypotheses are satisfied: $V$ is an $n$-dimensional Haar subspace of $C([a,b];\mathbb{R})$, the function $h \in V$ is a best uniform approximant to $f$, and the residual norm is positive. The lemma yields $n+1$ distinct ordered points
\begin{align*}
a \le t_0 < t_1 < \cdots < t_n \le b
\end{align*}
at which the residual reaches its maximal absolute value with alternating signs. Therefore there exists a sign $\sigma \in \{-1,1\}$ such that, for every $i \in \{0,\dots,n\}$,
\begin{align*}
r(t_i) = \sigma(-1)^i E.
\end{align*}
This is the key point where the Haar hypothesis enters: an $n$-dimensional Haar space forces a best residual to oscillate at $n+1$ extremal points.
[/guided]
[/step]
[step:Show the half-difference vanishes at every alternation point]
Since $u = h+w$ and $v = h-w$, the residuals of $u$ and $v$ are
\begin{align*}
f-u = r-w
\end{align*}
and
\begin{align*}
f-v = r+w.
\end{align*}
Because $u$ and $v$ are best approximants with error $E$, for every $t \in [a,b]$,
\begin{align*}
|r(t)-w(t)| \le E
\end{align*}
and
\begin{align*}
|r(t)+w(t)| \le E.
\end{align*}
Fix $i \in \{0,\dots,n\}$. Define $\varepsilon_i := \sigma(-1)^i \in \{-1,1\}$. At the alternation point $t_i$, we have $r(t_i)=\varepsilon_i E$. The two inequalities become
\begin{align*}
|\varepsilon_i E - w(t_i)| \le E
\end{align*}
and
\begin{align*}
|\varepsilon_i E + w(t_i)| \le E.
\end{align*}
Define the real number $s_i := \varepsilon_i w(t_i)$. Multiplying inside the absolute value by $\varepsilon_i$, whose absolute value is $1$, gives
\begin{align*}
|E-s_i| \le E
\end{align*}
and
\begin{align*}
|E+s_i| \le E.
\end{align*}
The [first inequality](/theorems/2897) implies $0 \le s_i \le 2E$, while the second implies $-2E \le s_i \le 0$. Hence $s_i=0$, and therefore $w(t_i)=0$.
Since this holds for every $i \in \{0,\dots,n\}$, the nonzero function $w \in V$ has zeros at the $n+1$ distinct points $t_0,\dots,t_n$.
[/step]
[step:Contradict the Haar property and conclude uniqueness]
The Haar property of $V$ says that every nonzero element of $V$ has at most $n-1$ distinct zeros in $[a,b]$. But $w \in V$ is nonzero and has at least the $n+1$ distinct zeros $t_0,\dots,t_n$. This contradiction shows that two distinct best approximants cannot exist.
Combining this uniqueness with the existence proved above, for every $f \in C([a,b];\mathbb{R})$ there exists a unique $v_0 \in V$ such that
\begin{align*}
\|f-v_0\|_\infty = \inf_{v \in V} \|f-v\|_\infty.
\end{align*}
This proves the theorem.
[/step]