Step missing in the proof of $\mathbb{R}$ being uncountable. Today I saw the proof of the uncountability of $\mathbb{R}$, where given  a list of all elements of $\mathbb{R}$, we produce an element not in the list by requiring that its $n$-th digit is different from the $n$-th digit of the $n$-th element of the list. Since it has different decimal expansion from every element in the list, it can't be on the list. I think this last statement is actually wrong since in $\mathbb{R}$ one number can have more than one decimal expansion. So even if the decimal expansion of the newly generated element differs from those of the elements on the list, this doesn't mean that the element is not in the list.
Am I right? and if so, how can the argument be fixed?
 A: You are right. The argument can be fixed; it usually is fixed. The only numbers with more than one decimal expansion have exactly two of them; they are the numbers like, say, $1.26$, which is equal to $1.2599999999\ldots$ In order to fix the argument, we choose the $n$th digit such that it is different from the $n$th digit of the $n$th number and also different from $9$. And we also choose the decimal representation of the $n$th number so that it doesn't end with infinitely many $9$'s.
A: you are right, but it's not enough to invalidate the proof and it is fixable.
The only real numbers with two different decimal expansions are those that can be written with an infinite number of $9$s at the end or those that can be written with an infinite number of $0$s at the end.  (All give an argument why at the end of this post).
So creating the element that will not be on the list replace the $n$ digit of the $n$ item with a different digit.  But a different digit that is not a $9$ or a $0$.
Alternatively we could insist that when we express a number in decimal, if it has two representations we always use the one with infinite $0$s. And we replaces $0$s with  $1$s and we won't have the issue.
=======
Okay, why are infinite $0$s at the end or infinite $9$s the only two cases where a real number has two decimal extensions?
The way we figure out decimal expansions is that we have a real $x$ and we have calculated $x'$ which is $x$ up to $k$ decimal spaces.  Now there is a $d \in \{0,1,2,3,4....,9\}$ so that $d\cdot \frac 1{10^k} \le x-x' \le d+1 \cdot \frac 1{10^k}$
The idea is that we pick our $k$th decimal as $d$ and let $x" = x' + d\times 1{10^k}$ and then continue along by figuring what digit we have $d_{k+1} \cdot \frac 1{10^{k+1}} \le x-x" \le d_{k+1}\times \frac 1{10^{k+1}}$ and we do that forever....
Now if $d\cdot \frac 1{10^k} < x-x' < d+1 \cdot \frac 1{10^k}$ we have no choice but to select $d$ as our $k$ decimal digit.
But if $x-x' = m\times \frac 1{10^k}$ exactly for an integer we will have $(m-1)\cdot \frac 1{10^k} \le (m\cdot \frac 1{10^k}= x-x') \le (m+1)\cdot \frac 1{10^k}$ and we have two choices for our $k$th decimal digit: We could pick $m$ (and that's the reasonable choice) or we could pick $m-1$ (a weird choice but a legal one).
If we pick $m$ as our $k$th decimal, then  $x" = x' + m\times \frac 1{10^k} = x$ and $x-x" = 0$ and we will get $0$ for all the rest of the digits.
If we pick $m-1$ as our $k$th decimal, then $x" = x' + (m-1)\times \frac 1{10^k} = x-\frac 1{10^k}$ and $x-x" = \frac 1{10^k}$ and when we do $d_{k+1}\times 10^{k+1}\le x-x" \le (d_{k+1}+1)\times \frac 1{10^{k+1}}$ and $d_{k+1} = 0,1,2,3,...,9$ we will have no choice but $d_{k+1} =9$ and we will get $9$s for the rest of the digits.
And those are the only ambiguities and the only way we get two decimal representations.
.....
Post script:
If we start with a real number $x$ and try to construct a decimal expansion from  a real number via rounding down then every real number will only have one decimal expansion and we will never get a decimal expansion with infinite $9$s at the end.
The only reason we have to worry about decimal expansions with infinite $9$s at the end, is that if we start with a decimal expansion first, and try to calculate which real number it is from the decimal expansion we could be given an expansion with an infinite number of $9$s at the end.  We could be given that and we have to figure what then?
But if that happens we discover that this is just the same as if we had taken the very last non-$9$ and added one to it and then continued with an infinite number of $0$.
