# Topological spaces that resemble the space of irrationals

(This question actually arose in some research on number theory.)

I once learned that any countable dense subspace of any Euclidean space $$\mathbb R^n$$ is homeomorphic to the rationals $$\mathbb Q$$.

Now I wonder if something similar is true for the irrationals $$J \mathrel{:=} \mathbb R \setminus \mathbb Q$$ (with the subspace topology from $$\mathbb R$$).

Let $$\mathfrak c$$ denote the cardinality of the continuum.

I. Is each cartesian power $$J^n$$ homeomorphic to $$J$$?

Also, how far can this be pushed?

II. Let $$X$$ be a dense totally disconnected subspace of $$\mathfrak R$$ such that every neighborhood of each point of $$X$$ contains $$\mathfrak c$$ points. Is $$X$$ homeomorphic to $$J$$?

What about for such subspaces of fairly nice subspaces of $$\mathbb R^n$$?

IIa. Let $$X$$ be any subspace of $$\mathbb R^n$$ as described in II., and let $$B$$ denote any subspace of $$\mathbb R^n$$ homeomorphic to [the open unit ball in $$\mathbb R^n$$ $$\cup$$ any subset of its boundary]. Then is $$X \cap B$$ homeomorphic to $$J$$?

III. Is there a simple set of conditions that describe exactly all spaces (or subspaces of $$\mathbb R^n$$) that are homeomorphic to $$J$$? What about $$J^n$$? (Perhaps the word homogeneous or metric needs to be included.)

(I found nothing relevant via Google, in MathSciNet, or here on MathOverflow.)

• $J$ is homeomorphic to topological group $\mathbb Z^\mathbb Z\$ hence it is homogenous, and $\ J^A\$ is homeomorphic to $\ J\$ for every non-empty countable set $A\$ (finite or infinite). Oct 18, 2021 at 3:53

The space of irrationals is homeomorphic to the Baire space $\mathbb N^{\mathbb N}$ of functions from $\mathbb N$ to $\mathbb N$. Here $\mathbb N$ gets the discrete topology and the power gets the product topology. In particular, every finite or countably infinite power of the space of irrationals is homeomorphic to the irrationals.

The Baire space is very well studied in descriptive set theory. See the book by Kechris, Classical Descriptive Set Theory.

• Hi Stefan, do you have any idea to prove that $\omega^{\omega}$ is a homogeneous space? Feb 27, 2021 at 1:18
• @GabrielMedina Let $A=(\alpha_i)_{i\in\mathbb{N}}$ be any sequence of permutations of $\omega$. Then consider the map $$f_A:\omega^\omega\rightarrow\omega^\omega: (c_i)_{i\in\mathbb{N}}\mapsto(\alpha_i(c_i))_{i\in\mathbb{N}}.$$ It's easy to check that this is an autohomeomorphism of $\omega^\omega$. Now given any two elements of Baire space $v=(v_i)_{i\in\mathbb{N}},w=(w_i)_{i\in\mathbb{N}}$, let $\alpha_i$ be the permutation of the naturals which switches $v_i$ and $w_i$ and fixes every other element of $\mathbb{N}$. Then the associated map $F_{(\alpha_i)_{i\in\mathbb{N}}}$ swaps $v$ and $w$. Mar 28, 2021 at 19:58
• @Noah Schweber Thanks a lot. Mar 29, 2021 at 16:19

The space $J$ of irrationals is homeomorphic to the Baire space $N^N$ of sequences of natural numbers (this follows easily from the continued fraction expansion). In particular it is homeomorphic to $J\times J$.

Concerning II and IIa, every subspace of $\mathbb R^n$ that is completely metrizable is in fact a $G_\delta$ set, i.e., a countable intersection of open sets.
If you are not $G_\delta$, you are not homeomorphic to the irrationals.

That completely metrizable subspaces of $\mathbb R^n$ are $G_\delta$ was shown by E. Čech in: On bicompact spaces. Annals of Math. 38 (1937), 823–844.

Regarding III, the Alexandrov-Urysohn Theorem gives sufficient conditions.

Any zero-dimensional, separable, nowhere compact, and completely metrizable space is homeomorphic to $$J$$.

