# Can we find an injection from the set of irrational numbers to a list of rational numbers that terminate

We can map an injection from an infinite list of irrational numbers to an infinite list of rational numbers that terminate like this

$0.314159 \dots \to 0.3000\dots$

$0.324159\dots \to 0.32000\dots$

$0.324259\dots \to 0.324000\dots$

$0.514159\dots \to 0.5000\dots$

$0.554159\dots \to 0.55000\dots$

$0.514159\dots \to 0.51000\dots$

$\dots$

The idea is to map the irrational to a rational created from the digits of the irrational itself.

If our irrational is $0.abcdef \dots$

then if $0.a$ has not been used we map $0.abcdef \dots \to 0.a$

else if $0.ab$ has not been used we map $0.abcdef \dots \to 0.ab$

else if $0.abc$ has not been used we map $0.abcdef \dots \to 0.abc$

since we have an infinite string of digits to choose from and we only need a finite string, this operation will always succeed.

But we can’t map the whole set of irrational numbers to an infinite list of rational numbers that terminate because the set of irrational numbers is unlistable.

Yet, we can diagonalize the list of irrational numbers and find a number that is not in our list of irrational numbers.

$d = 0.324159 \dots d' = 0.555565 \dots$

The problem is that we will still be able to map that irrational number to a number in the list of rational numbers that terminate. Because all the rational numbers have an infinite tail of zeros and we can thus find another number to pair with the new found irrational number.

We can then map $d' = 0.555565 \dots \to 0.555000 \dots$

or $d' \to 0.5555000 \dots$

or $d' \to 0.55556000 \dots$

or $d' \to 0.555565000 \dots$

$etc \dots$

Is there a limit to how many irrationals we can map to the rationals with this method?

Since diagonalization does not work, is it possible to find an irrational number that can't be mapped to a unique rational number?

I will give an example from Hilbert's Hotel to illustrate how this injection works for the natural numbers as well. It is a bit tedious, but the idea is that we are going to map every possible diagonal from every possible ordering of the irrationals.

So, here is the story from Infintyland.

The binary irrationals between $0$ and $1$ are having a convention for the weekend and they will be staying at Hilbert's Hotel, where a neon sign flashes “No Vacancy", yet carved over the door "GUESTS WELCOME".

When an infinite bus of binary irrationals pulls up to the hotel, the night manager boasts that he will never turn away a guest. He will make sure that he can accommodate all the elements on the bus and he will also reserve a room for any irrational that is not on the bus, just in case they show up later.

Here is the first few irrationals on the bus.

$0.00101010 \dots$

$0.11001010 \dots$

$0.00111010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

He will assign $0.00\color{red}{1}01010 \dots$ to room $1$.

Then he will diagonalize the list to get $0.011100 \dots$ then change all the digits to $0.100011 \dots$

Since $0.\color{red}{10}0011 \dots$ can't be on this bus he will reserve room $10$ for it.

He will then assign the second element $0.\color{red}{11}001010 \dots$ to room $11$.

He will then flip the first two elements on the list

$0.11001010 \dots$

$0.00101010 \dots$

$0.00111010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

Then he will diagonalize the list to find a number that can't be on the list $0.101100 \dots$ becomes $0.010011 \dots$

Since $0.0 \color{red}{100}11 \dots$ can't be on this bus he reserves room $100$ for it.

He will then assign the 3rd element on the bus $0.00 \color{red}{111}010 \dots$ to room $111$.

He will then flip the 2nd and 3rd element on the list

$0.00101010 \dots$

$0.11001010 \dots$

$0.00111010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

to get

$0.00101010 \dots$

$0.00111010 \dots$

$0.11001010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

Then the diagonal $0.000100 \dots$ becomes $0. \color{red}{1110}11 \dots$ and the manager reserves room $1110$ for it.

He will then move the third element to the top of the list

$0.00101010 \dots$

$0.11001010 \dots$

$0.00111010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

to get

$0.00111010 \dots$

$0.00101010 \dots$

$0.11001010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

Then the diagonal $0.000100 \dots$ becomes $0. \color{red}{11101}1 \dots$ and the manager reserves room $11101$ for it.

He will then flip the 2nd and 3rd element on the list

$0.00101010 \dots$

$0.11001010 \dots$

$0.00111010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

to get

$0.00101010 \dots$

$0.00111010 \dots$

$0.11001010 \dots$

$0.01010101 \dots$

$0.00010101 \dots$

$0.11101010 \dots$

$\dots$

Then the diagonal $0.011100 \dots$ becomes $0. \color{red}{1000}11 \dots$ and the manager reserves room $1000$ for it.

Then he will assign a room to the 4th irrational number and he will make 7 reservations for all the possible combinations of the elements that can't be on the bus.

Then he will assign a room to the 5th irrational number and he will make 15 reservations for all the possible combinations of the elements that can't be on the bus.

Then he will assign a room to the 6th irrational number and he will make 31 reservations for all the possible combinations of the elements that can't be on the bus.

Notice that some of the irrational numbers that are not on the bus, will have more than one room reservation. But the night manager is not concerned about that since he has an endless supply of rooms and he just wants to make sure that no irrational will be without a room.

