# $X$ metric separable then $C(X)$ separable

Is it true, that if $X$ is a separable metric space, then the space of all continuous functions on $X$ with the supremum metric is also separable?

-
I don't think it necessarily is. Consider the discrete metric space on $\Bbb N$. Then the set of bounded continuous functions is the space of bounded sequences $\ell^{\infty}$ which, if I remember correctly, is not separable. –  Olivier Bégassat Feb 12 '13 at 11:48
–  Davide Giraudo Feb 12 '13 at 12:26

No. Consider triangle-shaped function $$\varphi(x)=\max(1-2|x|,0)$$ then for each binary sequence $s:\mathbb{N}\to\{0,1\}$ we define $$f_s(x)=\sum\limits_{n=1}^\infty s(n)\varphi(x-n)$$ One can show that $\{f_s:s\in\{0,1\}^\mathbb{N}\}$ is uncountable set of functions with the property $$s'\neq s''\implies \Vert f_{s'}-f_{s''}\Vert_{C(\mathbb{R})}\geq 1$$ This implies that $C_b(\mathbb{R})$ is not separable.
@Josef: The linked post applies Stone-Weierstrass to deduce density. This theorem needs compactness for $C(X)$ or local compactness for the space $C_0(X)$ of functions vanishing at infinity. A further point you are missing is that the sup-metric is not really defined on all of $C(X)$, but on the bounded functions only. –  Martin Feb 12 '13 at 13:16