Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Boolos et al. Computability and Logic, 5ed, CUP, 2007.pdf
Скачиваний:
593
Добавлен:
10.08.2013
Размер:
2.33 Mб
Скачать

21

Monadic and Dyadic Logic

We have given in earlier chapters several different proofs of Church’s theorem to the effect that first-order logic is undecidable: there is no effective procedure that applied to any first-order sentence will in a finite amount of time tell us whether or not it is valid. This negative result leaves room on the one hand for contrasting positive results, and on the other hand for sharper negative results. The most striking of the former is the Lowenheim¨ –Behmann theorem, to the effect that the logic of monadic (one-place) predicates is decidable, even when the two-place logical predicate of identity is admitted. The most striking of the latter is the Church–Herbrand theorem that the logic of a single dyadic (two-place) predicate is undecidable. These theorems are presented in sections 21.2 and 21.3 after some general discussion of solvable and unsolvable cases of the decision problem for logic in section 21.1. While the proof of Church’s theorem requires the use of considerable computability theory (the theory of recursive functions, or of Turing machines), that is not so for the proof of the Lowenheim¨–Behmann theorem or for the proof that Church’s theorem implies the Church–Herbrand theorem. The former uses only material developed by Chapter 11. The latter uses also the elimination of function symbols and identity from section 19.4, but nothing more than this. The proofs of these two results, positive and negative, are independent of each other.

21.1 Solvable and Unsolvable Decision Problems

Let K be some syntactically defined class of first-order sentences. By the decision problem for K is meant the problem of devising an effective procedure that, applied to any sentence S in K , will in a finite amount of time tell us whether or not S is valid. Since S is valid if and only if S is not satisfiable, and S is satisfiable if and only if S is not valid, for any class K that contains the negation of any sentence it contains, the decision problem for K is equivalent to the satisfiability problem for K , the problem of devising an effective procedure that, applied to any sentence S in K , will in a finite amount of time tell us whether or not S is satisfiable, or has a model. The formulation in terms of satisfiability turns out to be the more convenient for our purposes in this chapter.

The most basic result in this area is a negative one, Church’s theorem, which asserts the unsolvability of the satisfiability problem full first-order logic, where K is the class of all sentences. We have given three different proofs of this result, two in Chapter 11 and another in section 17.1; but none of the machinery from any of these proofs of

270

21.1. SOLVABLE AND UNSOLVABLE DECISION PROBLEMS

271

Church’s theorem need be recalled for purposes of this chapter. We are going to prove sharper results than Church’s theorem, to the effect that the satisfiability problem is unsolvable for narrower classes K than the class of all first-order sentences; but in no case will we prove these sharper results by going back to the proof of Church’s theorem and sharpening the proof. Instead, we are simply going to prove that if the satisfiability problem for K were solvable, then the satisfiability problem for full first-order logic would be solvable, as Church’s theorem tells us it is not. And we are going to prove this simply by showing how one can effectively associate to any arbitrary sentence a sentence in K that is equivalent to it for satisfiability.

We have in fact already done this in one case in section 19.4, where we showed how one can effectively associate to any arbitrary sentence a sentence of predicate logic (that is, one not involving constants or function symbols), and indeed one of predicate logic without identity, that is equivalent to it for satisfiability. Thus we have already proved the following slight sharpening of Church’s theorem.

21.1 Lemma. The satisfiability problem for predicate logic without identity is unsolvable.

Sharper results will be obtained by considering narrower classes of sentences: dyadic logic, the part of predicate logic without identity where only two-place predicates are allowed; the logic of a triadic predicate, where only a single three-place predicate is allowed; and finally the logic of a dyadic predicate, where only a single two-place predicate is allowed. Section 21.3 will be devoted to proving the following three results.

21.2Lemma. The satisfiability problem for dyadic logic is unsolvable.

21.3Lemma. The satisfiability problem for the logic of a triadic predicate is unsolvable.

21.4Theorem (The Church–Herbrand theorem). The satisfiability problem for the logic of a dyadic predicate is unsolvable.

Let us now turn to positive results. Call a sentence n-satisfiable if has a model of some size m n. Now note three things. First, we know from section 12.2 that if a sentence comes out true in some interpretation of size m, then it comes out true in some interpretation whose domain is the set of natural numbers from 1 to m. Second, for a given finite language, there are only finitely many interpretations whose domain is the set of natural numbers from 1 to m. Third, for any given one of them we can effectively determine for any sentence whether or not it comes out true in that interpretation.

