Explaining Gödel's Incompleteness Theorem to a Twelve Year Old
reddit.com
reddit.com
Hey, $youngster, imagine that we have a Big Book of Mathematics. This book describes addition, multiplication, and some logic. There are pages like this:
Fact: 1 + 4 = 5
Fact: 2 + 3 = 5
Rule: Things that are equal to the same thing are equal to each other.
So now we know: 1 + 4 = 2 + 3
On another page of the book you see this: Rule 1. The next sentence is false.
Rule 2. The previous sentence is true.
So now we know:... nothing??
It's kind of funny right? Both of those things can't be true within the rules they set up. The whole thing is inconsistent. We don't learn anything, we don't know anything. In fact this one page ruins the whole book. We should just rip it out.But then, there's another book -- Gödel's book of Mathematics. On yet another page of the book there's this:
Rule: You can't prove the rule on this page!
So now we know: _________
That's just as funny, like the other one right? But here's the really weird part: is it wrong? (Let them get to No.) That's right, you can't prove the rule on this page. But it's still true. Fill in the blank: now we know "it's true!"That means that there are at least a few weird things that you can't prove are true, but which are true. That's what Gödel thought was funny!
Next steps: try to get them to notice what's weird about both cases, in that they refer to themselves. Walk them through the idea that maybe you could just outlaw referring to a rule on the page. I can't think of an easy way to explain Gödel numbers, so I'd just have to say that he showed that if you allowed a book to have numbers and addition and whatnot, you could still sneak in weird things like that, by using a secret code.
"ya. it means that there is an unlimited space in between every number."
The bulk of Godel's proof is introducing recursive functions and the "godelization", which means mapping formulas to natural numbers and functions to arithmetic/first order expressions. This all comes for free if you know any programming language; if you don't like natural numbers, you can use strings (the source code itself and its manipulations).
From there, the diagonalization used in the Halting problem proof is the same used in Godel's theorem. In fact, the two theorems are intimately connected, essentially by the statements "you can write a first-order proof verifier in a programming language", and "you can write a computable function as a first-order arithmetic formula".
Suppose that somebody wrote us a program that can check whether another program will loop indefinitely or eventually halt when run on a particular input:
bool halts(string program, string input){
// halting checking code that checks
// whether program's main function
// halts when given input
// returns true or false
}
For example: string program =
"void main(string foo){" +
" if(foo[0] == 'a'){ return; }" +
" else{ while(true){} }" +
"}";
halts(program, "abc") // returns true
halts(program, "bar") // returns false
Now we can write the following program: bool halts(string program, string input){
// same halting checking code as above
}
void main(string program){
if(halts(program, program)){
while(true){ }
}
}
Note that this is a perfectly valid program. halts() is supposed to work on any program, including a program that happens to contain the source code of halts(). We can just reuse the code that the person gave us and copy-paste it here.Now the question is: what will our halts() function say about this program, when given its own code as input? In other words: what will the following code print?
bool halts(string program, string input){
// same halting checking code as above
}
void main(){
string program =
"bool halts(string program, string input){" +
" // same halting checking code as above" +
"}" +
"void main(string program){" +
" if(halts(program, program)){" +
" while(true){ }" +
" }" +
"}";
print(halts(program,program));
}
There are just 2 possibilities: either this program prints true, or this program prints false (if this program never terminates then halts() has a bug).Case 1: suppose halts(program,program) returns true.
If the halts function is working correctly, that means that when we actually run the code in `program` with `program` as its input, it will halt. But now lets see what actually happens. When we run the main() function in `program` with `program` as its input, it first checks `if(halts(program,program))`. Well, we already assumed that halts returns true, so control flow will go inside the if block to the infinite loop. But that means that halts lied to us!
Case 2: suppose that halts(program,program) returns false.
Now a similar argument holds. run the code in `program` with `program` as its input, the condition of the if statement will be false, and the main function will terminate. So even though halts(program,program) returns false, the program actually terminates. It lied again!
As you can see, no matter what halts returns, it cannot tell the truth about the program we constructed. Hence it is impossible to fill in the missing code in halts() so that it will work correctly.
The following sentences have some of the 'flavor' of Godel's theorems:
"This sentence is false." →if true, then false.
"These are not words." →if true, then irreconcilable with its own truth.
So for example, in line with the first theorem you can algorithmically verify/decide all statements in a subset of Euclidean Geometry (the subset which does not deal well with circles). And in the second part you can have theories which can verify themselves. Or that it is possible to prove a theory complete and consistent as long as you can find a suitably powerful model outside of it.
In my understanding, Godel created a system that mapped statements to numbers, and then looked at the numbers that represented statements like 'this statement is provable' and found a way to show that the equivalent number had a property that wasn't provable.
reducing a holy book to logic analysis of text still produces something not reliable..
By the way, if you're interested in learning actual proofs of Godel's Theorems, you should take a look at this book: http://www.amazon.com/Introduction-G%25f6dels-Cambridge-Intr...
I haven't gone through all of it, but I've read much of the beginning. It actually starts off with easy proofs of Godel's Theorem, based much more on Computer Science explanations than Mathematical Logic.
One thing I love about N&N is that it's short (160 pages) and the paperback is cheap ($7.65) so that I have no compunctions in lending it out.
I haven't studied Gödel's proof and have to admit I would probably have to brush up quite a bit on my maths to be able to, but to me this simple joke offers a more pedagogical and perhaps more meaningful understanding of Gödel's (first) incompleteness theorem.
Godel's completeness theorem proves the equivalence of logical implication and deducibility. Logical implication being the formal definition of what it means for a collection of sentences (axioms) to logically imply another sentence (theorem); deducibility being the method with which a working mathematician would like to use to show logical implication (i.e. any proof you've ever read in a mathematical textbook).
Incompleteness, on the other hand, shows that there are some true sentences that cannot be deduced from any set of axioms (and therefore, by completeness, are not logically implied by any set of axioms).
This is my understanding after having spent a few weeks reading Enderton's "A Mathematical Introduction to Logic." If I am misunderstanding this, I would love input (so please comment). Godel's theorems are something I'm very anxious to wrap my head around.
People hoped that some logical system capable of formalizing real mathematics would be able to justify its own consistency. Godel's Incompleteness Theorem (and stronger, related results) imply that any system capable of formalizing real mathematics (or even a very weak subset of it) can not justify its own consistency, requiring an appeal to a stronger system. Obviously, that raises the obvious question of why that stronger system is consistent. There are constructive proofs (due to Godel himself, Gentzen, and others) of the consistency of Peano Arithmetic, but by the Incompleteness Theorem they must all be non-finitary in some fashion, no matter how slight.
However, there are some limits to this understanding of Godel's Incompleteness Theorem. There are theories that are strong enough to prove (and perhaps more importantly, state) their own consistency but not strong enough to formalize diagonalization. If PA is consistent, then there is a theory that can state and prove its own consistency as well as the consistency of PA. The trick is that provability can be formalized on the basis that subtraction and division are total functions, whereas diagonalization requires addition and multiplication to be total functions. These theories can prove that subtraction and division are total functions, but not addition and multiplication.
(mathematicians: is that right?)
Also not the OP's reply (paraphrased): "Thanks, but I wasn't interested in the understanding logic or math. I am thinking more along the lines of [metaphysical gobbledygook]. What can you say about that? "
These models can look very strange. For example, if ZF is consistent, then by the Second Incompleteness Theorem so is ZF + "ZF is inconsistent". By the Completeness Theorem, a model for this theory must exist. In this model ZF is inconsistent, so there is a 'proof' of a contradiction from the axioms of ZF. However, since we have assumed the consistency of ZF, such a 'proof' must necessarily involve nonstandard integers.
Here is a list of undecidable statements in ZFC: http://en.wikipedia.org/wiki/List_of_statements_undecidable_...
If you do that, you could wonder what your new arithmetic looks like. This is actually very interesting question. Since "not G" says basically "it's not true that there's no proof of me", or, more specifically, "it's not true that there's no number that represents the proof of me", it's clear that "not G" asserts the existence of a certain "natural" number being the proof of G, which is not one of the natural numbers we know (since no "regular" natural number represents the proof of G). In our new universe there are "natural" numbers that you cannot reach by counting. Because of that, one can construct many different nonequivalent "implementations" (models) of PA + not G, which are necessarily different than the standard implementation of artihmetic we know (1, 2 = S(1), 3 = S(S(1)), ..., n = S(S(...S(1)...)), with + and *).
What is interesting about incompleteness theorem is that no matter if we add arbitrarily large number of axioms to PA, or even infinite number of axioms generated by computer program we write, the resulting system will still be incomplete, and each will have its own (many of them, actually) Goedel sentence.