Halt! What Goes There?
2 min read
Core idea
Leibniz dreamed of a characteristica universalis — a language in which any dispute could be settled by calculation. Modern symbolic logic supplies the language. The remaining question is whether there is a calculating procedure that always delivers the answer. Alan Turing proved, in 1936, that there is not — even for the limited domain of mathematical claims.
What a computation is
A computer takes an input, runs an algorithm (a finite set of mechanical rules, no guessing, no creativity), and — if you are lucky — produces an output. Everything is stored as numbers: text, pictures, and even the program itself are all just binary numerals. Because a program is a number, every program Pn can be assigned a code number n.
The looping trap
Some programs, run on some inputs, never finish. A program that keeps adding 1 and tests for 0 will loop forever, since adding 1 never reaches 0. So a natural question arises: is there an algorithm that, given any program and input, decides in advance whether the computation will halt?
Priest's argument: The answer is no — and this is the Halting Theorem, "as good a piece of mathematics as it is possible for there to be."
Why it matters
The Halting Theorem marks a hard, permanent boundary on what computation — and hence formal reasoning — can do. There exist mathematical questions for which no algorithm can decide the answer. Leibniz's dream cannot be realised. The result rests on the Church–Turing Thesis, the (unprovable but well-accepted) claim that every algorithm can be programmed on a computer. The proof's engine is self-reference via diagonalization, the same technique that powers Gödel's incompleteness theorem in the next topic.
Key takeaways
Mental model
Practical application
Example
Suppose a manager asks for a script that scans every program in the company codebase and flags the ones that could loop forever. You could write a checker that catches obvious cases — a while true with no exit, a counter that only ever increases. But you cannot make it correct for every program. If you could, you would have built Turing's algorithm A, and you could then turn it on the self-referential program T and derive a contradiction. The honest checker must sometimes answer "undecidable" — and that limitation is a theorem, not a coding shortfall.
Related lessons
Related concepts
- Computabilitylinked concept
- Algorithmlinked concept
- Halting Problemlinked concept
- Turing Machinelinked concept