# Countable dense subsets of $\mathbb R$ are homeomorphic

Suppose countable subsets $A,B$ of the real line $\mathbb R$ satisfy $\overline{A}=\overline{B}=\Bbb R$.

How can one show that $A$ is homeomorphic to $B$?

I even have no idea how to get a bijection between $A$ and $B$.

• $A$ is bijective to $N$ and $B$ is bijective to $N$ .Then.. – Learnmore Apr 17 '15 at 5:32

Basically, you can build a homeomorphism by hand. A bijection automatically exists, since the sets are both countable, but you need to build in a bijection that is continuous with continuous inverse. To do this, observe or prove the following:

• A bijection $f$ between dense subsets $A$ and $B$ will be a homeomorphism if it preserves order, ie if $a<b$ implies $f(a) < f(b)$.

Therefore, you need to build your bijection carefully, defining $f$ one element at a time, in order to make sure it preserves order. Your choices will need to be compatible with the finite number of previous choices. The following fact is why you want $A$ and $B$ to be dense:

• If a set $A$ is dense in $\mathbb{R}$, and $x<y$ are elements of $A$, then there exists $z\in A$ such that $x<z<y$.

You also need to be tricky to make sure your map is bijective, since if you just define $f$ by taking an enumeration of $A = \{a_0, a_1, \ldots\}$ and define $f$ on each $a_i$ then you still need to make sure that every element of $B$ lies in the image of $f$. This means you're going to juggle the following tasks simultaneously while defining $f$ inductively:

1. Making sure that $f$ is defined for each $a\in A$
2. Making sure $f$ contains every element of $B$ in its image
3. Making sure that $f$ preserves order

I'm going to leave it there, since this is hopefully enough to get started.

• Making it preserving order seems to be challenging for me, but I'll try it. Thanks. – Sun Apr 17 '15 at 7:24
• @Sun: You may find it helpful to read about the back and forth method. – Brian M. Scott Apr 17 '15 at 19:52
• The order part is easy -- it's the bijection that's hard. – Abhimanyu Pallavi Sudhir Oct 20 '19 at 12:59