I'm trying to develop a good intuition for how Gödel's first incompleteness theorem works. I think I've got most of it, but there's one step involving a lemma I haven't been able to really get.
Here's my sense of how the proof works:
- Show there's a way to give each formula and proof a unique natural number (its "Gödel encoding").
- Show that this lets formulas refer to formulas and proofs. Intuitively this lets us write formulas that say things like "The formula with Gödel encoding $x$ has proof $P$."
- Construct a variable formula $f(x)$ that in effect says "The formula with Gödel encoding $x$ has no proof."
- Via a magical "diagonal lemma", we know there's a natural number $n$ such that the Gödel encoding of $f(n)$ is $n$.
- $f(n)$ is, in effect, the statement "This statement is unprovable." If it's true, then it's unprovable, meaning there are true statements the system cannot prove — i.e. it's incomplete. If $f(n)$ is false, then it's provable, meaning the system can prove false things and is inconsistent. QED.
I'd like some kind of intuition for that diagonal lemma in step 4 that feels as intuitive to me as the rest of the argument. LLMs haven't been helpful here; they keep either walking through their version of the proof, or saying extremely vague things like "The lemma involves self-reference."
Another way to say it is, I'm looking for the "key" that "unlocks" the diagonal lemma. Roughly the way that the statement "This statement is unprovable" sort of "unlocks" the overall proof: if I know that's what I'm aiming for, and why, then the formalism is mostly about checking the details of how I construct that statement.
As it is, I can't intuitively feel why the diagonal lemma wouldn't apply to the formula that says in effect "The formula with Gödel number $x$ is false." That'd let us construct the statement "This statement is false", which has a paradoxical truth value. I'm sure the lemma doesn't allow this, but I'm deducing this socially, not mathematically. (Maybe we can't construct formulas that talk about other formulas' truth values? If so, I'm not sure why not.)
I know there are a few other discussions of this already:
- Here is someone asking about the details of the diagonal lemma. I think I understand the answer to their questions. That doesn't give me a feel for why the lemma is true though.
- Then there's this one, which goes into way too much detail to give me the intuitive overview I'm looking for, and is about a possible alternative way of proving the lemma.
- Someone tagged my question as duplicating this one. I like the intuitive style the answerer gives; it's exactly the right type I'm looking for. And he explains what the lemma needs to show in good clear terms. That's super a step in the direction I'm hoping for. But his explanation for the proof of the lemma seems to me to be almost entirely contained within the statement "it turns out that". ("It turns out that if you calculate the number of this formula, you get exactly the number you get by starting with the number $k$ and performing the operations described by the statement.")
I've stared at various descriptions of the lemma's proof, including its proof in Wikipedia. It feels like pressing my brain through a symbolic meat-grinder. If I stare very, very closely at each step, I can agree it follows from previous steps. But I have no idea what intuition guided anyone to write those lines. I'm way more interested in the intuition than I am in the minute details of rigor here: I can make sense of the latter with the former, but I haven't been able to make it work the other way around.
Do any of you have a guess about a "key" that might help me make sense of the diagonal lemma?