Stone-Weierstrass Theorem/Compact Space/Complex-Valued

== Theorem ==
Let $X$ be a compact topological space.
Let $\map \CC {X, \C}$ be the set of complex-valued continuous functions on $X$.
Equip $\map \CC {X, \C}$ with pointwise addition, pointwise scalar multiplication and pointwise multiplication.
For each $f \in \map \CC {X, \C}$, define $\overline f : X \to \C$ by:
:$\map {\overline f} x = \overline {\map f x}$
for each $x \in X$.
Let $\AA$ be a unital $\ast$-subalgebra of $\map \CC {X, \C}$. 
Suppose that $\AA$ separates points of $X$, that is:
:for distinct $p, q \in X$, there exists $h_{p q} \in \AA$ such that $\map {h_{p q} } p \ne \map {h_{p q} } q$.
Then the closure $\AA^-$ of $\AA$ is equal to $\map C {X, \C}$.
== Proof ==
Let $\BB$ be the set:
:$\BB = \set {f \in \AA : f \in \map \CC {X, \R} }$
We show that $\BB$ is a algebra over $\R$.
From Bounded Continuous Functions on Topological Space form Banach Space, $\BB$ is a vector space over $\R$.
From Product of Continuous Functions on Topological Ring is Continuous, $\BB$ is an algebra over $\R$.
We show that:
:$\BB = \set {\map \Re f : f \in \AA} = \set {\map \Im f : f \in \AA}$
Immediately we have:
:$\set {f \in \AA : f \in \map \CC {X, \R} } \subseteq \set {\map \Re f : f \in \AA}$
since if $f \in \map \CC {X, \R}$, we have $\map \Re f = f$. 
We also have:
:$\set {f \in \AA : f \in \map \CC {X, \R} } \subseteq \set {\map \Im f : f \in \AA}$
since if $f \in \AA$, we have $i f \in \AA$ since $\AA$ is a subalgebra, and then $f = \map \Im {i f}$. 
Towards proving the converse, for $f \in \AA$ write:
:$\map \Re f = \dfrac {f + \overline f} 2$
from Sum of Complex Number with Conjugate.
Since $\AA$ is a $\ast$-subalgebra of $\map \CC {X, \C}$, we have $\map \Re f \in \AA$.
Similarly from Difference of Complex Number with Conjugate we hae:
:$\map \Im f = \dfrac {f - \overline f} {2 i}$
Since $\AA$ is a $\ast$-subalgebra of $\map \CC {X, \C}$, we have $\map \Im f \in \AA$.
So for $f \in \AA$ we have $\map \Re f \in \AA \cap \map \CC {x, \R}$ and $\map \Im f \in \AA \cap \map \CC {X, \R}$.
Hence we conclude:
:$\BB = \set {\map \Re f : f \in \AA} = \set {\map \Im f : f \in \AA}$
We prove that $\BB$ separates points.
We are given that $\AA$ separates points, hence:
:for distinct $p, q \in X$, there exists $h_{p q} \in \AA$ such that $\map {h_{p q} } p \ne \map {h_{p q} } q$.
Since $\map {h_{p q} } p \ne \map {h_{p q} } q$, we have either $\map \Re {\map {h_{p q} } p} \ne \map \Re {\map {h_{p q} } q}$ or $\map \Im {\map {h_{p q} } p} \ne \map \Im {\map {h_{p q} } q}$.
We have $\map \Re {h_{p q} }, \map \Im {h_{p q} } \in \BB$. 
Hence $\BB$ separates points.
Hence by Stone-Weierstrass Theorem: Compact Space we have $\BB^- = \map \CC {X, \R}$.
Now let $f \in \map \CC {X, \C}$. 
Write $f = \map \Re f + i \map \Im f$ with $\map \Re f, \map \Im f \in \map \CC {X, \R}$.
Let $\epsilon > 0$. 
Since $\BB^- = \map \CC {X, \R}$, there exists $\phi, \psi \in \BB \subseteq \AA$ such that:
:$\norm {\phi - \map \Re f}_\infty < \dfrac \epsilon 2$
and:
:$\norm {\psi - \map \Im f}_\infty < \dfrac \epsilon 2$
We then have: 
Since $\phi, \psi \in \AA$ and $\AA$ is a subalgebra, we have $\phi + i\psi \in \AA$.
Hence $\AA^- = \map \CC {X, \C}$.
Category:Stone-Weierstrass Theorem