• Nem Talált Eredményt

Godel’s incompleteness theorem

In document Complexity of Algorithms (Pldal 57-60)

2.3 Computability in logic

2.3.1 Godel’s incompleteness theorem

Mathematicians have long held the conviction that a mathematical proof, when written out in all detail, can be checked unambiguously. Aristotle made an attempt to formalize the rules of deduction, but the correct formalism was

found only by Frege and Russell at the end of the nineteenth century. It was championed as a sufficient foundation of mathematics by Hilbert. We try to give an overview of the most important results concerning decidability in logic.

Mathematics deals with sentences, statements about some mathemati-cal objects. All sentences will be strings in some finite alphabet. We will always assume that the set of sentences (sometimes also called alanguage) is decidable: it should be easy to distinguish (formally) meaningful sentences from nonsense. Let us also agree that there is an algorithm computing from each sentenceϕ, another sentenceψcalled itsnegation.

A proof of some sentence T is a finite string P that is proposed as an argument thatT is true. Aformal system, ortheoryFis an algorithm to decide, for any pairs(P, T)of strings whetherP is an acceptable proofT. A sentenceT for which there is a proof inFis called atheoremof the theoryF. Example 2.3.1. LetL1 be the language consisting of all expressions of the form “l(a, b)” and “l(a, b)” where a, b are natural numbers (in their usual, decimal representation). The sentences l(a, b) and l(a, b) are each other’s negations. Here is a simple theoryT1. Let us callaxiomsall “l(a, b)” where b=a+ 1. Aproofis a sequenceS1, . . . , Sn of sentences with the following property. IfSiis in the sequence then either it is an axiom or there arej, k < i and integersa, b, csuch thatSj =“l(a, b)”,Sk=“l(b, c)” andSi=“l(a, c)”. This theory has a proof for all formulas of the forml(a, b)where a < b.

A theory is called consistent if for no sentence can both the sentence itself and its negation be a theorem. Inconsistent theories are uninteresting, but sometimes we do not know whether a theory is consistent.

A sentence S is called undecidable in a theory T if neither S nor its negation is a theorem in T. A consistent theory is complete if it has no undecidable sentences.

The toy theory of Example 2.3.1 is incomplete since it will have no proof of eitherl(5,3)norl(5,3). But it is easy to make it complete e.g., by adding as axioms all formulas of the forml(a, b)where a≥b are natural numbers and adding the corresponding proofs.

Incompleteness simply means that the theory formulates only certain prop-erties of a kind of system: other propprop-erties depend exactly on which system we are considering. Completeness is therefore not always even a desirable goal for certain theories. It is, however, if the goal of our theory is to de-scribe a certain system as completely as we can. We may want e.g., to have a complete theory of the set of natural numbers in which all true sentences have proofs. Also, complete theories have the following desirable algorithmic property, as shown by the theorem below. If there are no (logically)

unde-cidable sentences in a theory then the truth of all sentences (with respect to that theory) is algorithmically decidable.

Theorem 2.3.1. If a theory T is complete then there is an algorithm that for each sentenceS finds in T a proof either forS or for the negation of S.

Proof. The algorithm starts enumerating all possible finite strings P and checking whetherP is a proof forS or a proof for the negation ofS. Sooner or later, one of the proofs must turn up, since it exists. Consistency implies that if one turns up the other does not exist.

Suppose that we want to develop a complete theory of natural numbers.

Since all sentences about strings, tables, etc. can be encoded into sentences about natural numbers this theory must express all statements about such things as well. In this way, in the language of natural numbers, one can even speak about Turing machines, and about when a Turing machine halts.

Let L be some fixed recursively enumerable set of integers that is not recursive. An arithmetical theory T is called minimally adequate if for every numbern, the theory contains a sentenceϕn expressing the statement

“n∈L”; moreover, this statement is a theorem in T if and only if it is true.

It is reasonable to expect that a theory of natural numbers with a goal of completeness be minimally adequate, i.e., that it should provide proofs for at least those facts that are verifiable anyway directly by computation, as

“n∈L” indeed is. (In the next section, we will describe a minimally adequate theory.) Now we are in a position to prove one of the most famous theorems of mathematics, which has not ceased to exert its fascination on people with philosophical interests:

Theorem 2.3.2 (Gödel’s incompleteness theorem). Every minimally ade-quate theory is incomplete.

Proof. If the theory were complete then, according to Theorem 2.3.1 it would give a procedure to decide all sentences of the formn∈L, which is impossible sinceLis not recursive.

Remarks. 1. Looking more closely into the last proof, we see that for any adequate theoryT there is a natural numbernsuch that though the sentence

“n 6∈ L” is expressible in T and true but is not provable in T. There are other, more interesting sentences that are not provable, if only the theoryT is assumed strong enough: Gödel proved that the assertion of the consistency ofT is among these. This so-called Second Incompleteness Theorem of Gödel is beyond our scope.

2. Historically, Gödel’s theorems preceded the notion of computability by 3-4 years.

In document Complexity of Algorithms (Pldal 57-60)