Skip to main content
4 of 4
Added additional step to map to an irrational set homeomorphic to the rationals first to avoid Henrik's objection.
Ivan Meir
  • 4.9k
  • 3
  • 32
  • 39

Take the dense subset to be those irrationals whose binary expansion $a_m 2^m+\cdots+a_n2^n$ is an irrational quadratic for the even powers (for alternatives see below) the binary number formed by the coefficients of the even places is irrational quadratic and the odd places irrational.

As observed by Henrik in the comments there are continuity issues mapping directly from $\mathbb{Q}$ so we replace it by any irrational homeomorphic set $\mathbb{Q}'$ which could be the quadratic irrationals as in Todd's answer or simply $\lambda \mathbb{Q}$ for some $\lambda \notin \mathbb{Q}$.

Then the map M from $\mathbb Q'\times \mathbb P$ to a dense subset of $\mathbb R$ given by interleaving the binary expansions should work. More formally $M(q,p)=T_e(q)+T_o(p)$ where $T_e(r)$ and $T_o(r)$ are defined by taking the binary expansion of $r$. Then in the binary form you map $2^n\rightarrow 2^{2n}$ and $2^n\rightarrow 2^{2n+1}$ respectively. i.e.

$T_e(11)=T_e(2^0+2^1+2^3)=2^0+2^2+2^6=69$, $T_o(11)=T_e(2^0+2^1+2^3)=2^1+2^3+2^7=138$.

This map is clearly continuous both ways, 1-1 and maps to a dense subset since any real number has an arbitrarily close rational approximation.

There are of course many possible such examples as for any infinite fixed subset S of the integers we can take the dense subset to be those irrational numbers whose binary expansion over $S$ or $\mathbb Z\setminus S$ is infinite and represents a value in $\mathbb{Q}'$ or is irrational respectively.

Ivan Meir
  • 4.9k
  • 3
  • 32
  • 39