# How (and when) to factor a function defined on a product of metric spaces?

Suppose we have a set of regular functions defined on a product of metric spaces, for instance the Banach space of the smooth functions from $\mathbb R^n$ to $\mathbb C$. We know, thanks to the Taylor series, that such a function can 'almost' be written as a linear combination of products $f_1 \cdot \ldots \cdot f_n$, each of the $f_i$ a continuous function from $\mathbb R$ to $\mathbb C$, where the almost means we are using a density argument in the sup norm.

Is there a way to generalize such a situation to a generic product of metric spaces? In particular I am interested in the space of locally constant, compactly supported functions on powers of the $p$-adic field $\mathbb Q_p$ but also the general question sounds interesting. Any reference is greatly appreciated, thanks.

-
I can not think of a proof for $\mathbb{R}\times \mathbb{R}$ which can not be generalized directly to product of two metric spaces. – Anton Petrunin Jul 2 '12 at 14:28
The proof of Taylor in $\mathbb R \times \mathbb R$ that I know goes like this: Let $f : \mathbb R \times \mathbb R \to \mathbb R$ be given. Let $a\in \mathbb R \times \mathbb R$, and suppose $f$ is sufficiently regular at $a$. Let $h \in \mathbb R \times \mathbb R$ be small enough. Consider the function of one variable $g(t) = f(a+th)$. Apply the one-dimensional Taylor theorem to $g$. – Gerald Edgar Jul 2 '12 at 15:12
The Taylor series of a function doesn't always converge to it in the sup norm even in one dimension (take $e^x$). What exactly is the precise statement you want? – Qiaochu Yuan Jul 2 '12 at 15:28
A reasonable construction (for Banach space-valued functions defined on a product of metric spaces) is via partitions of unity. Given a continuous function $f:X\times Y\rightarrow (E, \|\cdot\|)$, and $\epsilon >0$, there is a uniform approximation $\epsilon$-close to $f$ of the form $f_\epsilon(x,y):=\sum_{i,j} f(x_i,y_j)\phi_i(x)\psi_j(y)$. – Pietro Majer Jul 2 '12 at 17:59
You may look at topological tensor products which yield representations of function spaces on products like $C(K \times L) = C(K) \tilde{\otimes}_\epsilon C(L)$ or $C^\infty (\Omega_1 \times \Omega_2)= C^\infty (\Omega_1)\tilde{\otimes} C^\infty (\Omega_2)$ (in the latter case you can choose any tensor topology due to nuclearity). – Jochen Wengenroth Jul 3 '12 at 7:35

Is this the statement you want: any locally constant, compactly supported function from ${\bf Q}_p^n$ to ${\bf C}$ is uniformly approximated by linear combinations of products $f_1\cdots f_n$ where each $f_i$ is a locally constant, compactly supported function from ${\bf Q}_p$ to ${\bf C}$? Yes, this follows from the Stone-Weierstrass theorem for locally compact Hausdorff spaces. The linear combinations in question constitute a self-adjoint algebra of functions which separate points and separate each point from infinity. Therefore they are uniformly dense in the space of continuous functions vanishing at infinity on ${\bf Q}_p^n$.