[It is easy to see this last claim holds for quantifier-free sentences: the specification of the model tells us which atomic sentences are true, and then we can easily work out whether a given truth-functional compound of them is true. Perhaps the easiest way to see the claim holds for all sentences is to reduce the general case to the special case of quantifier-free sentences. To do so, for each 1 k m add to the language a constant k denoting k. To any sentence A of the expanded language we can effectively associate a quantifier-free sentence A* as follows. If A is atomic, A* is A. If A is a truthfunctional compound, then A* is the same compound of the quantifier-free sentences

272

MONADIC AND DYADIC LOGIC

associated with the sentences out of which it is compounded. For instance, (B & C)* is B* & C*, and analogously for . If A is x F(x), then A* is (F(1)& . . . &F(m))*, and analogously for . Then A comes out true in the interpretation if and only if A* does.]

Putting our three observations together, we have proved the following.

21.5 Lemma. For each n, the n-satisfiability problem for first-order logic is solvable.

To show that the decision problem for a class K is solvable, it is sufficent to show how one can effectively calculate for any sentence S in K a number n such that if S has a model at all, then it has a model of size n. For if this can be shown, then for K the satisfiability problem is reduced to the n-satisfiability problem. The most basic positive result that can be proved in this way concerns monadic logic, where only one-place predicates are allowed.

21.6 Theorem. The decision problem for monadic logic is solvable.

A stronger result concerns monadic logic with identity, where in addition to oneplace predicates, the two-place logical predicate of identity is allowed.

21.7 Theorem. The decision problem for monadic logic with identity is solvable.

These results are immediate from the following lemmas, whose proofs will occupy section 21.2.

21.8Lemma. If a sentence involving only monadic predicates is satisfiable, then it has a model of size no greater than 2k , where k is the number of predicates in the sentence.

21.9Lemma. If a sentence involving only n monadic predicates and identity is satisfiable, then it has a model of size no greater than 2k · r, where k is the number of monadic predicates and r the number of variables in the sentence.

Before launching into the proofs, some brief historical remarks may be in order. The first logician, Aristotle, was concerned with arguments such as

All horses are mammals.

All mammals are animals.

Therefore, all horses are animals.

The form of such an argument would in modern notation be represented using oneplace predicates. Later logicians down through George Boole in the middle 19th century considered more complicated arguments, but still ones involving only oneplace predicates. The existence had been noticed of intuitively valid arguments involving many-place predicates, such as

All horses are animals.

Therefore, all who ride horses ride animals.

But until the later 19th century, and especially the work of Gottlob Frege, logicians did not treat such arguments systematically. The extension of logic beyond the monadic to the polyadic is indispensable if the forms of arguments used in mathematical proofs are to be represented, but the ability of contemporary logic to represent

21.2. MONADIC LOGIC

273

the forms of such arguments comes at a price, namely, that of the undecidability of the contemporary notions of validity and satisfiability. For, as the results listed above make plain, undecidability sets in precisely when two-place predicates are allowed.

21.2 Monadic Logic

Let us get straight to work.

Proof of Lemma 21.9: Let S be a sentence of monadic logic with identity involving k one-place predicates (possibly k = 0) and r variables. Let P1, . . . , Pk be predicates and v1, . . . , vr the variables. Suppose M is a model of S.

For each d in the domain M = |M| let the signature σ (d) of d be the sequence ( j1, . . . , jk ) whose ith entry ji is 1 or 0 according as PiM does or does not hold of d [if k = 0, then σ (d) is the empty sequence ( )]. There are at most 2k possible signatures. Call e and d similar if they have the same signature. Clearly similarity is an equivalence relation. There are at most 2k equivalence classes.

Now let N be a subset of M containing all the elements of any equivalence class that has r elements, and exactly r elements of any equivalence class that has r elements. Let N be the subinterpretation of M with domain |N| = N . Then N has size 2k · r. To complete the proof, it will suffice to prove that N is a model of S.

Towards this end we introduce an auxiliary notion. Let a1, . . . , as and b1, . . . , bs be sequences of elements of M. We say they match if for each i and j between 1 and n, ai and bi are similar, and ai = a j if and only if bi = b j . We claim that if R(u1, . . . , us ) is a subformula of S (which implies that s r and that each of the us is one of the vs) and a1, . . . , as and b1, . . . , bs are matching sequences of elements of M, with the bi all belonging to N , then the ai satisfy R in M if and only if the bi satisfy R in N. To complete the proof it will suffice to prove this claim, since, applied with s = 0, it tells us that since S is true in M, S is true in N, as desired.

