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.