Let $X$ be completely regular. If $K$ is a compact subset of $X$, define $$p_K(f)=\sup\{|f(x)|;x\in X\}$$ then $\{p_k; \text{K is a compact }\}$ is a family of seminorms that makes $C(X)$ into a Locally convex space . If $\cal{A}$ is a closed subalgebra of $C(X)$ that separates the points of $X$ and $1\in {\cal A}$ and $\bar{f} \in {\cal A} $ whenever $f \in {\cal A}$, then $ {\cal A}=C(X).$
I want to use this theorem for proving:
Theorem: Let $X$ be completely regular and let $M$ be a linear manifold in $C(X)$. if for every compact subset $K$ of $X$, $M_{|K}=\{f_{|K}; f\in M\}$ is dense in $C(K)$, then $M$ is dense in $C(X)$.
I think I should show every ${\cal A}_{|K}$ is a closed subalgebra of $C(K)$. But I can not show that ${\cal A}_{|K}$ is closed.
Please help me. Thanks in advance.