Effective diagonal lemma Created 2026-10-06 Updated 2026-10-14
The diagonal lemma can be carried out uniformly: from a one-variable formula code, compute a sentence code whose assertion is equivalent to the original formula applied to that sentence code. The effective substitution operation is what turns a semantic diagonal argument into a productive function.
Here is the first incompleteness theorem in its modern consistency form: every consistent computably enumerable theory extending Robinson arithmetic is incomplete. The original Gödel sentence proof assumes omega-consistency to obtain both unprovabilities; we give that proof and the strengthening that removes this assumption. We also give the second incompleteness conclusion for theories extending Peano arithmetic.
First arithmetize syntax. Code strings and finite derivations by natural numbers. If the axioms of are merely computably enumerable, include the finite enumeration certificate for each nonlogical axiom used in a proof. The resulting proof-checking relation is primitive recursive. Finite strings and computation histories are coded by finite sequences, with bounded local verification of every step; these give arithmetic formulas representing the coding operations. In Robinson arithmetic every true or false instance with fixed numeral inputs is provable with the appropriate sign. Set
The diagonal lemma gives, for any formula , a sentence with . To see the construction, let be the computable syntactic operation substituting the numeral for into the formula coded by . Form the formula , interpreting the displayed coding function through its arithmetic representation, and let . Then , and . The representation proves that fixed computation, giving the asserted equivalence.
Apply the diagonal lemma to , obtaining
If , an actual finite proof has code , so proves its proof-checking instance and proves . The fixed-point equivalence gives its negation, contradicting consistency. Hence . For each standard numeral , proves because there is no such proof. If , the equivalence gives , contrary to omega-consistency. Thus the original proof gives two unprovabilities under that hypothesis. It also shows that is true in the standard natural numbers when is consistent.
For consistency alone use the Rosser sentence
If with code , consistency excludes every proof of . In particular the finitely many codes all fail their primitive recursive proof tests. Robinson arithmetic verifies those finitely many failures and the actual proof at , and hence proves , a contradiction. If with code , consistency excludes every proof of . For , Robinson arithmetic verifies all the finitely many failed proof tests. For , it verifies that is a proof of with . The elementary arithmetic dichotomy between and therefore proves the entire displayed condition, hence , again a contradiction. Thus
For the Gödel second incompleteness theorem, now assume and use its ordinary certified proof predicate. PA formalizes proof concatenation and the verification of a coded proof, giving the derivability conditions: if then ; and inside ,
The first internal implication is certified by combining two proofs; the second is certified by producing the arithmetic proof that a given finite proof passes its check, with existential introduction. Apply them to . From , the two internal implications yield provability of both and its negation, and hence provability of . Consequently
A proof of this consistency sentence in a consistent would prove , which the first argument excludes. Therefore . This concerns the standard arithmetic consistency sentence and the stated effective, arithmetic hypotheses; it is not a prohibition on proving consistency in a stronger theory.
A theory is recursively axiomatizable when it has an effective enumeration of axioms, equivalently when its deductive closure is computably enumerable. If the definition requires a decidable axiom set, the equivalent formulation is obtained by replacing an axiom enumerated at stage by a fixed left-associated logical conjunction of copies of it. To recognize a proposed padded axiom, inspect its finitely many possible decompositions into repeated conjuncts and check the corresponding finite enumeration stages. The padding preserves logical equivalence, so the resulting decidable axiom set generates the same theory. In either convention, enumerate formal proofs using the finite sets of axioms seen so far. This effectively enumerates every theorem.
Let be a sound arithmetic theory of the standard natural numbers, sufficiently strong to encode finite computations, proofs and substitution and to establish the diagonal lemma; an extension of Robinson arithmetic suffices. With a semidecidable axiomatization, the arithmetical provability predicate expresses that a proof of the sentence with code exists. A proof certificate can include enumeration stages for its axioms, so this predicate is arithmetically expressible even when the given axiom set is only computably enumerable.
The diagonal lemma produces a sentence such that
Here is the mechanism, including its effectiveness. For the computable substitution function taking a one-variable formula code to the code of that formula with the numeral substituted, let represent its graph. Given , form and let be the code of . The sentence has code . Numeralwise correctness and uniqueness of the represented substitution computation prove . This constructs a fixed point effectively from the code of . Applying it to gives .
If proved , arithmetic soundness would make true, while the existence of that proof would make true. The displayed equivalence would then make false, a contradiction. Thus does not prove . In the standard natural numbers its arithmetical provability predicate is therefore false at this code, so is true. Arithmetic soundness now rules out a proof of as well. Hence is incomplete: neither nor is a theorem, and is true.
For a fixed effective enumeration of computably enumerable sets, a productive set has a partial computable function such that
The condition applies to every computably enumerable subset, including finite subsets. No condition is imposed on when the inclusion fails.
Let be the set of codes of true arithmetic sentences; numbers which are not sentence codes are excluded. Uniformly in , there is an arithmetic formula expressing : it says that a finite enumeration computation outputs . Apply the effective diagonal lemma to obtain with
The operation producing this sentence code is total computable. Suppose . If , the subset assumption says that is true, while its fixed-point equivalence says it is false, a contradiction. Thus . The same equivalence now says is true, so . We have proved
Therefore arithmetic truth is a productive set. This proves productivity of arithmetic truth. It cannot itself be computably enumerable, since taking would contradict the defining property. Applying the productive procedure to the enumerable theorem set of a sound arithmetic theory also gives a true sentence outside that theory. The productive construction does not require the enumerable subset of truths to be a theory or to be deductively closed.
The diagonal lemma says that for every one-variable formula there is a sentence such that
Let be the computable function taking the code of a one-variable formula to the code of . By the assumed representation theorem, choose a Sigma-1 formula representing . Given , put
and let . Taking , representability proves in that the unique relevant is , yielding the required equivalence.
Suppose such a formula existed. Apply the diagonal lemma to to obtain a sentence for which
Because , the equivalence holds in . But the defining property of says exactly when , producing exactly when , a contradiction.
The diagonal lemma states that for every formula with one free variable there is a sentence such that
The same conclusion holds in every theory extending the arithmetic needed to formalize substitution.
Consistency of makes and disjoint. Suppose a recursive set separated them, and let represent its total characteristic function in . By the diagonal lemma, choose a sentence satisfying
Put . If , representability gives and hence , so , contradicting . If , representability gives and hence , so , again a contradiction. Therefore and are recursively inseparable.
Robinson arithmetic Created 2026-10-06 Updated 2026-10-14
Robinson arithmetic is a weak finitely axiomatized first-order theory sufficient for numeralwise representation of computable finite calculations and the diagonal lemma. Its extensions are sufficiently strong for the soundness-based incompleteness argument.