# Question about proof of Stone-Weierstrass

I would like to know if I understand the details in the proof of Stone-Weierstrass (in $\mathbb R$) so I'd like to post it here in my own words. Can you please check it and tell me if it's correct? Thank you!

Thm. (Stone-Weierstrass) Let $A$ be a unital subalgebra of $(C(K),\|\cdot\|_\infty)$ that separates points, where $K$ is a compact topological space and $C(K)$ are continuous functions $K \to \mathbb R$. Then $\overline{A} = C(K)$.

Proof: We use (without proof) that

(i) if $A$ is a subalgebra then so is $\overline{A}$

(ii) if $f,g$ in $\overline{A}$ then $\min (f,g)$ and $\max(f,g)$ are in $\overline{A}$

Let $f \in C(K)$ and $\varepsilon > 0$. We construct $h \in \overline{A}$ such that $h(x) - \varepsilon \leq f(x) \leq h(x) + \varepsilon$.

To this end let $x_0 \in K$ be fixed. Then since $\overline{A}$ separates points, for each $x \in K$ we can find $h_x \in \overline{A}$ such that $h_x(x_0) = f(x_0)$ and $h_x(x) = f(x)$. Since $h_x - f$ is continuous and $h_x(x) = f(x)$ there are $O_x$ open such that for $x^\prime \in O_x$ we have $|(h_x -f)(x) - (h_x -f)(x^\prime)| = |h_x(x^\prime) - f(x^\prime)| < \varepsilon$. In particular, $h_x(x^\prime) - \varepsilon\leq f(x^\prime)$ for all $x^\prime \in O_x$. Since $K$ is compact and $O_x$ cover $K$ there is a finite subcover $\{O_{x_i} \}_{i=1}^N$. Let $h_{x_0} (x) : = \min_i h_{x_i} (x)$. Then for all $x \in K$ we have $h_{x_0}(x) - \varepsilon \leq f(x)$.

$h_{x_0}$ is continuous and $h_{x_0}(x_0) = f(x_0)$ hence for each $x_0 \in K$ there is $U_{x_0}$ open such that for $x^\prime \in U_{x_0}$ we have $|(h_{x_0} -f)(x^\prime) - (h_{x_0} -f)(x_0)| = |h_{x_0}(x^\prime) - f(x^\prime)| < \varepsilon$. In particular, $f(x^\prime) \leq h_{x_0}(x^\prime)+\varepsilon$. Since $U_{x_0}$ are open and cover $K$ there is a finite subcover $\{U_{x_i} \}_{i=1}^M$. Let $h(x) = \max_i h_{x_i}(x)$ then $h(x) \in \overline{A}$ and $h(x) - \varepsilon \leq f(x) \leq h(x) + \varepsilon$. Let $\varepsilon \to 0$.

-
In the last line, shouldn't $h(x)$ be $\min_ih_{x_i}(x)$? –  Host-website-on-iPage Jul 13 '12 at 13:35
@SamL. I need to show $f \in \overline{A}$. Letting $\varepsilon \to 0$ gives me $f = h \in \overline{A}$ which is what I wanted to show. No? –  Matt N. Jul 13 '12 at 13:39
I think in (ii) you need $A$ to be closed? –  joriki Jul 13 '12 at 16:27
This "Let $\varepsilon \to 0$." Makes very little sense. You fixed $\varepsilon \gt 0$ (and $f$) at the beginning of the proof, now you can't just let it go to zero. The idea is that you show that for every $f$ and every $\varepsilon \gt 0$ you can find $h \in \overline{A} \cap B_\varepsilon(f)$, which implies that $\overline{A}$ is dense, but as it is also closed, it must be everything. –  t.b. Jul 13 '12 at 19:01
Of course you can do that, and you'd get a sequence $h_{\varepsilon_n}$ converging to $f$ in the uniform norm so not that bad a thinko (re: btw, I haven't vanished, I just try not to waste too much time here and I'm quite successful so far). –  t.b. Jul 13 '12 at 19:16