# Is an algebra the smallest one generated by a certain subset of it?

Let $X$ be a completely regular topological space and let $BC(X)$ denote the space of bounded continuous complex-valued functions on it. Also, let $C(X,[0,1])$ be the set of continuous functions on $X$ that take values in $[0,1]$.

Suppose that $\mathscr A\subseteq BC(X)$ is an algebra (that is, it is a vector space that also contains the product of any two continuous functions in it) such that $\mathscr A$ contains all constant functions. Let $\mathscr B\subseteq BC(X)$ be another algebra that contains the constant functions and also $\mathscr A\cap C(X,[0,1])\subseteq\mathscr B$.

My question is: is it true that $\mathscr A\subseteq \mathscr B?$

Using the fact that $\mathscr B$ contains the constants, I think it can be established that $\mathscr A\cap C(X,\mathbb R)\subseteq\mathscr B$, but it is not clear to me how to extend this partial result. NB: It is not assumed that $\mathscr A$ is closed under complex conjugations!

Any hints would be appreciated.

UPDATE: This is not true, as anomaly's counterexample below shows. I am still wondering if it is true if one required that (i) $\mathscr A$ be closed (in the uniform norm); and (ii) $\mathscr A\cap C(X,[0,1])$ separate points and closed sets, i.e., if $E\subseteq X$ is closed and $x\in X\setminus E$, then $\exists f\in A\cap C(X,[0,1])$ such that $f(x)\notin\operatorname{cl}[f(E)]$.

Let $X\subset\mathbb{C}$ denote the closed unit disk, and define ${\scr A}$ and ${\scr B}$ to be the spaces of functions of the form $f\vert X$ for $f:\mathbb{C} \to \mathbb{C}$ holomorphic and polynomial, respectively. Since $X$ is compact, ${\scr A}, {\scr B}\subset BC(X)$. But any holomorphic function that's real on $X\subset \mathbb{C}$ must be constant (by the Cauchy-Riemann equations), so ${\scr A} \cap C(X, [0, 1])$ consists only of constant functions and thus lies in $\scr{B}$.
• Nice counterexample. Do you think the result is true if one assumes that both $\mathscr A$ and $\mathscr B$ are closed (in the uniform norm)? – triple_sec Jul 13 '14 at 4:33
• I think the same argument would hold: any real element in $\overline{\scr{A}}$ is the limit of real functions and thus must be constant. – anomaly Jul 13 '14 at 4:49
• Thank you for your time. One extra condition, if you are interested in this: Do you think the result would hold if one required that $\mathscr A\cap C(X,[0,1])$ separate points and closed sets? That is, if $E\subseteq X$ is closed and $x\in X\setminus E$, then $\exists f\in A\cap C(X,[0,1])$ such that $f(x)\notin\operatorname{cl}[f(E)]$. This is clearly not true for the algebra of holomorphic functions. – triple_sec Jul 13 '14 at 7:52