Does using continued fractions work to give a homeomorphism $\mathbb{Q}^+ \rightarrow (\mathbb{Q}^+)^2$? Let $\mathbb{Q}$ be the topological space of rational numbers (with topology induced by inclusion in the real line) and let $\mathbb{Q}^+$ be the set of positive ($x>0$) rationals.
I'm looking for a simple construction of a homeomorphism $\phi: \mathbb{Q} \rightarrow \mathbb{Q}^2$ (not using an abstract result). In an early post, it was suggested to use continued fractions, but this has problems with negative numbers. My idea is we can first make a homeomorphism $f: \mathbb{Q}^+ \rightarrow \mathbb{Q}$ via $f(x) = (x-1)^3/x$ and then we can just worry about $\mathbb{Q}^+$.
Then the homeomorphism
$\phi: \mathbb{Q}^+ \rightarrow (\mathbb{Q}^+)^2$ would just go like
$[a_0, a_1, ..., a_n] \rightarrow ([a_0, a_2, ...], [a_1, a_3, ...])$
this seems to be obviously bijective, and I believe it is bicontinous just based on the idea that two continued fractions are close if and only if enough of their initial terms agree (which sounds plausible).
Does this make sense? Or am I missing something? Thanks for your help.
 A: This was to be a comment, but it is too long, consider this a partial answer then.
Here is an attempt: use the standard continued fraction, the one with all numerators equal to $1$. So a rational in $(0,1)$ corresponds to a finite sequence $[a_1,\ldots,a_n]$; turn that sequence into an infinite sequence (continued fraction) $[a_1+1,\ldots,a_n+1,1,1,1,\ldots]$. The subspace $Q_1$ of such irrational numbers (or such sequences in $\mathbb{N}^\mathbb{N}$) is homeomorphic to $\mathbb{Q}\cap(0,1)$.
Interlacing two such sequences produces a subspace $Q_2$ of the irrationals (or of $\mathbb{N}^\mathbb{N}$) that is homeomorphic to the square of $Q_1$ via the homeomorphism between $\mathbb{N}^\mathbb{N}$ and its square.
I have not yet found a convenient way to show that $Q_1$ and $Q_2$ are homeomorphic.
They are of course both countable and dense-in-itself subspaces of the unit interval, hence homeomorphic by a back-and-forth argument.
A: Here is one way to form a (not very) explicit homeomorphism.
As has been mentioned, the function $\phi=(\phi_0,\phi_1)$ from the question applied to the set $I^{>1}$ of irrationals greater than $1$ gives you a homeomorphism $I^{>1}\to I^{>1}\times I^{>1}$. So we will be done if we find a homeomorphism from $\mathbb{Q}$ to a countable subset $A\subseteq I^{>1}$ such that $x\in A$ iff $(\phi_0,\phi_1)(x)\in A\times A$ (equivalently, $A=\phi_0(A)=\phi_1(A)$).
We can achieve that if our set $A$ is dense in $I^{>1}$ and we have an enumeration of $A$: then we can follow the proof of Cantor's isomorphism theorem to get an explicit order isomorphism between $A$ and $\mathbb{Q}$ (and thus a homeomorphism, as both sets have their order topologies).
For example we can take $A=\mathbb{I}^{>1}\cap (\mathbb{Q}+\mathbb{Q}\sqrt{2})$, the set of irrationals $>1$ with periodic continued fraction.
P.S. I know almost nothing about continuous fractions, but this could be made more explicit if there was a set $A$ as above and such that we know a homeomorphism from $\mathbb{Q}$ to $A$ without using Cantor's isomorphism theorem. We don't even need the condition $A=\phi_0(A)=\phi_1(A)$ if we know enumerations of $A,\phi_0(A)$ and $\phi_1(A)$ and explicit homeomorphisms of them with $\mathbb{Q}$.
