Density of elementary tensors Consider $X=L^p(\mathbb{R}^n)$ for $n>1$, $1<p<\infty$. Call $f\in X$ an elementary tensor if there exist $n$ functions $f_1,\dots,f_n\in L^p(\mathbb{R})$ such that $f(x)=f_1(x_1)\cdots f_n(x_n)$. Are these functions dense in $L^p$?
If not, which most-useful positive statements "in this direction" can be made? Or is this maybe true for other function spaces?
 A: The set $\mathscr{E}_n$ of elementary tensors is not itself dense in $L^p(\mathbb{R}^n)$ for $n > 1$.
Note first, that for an elementary tensor we have
$$\int_{\mathbb{R}^n} \lvert f_1(x_1)\cdot \dotsb \cdot f_n(x_n)\rvert^p \,dx = \prod_{i=1}^n \int_\mathbb{R} \lvert f_i(x_i)\rvert^p\, dx_i$$
and hence $\lVert f\rVert_p = \prod \lVert f_i\rVert_p$.
Now consider (for $n = 2$) $t(x,y) = \chi_{[0,1]}(x)\cdot\chi_{[0,1]}(y) + \chi_{[-1,0)}(x) \cdot\chi_{[-1,0)}(y)$.
Suppose there were a sequence $t_n(x,y) = f_n(x)\cdot g_n(y)$ of elementary tensors with $t_n \to t$ in $L^p(\mathbb{R}^2)$. Without loss of generality, we may assume that the support of $f_n$ and $g_n$ is contained in $[-1,1]$. Let $a_n(x) = f_n(x)\cdot\chi_{[0,1]}(x)$, and $b_n(x) = f_n(x)\cdot \chi_{[-1,0)}(x)$. Similarly write $g_n = c_n + d_n$.
Multiplication with $\chi_{[0,1]\times[0,1]}$ shows that $a_n(x)\cdot c_n(y) \to \chi_{[0,1]\times[0,1]}$ in $L^p$, and therefore $\lVert a_n\rVert_p \cdot \lVert c_n\rVert_p \to 1$. Analogously $b_n(x)\cdot d_n(y) \to \chi_{[-1,0)\times[-1,0)}$ in $L^p$, whence $\lVert b_n\rVert_p \cdot \lVert d_n\rVert_p \to 1$. But in the same way, we see that $a_n(x)\cdot d_n(y) \to 0$ and $b_n(x)\cdot c_n(y) \to 0$, whence $\lVert a_n\rVert_p \cdot \lVert d_n\rVert_p \to 0$ and $\lVert b_n\rVert_p \cdot \lVert c_n\rVert_p \to 0$.
But that leads to the contradiction
$$1 = \lim_{n\to\infty} \bigl(\lVert a_n\rVert_p \lVert c_n\rVert_p\bigr)\cdot\bigl(\lVert b_n\rVert_p \lVert d_n\rVert_p\bigr) = \lim_{n\to\infty} \bigl(\lVert a_n\rVert_p \lVert d_n\rVert_p\bigr)\cdot\bigl(\lVert b_n\rVert_p \lVert c_n\rVert_p\bigr) = 0.$$
The general case that $\mathscr{E}_n$ is not dense in $L^p(\mathbb{R}^n)$ for $n > 1$ follows by multiplying the above example with a characteristic function of a set with finite positive measure in $\mathbb{R}^{n-2}$.
However, the linear span of the elementary tensors is dense in $L^p(\mathbb{R}^n)$ for every $n$.
Depending on how $L^p$ was constructed, it is more or less obvious.
If $L^p$ was constructed as the completion of the space of simple functions
$$\mathscr{S}(\mathbb{R}^n) = \left\lbrace \sum_{k=1}^m c_k\cdot \chi_{M_k} \colon m \in \mathbb{N}, c_k \in \mathbb{C}, M_k = \prod_{i=1}^n A_{i,k}, A_{i,k} \text{ finite interval} \right\rbrace$$
under $\lVert\cdot\rVert_p$ (modulo a.e. $0$ functions), it is obvious because each simple function is a (finite) linear combination of elementary tensors.
If $L^p$ was constructed as the completion of $\mathscr{C}_c(\mathbb{R}^n)$ under $\lVert\cdot\rVert_p$, it is less obvious, but it then obviously is sufficient to show that each $f \in \mathscr{C}_c(\mathbb{R}^n)$ can be approximated by linear combinations of elementary tensors.
One way to see that is by uniformly approximating $f$ by a sequence of simple functions, partitioning $\mathbb{R}^n$ into disjoint (half-open) cubes with side length $2^{-j}$ and letting the approximation on each such cube take some value of $f$ on that cube. Since $f$ is uniformly continuous, that uniformly approximates $f$, and since the support of $f$ is compact, that implies $L^p$-convergence.
Another way is, as I stated in the comment, to take a continuous partition of unity on $\mathbb{R}$, e.g. starting from $\psi(x) = \max\{0, 1-\lvert x\rvert\}$, we have $(\psi_k)_{k\in\mathbb{Z}}$ a partition of unity when $\psi_k(x) = \psi(x-k)$, obtaining finer partitions of unity by scaling, and approximating $f$ by
$$\sum_{k \in\mathbb{Z}^n} f\left(\frac{k}{2^j}\right)\prod_{i=1}^n \psi_{k_i,j}(x_i)$$
to obtain an approximation by linear combinations of continuous elementary tensors with compact support. One can even choose the partition of unity one starts with smooth, to obtain an approximation by smooth functions.
If $L^p(\mathbb{R}^n)$ was constructed in a different way, the above and the result that one of $\mathscr{S}(\mathbb{R}^n)$ and $\mathscr{C}_c(\mathbb{R}^n)$ is dense in $L^p(\mathbb{R}^n)$ shows that the span of $\mathscr{E}_n$ is dense.
