Proving separability of the countable product of separable spaces using density. Let $\{X_j\}_{j=1}^{+\infty}$ be a sequence of separable spaces.
The goal is to prove that the infinite cartesian product of separable spaces is indeed separable by showing that the product has a countable dense subset, arising from the fact that each $X_m$ has a countably dense subset.
 A: Let for each $k$, $D_j$ countable and dense in $X_j$
$$D:=\bigcup_{n\geqslant 1}\{(x_1,\dots,x_n,a_{n+1},\dots),x_j\in D_j, 1\leqslant j\leqslant n\},$$
where for each $n$, $a_n$ is a fixed element of $D_n$.
Then:


*

*$D$ is countable as an union of finite cartesian products of countable sets. 

*$D$ is dense in $X$. If $x\in X$ and $V$ is a neighborhood of $x$, by definition of the product topology, we can find an integer $N$ and for $1\leqslant j\leqslant N$, an open set $O_j$ of $X_j$ with $x_j\in O_j$. Now we use density of $D_j$ in $X_j$. 

A: For $n\in\Bbb Z^+$ let $D_n$ be a countable dense subset of $X_n$, and fix a point $x_n\in D_n$. For $m\in\Bbb Z^+$ let
$$E_m=\left\{y\in\prod_{n\in\Bbb Z^+}D_n:y_n=x_n\text{ for all }n\ge m\right\}\;,$$
and let $$E=\bigcup_{m\in\Bbb Z^+}E_m\;.$$
Then each $$E_m=\prod_{1\le n<m}D_n\times\prod_{n\ge m}\{x_n\}$$ is clearly countable, so $E$ is countable. Every non-empty open set in $X=\prod_{n\in\Bbb Z^+}X_n$ contains a basic open set of the form
$$B=\prod_{1\le n<m}V_n\times\prod_{n\ge m}X_n\;,$$ where $V_n$ is a non-empty open set in $X_n$ for $1\le n<m$, and clearly $B\cap E_m\ne\varnothing$, so $E$ is dense in $X$.
A: Using the fact that dense subsets of a set intersects every non-empty open sets, this is quite simple. In product topology, every open set $U$ in $X = \prod_{n \in \mathbb N}X_n$ looks like $U_1 \times U_2 \times...\times U_k \times X_{k+1} \times...$
Let $A_i$ be a countable dense subset of $X_i$. Then $A_i$ will intersect every open sets in $X_i$. Take the subset $A = \prod_{n \in \mathbb N}A_n$ in $A$. This is countable (countable product of countable sets is countable) and $U \cap A = U_1 \cap A_1 \times U_2 \cap A_2 \times...\times U_k \cap A_k \times X_{k+1} \cap A_{k+1} \times... \neq \phi$. Hence $A$ is dense.
