How do we know that Cantor's diagonalization isn't creating a different decimal of the same number?

This is in fact a potential problem if the proof is carelessly stated, but it’s easily avoided: if the $n$-th decimal digit of the $n$-th number on the list is $7$, we replace it by $6$, and if it’s not $7$, we replace it by $7$. The only numbers in $(0,1)$ with two decimal representations are those with one representation ending in an infinite string of nines and the other in an infinite string of zeroes, and this version of the argument clearly doesn’t produce a number of either of those forms.


As Henning Makholm stated in his comment, you're supposed to select digits that are different from the diagonal you look at, not the diagonal digits themselves. Make sure you also select digits different from $9$ and $0$, and the problem is avoided


Let's talk about numbers (which are numbers) and their representation (which are a list of digits).

You says:

Cantor's diagonalization is a way of creating a unique number given a countable list of all reals.

Not exactly, Cantor's diagonalization is a way of creating a unique representation given a countable list of representations of real number. (not all number).

I can see how Cantor's method creates a unique decimal string but I'm unsure if this decimal string corresponds to a unique number. Essentially this is because $1 = 0.\overline{999}$

The method create an unique decimal string (ie. representation). And a representation match only one number.

  • You may have 2 representation of 1 number.
  • But from 1 representation, you only have 1 number.

Let add a theorem (this one is hard):

  • If the representation doesn't end with an infinite string of 9 or 0, the representation is unique.

Now, you present an hypothetical list of representations of all real numbers between 0 and 1.

You use Cantor diagonalization to extract an unique diagonal representation that represent an unique diagonal number.

You say:

But 0.5 was the first number and $0.5 = 0.4\overline{999}$ so this hasn't produced a unique number.

This has produced a unique representation $0.4\overline{999}$ so it match an unique number which is $1/2$. Yes this number has two representation but there is only one unique number here.

It appears that the diagonal representation ($0.4\overline{999}$) and the first representation of the list ($0.5\overline{000}$) represent the same number ($1/2$ is another way to represent it).

In other word, you find out that the diagonal number (which is a real number in (0, 1)) is represented in your list of representation of all real numbers in (0, 1).

That's coherent and fine.

Now you want to build a number that is not represented in the list. And you will build a representation of it from the diagonal representation.

You will use @BrianM.Scott method and build a representation of a number that:

  • Doesn't contains any 0 or 9. So it's the unique representation of a given number.
  • Doesn't match any representation present in the list.
  • Represent a number in (0, 1)

That it, you find a number that has a unique representation and this representation is not in the list.

And you prove that your hypothetical list doesn't exist.