# Essential conditions for Stone-Weierstrass theorem

Recently, i've been reviewing analysis. And i found this theorem in my text and that in wikipedia differ. Indeed, wikipedia one is strictly stronger.

=======

Rudin - PMA p.162

Let $X$ be a compact Hausdorff space. Let $(C(X,\mathbb{R}),||•||)$ be the algebra of all continuous functions, which is given the uniform topology. Let $\mathscr{A}$ be a subalgebra of $C(X,\mathbb{R})$. If $\mathscr{A}$ vanishes nowhere and separates points, then it is dense in $C(X,\mathbb{R}$.

=======

However, it is stated in wikipedia that when $X$ is compact Hausdorff, $\mathscr{A}$ is dense iff $\mathscr{A}$ separates points. Moreover, when $X$ is locally compact Hausdorff, $\mathscr{A}$ is dense iff $\mathscr{A}$ separates points and vanishes nowhere. (Here, $\mathscr{A}$ is taken to be a subalgebra of the algebra of all continuous functions vanish at infinity)

Is it possible to extend the theorem in my text to that in wikipedia by slight changes in proof?

Or else, where can i see the complete proof for that in wikipedia?

I suspect that your concern is that in the compact case wikipedia doesn't mention the condition that $\mathscr{A}$ vanishes nowhere, while Rudin does?
Then either wikipedia (implicitly[?]) assumes that a subalgebra of the unital algebra $C(X,\mathbb{R})$ is unital, hence contains the constant function $1$, which trivially implies that $\mathscr{A}$ vanishes nowhere, and Rudin doesn't, whence he must explicitly demand it. Or wikipedia's formulation is incorrect. The non-unital subalgebra $\mathscr{M} = \{ f \in C([0,1],\mathbb{R}) : f(0) = 0\}$ is closed, not dense.
In the locally compact but not compact case, the algebra $C_0(X,\mathbb{R})$ of continuous functions vanishing at infinity is non-unital, hence its subalgebras are trivially non-unital, and the non-vanishing needs to be explicitly stated.
• Good question. If you can separate two points by a continuous function, they have disjoint open neighbourhoods. So you can only have a subset of $C(X,\mathbb{R})$ that separates points if $X$ is Hausdorff. For non-Hausdorff $X$, one would hence need to consider the equivalence classes of points with respect to the relation $x\sim y \iff \bigl(\forall f\in C(X)\bigr)\bigl(f(x)=f(y)\bigr)$. If $X$ is quasicompact non-Hausdorff, the quotient space is compact Hausdorff, and you're back to the treated case. I'm not sure if the quotient space is locally compact Hausdorff in the non-compact case, – Daniel Fischer Dec 18 '13 at 21:53