The proof proceeds in three stages: first show that the closure $\overline{A}$ of a subalgebra is a sublattice (by approximating $|f|$ via polynomials in $f^2$), then show that a closed sublattice separating points and not vanishing identically is dense (by a two-step approximation argument), and finally handle the case where $A$ vanishes at a point.
**Step 1: Closed subalgebras are sublattices.**
[claim:Absolute Value Approximation]
If $A$ is a closed subalgebra and $f \in A$ with $\|f\|_{C_\mathbb{R}(K)} \le 1$, then $|f| \in A$.
[/claim]
[proof]
For $\varepsilon > 0$, the function $h(t) = \sqrt{t + \varepsilon^2}$ is analytic on a neighbourhood of $[0, 1]$, with a [uniformly convergent](/page/Uniform%20Convergence) [power series](/page/Power%20Series) $S_N(t) = \sum_{k=0}^N c_k (t - 1/2)^k$ on $[0, 1]$. The polynomial $\tilde{S}_N(t) := S_N(t) - S_N(0)$ has no constant term, so $\tilde{S}_N(f^2) \in A$ (since $A$ is an algebra and $f^2 \in A$). We have $|h(f^2) - |f|| = |\sqrt{f^2 + \varepsilon^2} - |f|| \le \varepsilon$ and $|S_N(f^2) - h(f^2)| \to 0$ uniformly. Hence $\tilde{S}_N(f^2) \to |f|$ in $C_\mathbb{R}(K)$, and since $A$ is closed, $|f| \in A$.
[/proof]
Since $\max\{f, g\} = \frac{1}{2}(f + g) + \frac{1}{2}|f - g|$ and $\min\{f, g\} = \frac{1}{2}(f + g) - \frac{1}{2}|f - g|$, the closure $\overline{A}$ is a sublattice of $C_\mathbb{R}(K)$.
**Step 2: A lattice satisfying the interpolation property is dense.**
[claim:Lattice Density]
Let $L \subset C_\mathbb{R}(K)$ be a sublattice such that for every $g \in C_\mathbb{R}(K)$, every $\varepsilon > 0$, and every pair $x, y \in K$, there exists $f_{xy} \in L$ with $|f_{xy}(x) - g(x)| < \varepsilon$ and $|f_{xy}(y) - g(y)| < \varepsilon$. Then $L$ is dense in $C_\mathbb{R}(K)$.
[/claim]
[proof]
Fix $g$ and $\varepsilon > 0$. For fixed $x$, define $f_x := \min\{f_{xy_1}, \ldots, f_{xy_n}\}$ where $\{y_1, \ldots, y_n\}$ is a finite subcover (by compactness of $K$) ensuring $f_x < g + \varepsilon$ on all of $K$ and $|f_x(z) - g(z)| < \varepsilon$ in a neighbourhood of $x$. Then define $f := \max\{f_{x_1}, \ldots, f_{x_m}\}$ for a finite cover by these neighbourhoods. By construction, $\|f - g\|_{C(K)} < 3\varepsilon$.
[/proof]
**Step 3: The subalgebra satisfies the interpolation property.**
*Case 1:* If for every $x \in K$, there exists $f \in A$ with $f(x) \ne 0$, then given distinct $x, y \in K$, the separating hypothesis gives $f_{xy} \in A$ with $f_{xy}(x) \ne f_{xy}(y)$, and the non-vanishing hypothesis gives $f_x, f_y$ with $f_x(x) \ne 0$, $f_y(y) \ne 0$. The function $\tilde{f} := f_x + \alpha f_{xy} + \beta f_y$ (for suitable $\alpha, \beta \in \mathbb{R}$) achieves any prescribed pair of values at $x$ and $y$, since $(\tilde{f}(x), \tilde{f}(y))$ spans $\mathbb{R}^2$ as $\alpha, \beta$ vary. By Steps 1–2, $\overline{A} = C_\mathbb{R}(K)$.
*Case 2:* If there exists $x_0 \in K$ with $f(x_0) = 0$ for all $f \in A$, then consider $A' := A + \mathbb{R} \cdot \mathbf{1}$. This separates points (since $A$ does) and never vanishes (since constant [functions](/page/Function) are included). By Case 1, $\overline{A'} = C_\mathbb{R}(K)$. But $A \subset \{f \in C_\mathbb{R}(K) : f(x_0) = 0\} =: B$. If $g \in B$ and $\varepsilon > 0$, then there exist $f \in A$ and $\lambda \in \mathbb{R}$ with $\|g - (f + \lambda)\|_{C(K)} < \varepsilon$. Since $g(x_0) = f(x_0) = 0$, we get $|\lambda| < \varepsilon$, so $\|g - f\|_{C(K)} < 2\varepsilon$. Hence $\overline{A} = B$.