A $ 0 $-dimensional topological subspace of $ \Bbb{R}^{\Bbb{N}} $. Given the space $X(\mathbb{R}^{\mathbb{N}}, i)$ contains points $(x_{j})_{j\in N}$ of $\mathbb{R}^{\mathbb{N}}$ with only $i$ coordinates rational.
(a) Show that $X(\mathbb{R}^{\mathbb{N}}, 0)$ is zero-dimensional.
(b) Show that $X(\mathbb{R}^{\mathbb{N}}, 0)\cup X(\mathbb{R}^{\mathbb{N}}, 1)$ is not zero-dimensional.
My attempt For part (a), from the definition, every points in the space $X(R^N, 0)$ have irrational coordinates. So it means its coordinates belong to the set $R-Q$, and we know that every irrational numbers is between two rational numbers (classical result). Thus, every points is contained in an open set in $R^N$, which is of the form $((q_1,q_2), (q_3, q_4),....)$ where $q_i\in Q$, so the basis of $X(R^N, 0)$ is a union of open sets. On the other hand, every point $(x_j)$ has a closed discrete set ${x_j}$ in $X(R^N,0)$, so the basis sets is also a union of closed sets. Thus, $X(R^N,0)$ is zero-dimensional.
Is my proof above correct? Also, can someone please help me with part (b)? I really got stuck on this part:P
 A: It’s hard to tell, because what you’ve written isn’t entirely clear, but I think that your argument for (a) is not entirely correct. You do indeed want to show that $X(\Bbb R^{\Bbb N},0)$ has a clopen base, but it isn’t clear that you’ve actually done that. I would argue as follows.

Let $x=\langle x_n:n\in\Bbb N\rangle\in X(\Bbb R^{\Bbb N},0)$, and let $U$ be any open nbhd of $x$ in $X(\Bbb R^{\Bbb N},0)$. By the definition of the product topology there are a finite $F\subseteq\Bbb N$ and open intervals $(a_n,b_n)$ in $\Bbb R$ for $n\in F$ such that if $U_n=(a_n,b_n)$ for $n\in F$, and $U_n=\Bbb R$ for $n\in\Bbb N\setminus F$, then $x\in\prod_{n\in\Bbb N}U_n\subseteq U$. Clearly $a_n<x_n<b_n$ for $n\in F$, so there are rational numbers $p_n$ and $q_n$ for $n\in F$ such that $a_n<p_n<x_n<q_n<b_n$. Let $V_n=(p_n,q_n)$ for $n\in F$ and $V_n=\Bbb R$ for $n\in\Bbb N\setminus F$; then $x\in\prod_{n\in\Bbb N}V_n\subseteq\prod_{n\in\Bbb N}U_n\subseteq U$, and 
$$\operatorname{cl}_{X(\Bbb R^{\Bbb N},0)}\prod_{n\in\Bbb N}V_n=\prod_{n\in\Bbb N}\operatorname{cl}_{\Bbb R}V_n=\prod_{n\in\Bbb N}V_n\;,$$
so $\prod_{n\in\Bbb N}V_n$ is clopen. Thus, $x$ has a local base of clopen sets, and since $x$ was arbitrary, $X(\Bbb R^{\Bbb N},0)$ is zero-dimensional.

For (b) let’s start by simplifying the notation a little and letting $X_i=X(\Bbb R^{\Bbb N},i)$ for $i\in\Bbb N$ and setting $X=X_0\cup X_1$; $X$ is the set of points of $\Bbb R^{\Bbb N}$ with at most one rational coordinate, and we want to show that $X$ is not zero-dimensional. This would certainly follow if we could show that $X$ is path-connected. Let $p=\langle p_n:n\in\Bbb N\rangle\in X_0$ be defined by $p_n=\sqrt2$ for each $n\in\Bbb N$. (The specific choice of $\sqrt2$ isn’t important: I just want an irrational number.) Let $x=\langle x_n:n\in\Bbb N\rangle\in X$ be arbitrary; it suffices to show that there is a path from $x$ to $p$.
Suppose first that $x\in X_0$. We’ll define a continuous $f:[0,1]\to X$ so that $f(0)=x$ and $f(1)=p$. For $f(t)$ I’ll write $x^{(t)}=\langle x_n^{(t)}:n\in\Bbb N\rangle$. Begin by sliding $x_0$ to $p_0$ as $t$ goes from $0$ to $\frac12$, leaving the other coordinates alone:
$$x_n^{(t)}=\begin{cases}
2tp_0+(1-2t)x_0,&\text{if }n=0\\
x_n,&\text{otherwise}
\end{cases}$$
for $0\le t\le\frac12$. At no point is more than one coordinate rational: the only one that can ever be rational is $x_0^{(t)}$. Then slide $x_1$ to $p_1$ as $t$ goes from $\frac12$ to $\frac34$, leaving the other coordinates alone:
$$x_n^{(t)}=\begin{cases}
(4t-2)p_0+(3-4t)x_1,&\text{if }n=1\\
x_n^{(1/2)},&\text{otherwise}
\end{cases}$$
for $\frac12\le t\le\frac34$. Once again, at no point does $x^{(t)}$ have more than one rational coordinate.
Continue in this fashion, sliding $x_n$ to $p_n$ as $t$ goes from $1-2^{-n}$ to $1-2^{-(n+1)}$. I’ll leave it to you to work out the actual formula for $x_n^{(t)}$ on the general interval $1-2^{-n}\le t\le 1-2^{-(n+1)}$ and to verify continuity. (Of course $f(1)=p$.)
Finally, for $x\in X_1$ you can do the same thing, provided that you start by fixing up the one coordinate on which $x$ is rational.