• Since $J$ is not complete in its given metric, maybe a better way to phrase the result is "completely metrizable". Also, does "nowhere compact" mean that no nonempty open set has compact closure? (If not, what?) Jul 31, 2010 at 1:09
• @Pete: Yes, it would be nice to rephrase to get necessary and sufficient conditions. Indeed, nowhere compact means what you think it means. Jul 31, 2010 at 1:46
• @TonyHuynh : When you say "necessary and sufficient" are you looking for a theorem that the above list of conditions cannot be weakened? I recently learned of a nice result by Mel Currie ("A Metric Characterization of the Irrationals Using a Group Operation", Topology and Its Applications 21 (1985), 223-236) that if the word "completely" is dropped, then there are uncountably many non-homeomorphic examples. In particular we can take any metric space $(S,d)$ satisfying $\forall x\in S \forall r\in\mathbb{R}^+ \exists ! y\in S : d(x,y) = r$. Currie calls these "spyc spaces". Mar 21, 2019 at 22:58
• @TimothyChow Yes, that's what I meant when I said ''necessary and sufficient''. Thanks for the reference! Apr 5, 2019 at 9:07

Several answers point out the following:

The space of irrationals is homeomorphic to the Baire space $$\mathbb N^{\mathbb N}$$ of functions from $$\mathbb N$$ to $$\mathbb N$$.

No one gave an explicit homeomorphism. [PS: It's now pointed out that the answer by Richard Borcherds did so, if very tersely. I skimmed too fast.]

Let $$a_1,a_2,a_3,\ldots$$ be a sequence of positive integers. Then $$a_1 + \cfrac 1 {a_2 + \cfrac 1 {a_3 + \cfrac 1 {a_4 +\ddots}}} \in \mathbb R \smallsetminus\mathbb Q.$$ This number cannot be rational since an expansion of a rational number in this way must terminate because of well-ordering of $$\mathbb N.$$

That gives you the positive irrationals. To see that that is homeomorphic to the space of all irrationals, recall a fact proved by Georg Cantor: any two countable densely linearly ordered sets without endpoints are order-isomorphic to each other. ("Densely" means only that between any two elements there is another (so no knowledge of topology is needed to understand that word).) And an order isomorphism of those two sets of rationals will give you an order isomorphism of those two sets of irrationals.

• To make everything explicit, rather use an explicit (obvious) way of splitting $\mathbf{N}^\mathbf{N}$ into two open parts homeomorphic to itself?
– YCor
Mar 28, 2021 at 19:50
• Note that the continued fraction expansion was evoked in Richard Borcherds' answer, although not written down explicitly.
– YCor
Mar 28, 2021 at 19:53
• @YCor : I see. I've now up-voted that one. Mar 28, 2021 at 20:03

As regards $$\mathbb Q$$ (your first remark), it is true that all countable metrisable spaces without isolated points are homeomorphic to $$\mathbb Q$$. If you want to omit metrisable, replace it by $$\mathrm T_3$$ and second countable. One then notes that a dense subset of $$\mathbb R^n$$ doesn't have isolated points, and is metrisable.

• Neat. In particular, for any $p$, the rationals endowed with the $p$-adic metric are homeomorphic to the rationals endowed with the Euclidean metric. (This came up in an offhand way in an answer I gave here some months ago. In a comment, I sketched an argument that is certainly more complicated than this.) Jul 31, 2010 at 8:44
• I guess your comment about replacing metrizable by regular (Hausdorff) second countable is just for those who don't know Urysohn's Metrization Theorem? Jul 31, 2010 at 8:45
• It's more for those who want pure topological properties. Metrisable refers to an external object R, and some like this less as a property. I don't really care either way, now that we have a complete characterisation of metrisability since the fifties. Aug 1, 2010 at 9:09
• It's also amusing that given n, the complement of any countable dense subset of R^n is homeomorphic to the complement of any other such. Aug 7, 2010 at 18:56

Hello, Dan: Two countable dense subsets of the reals are order isomorphic and this extends to a homeomorphism of the reals. In particular, two countable dense subsets are homeomorphic via the restriction of a homeomorphism of the reals and this yields a homeomorphism of the complements.

• Hello, Ethan. Yes, indeed -- as you may recall, I proved that (as well as an n-dimensional version) in a class of yours on PL topology around 1970. Aug 10, 2010 at 15:59