I want to show, that the set $M:=\{f\in C([0,1],\mathbb{R})|\|f\|_\infty\leq 1, f\geq 0\}$ is closed and bounded, but not compact.
Therefor this is a counterexample to Heine-Borel.
I am struggeling to show, that it is not compact, because I have no real clue, on how to tackle this. I would like to try going by the definition and give an open covering of $M$ which has not a finite subcovering. But I do not know, what an open covering of $M$ would look like, since it contains functions...
Showing that $M$ is bounded ist trivial. Since $f\geq 0$ and $\|f\|_\infty\leq 1$, we have $0\leq |f(x)|\leq 1$ for all $x\in [0,1]$. Therefor $M$ is bounded.
For showing, that $M$ is closed I tried this:
Let $(f_n)_{n\in\mathbb{N}}\subset M$ and $(f_n)$ converges in $C([0,1],\mathbb{R})$. I have to show, that $\lim_{n\to\infty} f_n=f\in M$.
Therefor $f\geq 0$ and $\|f\|_\infty\leq 1$ and $f\in C([0,1],\mathbb{R})$
$f\geq 0$ is trivial.
For $\|f\|_\infty\leq 1$ I tried:
Let $(f_n)_{n\in\mathbb{N}}\subset M$ for all $n\geq m$. Since $\lim_{n\to\infty} f_n=f$ it exists for $\epsilon=1$ a $p\geq m$ such that for every $x\in [0,1]$ holds:
$|f(x)|-|f_p(x)|\leq |f(x)-f_p(x)|<1$.
Hence, $|f(x)|<1+|f_p(x)|\leq 1+\|f_p\|_\infty$
For $p\to\infty$ we have $\|f_p\|_\infty\to 0$ and we conclude $|f(x)|\leq 1$. And as desired $\|f\|_\infty\leq 1$.
Also $f\in C([0,1],\mathbb{R})$, because $(f_n)\in C([0,1],\mathbb{R})$ for all $n\in\mathbb{N}$.
Is this correct so far?
How can I show, that $M$ is not compact? What would an open covering look like? Can we show it straight from the definition, or might a theorem be useful (I checkt in my notes, but nothing seemed fitting so far).
Hints are apprechiated. Thanks in advance.
It suffices to show that $M$ is not sequentially compact. Consider the sequence $f_n(x)=x^n\in M$. Is there any subsequence which is convergent to some $f\in M$? Note that $x^n\to 0$ when $x\in[0,1)$ and $x^n\to 1$ for $x=1$.
P.S. Your proof for $\|f\|_\infty\leq 1$ needs some revision. Let $\epsilon>0$, then ther is $p$ such that $\|f-f_p\|_\infty<\epsilon$ and therefore $$\|f\|_\infty\leq \|f_p\|_\infty+\|f-f_p\|_\infty< 1 +\epsilon.$$ which implies that $\|f\|_\infty\leq 1$.