# Proof of Stone-Wierstrass theorem

## Homework Statement

During the proof of the Stone-Wierstrass theorem we define a particular set and claim it is open. I can't figure out how to show it is open.
I wrote out the proof until that point to show how it is constructed, I apologize for the long windedness.

Assume that X is a compact hausdorf space$$A\subset C(X)$$is an algebra that sperates points and has a continuosu function in it. then $$\overline{A}=C(X).$$

Proof:

Since A seperates points then for any $$a,b\in X$$ there exists $$h\in A$$ such that $$h(a)\neq h(b)$$. define $$g(x)=\frac{h(x)-h(a)}{h(b)-h(a)}.$$ Then $$g(a)=0$$and $$g(b)=1$$.

for any function $$f\in A$$ define $$f_{\left(a,b\right)}(x)=\left(f(b)-f(a)\right)g(x)+f(a)\text{then }f_{\left(a,b\right)}(a)=f(a)\text{ and }f_{\left(a,b\right)}(b)=f(b)$$.

Set $$\epsilon>0$$ and define $$U_{\left(a,b\right)}=\left\{ x\quad|f_{\left(a,b\right)}(x)<f(x)+\epsilon\right\} .$$

My question is how do i gaurantee that $$U_{\left(a,b\right)}$$ is open? My professor took it for granted. I'm sure it has to do with the pre-image of f but i can't write it out.

## The Attempt at a Solution

With such a questions, you have to rewrite $$U_{(a,b)}$$ in such a way so that it is clear that it's open. In this case:
$$U_{(a,b)}=\{x~\vert~f_{(a,b)}(x)<f(x)+\epsilon\}=\{x~\vert~(f_{(a,b)}-f)(x)<\epsilon\}=(f_{(a,b)}-f)^{-1}(]-\infty,\epsilon[)$$.