3

I was working with an exercise of general topology and I had a question: are there an homeomorphism $f:\mathbb{R}\to(0,1)$ such that $f(x)\in\mathbb{Q}$ if and only if $x\in\mathbb{Q}$?, i.e., the homeomorphism maps the rationals to rationals and therefore the irrationals to irrationals.

My intuition says that the answer is yes but I can't find an example. The closer example was $g:\mathbb{R}\to(0,1)$ defined by $g(x)=\dfrac{1}{1+2^{-x}}$. But I think that doesn't works.

3 Answers3

4

$f(x)=(\frac x {1+|x|}+1)/2$ is such a map. Its inverse is $y \to \frac {2y-1} {1-|2y-1|}$.

2

Yes. By a well-known result, any two countable totally-ordered sets with no largest and smallest elements are order-isomorphic. Therefore there is an order-isomorphism $F:\Bbb Q\to\Bbb Q\cap(0,1)$. Now $\Bbb R$ and $(0,1)$ can be constructed by Dedekind cuts on $\Bbb Q$ and $\Bbb Q\cap(0,1)$ respectively. Thus $F$ extends to an order-isomorphism $f:\Bbb R\to(0,1)$. As both $\Bbb R$ and $(0,1)$ have the topologies induced by their ordering, $f$ is a homeomorphism.

Angina Seng
  • 158,341
1

You can construct an example by hand, choosing a rational at each integer (say) and imposing piecewise linearity.

For example, let $f\colon\mathbb{R}\to(0,1)$ be $$ f(x)= \begin{cases} 1-\dfrac1{2(x+1)} & \text{if }x\in\mathbb{N}\\ \dfrac1{2(-1-x)} & \text{if }-x\in\mathbb{N}\\ \frac12 & \text{if }n=0\\ \text{linear} & \text{otherwise}. \end{cases} $$

user10354138
  • 33,239