# 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! –  Matt N. 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

In the hope I did understand the question correctly by now: It is a corollary of Stone-Weierstrass. Add the constant functions to the algebra you constructed and you are done.

-
Now after reading Norbert's comment I'm not so sure anymore. –  Matt N. Aug 4 '12 at 9:40
Sorry, the question is, why do we have to construct an algebra other than polynomials. And by now I suspect the answer could be because we don't have a definition of polynomial on a general metric space. –  Matt N. Aug 4 '12 at 9:43
@MattN. Yes, that's correct. That's what I wanted to express with the last sentence of my first comment. (And the algebra is rather easy to construct, so it is indeed a corollary of S-W). –  user20266 Aug 4 '12 at 9:44
Oh ok, now I see what you meant there : ) –  Matt N. Aug 4 '12 at 9:47
@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
show 1 more comment