First I'd like to recognize the shear number of these "anti-proofs" for Cantor's Diagonalization Argument, which to me just goes to show how unsatisfying and unintuitive it is to learn at first. It really gives off a "I couldn't figure it out, so it must not have a mapping" kind of vibe. I have read these posts [ 1,
2,
3,] and do recognize many of the mistakes though potentially not all so I apologize if I end up repeating some of them. That said here is my attempted proof which I know must be wrong but don't understand why.
Proof by Contradiction:
Since all subsets of a countable set are countable, if rational numbers are countable then the subset $(0,1)\in \mathbb{Q}$ is therefore countable.
Where $i \in \mathbb{N}$ and $n,d\in \mathbb{N}$ let:
$$
q_i=\frac{2^{n_{i1}}\cdot 3^{n_{i2}} \cdot 5^{n_{i3}} \cdot 7^{n_{i4}} \cdot ... }{2^{d_{i1}}\cdot 3^{d_{i2}} \cdot 5^{d_{i3}} \cdot 7^{d_{i4}} \cdot ... }, \text{where} \,n_{ij}\ne0\to d_{ij}=0 \, \text{and} \,d_{ij}\ne0\to n_{ij}=0
$$
By using the fundamental theorem of arithmetic we know that we can represent all integers in both the numerator and denominator of $q_i$ and that $q_i\ne q_k$ unless for all index values of $\mathbf{n}_i$ and $\mathbf{d}_i$ are equal to those of $\mathbf{n}_k$ and $\mathbf{d}_k$.
With this we can represent the set $(0,1)\in\mathbb{Q}$ as $\{q_1, q_2, q_3,...\}$.
However, using Cantor's Diagonalization Argument we can create:
$$
q=\dfrac{2^{n_{11}}\cdot 3^{n_{22}} \cdot 5^{n_{33}} \cdot 7^{n_{44}} \cdot ...}{2^{d_{11}\,+1}\cdot 3^{d_{22}\,+1} \cdot 5^{d_{33}\,+1} \cdot 7^{d_{44}\,+1} \cdot ...}
$$
The new value $q$ will not be equal to any elements in $\{q_1, q_2, q_3, ...\}$ and it also isn't necessarily a larger number or smaller number (so I'm not just counting up or down by one). The value $q$ will also need to exist in the subset.
Any help pointing out my mistakes will help me finally seal my unease with Cantor's Diagonalization Argument, as I get how it works for real numbers but I can't seem to wrap my mind around it not also being applied to other sets which are countable.

