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: 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:


*

*Making sure that $f$ is defined for each $a\in A$

*Making sure $f$ contains every element of $B$ in its image

*Making sure that $f$ preserves order


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