Will the night manager ever have to turn away a guest or will his boasting about never turning away a guest prevail?

Your map is simply not correct. The cardinality of the rational numbers is less than that of the irrationals.

If you consider any subset of the real numbers with non-zero measure it will be impossible to construct an injective map from the irrational numbers contained in that subset to any set of rational numbers.

However, if you pick a countable set of irrational numbers you can construct such a map. The problem with your map is that you assumed you could write down all the irrational numbers.

When you define an injection from one set to another, you should say more than “like this”. For me it was not at all obvious what you were trying to say, as I had never seen this before. But, it seems to me that you are peeling off just enough digits from the front of the irrational number to make a rational number that has not yet been used. And since the irrational number has an infinite number of digits, you should be able to do this with any list of irrational numbers. This would contradict Cantor’s diagonal argument. The problem with this approach, is that you can never account for all the irrational numbers, let me give you an example to demonstrate this.

Imagine your list had a $0.1$ followed by the digits of $\pi$. This would be an irrational number.

Then the next number on the list would be $0.2$ then the digits of $\pi$.

Then $0.3$ and the digits of $\pi$.

And so on, forever.

Then you could map

$0.1 \color{red} {314159\dots} \to 0.1$

$0.2\color{red} {314159\dots} \to 0.2$

$0.3\color{red} {314159\dots} \to 0.3$

With just this one special irrational number, you will have used up all the rational numbers that terminate.

Then what number would you map to $\frac{\sqrt2}{10} = 0.14142 \dots$

You can’t use $0.1$ because you used it for $0.1 \color{red} {314159\dots}$

You can’t use $0.14$ because you used it for $0.14 \color{red} {314159\dots}$

You can’t use $0.141$ because you used it for $0.141 \color{red} {314159\dots}$

And so on, forever.

• You are right, my mapping is not clear, I will try to fix it. But, your objection does not work, it would be like mapping all the prime numbers to the rational numbers and then saying we have used up all the rational numbers, then what will you map the number 16 to? – Ivan Hieno Mar 28 '18 at 12:53
• No. Because the prime numbers and the rationals have the same cardinality. There is no injective mapping for a higher cardinality to a lower cardinality. You are getting around this by not mapping all irrationals but only mapping a SUBSET if the irrationals. A countable subset. This means there are infinitely many irrationals not in the subset that would be matched to the same one. But they are not in the subset. Some how you seem to think that by saying they aren't in the subset that they somehow map to different rationals. They don't. – fleablood Mar 28 '18 at 16:28
• I added a story to the question to show how we can increase the size of the rationals or naturals, by mapping the impossible diagonal numbers as we go. Thereby avoiding Cantor's fatal number not on the list. Can we find some other method of producing an unmappable irrational? – Ivan Hieno Apr 15 '18 at 17:21
• Mapping the diagonals as you go is new enough, but you are trying to get around Cantor's diagonal proof, which has withstood the scrutiny of the best mathematicians in the last 100 years. Before anything you say will be taken seriously, you must explain why Cantor's proof is wrong. Can you do that? – Adam53 Apr 16 '18 at 15:40

The cardinality of all rationals and the cardinality of all terminating rationals are both the same; countably infinite. So we can map any countably infinite list of irrationals to a list of all terminating rationals.

So far as I can tell there is absolutely nothing of interest in mapping proper subsets with a lower cardinality to a set with a lower cardinality.

• It is interesting because we have mapped all the irrationals on the list to a rational, and we can even map the irrationals that are not on the list to a rational. So, how can we find an irrational that can't be in this mapping? – Ivan Hieno Mar 28 '18 at 13:02
• What are you talking about? If we can map irrationals that are not on the list then the mapping is not injective and the list is not the domain. We can always restrict the domain of any function to make it injective by simply tossing out all but one of the the elements that get mapped to the same value. That is boring. You find a number not on the list simply by taking one of the irrationals that you threw away. That is boring. Restricting a domain to force a function to be injective is an inane triviality. There is no insight to be had here. – fleablood Mar 28 '18 at 16:18
• Let set A be all the listable irrational numbers and set B is all irrationals not in A. Then we can map all the elements in A to some rational number. And since we have a function that finds a rational from the irrational itself, we can map the elements of B to some rational that was not used in the map of set A. This does not seem right. So, we need to find an irrational that can't have a rational counterpart. To me this is not boring. – Ivan Hieno Mar 29 '18 at 15:36
• "And since we have a function that finds a rational from the irrational itself, we can map the elements of B to some rational that was not used in the map of set A." What?!?!?! Why?!?!? That's nonsense. That's wrong. And incoherent. You are babbling incoherently. – fleablood Mar 29 '18 at 16:48
• ""So, we need to find an irrational that can't have a rational counterpart. To me this is not boring." Let $A\subset\mathbb R\setminus\mathbb Q$ be a countable set. Let $i:A\to\mathbb Q$ be a bijection. Let $x\in [\mathbb R\setminus\mathbb Q]\setminus A$. Then $x$ is an irrational that is not in $A$ and does not have a rational counterpart. That was EXCEEDINGLY boring!... and trivial. – fleablood Mar 29 '18 at 16:56