Closed and Bounded but not compact Let $(C[0,1];d_{\infty})$ the metric space with $C[0,1]$ the continuous functions on $[0,1]$ and $d_{\infty}(f,g)=\max_{x \in[0,1]}|f(x)-g(x)|$
Prove that $$S=\{f:|f(x)| \leq 1\}$$ is closed and bounded but no compact.
My attempt: I've already proved that is bounded using a ball with radius $2$. But I can't figure out how can I prove that is closed and is not compact, I tried with the limit points and the complement but I'm lost.


Let $X = C([0, 1])$, with $d(f, g) = \sup_{0 \le x \le 1} |f(x) - g(x)|$. Let $B = \{f \in X: d(f, 0) \le 1\}$. Show that $B$ is closed and bounded, but $B$ is not compact.



*

*$B$ is bounded. Set $\|f\| = d(f, 0)$ for $f \in C([0, 1])$. Then $\|f\| \le 1$ for all $f \in B$.

*$B$ is closed. Let $f \in C([0, 1])$ be a limit point of $B$. Then there exists a Cauchy sequence $\{f_n\}$ such that$$\lim_{n \to \infty} d(f_n, f) = 0.$$Then$$\|f\| \le d(f, f_n) + d(f_n , 0) \le d(f, f_n) + 1$$for all $n$. Letting $n$ go to infinity, we get $\|f\| \le 1$. That is, $f \in B$.

*$B$ is not compact. For $n \ge 1$, we define$$g_n(x) = \begin{cases} 1 - nx & \text{if }0 \le x \le {1\over{n}} \\ 0 & \text{if }{1\over{n}} \le x \le 1.\end{cases}$$Then $g_n \in B$. Note that $g_n(x)$ is a decreasing function. Let $m < n$. Then$$g_m(x) - g_n(x) = \begin{cases} (n-m)x & \text{if }0 \le x \le {1\over{n}} \\ 1 - mx & \text{if } {1\over{n}} \le x \le {1\over{m}} \\ 0 & \text{ if} {1\over{m}} \le x \le 1.\end{cases}$$It is clear that$$d(g_m, g_n) = {{n-m}\over{n}} \ge {1\over{m+1}}.$$If $m > n$, then$$d(g_m, g_n) \ge {1\over{n+1}} \ge {1\over{m+1}}.$$This implies that $\{g_1, g_2, \dots\}$ is a bounded closed subset of $C([0, 1])$. Let$$U_0 = C([0, 1]) \setminus \{g_1, g_2, \dots\},$$which is clearly an open set. Also, set$$U_m = \left\{f \in C([0, 1]): d(f, g_m) < {1\over{2(m+1)}}\right\}$$for $m \in \mathbb{N}$. Then$$U_m \cap \{g_1, g_2, \dots\} = \{g_m\}$$and $U_m$ is an open set of $C([0, 1])$. It is clear that $\{U_i: i \ge 0\}$ is an open covering of $B$. But any finite number of $U_i$'s can not cover $B$.

