Vector-Valued Stone-Weierstrass Theorem? The standard statement of the Stone-Weierstrass theorem is:

Let $X$ be compact Hausdorff topological space, and $\mathcal{A}$ a subalgebra of the continuous functions from $X$ to $\mathbb{R}$ which separates points. Then $\mathcal{A}$ is dense in $C(X, \mathbb{R})$ in sup-norm.

Most materials that I can find on the extension of Stone-Weierstrass theorem discuss only the multivariate case, i.e., $X\in \mathbb{R}^d$. I wonder whether this theorem can be extended to vector-valued continuous functions. Specifically, let $\mathcal{A}$ be a subalgebra of continuous functions $X\to \mathbb{R}^n$, with the multiplication defined componentwisely, i.e., $\forall f, g\in \mathcal{A}$, $fg = (f_1g_1, \ldots, f_ng_n)$. Then shall we claim $\mathcal{A}$ is dense in $C(X, \mathbb{R}^n)$ in sup-norm if $\mathcal{A}$ separates points?
Any direct answer or reference would greatly help me!
Edit: As Nik Weaver points out, the original conjecture is false since the functions of the form $x\mapsto (f(x), 0, \ldots, 0)$ create a counter-example. I wonder whether there are non-trivial Weierstrass-type theorems on vector-valued functions. For instance, what if we further assume $\mathcal{A}$ is dense on each `axis'?
 A: This is a comment, not an answer but I am, alas, not entitled.  Vector valued Stone-Weierstraß theorems were studied in great detail in the second half of the last century and there is a comprehensive monograph on the subject by João Prolla ("Weierstraß-Stone, the theorem", 1993).  Not on topic, but he also considered the case of bounded, continuous vector-valued functions on non-compact spaces, using the strict topology of R.C. Buck.
A: I think that you want something like this:
Let $E\to X$ be a (finite rank) vector bundle over a compact, Hausdorff topological space $X$, let $\mathcal{A}\subset C(X,\mathbb{R})$ be a subalgebra that  separates points, and let $\mathcal{E}\subset C(X,E)$ be an $\mathcal{A}$-submodule of the $C(X,\mathbb{R})$-module of continuous section of $E\to X$.  Suppose that, at every point $x\in X$, the set $\{\,e(x)\ |\ e\in\mathcal{E}\ \}$ spans $E_x$.  Then $\mathcal{E}$ is dense in $C(X,E)$ with respect to the sup-norm defined by any norm on $E$.
Addendum: Here is a sketch of the argument:  First, by an easy compactness argument, one can show that $\mathcal{E}$ contains a finite set $e_1,\ldots e_m$ such that $e_1(x),e_2(x),\ldots,e_m(x)$ spans $E_x$ for all $x\in X$.  Then $\mathcal{E}$ contains all the sections of the form $$a_1\, e_1 + \cdots + a_m\,e_m$$ where $a_i\in\mathcal{A}$, and every section $e\in C(X,E)$ can be written in the form $$e = f_1\, e_1 + \cdots + f_m\,e_m$$  for some functions $f_i\in C(X,\mathbb{R})$. By the Stone-Weierstrass Theorem, for any given $\delta>0$, we can choose $a_i\in \mathcal{A}$ so that $\|f_i-a_i\|<\delta$  for all $1\le i\le m$.  Now the equivalence of all norms in finite dimensional vector spaces can be applied (together with the compactness of $X$) to conclude that $\mathcal{E}$ is dense in $C(X,E)$ in any sup-norm derived from a norm on the (finite rank) vector bundle $E$.
