StoneWeierstrass theorem (complex version)
Theorem  Let $X$ be a compact space and $C(X)$ the algebra^{} of continuous functions^{} $X\u27f6\u2102$ endowed with the sup norm $\parallel \cdot {\parallel}_{\mathrm{\infty}}$. Let $\mathcal{A}$ be a subalgebra^{} of $C(X)$ for which the following conditions hold:

1.
$\forall x,y\in X,x\ne y,\exists f\in \mathcal{A}:f(x)\ne f(y)$, i.e. $\mathcal{A}$ separates points

2.
$1\in \mathcal{A}$, i.e. $\mathcal{A}$ contains all constant functions

3.
If $f\in \mathcal{A}$ then $\overline{f}\in \mathcal{A}$, i.e. $\mathcal{A}$ is a selfadjoint (http://planetmath.org/InvolutaryRing) subalgebra of $C(X)$
Then $\mathcal{A}$ is dense in $C(X)$.
$$
Proof: The proof follows easily from the real version of this theorem (see the parent entry (http://planetmath.org/StoneWeierstrassTheorem)).
Let $\mathcal{R}$ be the set of the real parts of elements $f\in \mathcal{A}$, i.e.
$\mathcal{R}:=\{\mathrm{Re}(f):f\in \mathcal{A}\}$ 
It is clear that $\mathcal{R}$ contains (it is in fact equal) to the set of the imaginary parts of elements of $\mathcal{A}$. This can be seen just by multiplying any function $f\in \mathcal{A}$ by $i$.
We can see that $\mathcal{R}\subseteq \mathcal{A}$. In fact, $\mathrm{Re}(f)=\frac{f+\overline{f}}{2}$ and by condition 3 this element belongs to $\mathcal{A}$.
Moreover, $\mathcal{R}$ is a subalgebra of $\mathcal{A}$. In fact, since $\mathcal{A}$ is an algebra, the product^{} of two elements $\mathrm{Re}(f)$, $\mathrm{Re}(g)$ of $\mathcal{R}$ gives an element of $\mathcal{A}$. But since $\mathrm{Re}(f).\mathrm{Re}(g)$ is a real valued function, it must belong to $\mathcal{R}$. The same can be said about sums and products by real scalars.
Let us now see that $\mathcal{R}$ separates points. Since $\mathcal{A}$ separates points, for every $x\ne y$ in $X$ there is a function $f\in \mathcal{A}$ such that $f(x)\ne f(y)$. But this implies that $\mathrm{Re}(f(x))\ne \mathrm{Re}(f(y))$ or $\mathrm{Im}(f(x))\ne \mathrm{Im}(f(y))$, hence there is a function in $\mathcal{R}$ that separates $x$ and $y$.
Of course, $\mathcal{R}$ contains the constant function $1$.
Hence, we can apply the real version of the StoneWeierstrass theorem to conclude that every real valued function in $X$ can be uniformly approximated by elements of $\mathcal{R}$.
Let us now see that $\mathcal{A}$ is dense in $C(X)$. Let $f\in C(X)$. By the previous observation, both $\mathrm{Re}(f)$ and $\mathrm{Im}(f)$ are the uniform limits of sequences $\{{g}_{n}\}$ and $\{{h}_{n}\}$ in $\mathcal{R}$. Hence,
${\parallel f({g}_{n}+i{h}_{n})\parallel}_{\mathrm{\infty}}\le {\parallel \mathrm{Re}(f){g}_{n}\parallel}_{\mathrm{\infty}}+{\parallel \mathrm{Im}(f){h}_{n}\parallel}_{\mathrm{\infty}}\u27f60$ 
Of course, the sequence $\{{g}_{n}+i{h}_{n}\}$ is in $\mathcal{A}$. Hence, $\mathcal{A}$ is dense in $C(X)$. $\mathrm{\square}$
Title  StoneWeierstrass theorem (complex version) 

Canonical name  StoneWeierstrassTheoremcomplexVersion 
Date of creation  20130322 18:02:31 
Last modified on  20130322 18:02:31 
Owner  asteroid (17536) 
Last modified by  asteroid (17536) 
Numerical id  6 
Author  asteroid (17536) 
Entry type  Theorem 
Classification  msc 46J10 