# Question about proof that $C(X)$ is separable

In my notes we prove Stone-Weierstrass which tells us that if we have a subalgebra $A$ of $C(X)$ such that it separates points and contains the constants then its closure (w.r.t. $\|\cdot\|_\infty$) is $C(X)$.

A few chapters later there is a lemma that if $X$ is a compact metric space then $C(X)$ is separable. The proof constructs a subalgebra that separates points by taking a dense countable subset of $X$, $\{x_n\}$, and defining $f_n (x) = d(x,x_n)$.

Question: could we treat this as a corollary of Stone-Weierstrass and say that polynomials with rational coefficients are a subalgebra containing $1$ and separating points? Thank you.

-
I'm not sure what your question is. Yes, separability is a consequence of the algebra you constructed and the application of Stone-Weierstrass. And yes, polynomials are dense in, say, $C(K)$ if $K$ is a compact subset of the reals or the complex numbers, because the polynomials fulfil the prerequisites of Stone-Weierstrass. But what has your metric space to do with polynomials? – user20266 Aug 4 '12 at 9:18
Thank you, @Martin! – Rudy the Reindeer Aug 4 '12 at 9:19
@Martin Sleziak How do you define polynomials on arbitrary metric space? – Norbert Aug 4 '12 at 9:24
@MattN, we can define anything we want, but will this newborn object good for our needs? So we come another more difficult question. – Norbert Aug 4 '12 at 9:48
@MattN. Sure you can define anything as long it is well defined. With this particular defintion of polynomial, however, I assume that a lot of people will complain. But these are then not the polynomials for which you have shown that S-W can be applied to them. But just by defining it you did not proof it fulfils the requirements of S-W. – user20266 Aug 4 '12 at 9:49

@MattN. For a compact metric space you can take Lipshcitz functions in place of polynomials. That is your appropiate algebra would be $C^{0,1}(X)$ which would be dense by Stone Weierstrass theorem. All you have to show is that $C^{0,1}(X)$ is seperable. – smiley06 Mar 15 '13 at 10:50