



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Applied Logic Lecture 23: Unsolvable Problems in Logic CS 4860 Spring 2009 Tuesday, April 14, 2009
The fact that Peano Arithmetic is expressive enough to represent all computable functions means that some of the unsolvable problems from the theory of computation carry over to first-order logic. We know that the theory of computation is undecidable, that is we can formulate problems about computable functions that cannot be decided by an algorithm in a uniform way. Since we have shown how to represent computable functions in logic, the same problems can be formulated in first-order logic as well, which means that first-order logic must be undecidable. We are now in a position to give a unified account of this and two other negative results of logic:
The key to all these results is an ingenious discovery made by G¨odel in the 1930’s: it is possible to effectively enumerate all computable functions in a uniform way (via so-called G ¨odel num- berings , and it is possible to define computable functions by diagonalization through the table of computable functions. Assumptions about decidability and computability then enable us to define a new computable function that is different from all other computable functions and thus leads to a contradiction. We will briefly sketch both methods.
Definition: A G¨odel numbering is a mapping from a set of expressions to N that satisfies the following conditions (1) Different expressions receive different G¨odel numbers. ( injective ) (2) The G¨odel number of an expression can be effectively calculated. ( computable ) (3) It is effectively decidable whether a given number is a G¨odel number or not.
It is easy to see that the language of Peano-Arithmetic has a G ¨odel-numbering. As we only use finitely many different symbols to write down arithmetic formulas we simply assign a number to every symbol. For instance, we may assign 0 to (, 1 to ), 2 to ∀, 3 to ∃, etc. Thus every formula corresponds to a unique finite sequence of numbers that represents the string of symbols needed to write down the formula.
There are multiple ways to encode sequences of numbers by natural numbers. One possibility is using polynomials as described in the representation of primitive recursion. Another one is extending the bijective encoding 〈〉 of pairs of numbers to an encoding 〈〉^3 of triples, quadruples, etc, and then to a bijective encoding 〈〈〉〉 of arbitrary lists of numbers as follows:
〈x〉^1 ≡ x, 〈x 1 , ..., xk+1〉k+1^ ≡ 〈〈x 1 , ..., xk〉k, xk+1〉, 〈〈x 1 , ..., xn〉〉 ≡ 〈n, 〈x 1 , ..., xn〉n〉
All these functions are computable and have computable inverses, which means that given the assignments of numbers to symbols (and the rules for parsing formulas) we can determine whether a number corresponds to a formula and we are able to construct the formula if this is the case.
Diagonalization is a method for deriving contradictions from certain assumptions, which is best illustrated when considering an infinite set of functions. We construct a new function by going diagonally through the table of all function values and modifying the entry at each diagonal point. As a result we get a function that cannot be represented by a row of the table. The assumptions are usually crucial for proving that this diagonal function exists at all.
0 1 2 3 4 5 6... f 0 f 0 (0) f 0 (1) f 0 (2) f 0 (3) f 0 (4) f 0 (5) f 0 (6)... f 1 f 1 (0) f 1 (1) f 1 (2) f 1 (3) f 1 (4) f 1 (5) f 1 (6)... f 2 f 2 (0) f 2 (1) f 2 (2) f 2 (3) f 2 (4) f 2 (5) f 2 (6)... f 3 f 3 (0) f 3 (1) f 3 (2) f 3 (3) f 3 (4) f 3 (5) f 3 (6)... f 3 f 3 (0) f 3 (1) f 3 (2) f 3 (3) f 3 (4) f 3 (5) f 4 (6)... f 5 f 5 (0) f 5 (1) f 5 (2) f 5 (3) f 5 (4) f 5 (5) f 5 (6)... f 6 f 6 (0) f 6 (1) f 6 (2) f 6 (3) f 6 (4) f 6 (5) f 6 (6)... .. .
.. .
.. .
.. .
.. .
.. .
.. .
.. .
Cantor’s famous theorem about the nondenumerability of the set of total functions from N to N (which is equivalent to the nondenumerability of the set of real numbers), for instance, uses this argument. If we assume that all functions from N to N are denumerable, then we can define a new function f :N→N as f (i) := fi(i) + 1. Because of the assumption, f must be some fj in the table and we get f (j) = fj (j) + 1 = f (j) + 1, a clear contradiction. As a result, the set of functions from N to N must be nondenumerable.
G¨odel’s important modification to that argument was the insight that diagonalization on com- putable functions is computable , provided we use a G¨odel-numbering of computable functions. G¨odel originally expressed his construction without an explicit reference to computable functions (there was not yet a developed theory of computation). Instead he formulated it entirely within logic as an encoding of self-reference within formulas, which is the key issue in a diagonalization.
Definition: Let dXe denote the representation of the G¨odel number of the formula X (in which x may occur free). The diagonalization of X is the formula (∃x)(x=dXe ∧ X).
Lemma 1: Diagonalization is computable: there is a computable function diag such that n = dXe implies diag( n ) = d(∃x)(x=dXe ∧ X)e, that is diag( n ) is the G¨odel number of the diagonalization of X whenever n is the G¨odel number of the formula X.
Proof sketch: Given a number n we can effectively determine whether it is a G¨odel number of some formula X. Once we have X we can construct the formula (∃x)(x=n ∧ X) and compute its G¨odel number. The difficult part of the actual proof is recasting the argument so that it deals with natural numbers only. One needs a specific G¨odel-numbering for this purpose.
Diagonal Lemma: If T is a theory in which diag is representable, then for any formula B(x) with exactly one free variable x there is a formula G such that |=T G ⇔ B(dGe).
of Peano Arithmetic since the Peano axioms are true in both standard and non-standard inter- pretations, so representability and definability carries over from Peano arithmetic to arithmetic. However, there are certain kinds of functions and sets that cannot be represented anymore once a theory is expressive enough to represent the computable functions. A key observation, for instance, is that such a theory cannot define its own theorems by a formula.
Lemma 2: If T is a consistent theory in which diag is representable, then the set of G¨odel num- bers of T -theorems is not definable in T.
Proof: Assume that GN defines the set of G¨odel numbers of T -theorems in T. By the diagonal lemma, there must be a formula G such that |=T G ⇔ ∼GN(dGe). We show that both G and ∼G are T -theorems, which contradicts the consistency of T. Assume G is not a T -theorem. Then |=T ∼GN(dGe) by definition of GN and thus |=T G because of the above equivalence. This, in turn, means that G is a T -theorem. Thus by definition of GN we know |=T GN(dGe). Because of the above equivalence |=T ∼G must hold.
The proof of Lemma 2 mimics in logic what Cantor’s argument did to functions on natural num- bers. The assumption that the predicate GN is definable corresponds to the assumption that we can construct a function f via f (y)=fy(y). Modifying GN(y) into ∼GN(y) captures the key idea behind defining f (y)=fy(y) + 1, which makes f different from every fy. The contradiction G ⇔ ∼G then follows for the fixed point G of ∼GN – while in Cantor’s theorem it is stated as f (j)=f (j) + 1 for the index j of f.
An immediate consequence of Lemma 2 is that it is impossible to represent the arithmetically true statements by a formula in arithmetic.
Theorem: [Tarski’s Indefinability Theorem] Arithmetical truth is not arithmetically definable, i.e. the set of G¨odel numbers of formulas that are true in natural number arithmetic are not definable in the theory of arithmetic.
If a theory T is decidable, then there is an effective method for deciding whether a given formula is a theorem in T. One only has to calculate the G¨odel number of that formula and test whether the value of the corresponding characteristic function is 1. Conversely, if a theory is undecidable, then there cannot be an effective method for checking whether a given formula is a theorem or not.
Theorem 1: No theory that can represent the computable functions is decidable.
Proof: Assume that T is decidable and can represent the computable functions. Then the charac- teristic function of the set of G¨odel numbers of T is representable, which means that the set of G¨odel numbers of T is definable. Because of Lemma 2 this cannot be the case.
Corollary: Arithmetic is undecidable.
An immediate consequence of Theorem 1 is Church’s undecidability theorem, which states that first-order logic is undecidable. We can easily reduce the decidability problem for first-order logic to the decidability problem for theories that can represent the computable functions, provided we find a finitely axiomatizable theory that has this property. Since the theories we considered so far are not finitely axiomatizable, we postpone the proof of Church’s undecidability theorem until we have introduced the theory Q.
The following lemma provides the key argument for G¨odel’s first Incompleteness Result.
Lemma 3: Every axiomatizable and complete theory is decidable.
Proof: Let T be an axiomatizable complete theory and S be its set of axioms. If T is inconsistent, then for some formula X both X and ∼X are theorems of T , thus consequences of the axioms. As a result, every formula in the language of T is a logical consequence of the axioms, which means that T is the set of all formulas, hence decidable. Assume that T is consistent. Since S is decidable, we can determine whether a given deriva- tion of a formula from the axioms constitutes a valid logical inference. Therefore, it is possible to enumerate all valid derivations in T and all logical consequences of the axioms. Now let X be an arbitrary formula in the language of T. Since T is complete, the enumera- tion of the logical consequences of the axioms in S will yield either X or ∼X after finitely many steps. Thus we can decide whether X is a theorem in T or not.
Theorem: [G¨odel’s First Incompleteness Theorem] There is no consistent, complete, and ax- iomatizable theory that can represent the computable functions.
Proof: This is an immediate consequence of Lemma 3 and the fact that no theory that can repre- sent the computable functions is decidable (Theorem 1).
Corollary: Arithmetic is not axiomatizable.
G¨odel’s incompleteness theorem is often described as “ any consistent and sufficiently strong formal theory of arithmetic is incomplete ”, where a formal theory is viewed as one whose theorems are derivable from an axiom system. For such theories there will always be formulas that are true (for instance, in the standard interpretation of arithmetic) but not theorems of the theories. When it comes to arithmetic, truth and provability are in no sense the same.
The above formulation is a sharpening of that statement, as it specifies “sufficiently strong” as “capable of representing computable functions”. As we will see later, this includes theories that are much weaker than Peano Arithmetic.
G¨odel’s incompleteness result has a strong impact on the development of formal reasoning envi- ronments for mathematics. It is impossible to develop a consistent and complete proof system for any fragment of mathematics that includes arithmetic. As formal systems necessarily need to have decidable sets of axioms (even if we use axiom schemes), we have to sacrifice completeness, which means that there will always be theorems that are true but cannot be proven in the proof system.
On the other hand, one has to be aware that the incompleteness result has little effect on practical theorem proving. Most, if not all theorems in practical mathematics do not involve the issue of self-application and will therefore remain provable in a formal system.
Undecidability, however, is a bigger problem, as it shows the limitations of fully automated proof systems. While it is possible to find a proof for almost all (valid) practical problems in a formal proof system, the undecidability of first-order logic makes it impossible to check whether a proof attempt fails or just needs more time to complete. For this reason, all proof systems that aim at formalizing large fragments of mathematics and computer science (like Cornell’s Nuprl system) proceed interactively with some controlled automated support for decidable sub-problems.