# Stone-Weierstrass theorem with "nowhere-vanishing" premise

Let $$K$$ be a compact space and $$\mathscr A\subseteq C(K,\mathbb R)$$ be a subalgebra. Let us assume the "usual" form of the real Stone-Weierstrass theorem: If $$\mathscr A$$ separates points in $$K$$ and contains a nonzero constant function, then it is uniformly dense in $$C(K,\mathbb R)$$.

Rudin proves this with weaker premises (hence, his version is stronger), namely, replacing the bold part with the requirement that the $$\mathscr A$$ vanish nowhere (baby Rudin, Theorem 7.32). I'd like to prove Rudin's stronger version, but in the fastest way possible, given that I've already proven the usual form given above. In particular, I only need to prove that $$1\in\overline{\mathscr A}$$. I think this can be done without repeating all of Rudin's proof.

Current progress/idea: Repeat the first part of Rudin's proof, which uses the Weierstrass theorem (for polynomials) to show that $$f,g\in\overline{\mathscr A}\implies\max(f,g)\in\overline{\mathscr A}$$. The nowhere-vanishing condition can be used to find functions $$f_x\in\mathscr A$$ such that $$f_x(x)=1.$$ Using compactness of $$K$$ and closure of $$\mathscr A$$ under finite maximums, we can constrct a function $$f\in\mathscr A$$ such that $$f(x)>1-\varepsilon$$ for small $$\varepsilon>0$$. Using some constructions like this and combining them appropriately, I imagine we can find a function that falls uniformly within $$\varepsilon$$ of $$1$$, but so far I'm stuck here.

• How can you use the Weierstrass theorem for polynomials, though? If you don't know constants are in $\mathcal{A}$, then $\mathcal{A}$ may not be closed under composition with polynomials (only polynomials without a constant term). Commented Jun 6, 2022 at 20:51
• @EricWofsey The way Rudin uses it is indirect. We don't know constants are in $\mathscr A$, but given $f\in\overline{\mathscr A}$ with $a=\|f\|$, we can construct a polynomial that approximates $x\mapsto|x|$ on $[-a,a]$, and then we use the coefficients to construct a function in $\mathscr A$ that approximates $|f|$. Commented Jun 6, 2022 at 20:56
• @EricWofsey If $p_n(x)\to|x|$ then $p_n(0)\to0$, so wlog $p_n(0)=0$. Commented Jun 6, 2022 at 20:58
• But if $p$ is a polynomial and you want to construct $p(f)$, how do you get the constant term of $p(f)$? Commented Jun 6, 2022 at 21:00
• No, there is a problem (easily finagled). The problem is that if say $p(t)=2t+1$ then $p\circ f=1+2f$. No, the $2f$ is no problem, but where do you get the $1$? Commented Jun 6, 2022 at 21:00

Here's what I would do. Let $$f\in\mathcal{A}$$ be a nowhere vanishing function. Replacing $$f$$ with $$f^2$$, we may assume $$f>0$$ everywhere, and scaling $$f$$, we may assume $$f\geq 1$$ everywhere. Let $$g:\mathbb{R}\to\mathbb{R}$$ be a continuous function such that $$g(0)=0$$ and $$g(x)=1$$ for all $$x\geq 1$$. By the Weierstrass approximation theorem, we can uniformly approximate $$g$$ with polynomials $$p_n$$ on the interval $$[0,\|f\|]$$. Subtracting the constant terms from these $$p_n$$, we get polynomials $$q_n$$ which still uniformly approximate $$g$$, since the constant terms are the values $$p_n(0)$$ which converge to $$g(0)=0$$. Since $$q_n$$ does not have a constant term, $$q_n(f)\in\mathcal{A}$$ for each $$n$$. Since $$f$$ takes values in $$[1,\|f\|]$$ everywhere, $$q_n(f)$$ converges uniformly to $$g(f)$$ which is just the constant function $$1$$.