# Can construct a bijection between R - Q and ( (R - Q) ∩ [0,1] )?

I've tried to show that:

$$[0,1]\sim([0,1] ∩R-Q)$$
I know from this answer :
$$[0,1]\sim R-Q$$
But how to construct a bijection between R-Q and $$([0,1]∩R-Q)$$ ?

I think the function would be like $$f:R-Q→[0,1]∩R-Q$$:
$$f(x) = \cases{ 1/x & \text{if ~x∈(R-Q)-[0,1]} \\ x & \text{if ~x ∈ (0,1)} }$$
But I think this function is not complete ... could someone help me please to improve this?

• You mean $\mathbb{R}\setminus\mathbb{Q}$, not the quotient of $\mathbb{R}$ by $\mathbb{Q}$ – Stefan Octavian Apr 23 at 8:39
• @StefanOctavian Thanks edited. – program_craft Apr 23 at 8:42
• your function is not bijective because, for example, $f(\pi)=f\left(\frac{1}{\pi}\right)=\frac{1}{\pi}$. I don't think there is a simple way to improve your function to make it bijective without making a completely different one. – R.V.N. Apr 23 at 8:56

## 1 Answer

Let $$(r_n)_{n\in\mathbb{N}}$$ be an enumeration of the elements of $$\mathbb{Q}\cap[0,1]$$. Let $$(l_n)_{n\in\mathbb{N}}$$ be a sequence of irrational numbers of $$[0,1]\setminus\mathbb{Q}$$, for example, we could define $$l_n=\frac{1}{\sqrt{p_n}}$$ where $$p_n$$ is the $$n-th$$ prime number.

Then, define $$f:[0,1]\longrightarrow[0,1]\setminus\mathbb{Q}$$ as: $$f(x):=\begin{cases} l_{2n} &\text{ if } x=l_n\\ l_{2n+1} &\text{ if } x=r_n \\ x &\text{ in other case} \end{cases}$$ $$f$$ is a bijection.

• Thanks! But how to prove thats bijection (surjective + injective) ? – program_craft Apr 23 at 10:02
• I've proved thats a injection but stucked in surjection. – program_craft Apr 23 at 10:14
• Let $y\in[0,1]\setminus\mathbb{Q}$. If $y\neq l_n$ for all $n\in\mathbb{N}$ then $f(y)=y$. If $y=l_n$ for some $n\in\mathbb{N}$ then, if $n$ is even $f\left(l_{\frac{n}{2}}\right)=l_n$; if $n$ is odd, $f\left(r_{\frac{n-1}{2}}\right)=l_n$. – R.V.N. Apr 23 at 21:41