249 points · by raganwald · 16y ago · 52 comments
Thus at one point the poem asks whether Q halts without specifying an input to Q. This question is meaningless.
The correct proof is given by BrandonM in a thread somewhere on this page. Check it out. (scott_s restates the incorrect proof above BrandonM, for comparison.)
A formal proof is a sequence of statements where each is either an axiom or derived from previous ones via a set of derivation rules, and wherein assessing the validity of each axiom statement or derivation can be done "typographically" (mechanically and primitive-recursively). It's nigh-impossible to write a human-readable formal proof of anything interesting; the vast majority of mathematical papers published are informal proofs.
(Of course, this diversion doesn't detract from the matter of this proof-poem being very cool.)
[trying to get the rhyme going for you]
The idea would be that we generally share understanding of obvious axioms (and thus, allow them to be request-able assumptions), and so can enhance readability.
Do you know about Metamath yet? It's something similar to what you want, but it's all in a single program as opposed to being web-based.
An external halting detector (such as one of us) would tell you the hypothetical arrangement would never halt. If we can prove it would never halt, can't a program?
Just like you did. You've accounted for all output, and demonstrated that it always negates us.
By that, if a halting detector cannot exist, then how do we exist? We can tell if a hypothetically-impossible device (Q calling P and reversing the output) will loop forever or not.
def P(program):
if program halts:
true
else:
false
def Q(program):
if P(program):
false
else:
Q(program)
When we call Q(Q), we call P(Q). Let's say P(Q) returns false; P says that Q halts. In that case, the conditional fails, and we then call Q(Q) infinitely. Q has done the opposite of what P said it would do.Now let's say that P(Q) returns true; P says that Q does not halt. In that case, the conditional succeeds, and Q returns false - it halts. Again, Q has done the opposite of what P said it would do.
Here we have a situation where Q will always do the opposite of what P says it will do. We've constructed a situation where P is always wrong; we've created a paradox. The only way out of it is to say P cannot exist.
(this comment partially motivated by a "woot! someone agrees!", and partly to say congrats on your evil-th day here!)
No single program can ever predict the output of another one, because the program doing the predicting could theoretically be embedded in the program being analyzed.
People can theoretically predict outcomes, because they cannot be embedded in programs.
This doesn't prove that users are capable of finding bugs that computers aren't (theoretically) capable of finding. The sets might be the same.
Then you use the modified looping detector on itself. If you think about it, it can't be used on itself. Because if it says that it will loop then it will itself not loop, and if it says that it won't loop then it will itself loop.
It's a logical paradox, which is also a reductio ad absurbum proof that no such thing as a halting detector can exist.