Footnotes:
The Diagonal Lemma
Page last updated 17 Jan 2025
It is claimed that a statement that is commonly called the Diagonal Lemma, or the Diagonalization Lemma, proves the existence of self-referential sentences in formal systems of natural numbers, and that it can be used to prove incompleteness of certain formal systems. The Diagonal Lemma essentially states, that for any given formula of the formal system with one free variable, that formal system can prove a certain proposition regarding the Gödel numbering system.
The formulas of the formal system have no way of referring to the Gödel numbering function, since, by definition, it is a function that is defined in a meta-language to the formal system. So the idea that it is possible to prove that the formal system can prove a proposition regarding the Gödel numbering system is one that deserves careful scrutiny.
The following proofs of the Diagonal ‘Lemma’ are examined here:
- A proof given in the book, ‘Computability and Logic’, by George Boolos, John Burgess, and Richard Jeffrey
- A proof given in the book, ‘Introduction to Mathematical Logic’, by Elliott Mendelson
- A proof on the Wikipedia website
- A proof on the ProofWiki website
- A proof by Panu Raatikainen on the Stanford website
- A proof by Vann McGee of MIT
There is also a proof of the lemma in the book, ‘An Introduction to Gödel’s Theorems’. (Footnote:
Peter Smith. An Introduction to Gödel’s Theorems. Cambridge University Press, 2006.
ISBN: 9780521857840 See An Introduction to Gödel’s Theorems: Details.)
by convicted paedophile ex-professor Peter Smith, and there is also a downloadable cut-down version of his book at PDF Logic Matters: Peter Smith’s Gödel Without (Too Many) Tears. The error in Smith’s “proof ” of the lemma is the same error that is dealt with in detail in the paper PDF A Fundamental Flaw in an Incompleteness Proof by Peter Smith. As in the generic proof below, Smith’s error is to assume that certain functions/
Please note:
- The rest of the content of this page requires a basic knowledge of symbolic logic.
- Some of the symbols used on this page may not display correctly on older browsers.
The Generic Proof of the Diagonal ‘Lemma’
While the proofs mentioned above are all slightly different, the main core is the same, and they all rely on the same elementary error. Because the main core is the same in all the proofs, a generic proof can be written, and which contains the essence of the four proofs mentioned above. This generic proof of the Diagonal ‘Lemma’ is as follows:
(1)
Let
(2)
There is a relation
(3)
There is a formula that expresses the relation
(4)
Now define a formula
(5)
where
(6)
The formula
(7)
Assume that the system
(8)
Take the first case; that the system
(9)
That is, the system
(10)
For the case where
(11)
Now, take the second case; that the system
(12)
(13)
(14)
(15)
Now, we know that there is only one value of
(16)
From the two cases above, the system
This result is a general result that is the underlying basis of all the proofs mentioned above. Given this result the rest of the proof proceeds as follows:
(17)
We now let the function
(18)
(19)
Take the formula of the system
(20)
(21)
Giving the name
(22)
The flaw in the proof is obvious. For there to be a formula in the system
Thus step (17) is a logical absurdity. This absurdity is disguised in the proofs mentioned above by their presentation, which serves to obscure the inherent absurdity.
An unresolvable circular definition
The flaw can also be demonstrated by observing that the definition of the function
The initial formula
That function
By (5), we have that
Hence the definition of
Boolos’ Proof of the Diagonal Lemma
This proof is found in the book, ‘Computability and Logic’, by George Boolos, John Burgess, and Richard Jeffrey, (Footnote:
G Boolos, J Burgess, R Jeffrey. Computability and Logic. Cambridge University Press, 5th Edition, 2007.
ISBN‑13 978‑0511366680 Computability and Logic - Boolos: Details.)
and is given as a proof of the lemma 17.1 in the book.
The proof commences by asserting:
“There is a primitive recursive function,
The proof goes on to assert that since the function
However, Boolos has previously defined the diagonalization of
The result is that Boolos’ proof continues as:
Let
which corresponds to the
as seen in the generic proof above, where
The rest of Boolos’ proof follows the general outline as given in the generic proof above, generating the inevitable result of:
a result which is completely dependent on the fallacy that the function
It will be seen that the main part of the proof has nothing whatsoever to do with proving self-reference, and that the self-reference in the proof is that brought about by the invalid introduction of the definition of
Mendelson’s Proof of the Diagonal Lemma
Mendelson’s proof of the Diagonal Lemma is given in Chapter 3 of his book ‘Introduction to Mathematical Logic’. (Footnote:
E Mendelson. Introduction to Mathematical Logic. Chapman & Hall/CRC, 6th edition, 2015
ISBN 9781482237726 Introduction to Mathematical Logic - Mendelson: Details.)
Note: Some of the symbols used by Mendelson appear somewhat differently in HTML code. Note also that Mendelson uses an overscore (such as
In his section Proposition 3.27, Mendelson defines a primitive recursive function with one free varaible as
Then, in his Proposition 3.34 (Diagonalization Lemma).he gives his statement of the Diagonal Lemma as:
Assume that the diagonal function
where
The proof proceeds as follows:
Let
Let
Let
The pertinent information here is that the relation
Now, Mendelson provides a proof that
and he had previously defined the function
In his proof of the Diagonal Lemma, Mendelson sets out by logical steps, as in the generic proof given above, that given that:
then it can be shown that:
However, while Mendelson states that the function
in other words, that
Here, Mendelson’s proof is logically absurd. It cannot be the case that
As in the Boolos proof, the main part of the proof has nothing whatsoever to do with proving self-reference; the self-reference in the proof is that brought about by the invalid assumption that the function
The Wikipedia Proof of the Diagonal Lemma
This proof of the lemma is that given in Wikipedia, as of 15 August 2012. The current page is Wikipedia - The Diagonal Lemma. The text of the proof of 15 August 2012 is given Wikipedia - The original text: below.
Note: The Wikipedia proof uses underlines to indicate the numeric notation of the formal system (such as
The statement of the Lemma is given as:
Let
The Proof of the Lemma commences as:
(1)
Let
(2)
for each
(3)
(4)
The function
(5)
This proof is nonsensical from the outset. Regardless of the details of the system
This proof is yet another example of a ‘proof’ of self-reference being simply an assertion of the existence of self-reference included amongst a few lines of formulas that are dressed up to look like a logical proof.
It might be remarked of the given function that is defined as the outset of the proof by:
(1)
Let
(2)
for each
(3)
that a similar function can be defined in purely number-theoretic terms. For the first part of the definition (2), the value of the input to the function can be defined as a number that satisfies the condition that it can be factored into consecutive prime numbers (i.e: 2a· 3b· 5c· 7d· 11e· 13f … ), and that the exponents of the prime factors must follow certain conditions. The value of the function if the input satisfies these conditions is a value that can be stated in purely numerical terms.
And, given this purely number-theoretic definition, you can define, in the meta-language, a particular Gödel numbering function. You can then state, in the meta-language, that your previously defined number-theoretic function corresponds to this one particular Gödel numbering function (there are infinitely many Gödel numbering functions). But it must be borne in mind that this is stated in the meta-language, not in the language that this particular Gödel numbering function refers to.
As is the case for the other proofs mentioned here, you cannot have it both ways. You either define the function in terms of the Gödel numbering function, and accept that it is not a function that can be expressed by the formal system in question - or you define a function in purely number-theoretic terms and accept that it is not a function that refers to the Gödel numbering function.
The ProofWiki Proof of the Diagonal Lemma
This proof of the lemma is that as given in ProofWiki as of 15 August 2012. The current page is ProofWiki - The Diagonal Lemma. The text of the proof of 15 August 2012 is given ProofWiki - The original text: below.
Note: Where the notation for the Gödel numbering function occurs in the original, for example as , this has been replaced by
The statement of the Lemma is:
Let
For any formula
where
The ProofWiki proof proceeds as follows:
There is a primitive recursive function
(1)
where
where
As for the Wikipedia proof, the proof is nonsensical from the outset. Although the proof states that
Incidentally, this proof includes another quite elementary error. At one step (see ProofWiki Step 6 below) the author of the proof adds the formula
However, in the first case, this assumes that the system
Panu Raatikainen’s Proof of the Diagonal Lemma
In the article The Diagonalization Lemma on the Stanford Encyclopedia of Philosophy website, Panu Raatikainen, an associate professor at the University of Helsinki, gives a ‘proof’ of the Diagonalization Lemma. He proceeds as follows:
The proof of the Diagonalization Lemma centers on the operation of substitution (of a numeral for a variable in a formula).
If a formula with one free variable,
So is the analogous arithmetical operation which produces, given the Gödel number of a formula (with one free variable)
The latter operation can be expressed in the language of arithmetic.
Here, Raatikainen claims that
Vann McGee’s Proof of the Diagonal Lemma
PDF Vann McGee is a professor of philosophy at MIT. Among his lecture course notes the following can be found on the MIT website at PDF Gödel’s First Incompleteness Theorem by Vann McGee.
In it McGee starts off by saying (he refers to the Diagonal Lemma as the Self-referential Lemma):
The following result is a cornerstone of modern logic:
Self-referential Lemma: For any formula
Then he goes on to say:
Proof: You would hope that such a deep theorem would have an insightful proof. No such luck. I am going to write down a sentence N and verify that it works. What I won’t do is give you a satisfactory explanation for why I write down the particular formula I do. I write down the formula because Gödel wrote down the formula, and Gödel wrote down the formula because, when he played the logic game he was able to see seven or eight moves ahead, whereas you and I are only able to see one or two moves ahead. I don’t know anyone who thinks he has a fully satisfying understanding of why the Self-referential Lemma works.
It has a rabbit-out-of-a-hat quality for everyone.
Well, in fact, it is very easy to have a very clear understanding of why the Diagonal Lemma does not work. It’s because it simply assumes that the Gödel numbering function can be expressed by the formal system, whereas the reality is that every Gödel-type numbering function is a meta-language function, and the formal language cannot express it (see the paper PDF The Impossibility of Representation of a Gödel Numbering Function by a Formula of the Formal System ). And that’s why it might appear to have a “rabbit-out-of-a-hat” quality - because just like a magician pulling a rabbit out of an empty hat, there is a trick that makes it appear that that is happening, whereas the reality is far more prosaic.
In McGee’s subsequent ‘proof’, he defines a function where he simply assumes that the formal system can express the Gödel numbering function. So in effect his ‘proof’ amounts to:
We prove that the formal system can represent itself by first assuming that the formal system can represent itself.
Incidentally, McGee is incorrect in stating that Gödel wrote down that formula; in fact it appears that it was Carnap who first came up with an expression that can be considered to be a representation of the Diagonal Lemma formula. (Footnote: Rudolf Carnap. Logische Syntax der Sprache, Springer Verlag, Vienna, 1934, English translation by A. Smeaton. The logical syntax of language. Routledge and Kegan Paul, 1937.)
Appendix: Text of the proof of Wikipedia article
This is the text of the proof of the Diagonal Lemma as given in Wikipedia as of 15 August 2012. The current page is Wikipedia - The Diagonal Lemma.
The Statement of the Lemma
Let
The Proof of the Lemma
Note: Line numbers have been added to the original Wiki section for easier reference.
(1)
Let
(2)
for each
(3)
(4)
The function
(5)
which is to say
(6)
(7)
Now define the formula
(8)
then
(9)
which is to say
(10)
(11)
Let
(12)
Then we can prove in
(13)
(14)
Working in T, analyze two cases:
(15)
Assuming
(16)
(17)
Since
(18)
Conversely, assume that
(19)
Thus
Appendix: Text of the proof of ProofWiki article
This is the text of the proof of the Diagonal Lemma as given in ProofWiki as of 15 August 2012. The current page is ProofWiki - The Diagonal Lemma.
Note: The notation for the Gödel numbering function has been changed, for example has been replaced by
The Statement of the Lemma:
Let
For any formula
where
The Proof of the Lemma:
There is a primitive recursive function
(1)
where
where, again, the
Informally,
Since
That is:
(2)
(3)
Let
(4)
Let
(5)
We then have
(6)
Let
(7)
Then
(8)
Hence
(9)
But since
(10)
(11)
Thus,
(12)
Let
(13)
Again, we have
(14)
(15)
(16)
But this is the same thing as
(17)
(18)
Thus,
Thus
Rationale: Every logical argument must be defined in some language, and every language has limitations. Attempting to construct a logical argument while ignoring how the limitations of language might affect that argument is a bizarre approach. The correct acknowledgment of the interactions of logic and language explains almost all of the paradoxes, and resolves almost all of the contradictions, conundrums, and contentious issues in modern philosophy and mathematics.
Site Mission
Please see the menu for numerous articles of interest. Please leave a comment or send an email if you are interested in the material on this site.
Interested in supporting this site?
You can help by sharing the site with others. You can also donate at where there are full details.