A linear space is dense in $L_2([0,1]^n)$ I'm reading a course related to Hilbert spaces and the problem I faced is following: Denote $S_n=\{(t_1,t_2,\ldots, t_n)\in [0,1]^n : 0\leqslant t_1\leqslant t_2\leqslant \cdots\leqslant t_n\leqslant 1\}$ and $H_n=\{f^{\otimes n}(t_1, t_2, \ldots, t_n) , (t_1, t_2, \ldots, t_n) \in S_n : f\in L_2([0,1])\}\subset L_2(S_n)$, where the tensor product $f^{\otimes n}(t_1, t_2, \ldots, t_n):=f(t_1)f(t_2)\cdots f(t_n)$. The author said that it is easy to see the closure of linear span of $H_n$ is $L_2(S_n)$, 
$$\overline{\mbox{span}}^{L_2(S_n)} H_n = L_2(S_n),$$
i.e., span$H_n$ is dense in $L_2(S_n)$ w.r.t. topology generated by inner product.
I tried by using Stone-Weierstrass theorem, however this theorem is only available for continuous functions on compact domain. Does anybody have any idea? 
 A: Start with taking $\tilde S_n = \{ (t_1, \ldots, t_n): 0 < t_1 < \ldots < t_n < 1 \}$. We can extend any $\tilde f \in L_2(\tilde S_n)$ to $f \in L_2(S_n)$ by setting $f=0$ on $S_n \setminus \tilde S_n$. Since $S_n \setminus \tilde S_n$ is of measure zero, the map $\tilde f \mapsto f$ is an isomorphism, denote it by $\varphi:L_2(\tilde S_n) \to L_2(S_n)$.
Now, note that the space of continuous functions $C(\tilde S_n)$ is dense in $L_2(\tilde S_n)$.
Then use Stone-Weierstrass to prove $\tilde H_n = \varphi^{-1}(H_n)$ is closed in $C(\tilde S_n)$:
Clearly, $\tilde H_n$ vanishes nowhere. It also separates points: take $0 < t_1 < \ldots < t_n < 1$ and $0 < s_1 < \ldots < s_n < 1$ such that $(t_1, \ldots, t_n) \neq (s_1, \ldots, s_n)$. It means there is some $j$ such that $t_j \neq s_j$. Take smallest such $j$ and assume without loss of generality that $t_j < s_j$. Since $t_j > t_{j-1} = s_{j-1}$, it follows that $t_j \notin \{ s_1, \ldots, s_n\}$. Thus, we may take a continuous function $f:[0,1] \to \mathbb{R}$ such that $f(t_j) = 0$ and $f(s_k)=1 \forall_k$. Then $f^{\otimes n}(t_1, \ldots, t_n) = 0$ and $f^{\otimes n}(s_1, \ldots, s_n) = 1$, and $f \in \tilde H_n$.
Note that $H_n$ is not dense in $L^2([0,1]^n)$ since all functions in $H_n$ are symmetric in all variables. The closure is equal to the subset of symmetric functions in $L^2([0,1]^n)$, which is isomorphic to $L^2(S_n)$.
