Weierstrass's Theorem/Lemma 1

Lemma for Weierstrass's Theorem
Let $C \closedint 0 1$ denote the set of all real functions $f: \closedint 0 1 \to \R$ which are continuous on $\closedint 0 1$.

Let $\norm {\,\cdot \,}_\infty$ denote the supremum norm on $C$.

Let $X$ consist of the $f \in C \closedint 0 1$ such that:
 * $\map f 0 = 0$
 * $\map f 1 = 1$
 * $\forall x \in \closedint 0 1: 0 \le \map f x \le 1$

$X$ is a complete metric space under $\norm {\,\cdot \,}_\infty$.

Proof
For every $n \in \N$, let $f_n \in X$.

that in $C \closedint 0 1$:

If we can prove that $f \in X$, we know $X$ contains all its limit points.

Hence by Closed Set iff Contains all its Limit Points, $X$ is closed.

From Topological Completeness is Weakly Hereditary, $X$ is complete.

It is now to be proved that $f \in X$.

Suppose $\map f 0 \ne 0$.

Then:
 * $\forall n \in \N: \norm {f_n - f}_\infty \ge \size {\map {f_n} 0 - \map f 0} = \size {\map f 0} > 0$

This would contradict equation $(1)$.

Hence $\map f 0 = 0$.

Similarly, it is necessary that $\map f 1 = 1$.

Also, for all $n \in \N$ and $x \in \closedint 0 1$, we have that:
 * $0 \le \map {f_n} x \le 1$

Suppose there is an $x \in \closedint 0 1$ such that either:
 * $\map f x < 0$

or:
 * $\map f x > 1$

We see that it must be that:
 * $\forall n \in \N: \norm {f_n - f}_\infty \ge \norm {\map {f_n} x - \map f x} > 0$

which contradicts $(1)$.

Therefore, $f \in X$, and hence $X$ is complete.