How is the "diagonal proof" valid?

Short version: that's not actually the diagonal proof.


That argument is indeed incorrect, for precisely the reason you say - as written, all it shows is that there is an irrational number, and so $\mathbb{R}\supsetneq\mathbb{Q}$.

However, it does contain the germ of the right idea. Note that in the first part we didn't actually use anything about rationals: what we really showed was the following.

Suppose $(a_i)_{i\in\mathbb{N}}$ is any sequence of real numbers. Then there is a real number $b$ such that $b\not=a_i$ for any $i$.

This does ultimately imply that $\mathbb{R}$ cannot be put in bijection with $\mathbb{Q}$. We already know that there is a sequence $(q_i)_{i\in\mathbb{N}}$ such that every rational appears in the sequence. Now suppose $f:\mathbb{Q}\rightarrow\mathbb{R}$ were a bijection. Then letting $a_i=f(q_i)$ we would get a counterexample to the result above.

So basically the argument in the OP has the right idea, but doesn't implement it correctly.


It sounds like the version of the argument you gave here is slightly different from the standard version. The standard version says: suppose that we had an enumeration $a_1, a_2, a_3, \ldots$ not just of the rationals, but of every real number. Then the diagonal argument constructs a new real number that couldn't have appeared in your enumerated list, yielding a contradiction.

Note that this argument, as written, doesn't directly talk about the rational numbers at all -- the contrast between irrational numbers and rational numbers comes from observing that we can enumerate the rational numbers in this manner, so since we can't enumerate $\mathbb{R}$, the irrationals must be making up the gap.