Let $X \subset \mathbb{R}$ be $G_{\delta}$ is homeomorphic to $\mathcal{N}$. Let $X \subset \mathbb{R}$ be $G_{\delta}$ such that $X$, $\mathbb{R} \smallsetminus X$ are dense in $\mathbb{R}$. Then $X$ is homeomorphic to $\mathcal{N}$, where $\mathcal{N}$ is Baire space. Prove that the same fact also holds when $\mathbb{R}$ is replaced by a zero-dimensional nonempty Polish space. 
I want to use a topological characterization of the Baire space.

$\mathcal{N}$ is the unique, up to homeomorphism, polish zero-dimensional space for  which all compact subsets have empty interior.

For the first part  I know the following:


*

*As $X$ is $G_\delta$ and $\mathbb{R}$ is polish, then $X$ is polish (theorem's Alexandrov).

*As $X$, $\mathbb{R} \smallsetminus X$ are dense in $\mathbb{R}$, then $X$ is a zero-dimensional space with $\{(c, d) \cap X: c, d \in \mathbb{R} \smallsetminus X\}$ a clopen base.

*For every nonempty open $O$ of $\mathbb{R}$, the set $O \cap X$ not is containing in a compact set of $X$ for Bolzano-Weirestrass theorem.


when $\mathbb{R}$ is replaced by a zero-dimensional nonempty Polish space
1. and 2. holds, but 3. is not clear. How should I try this?
 A: In general, the claim is false. Indeed, let $\mathcal C\subset [0,1]$ be the Cantor set, $Y=C\times C$ and $X=\{0\}\times C$ be a closed (and hence $G_\delta$) subset of a metrizable space $Y$. Then $Y$ is a zero-dimensional closed subspace of $\Bbb R^2$, so it is Polish. Since the space $C$ has no isolated points, $Y\setminus X$ is dense in $X$. But $X$ is non-homeomorphic to $\mathcal N$,  because $X$ is compact, whereas $\mathcal N$ is not.
On the other hand, the claim holds provided an additional condition  $X$ is dense in $Y$. In this case it remains to prove a counterpart of Condition 3. Suppose to the contrary that  there exists a non-empty open subset $O$ of $X$ contained in a compact set $K$ of $X$. Then the closure $\overline{O}$ in $Y$ is contained in $\overline{K}=K$ (the latter equality holds because $K$) is compact. There exists an open set $O’$ of $Y$ such that $O=O’\cap X$. Since $X$ is dense in $Y$,  $O’\subset\overline{O}$. Since a set $Y\setminus X$ is dense in $Y$, there exists a point 
$$y\in (Y\setminus X)\cap O’\subset (Y\setminus X)\cap \overline{O}\subset (Y\setminus X)\cap \overline{K}=(Y\setminus X)\cap K=\varnothing,$$
a contradiction.
