Here is Prob. 16 (a), Sec. 30, in the book Topology by James R. Munkres, 2nd edition:
Show that the product space $\mathbb{R}^I$, where $I = [0, 1]$, has a countable dense subset.
My Attempt:
Here $\mathbb{R}^I$ is the set of all the real-valued functions defined on the closed unit interval $I = [0, 1]$, with the product topology. For any $\mathbf{x} \in \mathbb{R}^I$, let us denote $\mathbf{x}(t)$ by $x_t$ for all $t \in I$.
We note that the set $I \cap \mathbb{Q}$ of all the rational numbers in $I$ is a countable set.
For each $n = 1, 2, 3, \ldots$, let $\mathbf{D}_n$ be the set of all the real-valued functions $\mathbf{y}$ defined on $I = [0, 1]$ such that $y_t = \mathbf{y}(t) \in \mathbb{Q}$ for some $n$ values $t = t_1, \ldots, t_n \in I\cap \mathbb{Q}$ and $y_t = 0$ for all other $t \in I$. Then $\mathbf{D}_n$ is a countable subset of $\mathbb{R}^I$ because $\mathbf{D}_n$ is a countable union (over $I \cap \mathbb{Q}$) of sets each of which is in bijection with $\mathbb{Q}^n$.
Let us now put $$ \mathbf{D} \colon= \bigcup_{n \in \mathbb{N} } \mathbf{D}_n. \tag{Definition 0} $$ This set $\mathbf{D}$ being a countable union of countable sets is countable. We show that $\mathbf{D}$ is dense in the product space $\mathbb{R}^I$.
Let $\mathbf{x}$ be any point of $\mathbb{R}^I$, and let $$ \mathbf{B} \colon= \prod_{t \in I} B_t $$ be any basis set for the product topology on $\mathbb{R}^I$ such that $\mathbf{x} \in \mathbf{B}$. Then there are finitely many values of $t \in [0, 1]$, say $t_1, \ldots, t_n$, for which $B_t$ is an open set of $\mathbb{R}$ and $B_t =\mathbb{R}$ for all other values of $t \in [0, 1]$.
For each $i = 1, \ldots, n$, as $x_{t_i} = \mathbf{x} \left( t_i \right) \in B_{t_i}$ and as $B_{t_i}$ is an open set in $\mathbb{R}$, so there exist real numbers $a_{t_i}$ and $b_{t_i}$ such that $a_{t_i} < b_{t_i}$ and $$ x_{t_i} \in \left( a_{t_i}, b_{t_i} \right) \subset B_{t_i}; $$ let us choose a rational number $q_{t_i} \in \left( a_{t_i}, b_{t_i} \right)$.
Now let $\mathbf{y}$ be a real-valued function defined on $I$ such that $y_{t_i} = q_{t_i}$ for $i = 1, \ldots, n$ and $y_t = 0$ for all other $t \in [0, 1]$. This $\mathbf{y}$ is clearly in $\mathbf{D} \cap \mathbf{B}$.
Thus for any basis set $\mathbf{B}$ for the product topology on $\mathbb{R}^I$ containing $\mathbf{x}$, we have $$ \mathbf{B} \cap \mathbf{D} \neq \emptyset. $$ So $\mathbf{x} \in \overline{\mathbf{D}}$, by Theorem 17.5 (b) in Munkres.
But $\mathbf{x}$ was an arbitrary point of $\mathbb{R}^I$. Hence $$ \overline{\mathbf{D}} = \mathbb{R}^I, $$ as required.
Is my proof correct? If so, is my presentation neat and clear enough too? Or, is there any clutter or confusion in my work?