Example of a bijection from the set of real numbers to a subset of irrationals
$begingroup$
I need an example of a bijection from the set of real numbers to a subset of the irrationals.
I tried something like
$f(x)=x+sqrt{2}$,
but where should I map $-sqrt{2}$?
functions
$endgroup$
add a comment |
$begingroup$
I need an example of a bijection from the set of real numbers to a subset of the irrationals.
I tried something like
$f(x)=x+sqrt{2}$,
but where should I map $-sqrt{2}$?
functions
$endgroup$
$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
9
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23
add a comment |
$begingroup$
I need an example of a bijection from the set of real numbers to a subset of the irrationals.
I tried something like
$f(x)=x+sqrt{2}$,
but where should I map $-sqrt{2}$?
functions
$endgroup$
I need an example of a bijection from the set of real numbers to a subset of the irrationals.
I tried something like
$f(x)=x+sqrt{2}$,
but where should I map $-sqrt{2}$?
functions
functions
edited Jul 8 '14 at 18:10
Mathmo123
17.9k33166
17.9k33166
asked Jul 8 '14 at 17:16
user 160756user 160756
551
551
$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
9
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23
add a comment |
$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
9
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23
$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
9
9
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
Let $f(x) = dfrac{arctan x}{pi}$, so $f^{-1}(x) = tan pi x$. $f$ maps $mathbb{R}$ to $(-dfrac12,dfrac12)$.
$$g(x) = begin{cases}
x in mathbb{Q} & x + sqrt{5}\
x notin mathbb{Q} & x\
end{cases}$$
$$g^{-1}(x) = begin{cases}
x > 1 & x - sqrt{5}\
x le 1 & x\
end{cases}$$
So $g circ f$ maps from $mathbb{R}$ to a certain subset of the irrationals between $-dfrac12$ and $dfrac12 + sqrt{5}$, and $f^{-1} circ g^{-1}$ maps the inverse.
$endgroup$
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
add a comment |
$begingroup$
Let $A_i = pi^i {mathbb Q}$ and $ A =cup_{ige0} A_i$. Then the map $h:{mathbb R}backslash{mathbb Q}rightarrow {mathbb R}$
$$
h(x) = left{
begin{array}{ll}
pi x & xin A \
x & x in B={mathbb R}backslash A\
end{array}
right.
$$
is a bijection.
$endgroup$
add a comment |
$begingroup$
Enumerate $Bbb Q$ as $q_n$ for $ninBbb N$. Now define,
$$f(x)=begin{cases}e^{2n+1} & x=q_n\e^{2n} & x=e^n, ninBbb N\x&text{otherwise}end{cases}$$
Key point here is that $e$ is transcendental, so $e^nnotinBbb Q$ for any $n>0$. You can effectively replace $e$ by any other number with this property. For example $pi,sqrt2^sqrt2$, Liouville number, and so on and so forth.
$endgroup$
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
add a comment |
$begingroup$
Consider $A$ = { $pi + n : n in Bbb N$}.
Clearly $A$ is countable. ( Consider the bijection $n rightarrow pi + n$ , $forall n in Bbb N$).
So elements of $A$ can be expressed as, $A = {a_k : k in Bbb N}$.
And we also can have $Bbb Q = {b_k : k in Bbb N}$
Now consider the bijection
$phi : Bbb R rightarrow Bbb R - Bbb Q$ by,
$phi(x) := a_{2k+1}$ if $ x = b_k , x in Bbb Q$.
= $a_{2k}$ if $x = a_k , x in A$
= $x$ if $x in Bbb R - (A cup Bbb Q)$
The construction in my example can be seen as a very general bijection from a general uncountable set to a proper uncountable subset of it.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f860331%2fexample-of-a-bijection-from-the-set-of-real-numbers-to-a-subset-of-irrationals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Let $f(x) = dfrac{arctan x}{pi}$, so $f^{-1}(x) = tan pi x$. $f$ maps $mathbb{R}$ to $(-dfrac12,dfrac12)$.
$$g(x) = begin{cases}
x in mathbb{Q} & x + sqrt{5}\
x notin mathbb{Q} & x\
end{cases}$$
$$g^{-1}(x) = begin{cases}
x > 1 & x - sqrt{5}\
x le 1 & x\
end{cases}$$
So $g circ f$ maps from $mathbb{R}$ to a certain subset of the irrationals between $-dfrac12$ and $dfrac12 + sqrt{5}$, and $f^{-1} circ g^{-1}$ maps the inverse.
$endgroup$
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
add a comment |
$begingroup$
Let $f(x) = dfrac{arctan x}{pi}$, so $f^{-1}(x) = tan pi x$. $f$ maps $mathbb{R}$ to $(-dfrac12,dfrac12)$.
$$g(x) = begin{cases}
x in mathbb{Q} & x + sqrt{5}\
x notin mathbb{Q} & x\
end{cases}$$
$$g^{-1}(x) = begin{cases}
x > 1 & x - sqrt{5}\
x le 1 & x\
end{cases}$$
So $g circ f$ maps from $mathbb{R}$ to a certain subset of the irrationals between $-dfrac12$ and $dfrac12 + sqrt{5}$, and $f^{-1} circ g^{-1}$ maps the inverse.
$endgroup$
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
add a comment |
$begingroup$
Let $f(x) = dfrac{arctan x}{pi}$, so $f^{-1}(x) = tan pi x$. $f$ maps $mathbb{R}$ to $(-dfrac12,dfrac12)$.
$$g(x) = begin{cases}
x in mathbb{Q} & x + sqrt{5}\
x notin mathbb{Q} & x\
end{cases}$$
$$g^{-1}(x) = begin{cases}
x > 1 & x - sqrt{5}\
x le 1 & x\
end{cases}$$
So $g circ f$ maps from $mathbb{R}$ to a certain subset of the irrationals between $-dfrac12$ and $dfrac12 + sqrt{5}$, and $f^{-1} circ g^{-1}$ maps the inverse.
$endgroup$
Let $f(x) = dfrac{arctan x}{pi}$, so $f^{-1}(x) = tan pi x$. $f$ maps $mathbb{R}$ to $(-dfrac12,dfrac12)$.
$$g(x) = begin{cases}
x in mathbb{Q} & x + sqrt{5}\
x notin mathbb{Q} & x\
end{cases}$$
$$g^{-1}(x) = begin{cases}
x > 1 & x - sqrt{5}\
x le 1 & x\
end{cases}$$
So $g circ f$ maps from $mathbb{R}$ to a certain subset of the irrationals between $-dfrac12$ and $dfrac12 + sqrt{5}$, and $f^{-1} circ g^{-1}$ maps the inverse.
edited Jul 8 '14 at 17:46
answered Jul 8 '14 at 17:39
NovaDenizenNovaDenizen
3,437718
3,437718
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
add a comment |
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
$gof$ is not onto!
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 17:48
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
You are correct, but it doesn't have to be onto. The question asked for a bijective map from $mathbb{R}$ to an irrational subset of the reals.
$endgroup$
– NovaDenizen
Jul 8 '14 at 17:50
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
$begingroup$
Yeah! In this case, it is not interesting! :)
$endgroup$
– Mohammad Khosravi
Jul 8 '14 at 18:04
add a comment |
$begingroup$
Let $A_i = pi^i {mathbb Q}$ and $ A =cup_{ige0} A_i$. Then the map $h:{mathbb R}backslash{mathbb Q}rightarrow {mathbb R}$
$$
h(x) = left{
begin{array}{ll}
pi x & xin A \
x & x in B={mathbb R}backslash A\
end{array}
right.
$$
is a bijection.
$endgroup$
add a comment |
$begingroup$
Let $A_i = pi^i {mathbb Q}$ and $ A =cup_{ige0} A_i$. Then the map $h:{mathbb R}backslash{mathbb Q}rightarrow {mathbb R}$
$$
h(x) = left{
begin{array}{ll}
pi x & xin A \
x & x in B={mathbb R}backslash A\
end{array}
right.
$$
is a bijection.
$endgroup$
add a comment |
$begingroup$
Let $A_i = pi^i {mathbb Q}$ and $ A =cup_{ige0} A_i$. Then the map $h:{mathbb R}backslash{mathbb Q}rightarrow {mathbb R}$
$$
h(x) = left{
begin{array}{ll}
pi x & xin A \
x & x in B={mathbb R}backslash A\
end{array}
right.
$$
is a bijection.
$endgroup$
Let $A_i = pi^i {mathbb Q}$ and $ A =cup_{ige0} A_i$. Then the map $h:{mathbb R}backslash{mathbb Q}rightarrow {mathbb R}$
$$
h(x) = left{
begin{array}{ll}
pi x & xin A \
x & x in B={mathbb R}backslash A\
end{array}
right.
$$
is a bijection.
edited Jul 8 '14 at 17:49
answered Jul 8 '14 at 17:41
Mohammad KhosraviMohammad Khosravi
2,014716
2,014716
add a comment |
add a comment |
$begingroup$
Enumerate $Bbb Q$ as $q_n$ for $ninBbb N$. Now define,
$$f(x)=begin{cases}e^{2n+1} & x=q_n\e^{2n} & x=e^n, ninBbb N\x&text{otherwise}end{cases}$$
Key point here is that $e$ is transcendental, so $e^nnotinBbb Q$ for any $n>0$. You can effectively replace $e$ by any other number with this property. For example $pi,sqrt2^sqrt2$, Liouville number, and so on and so forth.
$endgroup$
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
add a comment |
$begingroup$
Enumerate $Bbb Q$ as $q_n$ for $ninBbb N$. Now define,
$$f(x)=begin{cases}e^{2n+1} & x=q_n\e^{2n} & x=e^n, ninBbb N\x&text{otherwise}end{cases}$$
Key point here is that $e$ is transcendental, so $e^nnotinBbb Q$ for any $n>0$. You can effectively replace $e$ by any other number with this property. For example $pi,sqrt2^sqrt2$, Liouville number, and so on and so forth.
$endgroup$
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
add a comment |
$begingroup$
Enumerate $Bbb Q$ as $q_n$ for $ninBbb N$. Now define,
$$f(x)=begin{cases}e^{2n+1} & x=q_n\e^{2n} & x=e^n, ninBbb N\x&text{otherwise}end{cases}$$
Key point here is that $e$ is transcendental, so $e^nnotinBbb Q$ for any $n>0$. You can effectively replace $e$ by any other number with this property. For example $pi,sqrt2^sqrt2$, Liouville number, and so on and so forth.
$endgroup$
Enumerate $Bbb Q$ as $q_n$ for $ninBbb N$. Now define,
$$f(x)=begin{cases}e^{2n+1} & x=q_n\e^{2n} & x=e^n, ninBbb N\x&text{otherwise}end{cases}$$
Key point here is that $e$ is transcendental, so $e^nnotinBbb Q$ for any $n>0$. You can effectively replace $e$ by any other number with this property. For example $pi,sqrt2^sqrt2$, Liouville number, and so on and so forth.
edited Jul 8 '14 at 18:03
answered Jul 8 '14 at 17:47
Asaf Karagila♦Asaf Karagila
306k33438769
306k33438769
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
add a comment |
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
$begingroup$
@David: $e$ is transcendental. So yes.
$endgroup$
– Asaf Karagila♦
Jul 8 '14 at 18:00
add a comment |
$begingroup$
Consider $A$ = { $pi + n : n in Bbb N$}.
Clearly $A$ is countable. ( Consider the bijection $n rightarrow pi + n$ , $forall n in Bbb N$).
So elements of $A$ can be expressed as, $A = {a_k : k in Bbb N}$.
And we also can have $Bbb Q = {b_k : k in Bbb N}$
Now consider the bijection
$phi : Bbb R rightarrow Bbb R - Bbb Q$ by,
$phi(x) := a_{2k+1}$ if $ x = b_k , x in Bbb Q$.
= $a_{2k}$ if $x = a_k , x in A$
= $x$ if $x in Bbb R - (A cup Bbb Q)$
The construction in my example can be seen as a very general bijection from a general uncountable set to a proper uncountable subset of it.
$endgroup$
add a comment |
$begingroup$
Consider $A$ = { $pi + n : n in Bbb N$}.
Clearly $A$ is countable. ( Consider the bijection $n rightarrow pi + n$ , $forall n in Bbb N$).
So elements of $A$ can be expressed as, $A = {a_k : k in Bbb N}$.
And we also can have $Bbb Q = {b_k : k in Bbb N}$
Now consider the bijection
$phi : Bbb R rightarrow Bbb R - Bbb Q$ by,
$phi(x) := a_{2k+1}$ if $ x = b_k , x in Bbb Q$.
= $a_{2k}$ if $x = a_k , x in A$
= $x$ if $x in Bbb R - (A cup Bbb Q)$
The construction in my example can be seen as a very general bijection from a general uncountable set to a proper uncountable subset of it.
$endgroup$
add a comment |
$begingroup$
Consider $A$ = { $pi + n : n in Bbb N$}.
Clearly $A$ is countable. ( Consider the bijection $n rightarrow pi + n$ , $forall n in Bbb N$).
So elements of $A$ can be expressed as, $A = {a_k : k in Bbb N}$.
And we also can have $Bbb Q = {b_k : k in Bbb N}$
Now consider the bijection
$phi : Bbb R rightarrow Bbb R - Bbb Q$ by,
$phi(x) := a_{2k+1}$ if $ x = b_k , x in Bbb Q$.
= $a_{2k}$ if $x = a_k , x in A$
= $x$ if $x in Bbb R - (A cup Bbb Q)$
The construction in my example can be seen as a very general bijection from a general uncountable set to a proper uncountable subset of it.
$endgroup$
Consider $A$ = { $pi + n : n in Bbb N$}.
Clearly $A$ is countable. ( Consider the bijection $n rightarrow pi + n$ , $forall n in Bbb N$).
So elements of $A$ can be expressed as, $A = {a_k : k in Bbb N}$.
And we also can have $Bbb Q = {b_k : k in Bbb N}$
Now consider the bijection
$phi : Bbb R rightarrow Bbb R - Bbb Q$ by,
$phi(x) := a_{2k+1}$ if $ x = b_k , x in Bbb Q$.
= $a_{2k}$ if $x = a_k , x in A$
= $x$ if $x in Bbb R - (A cup Bbb Q)$
The construction in my example can be seen as a very general bijection from a general uncountable set to a proper uncountable subset of it.
edited Jan 22 at 13:20
answered May 6 '17 at 15:41
CoherentCoherent
1,147623
1,147623
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f860331%2fexample-of-a-bijection-from-the-set-of-real-numbers-to-a-subset-of-irrationals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown

$begingroup$
There are problems with all numbers of the form $-sqrt 2 +r$, with $rin mathbb Q$.
$endgroup$
– Git Gud
Jul 8 '14 at 17:18
$begingroup$
Worse than that -- your function maps $mathbb R$ onto itself
$endgroup$
– MPW
Jul 8 '14 at 17:20
9
$begingroup$
Map the rationals to the odd non-zero multiples of $sqrt2$. Map the non-zero multiples of $sqrt 2$ to the even multiples of $sqrt 2$. Take the identity elsewhere.
$endgroup$
– David Mitra
Jul 8 '14 at 17:23