The proof of the claim is by induction on complexity. If R is atomic, it is either of the form Pj (ui ) or of the form ui = u j . In the former case, the claim is true because matching requires that ai and bi have the same signature, so that PjM holds of the one if and only if it holds of the other. In the latter case, the claim is true because matching requires that ai = a j if and only if bi = b j .

If R is of form Q, then the as satisfy R in M if and only if they do not satisfy Q, and by the induction hypothesis the as fail to satisfy Q in M if and only if the bs fail to satisfy Q in N, which is the case if and only if the bs satisfy R in N, and we are done. Similarly for other truth-functional compounds.

It remains to treat the case of universal quantification (and of existential quantification, but that is similar and is left to the reader). So let R (u1, . . . , us ) be of formus+1 Q(u1, . . . , us , us+1), where s + 1 r and each of the us is one of the vs. We need to show that a1, . . . , as satisfy R in M (which is to say that for any as+1 in M, the longer sequence of elements a1, . . . , as , as+1 satisfies Q in M) if and only if b1, . . . , bs satisfy R in N (which is to say that for all bs+1 in N , the longer sequence of elements b1, . . . , bs , bs+1 satisfies Q in N). We treat the ‘if’ direction and leave the ‘only if’ direction to the reader.

274 MONADIC AND DYADIC LOGIC

Our induction hypothesis is that if a1, . . . , as , as+1 and b1, . . . , bs , bs+1 match, then a1, . . . , as , as+1 satisfy Q in M if and only if b1, . . . , bs , bs+1 satisfy Q in N. What we want to show is that if b1, . . . , bs , bs+1 satisfy Q in N for all bs+1 in N , then a1, . . . , as , as+1 satisfy Q in M for all as+1 in M. Therefore it will be enough to show that if a1, . . . , as and b1, . . . , bs match, where s < r, then for any as+1 in M there is a bs+1 in N such that a1, . . . , as , as+1 and b1, . . . , bs , bs+1 match.

In the degenerate case where as+1 is identical with one of the previous ai , we may simply take bs+1 to be identical with the corresponding bi . In the non-degenerate case, as+1 belongs to some equivalence class C and is distinct from any and all previous ai that belong to C. Let the number of such ai be t (where possibly t = 0), so that there are at least t + 1 elements in C, counting as+1. To ensure matching, it will suffice to choose bs+1 to be some element of C that is distinct from any and all previous bi that belong to C. Since a1, . . . , as and b1, . . . , bs match, the number of such bi will also be t. Since t s < r, and there are at least t + 1 r elements in C, there will be at least that many elements of C in N , and so we can find an appropriate bs+1, to complete the proof.

21.10Corollary. If a sentence involving no nonlogical symbols (but only identity) is satisfiable, then it has a model of size no greater than r, where r is the number of variables in the sentence.

21.11Corollary. If a sentence of monadic logic involving only one variable is satisfiable, then it has a model of size no greater than 2k , where k is the number of monadic predicates in the sentence.

Proofs: These are simply the cases k = 0 and r = 1 of Lemma 21.9.

Proof of Lemma 21.7: This is immediate from Corollary 21.11 and the following, which is a kind of normal form theorem.

21.12 Lemma. Any sentence of monadic logic without identity is logically equivalent to one with the same predicates and only one variable.

Proof: Call a formula clear if in any subformula x B(x) or x B(x) that begins with a quantifier, no variable other than the variable x attached to the quantifier appears in F. Thus x y(F x & Gy) is not clear, but x F x & yGy is clear. To prove the lemma, we show how one can inductively associate to any formula A of monadic logic without identity an equivalent formula A© with the same predicates that is clear (as in our example the first formula is equivalent to the second). We then note that any clear sentence is equivalent to the result of rewriting all its variables to be the same (as in our example the second sentence is equivalent to z F z & zGz). The presence of identity would make such clearing impossible. (There is no clear sentence equivalent to x y x = y, for instance.)

To an atomic formula we associate itself. To a truth-functional compound of formulas to which clear equivalents have been associated, we associate the same truthfunctional compound of those equivalents. Thus (B C)© is B© C©, for instance, and analogously for &. The only problem is how to define the associate ( x B(x))©