- 29
-
"The value $q$ will also need to exist in the subset." Why? Specifically, why should $q$ be rational? (An infinite product of rationals need not be rational, just as an infinite sum of rationals need not be rational.) This issue is left implicit in the uncountability of the reals since it's obvious that any infinite decimal sequence corresponds to a real number, but here it's a serious issue (and this is why it shouldn't be left implicit in the usual presentation). – Noah Schweber Apr 03 '21 at 19:05
-
While not addressing your specific proposed construction, each of the following posts has the same basic idea (diagonalize against $\mathbb{Q}$), and the answers point out the same flaw (why should you wind up with a rational at the end?): https://math.stackexchange.com/questions/3607839/, https://math.stackexchange.com/questions/40728/, and to a lesser extent https://math.stackexchange.com/questions/1914901/ (and many others as well). Is there a point that remains unclear? (If not, while this is a very reasonable question it should be closed as a duplicate since it has been asked before.) – Noah Schweber Apr 03 '21 at 19:18
-
@NoahSchweber woops somehow kept thinking I would end up with a number smaller than 1 with this construction but I suppose it really doesn't need to which is obviously a big issue. As to your point about it not necessarily being a rational number, I'm very confused by that. It's an integer over an integer, I don't see how much more rational it can get... – Dawson Apr 03 '21 at 20:34
-
1"It's an integer over an integer" No it's not - it's an infinite product of integers over an infinite product of integers (and actually even that's a bit inaccurate since we can't evaluate the numerator and denominator separately, but let's ignore that for now). That's not guaranteed to be rational anymore - consider e.g. the Wallis formula for $\pi$. – Noah Schweber Apr 03 '21 at 20:50
-
Right but aren't those types of formulas explicitly used as approximations? – Dawson Apr 03 '21 at 20:52
-
1No, that literally is $\pi$. The approximations are the finite initial segments of those infinite products. – Noah Schweber Apr 03 '21 at 20:53
-
1Regardless, do you understand how your representation of $q$ does not constitute an integer over an integer? – Noah Schweber Apr 03 '21 at 20:54
-
To clarify for later readers: based on the OP's subsequent comments, I no longer believe that this is a duplicate. (I'm leaving my original comment up though since the links in it may be useful nonetheless.) Specifically, this is because of their focus on a particular construction which as far as I can tell doesn't appear in other questions. Even though the underlying issue is the same, I think the "surface difference" does make it a distinct question. (That said, I don't feel so strongly that I'll vote to reopen.) – Noah Schweber Apr 03 '21 at 22:11
2 Answers
I believe the mistake is that you are forgetting a condition that the numbers $n_{i,j}$ and $d_{i,j}$ must satisfy: At most a finite number of them can be non-zero. This changes everything.
Cantor's argument shows there is no surjective function from $X$ to $2^X$, but what we have (instead of $2^X)$ is more akin to the the set of finite subsets of $X$. See this answer here for more information on the cardinality of this set.

- 105,651
-
I'm not sure I understand why the first point makes this different from real numbers. Don't those elements each also only have a finite number of digits which can be non-zero? I found an issue in one of the earlier comments, though again it seems to only prove my construction wrong and not help my understanding. I think your second point though is leading me to some new space to consider and think about my question though, so thank you. – Dawson Apr 03 '21 at 20:43
-
2No, when you only allow for a finite number of non-zero digits you only get numbers of the form $\frac{n}{b^k}$ where $b$ is the base you are using (which is usually $10$ ). This doesn't even give you all the rational numbers, and definitely doesn't give you any of the irrational ones. – Asinomás Apr 03 '21 at 20:46
The mistake you're making is basically that an infinite product of rationals need not be rational (any more than an infinite sum of rationals need be rational - consider e.g. $3+0.1+0.04+0.001+0.0005+...$). The Wallis formula is a concrete example of how this can break down. In fact, it's not hard to show the following:
Every real number can be written as an infinite product of rationals; that is, for every real number $a$ there is some sequence of rationals $(q_i)_{i\in\mathbb{N}}$ such that $a=\prod_{i\in\mathbb{N}}q_i$.
(HINT: think about how every real is the limit of a sequence of rationals ...)
Note that there's a crucial point about limits here: limits are not approximations, even though the intuitive way we think about them (initially at least) is in terms of approximation. For example, the infinite product in the Wallis formula literally is $\pi\over 2$, in the same way that $\lim_{n\rightarrow\infty}(1-2^{-n})$ literally is $1$. A general consequence of this, which is often surprising at first, is that a limit of numbers with a certain property need not have that property. Here of course the relevant property is rationality.

- 245,398
-
I suppose I'm still quite new to math and quite unfamiliar with working with infinity as a concept in general. Thank you for all the time you've put into answering me. I think I need to get back into my texts and figure out how to think about these concepts – Dawson Apr 03 '21 at 21:06
-
1@Dawson Please don't let this discourage you - understanding limits is a genuinely difficult task, especially given how terribly they're often presented. A crucial point is to separate the brief intuitive descriptions from the formal definitions; this is often hard to motivate since early on an informal approach doesn't seem to run into problems, but in your question here you're seeing exactly the need to carefully develop a precise theory once we turn to more complicated questions. – Noah Schweber Apr 03 '21 at 21:11