I know from Stone-Weierstrass that the span of $C(X)C(Y)$ is in fact dense in $C(X \times Y)$. Nevertheless, I saw from an old guide from my university that they ask to prove $C(X)C(Y)$ (without taking the span) is dense in $C(X \times Y)$. The statement is the following:
Let $\phi \in C(X \times Y)$. Then prove that there exists $\{f_k\}_k \in C(X)$ and $\{g_k\}_k \in C(Y)$ sequences such that $f_k g_k \rightarrow \phi$ under the norm $\lVert \cdot \rVert_{\infty}$. $X$ and $Y$ are compact subsets of $\mathbf{R}^n$ and $\mathbf{R}^m$, respectively.
Is this statement true? Because as far as I saw from the proof of the Stone-Weierstrass theorem, it seems important for $\min\{h_1,h_2\}$ or $\max\{h_1,h_2\}$ to stay in the set for $h_1, h_2$ in the set, or that the set is a vector subspace closed under taking products in $C(X \times Y)$. The second condition implies the first up to taking limits because of the fact that there is $\{p_k(x)\}_k \in \mathbf{R}[x]$ such that $p_k\rightarrow |x|$ uniformly on any compact set.