by ballenf · 3y ago · 0 comments
The proof of uncountability of real numbers starts with a process of enumerating this infinite list of infinitely long binary numbers. Then says that we construct a number that can't be on them by flipping bits the down the diagonal.
But hasn't this concept already kind of mixed domains? The enumeration was describing a process, but the diagonal flipping move seems to assume or require that the enumeration is complete or at least paused. How could the diagonal construction ever finish to allow a "check" of whether the result of that process is actually on the list.
Obviously at any point in time it won't be, but aren't we just kind of proving that we can construct a number that isn't on the list yet? And the first process would certainly eventually get to our constructed number?
The diagonal just seems like a shortcut to a number that we know the first process hasn't gotten to yet?
I just don't get how we conclude that Integers are countable and Reals are Uncountable from this proof, even though its obvious in an intuitive sense that Reals have to be much "larger".
It's like saying "There are infinitely many primes because if not we could multiply them all together and add one to generate another one". You don't actually have to find all the prime numbers and work out a product. You are saying that's actually not possible because the idea contradicts itself.
Assume you had a list of every integer. To begin with, you couldn't start flipping bits from the left since integers don't start from the left. You could however imagine them having a sequence of 0s extending infinitely to the left, e.g. 101 = ...00000101. If you did that, the diagonal argument is possible to perform only starting from the rightmost digit, and you do end up with some string of numbers.
The problem is this: If you do walk right-to-left flipping bits in such a list, the integer case has an "out". You do end up with a string of 0s and 1s, but by assumption it can't have 0s extending infinitely to the left because then it would have been on the list. In other words, the thing you end up with never has its "final" 1, and so what you end up with isn't an integer.
This is really the crux of the argument: Not every string of 0s and 1s actually represents an integer. However, put any string of 0s and 1s after the radix point ("decimal point") and that does represent a real number. So what you construct in the real version of the argument really is a real number not on the list (i.e. a contradiction).
It's instructive to do the same thought experiment with an imaginary list of rational numbers written out as decimals and see why the diagonal argument fails in that case too.
Now I described the above as a kind of procedure ("walk right-to-left") but that's really just for convenience. There isn't any actual iteration going on.
Is that to say that only the finite ones are? Since an infinitely long string that starts with 1 is infinite in size?
Otherwise I can’t make sense of this statement.
It's maybe easier to think of the argument as working on sequences: From a sequence (x_0, x_1, x_2, ...) with each x_n a binary digit (i.e. 0 or 1) you can always construct a real number x = Sum(x_n / 2^n, n = 0, 1, 2, ...).
The integer you'd want to construct from such a sequence would be Sum(x_n * 2^n, n = 0, 1, 2, ...), but this only works if there's some N such that x_n = 0 for all n > N. Otherwise you would have an "infinite integer" (whatever that means). Valid positive integers are all on the form Sum(x_n * 2^n, n = 0, 1, 2, ..., N), i.e. the binary expansion is finite.
The subtlety of the diagonal argument (why it works for reals but not for integers/rationals) is that while it always produces _some_ string of digits, only the real numbers are defined such that the string of digits is itself always a real number. In the integer/rational case, you can construct a number "outside" the set you started from. (In fact you always do if the original list really was of all integers/rationals. Given any enumeration of the rationals, the diagonal argument can actually be used constructively to produce an irrational number.)
> How could the diagonal construction ever finish to allow a "check" of whether the result of that process is actually on the list.
> The diagonal just seems like a shortcut to a number that we know the first process hasn't gotten to yet?
I think you are mixing up the enumeration of the (hypothetically countable) reals with the existance of said set of reals, and viewing the construction of the counterexample as an actual process that involves programmatically iterating over the list instead of a description of how the digits of said new real number is created.
There is no pause or setp-by-step of this iteration that's required, since it's only telling you that the i'th digit of the counterexample will be distinct from the i'th digit of the i'th number (thereby creating a real not in your countable set, since you have created a number outside of your 1-1 mapping onto the natural numbers).
Countable sets can be finite or infinite. Most interesting countable sets are infinite. The enumeration then means a bijection with the natural numbers. Your definition of enumeration seems to require it to "complete" which is incorrect.
(I put "complete" in quotes because that's the word you used, but I don't want you to further confuse that with the completeness of real numbers which is a whole another thing.)
If you believe the reals are countable, then your task is to come up with one, just one, scheme for enumerating them (i.e. putting in 1-to-1 correspondence with the naturals). If, on the other hand, you believe the reals are uncountable, then your task is decidedly harder: You need to come up with some scheme that, given any proposed enumeration, you can produce a number definitively not on that list.
Cantor's argument does the latter. Given any scheme---say a computer program---that claims to enumerate the reals, Cantor's argument shows us how to build a corresponding computer program to generate the digits of a number that are never produced by your original program. I.e. if you let the original program list out N reals, Cantor's program can give you an N-digit number that it has definitely not listed. The original program certainly might list it later, but by that point it's listed N+M digits and Cantor's program can give an N+M-digit number that's missing. The point being that Cantor's program always works, no matter how big N gets.
On the other hand, as another poster has pointed out, the Cantor scheme fails to work for an actually countable set, like the even numbers or primes. Cantor's argument will still work in a sense. It will give you something, but the thing it gives you will always violate some property that the original set of things must satisfy, like having only finite digits or whatnot.
With that said, assume that you have some list of real numbers. In a sense, what we're asking for is a function f, such that f(i, j) returns the j-th digit of the i-th number on that list. [0, 1]
Then you construct a function g as follows:
def g(j)
f(j, j) + 1 % 10
end
Now you convince yourself of the fact that there is no number i, such that f(i, j) = g(j) for all j - or in other words, g encodes a different number than f(i, .) for any i. So, for every list of real numbers, there must be a number not on that list.[0]: I'm brushing over the fact that some different sequences of integers encode the same real number, e.g. 0.999... and 1.000... - it doesn't affect the argument substantially.
[1]: This function doesn't necessarily have to implementable in a programming language - mathematicians are fine with talking about "uncomputable functions" and claiming that they exist. The argument shows that such a function can't exist even non-constructively. You can avoid all that talk about uncomputable functions and numbers by getting into constructive mathematics, but that's another can of worms and as far as I know it comes with its own unintuitive results. For example, exactly the same diagonalisation argument shows that there is no computable function encoding a list of all computable numbers.
Cantor is doing a proof by contradiction. He’s assuming that the complete enumeration exists precisely because it is wrong.
If you object to making that assumption, you’re just agreeing with Cantor’s conclusion before he’s made the argument.
There is a way to completely define a countable list. I do not say that you can completely write the list out in finite time. But you can specify it fully. Write a function f : Nat -> X, where X is the type of the things in the list, such that f is total, i.e., provably halts on every input. Your favorite typed lambda calculus or other theorem proving language will give you this property basically for free. The entire list is encoded as f. It doesn't matter that you can only extract elements one at a time by processing this function. They're all there, well-defined.
Now, we use this technique twice in Cantor's argument. First, we suppose the existence of f : Nat -> Real with the property that f covers all the reals. What we mean by that is you cannot define a real, x, such that f i != x for all i. (But we will do so.)
Second, each real number is itself encoded as a countable list of digits. So, Real := Nat -> Digit. In some sense, every real number is itself "a process" of digit generation, but you don't need to carry it out. Simply holding the function will suffice. Now, it's kind of tricky to compare reals to see which are equal and unequal, but ignoring the 0.99999... = 1 issue, which can be resolved, a proof that x != y involves identifying just one place i : Nat where the digits disagree: x i != y i.
Here we go: define x as x i := (f i i) + 1 mod 10. We claim x witnesses that f doesn't cover the reals. We agreed this means we must show x != f i for all i. We agreed that means finding j such that x j != f i j. The proof we seek: Let j := i.
We're just pushing functions around in a suitably typed language. Everything halts, nothing is running forever, no infinite storage space is required to hold the supposed list of reals nor the digits of each real. You can whip this up pretty fast in Lean or Coq etc.
Incidentally the "exists no surjective map" interpretation may or may not be correct, depending on the exact choice of definitions.
Here is how it can be false.
Suppose that we define a function f in some programming language to be a real if it can be proven from a specific set of axioms that f(n) is always a rational, and that |f(n) + f(m)| is always less than or equal to 1/n + 1/m. Let's call those axioms, ASSUME.
It is now straightforward to write a program that maps the natural numbers onto the reals. Just do a breadth-first search for all proofs from ASSUME that some function f represents a real. Given n, we return the program that is the subject of the n'th such proof. It is also straightforward to do Cantor's diagonalization argument. But proving that the resulting function produces an output for every n requires proving that ASSUME is consistent. Which, as Gödel pointed out, hopefully doesn't follow from ASSUME. And therefore the construction does not result in a real by the chosen definition.
(When we start thinking carefully about reasoning, we find that there is an important difference between "X proves" and "X proves that X proves".)
Proof sketch: Turing Machines are enumerable by lexiographically sorting them. The Turing Machines that compute computable numbers are a subset of them. Therefore the set of computable numbers is subcountable.
Now assume that the set of computable numbers is enumerable by some Turing Machine M. Then I can construct a new computable number who's ith digit is a swap from the ith number's ith digit given by M (ie a diagonialization). This contradiction shows that the set of computable numbers is not enumerable.
Another way of looking at this is that determining if some Turing Machine computes a computable number requires deciding the halting problem, which cannot be done. TMs computing computable numbers are required to terminate given an input precision.
I don't know what you mean by "process". Any list of numerals like this will be missing (at least) a numerals is what he says.
Maybe let's take a step back.
It needs a proof by contraposition. The "normal" position is "S -> T" (so if S then T), which also fixes the contraposition "(not T) -> (not S)".
Cantor's idea is to have a list of (possibly infinite length) binary literals representing real numbers between 0 and 1 (and if those are uncountable, so are ALL the real numbers :P).
The important part is that first consider the set of all such literals, whether countable or not. Let's call those T (for "total"). But then consider the subset of those that can be enumerated. Let's call those S (for "subset").
The countability means that you have a function that literally enumerates those (i.e. a function "natural number -> literal", 1:1)
Enumerate the literal and enumerate the digit at some position in the literal.
Let a_n be the nth literal. The a_n need to be unique (in order for those to be an enumeration).
Let d(n, m) be the nth literal's digit at position n.
Now construct a new literal q that differs from the first string in the first position, from the second string in the second position and so on.
This q is NOT IN S. (it differs from any of the elements of S in at least one position each)
Thereby, we proved that if S is countable, then it's not all of T. (because we found some literal that's not on the list; the list of all needs to be bigger!)
So the "position" proof is: "Assume S is countable. Then show it's not all of T."
But that, by contraposition, means, if it's all of T then it's not countable. Which is what we wanted.
That’s not to say Cantor was wrong - much more likely we’re missing something, however I think the issue is more subtle than people realise.
The problem is what does existence mean?
Classical math includes "procedures" with processes based on absolute truth. They avoid paradox only because you cannot reason about the reasoning process itself. The result of this is simpler arguments, but we must accept the existence of things that we can never, even in principle, write down.
Now let's change existence to mean that mathematical things only exist when we can write them down. (Classical mathematics calls this the constructible universe.) So procedures must be computer programs. Real numbers are represented computer programs that produce a sequence of rational numbers converging at a known rate. An enumeration of real numbers is a program that produces a list of programs that themselves represent real numbers. And so on.
Now try Cantor's argument. We start with an enumeration of the real numbers. A program that creates a list of programs. We then construct a new real number as per Cantor. So far so good. And, as Cantor said, the new real number cannot be on the enumeration. Cantor now concludes that there are more real numbers.
BUT his conclusion is now false! I can easily write down a program that lists every possible program. Ones that crash. Ones that run forever and never stop. And, yes, ones that represent real numbers. It is a countable list. And our new real is on the list!
The problem isn't that there are too many real numbers. It is that you can't decide whether or not a given program represents a real number without solving the halting problem. So every enumeration has a choice - it either includes things that aren't real numbers, or it misses some real numbers. But all the things that can be real numbers are on a countable list!
The only sense in which there can be "more" real numbers in classical mathematics is that we accept the "existence" of numbers whose claim to exist is extremely tentative. And we do so with decision "procedures" that depend on decisions made based on unverifiable absolute truths.
If you want a sense of how different mathematics looks if you don't do that, look up Constructivism.
All of ZFC can be formulated with an effectively computable set of first-order axioms and every valid theorem has a proof which is nothing more than a finite string of symbols which can be checked in finite time.
It's really odd to claim that "you cannot reason about the reasoning process of classical mathematics".
Actually doing this requires making decisions based on absolute truth. The procedure could never be done in practice because there is no reasoning process available in first order logic that can always determine absolute truth. In fact even being able to determine the absolute truth of whether our current axioms are consistent would imply a contradiction. (Thanks, Gödel.)
Whether it makes any sense to talk about such constructions at all was the heart of the Formalist vs Constructivist debate about "the law of the excluded middle".
The formal first order proofs from ZFC that you mention depend on the axioms of ZFC. Which in turn are assumed. What is actually proven is, "If these are true, then that is the conclusion." But the axioms must be assumed. What is proven is that the axioms lead to the conclusion. And not that the axioms are true or the conclusion matches our naive notions of truth or existence.
As to that, a Constructivist can't even get through the first axiom of ZFC before finding problems to question. The axiom of extensionality says that two sets are equal if and only if they have the same elements. In classical mathematics, elements either are or are not in the set. And two sets either do or don't have the same elements. And we can build procedures based on that truth. But such statements based on absolute truth might not be able to be established through any reasoning process. Procedures requiring decisions made on such absolute truths cannot actually be performed. In what way can we establish existence by constructions involving impossible procedures based on information that no reasoning process can ever verify.
I will make this problem concrete.
Let's let A be the empty set. And B be the set of non-trivial zeros of the Riemann zeta function. According to classical mathematics, either ZFC may prove that A = B, it may prove that A is not B, or the question may be undecidable. If the question is undecidable, then through https://en.wikipedia.org/wiki/Second-order_arithmetic you can prove that A = B. (The principle of the proof is the same as how Gödel proved that if ZF is consistent, then so is ZFC.) Classical mathematicians happily accept that claim, even though it rests on a statement that might be true without any possibility of proof. And, furthermore, classical mathematicians will happily accept proofs based on constructions that require an infinite number of decisions that are similarly impossible to make through any form of first-order logic.
Constructivism collapses all of that. In that philosophy, we can't talk about the truth of any statement unless a proof as been found for or against it. Procedures may not depend on the impossible task of deciding the undecidable. Nor can we sneak such assumptions in through things like the axiom of extensionality. Which makes the classical proof just pointless symbol manipulation that implies nothing about what does or doesn't exist.
Here is the Constructivist view. If we assume things that make no sense, we conclude things that also make no sense. Rather than trying to understand the nonsensical conclusion, we should avoid the nonsensical assumption. There aren't an uncountable number of real numbers who can never be defined, even in principle, in any finite way. Mathematical things that can't be defined, simply don't exist.
This view only seems strange to us because it is impossible to study higher mathematics without being indoctrinated into the classical mathematical approach. It is only after learning to think outside of that box that you start to realize how arbitrary the implicit assumptions are.
That is true of every kind of mathematics. Ex nihilo nihil. There is no argument that can be made without any sort of axiom (you can derive tautologies, but only if you agree on at least the inference rules you're going to use - if you don't even agree on that you're out of luck).
You don't like the axioms of ZFC, or LEM, or whatever - fine. But you can't argue that whatever you want to use instead doesn't suffer from exactly the same problems. Maybe you find your axioms "more intuitive". Okay, and you're free to do mathematics in whichever way you prefer. But I guarantee that someone else will come along and tell you that your own axioms don't look all that intuitive to them. In fact, it seems like you assume that the integers exist. But an ultrafinitist would look at you in disbelief because they don't think that infinite sets exist at all (after all, where are the infinite sets in nature?). So which axioms are the "true" ones?
Personally, I'm not interested in metaphysical questions about what is "mathematically true". It's satisfying enough that a) we can constructively prove that classical proofs are valid chains of inferences from their axioms to their conclusions, b) nobody has found a contradiction in ZFC for over 100 years, c) the results we get from applying mathematics to the real world are astonishingly useful in all sorts of domains. Many mathematicians consider that a win and then move on without pondering about metaphysical things that we can never have an answer to.
> This view only seems strange to us because it is impossible to study higher mathematics without being indoctrinated into the classical mathematical approach.
Calling other people "indoctrinated" doesn't make your argument stronger. For the record, there's enough constructivist advocates hanging around programming-related communities, so it's not like these voices aren't heard here.
edit: And in any case, you did massively shift the goalposts here, because first you claimed that "we can't reason about the reasoning used in classical mathematics" (wrong, we can do all sorts of reasoning about classical reasoning without even having to resort to infinities and other weird things), now you're claiming that classical mathematics isn't "true" (or not provably so) - but that's an entirely different discussion.
Definitely going to check out Construvism, which is a new term to me, and was mentioned by several replies.