Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Hedman. A First Course in Logic, 2004 (Oxford)

.pdf
Скачиваний:
139
Добавлен:
10.08.2013
Размер:
7.17 Mб
Скачать

400

Beyond first-order logic

9.4 Lindstr¨om’s theorem

In this section, we define the concept of an arbitraryextension of first-order logic. Each of the logics defined in this chapter are examples of such extensions. The semantics of each of these logics is defined in terms of the structures defined in Chapter 2. Given any V-structure M and any V-sentence ϕ of one of these logics, either M |= ϕ or M |= ¬ϕ. Two sentences in the same vocabulary, but not necessarily in the same logic, are said to be equivalent if they hold in the same structures.

A logic is a formal language. The logics we are considering are designed to describe structures and only structures (as defined in Chapter 2). Moreover, extensions of first-order logic behave like first-order logic in certain fundamental ways that we shall describe. In defining “extensions of first-order logic,” we are by no means providing a definition for the notion of a “logic.” There are important logics (such as fuzzy logic, intuitionistic logic, and modal logic) that do not fall under the scope of what we are about to describe.

For a logic L to be an extension of first-order logic, it must possess certain basic properties. For any vocabulary V, we let L(V) denote the set of satisfiable V-sentences of the logic L. We assume not only that the set L(V) exists, but also that it behaves as expected. In particular, if a V-structure models some sentence ϕ of L, then ϕ L(V). Furthermore, to be anextension of first-order logic, L must possess each of the following properties:

The Extension Property: Any satisfiable first-order V-sentence is equivalent to a sentence in L(V). (That is, an extension of first-order logic must contain first-order logic.)

The Expansion Property: Let M be a V-structure and let M be an expansion of M . For any sentence ϕ in L(V), M |= ϕ if and only if M |= ϕ. (In particular, if V1 V2, then L(V1) L(V2).)

The Relational property: Let M be a structure in a vocabulary V {f } containing a k-ary function f . Let MR be the structure obtained by replacing

f with a (k + 1)-ary relation R. That is, MR |= Rx, y) if and only if M |= f x) = y. As V-structures, MR and M are identical.

For any ϕ L(V {f }) there exists ψ L(V {R}) such that, for any structures M and MR as described above, M |= ϕ if and only if MR |= ψ. (This allows us to assume that vocabularies are relational with no loss of generality.)

The Relativization Property: Let M be a V-structure. Let D M be a substructure of M such that the universe of D is defined by a first-order V-formula ϕ(x) in one free variable. For any ψ L(V) there exists ψϕ L(V) such that M |= ψϕ if and only if D |= ϕ.

Beyond first-order logic

401

• The Small Vocabulary Property: If a sentence ϕ of L is satisfied in a model of size κ, then it is satisfied in a structure having vocabulary of size κ.

• The Closure Property: if ϕ and ψ are sentences of L, then so are ϕ ψ, ¬ϕ, and .

• The Isomorphism Property: if M N , then for any sentence ϕ of L, M |= ϕ

=

if and only if N |= ϕ.

Definition 9.23 An extension of first-order logic is any formal language that satisfies each of the above properties.

Each of the logics we have considered is an extension of first-order logic. For the fixed-point logics of the previous section, this is a nontrivial fact (it is far from obvious that they are closed under negation). Whereas each extension of first-order logic must possess each of the above properties, the following are the properties of first-order logic that may or may not be shared by an extension of first-order logic:

The Compactness property: for any set Γ of sentences of L, if every finite subset of Γ has a model, then Γ has a model.

The Downward L¨owenheim–Skolem property: for any sentence ϕ of L, if

M |= ϕ, then there exists N M such that N |= ϕ and |N | = 0.

Let L1 and L2 be two extensions of first-order logic. We say that L2 is at least as strong as L1, and write L1 ≤ L2 if every sentence of L1 is equivalent to a sentence of L2. If both L1 ≤ L2 and L2 ≤ L1, then we say that L1 and L2 have the same expressive power. Lindstr¨om’s theorem implies that first-order logic is the strongest logic possessing both the Downward L¨owenheim–Skolem property and the Compactness property. The following proposition is somewhat of a “warm-up” exercise for Lindstr¨om’s theorem.

Proposition 9.24 Let L be an extension of first-order logic that has the Downward L¨owenheim–Skolem property. Suppose that Lω1ω ≤ L. For any structures M and N , if there exists an L sentence that holds in M but not N , then there exists such a sentence in Lω1ω.

Proof Suppose that M ≡Lω1ω N . Suppose for a contradiction that M |= ϕ, and N |= ¬ϕ for some L sentence ϕ. By the Downward L¨owenheim–Skolem property,

ϕhas a model of size 0. By the Small Vocabulary Property, we may assume that

ϕL(V) for a countable vocabulary V. By the Expansion property (which may just as well be called the “Reduct property”), we may assume that M and N are V-structures. By the Relational property, we may assume that V is relational. By the Downward L¨owenheim–Skolem property, there exist countable M0 M and

402

 

 

Beyond first-order logic

 

 

 

N

0

N such that M

0

0

, M

0

|

0

|

¬

ϕ. By Proposition 9.13,

 

 

Lω1ω N

 

= ϕ, and N

 

=

 

M N . This contradicts the Isomorphism Property.

0 = 0

This proposition states that, in some sense, Lω1ω is the strongest extension of first-order logic possessing the Downward L¨owenheim–Skolem property. Toward Lindstr¨om’s theorem, let us strengthen this proposition. Lindstr¨om’s Theorem regards first-order logic rather than Lω1ω. Prior to stating this theorem, we strengthen Proposition 9.24 in a di erent direction. We replace the Downward L¨owenheim–Skolem property with a weaker property.

Definition 9.25 Let κ be a cardinal. An extension of first-order logic is said to have L¨owenheim–Skolem number κ if for every set Γ of sentences of L, if Γ has a model and |Γ| ≤ κ, then Γ has a model of size at most κ.

If L has the Downward L¨owenheim–Skolem property, then L has L¨owenheim–Skolem number 0. The converse is not necessarily true. If a sentence ϕ has a countable model, then it is not necessarily true that every model of ϕ has a countable substructure that models ϕ as the Downward L¨owenheim–Skolem property asserts.

Proposition 9.26 Let L be an extension of first-order logic that has L¨owenheim– Skolem number 0. Suppose that Lω1ω ≤ L. For any structures M and N , if there exists an L sentence that holds in M but not N , then there exists such a sentence in Lω1ω.

Proof Suppose that M ≡Lω1ω N . Suppose for a contradiction that M |= ϕ, and N |= ¬ϕ for some L sentence ϕ. Let U be the underlying set of M and let V be the underlying set of N . By the Isomorphism property, we may assume that U and V are disjoint. By the Relational property, we may assume that the vocabulary V of M and N is relational. Since L has L¨owenheim–Skolem number0 and ϕ is satisfiable (M is a model), ϕ has a countable model. By the Small Vocabulary property, we may assume V is countable.

We describe a structure M having U V as an underlying set. The vocabulary for M is VEF = V {PU , PV , R1, R2, . . .}. The unary relation PU defines the set U and the unary relation PV defines the set V in M. So M is isomorphic to the substructure PU (M) of M and N is isomorphic to the substructure PV (M) of M. By the Relativization property, there exists a sentence ϕU of L such that, for any VEF -structure S, S |= ϕU if and only if PU (S) |= ϕ. Likewise, there is a sentence ¬ϕV of L such that S |= ¬ϕV if and only if PV (S) |= ¬ϕ.

Each Rn in the vocabulary of M is a 2n-ary relation. We now list countably many first-order sentences that describe the interpretation of these relations in

Beyond first-order logic

403

M. For each n N

n

n

 

M |= Rn(x1, . . . , xn, y1, . . . , yn)

i

 

PU (xi) PV (yi).

 

=1

i=1

For each n N and each quantifier-free first-order V-formula θ in n free variables,

M |= Rn(x1, . . . , xn, y1, . . . , yn) (θ(x1, . . . , xn) ↔ θ(y1, . . . , yn)).

That is if Rn(a1, . . . , an, b1, . . . , bn) holds then the function f (ai) = bi is a partial isomorphism from PU (M) to PV (M). Moreover, for each n N,

M|= Rn(x1, . . . , xn, y1, . . . , yn) → x yRn+1(x1, . . . , xn, x, y1, . . . , yn, y),

and

M|= Rn(x1, . . . , xn, y1, . . . , yn) → y xRn+1(x1, . . . , xn, x, y1, . . . , yn, y).

Finally, M |= x yR1(x, y) y xR1(x, y).

We have listed countably many first-order sentences that hold in M. Let ΦEF be the conjunction of these sentences. We claim that, for any VEF -structure S, S |= ΦEF if and only if PU (S) Lω1ω PV (S). That is, ΦEF expresses that Duplicator wins EFω(PU (S), PV (S)). The final sentence in the above list states that Duplicator can match Spoiler’s first move. The previous sentences express that Duplicator can continue to match Spoiler indefinitely.

By the Closure property, ΦEF ϕU ¬ϕV is equivalent to a sentence of L. This sentence is satisfiable since M is a model. Since L has L¨owenheim– Skolem number 0, there exists a countable model C of this sentence. Since

C = Φ

EF

, P

U

(C)

Lω1

ω P

V

(C). By Proposition 9.13, P

U

(C) = P

V

(C). Since

|

 

 

 

 

 

 

 

C |= ϕU ¬ϕV , PU (C) |= ϕ and PV (C) |= ¬ϕ. This contradicts the isomorphism property.

To state Lindstr¨om’s theorem in its most general form, we consider a weak version of the Compactness property.

Definition 9.27 Let κ be a cardinal. An extension of first-order logic is said to have compactness number κ if for any set Γ of sentences of the logic, if |Γ| ≤ κ and every finite subset of Γ has a model, then Γ has a model.

Theorem 9.28 (Lindstr¨om) If an extension L of first-order logic has L¨owenheim– Skolem number 0 and compactness number 0, then L has the same expressive power as first-order logic.

Proof Let Lfo denote first-order logic. We must show that L ≤ Lfo. That is, each sentence ϕ of L is equivalent to some first-order sentence ψϕ.

Claim 1 If M ≡ N , then M |= ϕ if and only if N |= ϕ.

404

Beyond first-order logic

Proof Suppose for a contradiction that M ≡ N , M |= ϕ, and N |= ¬ϕ. Recall the sentence ΦEF ϕU ¬ϕV from the proof of Proposition 9.26. The sentence ΦEF is the conjunction of countably many first-order sentences. Let us now regard ΦEF as a countable set (since we can no longer take infinite conjunctions). The Relativization property guarantees the existence of the L sentences ϕU and ¬ϕV . We claim that ΦEF U , ¬ϕV } has a countable model M. Since M ≡ N , Duplicator wins EFk(M , N ) for each k N. It follows from the definition of ΦEF that every finite subset of ΦEF U , ¬ϕV } is satisfiable. Since L has compactness number 0, this set has a model. Since L has L¨owenheim–Skolem number 0, this countable set of sentences has a countable model. This leads to the same contradiction as in the proof of Proposition 9.26. This contradiction proves the claim.

It remains to be shown that Lindstr¨om’s theorem follows from the claim. We must show that ϕ is equivalent to some first-order sentence. Let M |= ϕ. Since L has L¨owenheim–Skolem number 0, we may assume that M is countable. Since L has compactness number 0, we can use the following compactness argument that was used repeatedly in Chapter 4.

Let T be the first-order theory of M . Let C be the set of all ψ T such that each model of ϕ also models ψ (C is the set of “consequences” of ϕ in T ).

Claim 2 Every model of ∆ models ϕ for some finite subset ∆ of C.

Proof Suppose not. Then, by compactness, C {¬ϕ} has a model N1. Let T1 be the first-order theory of N1. Consider the set T1 {ϕ}. If this set does not have a model, then some finite subset does not have a model (again by compactness). So, for some θ T1, ϕ {θ} has no model and ¬θ C. This contradicts the facts that C T1 and T1 is consistent. This contradiction proves that T1 {ϕ} does have a model N2. But now N1 ≡ N2 (since T1 is complete), N2 |= ϕ and N1 |= ¬ϕ. This directly contradicts Claim 1 and proves Claim 2.

So ∆ and ϕ have the same models and ϕ is equivalent to the conjunction of the finitely many first-order sentences in ∆.

Exercises

9.1.Let G be a graph. AHamilton circuit in G is a path that begins and ends at the same vertex and includes each of the other vertices once and only once.

(a)Write a second-order sentence that holds in G if and only if G has a Hamilton circuit.

(b)Write a Lω1ω sentence that holds in G if and only if G has a Hamilton circuit.

Beyond first-order logic

405

9.2. Write a second-order sentence that holds in a structure

M if and

only if M is finite and the universe of M contains an odd

number of

elements.

 

9.3.Let Kn denote the n-clique. Show that for any k N, Duplicator can prevent Spoiler from winning EFk(Kn, Km) for su ciently large n and m.

9.4.Let V< = {<}. Let L1 and L2 be finite V<-structures that interpret the binary relation < as a linear order. Show that if both |L1| and |L2| are larger than 2k, then Duplicator can prevent Spoiler from winning

EFk(L1, L2).

9.5.Let G be a finite graph. The degree of a vertex v in G is the number of vertices adjacent to v. An Euler path is a path that includes each edge once and only once. Leonhard Euler proved that a finite graph has an Euler path if and only if there are at most two vertices of odd degree.

(a)Show that there is no first-order sentence ΦEuler such that G |= ΦEuler if and only if G has an Euler path. (Use Exercise 9.3.)

(b)Write a second-order sentence that holds in G if and only if G has a Euler circuit. (Use the formula from Exercise 9.2.)

(c)Write a Lω1ω sentence that holds in G if and only if G has a Euler circuit.

9.6.A graph is said to be k-colorable if the vertices of the graph can be colored with k colors in such a way that no two vertices of the same color share an edge. Write a second-order existential sentence that holds in a graph G if and only if G is k-colorable.

9.7.Each of the following are proved in Chapter 4 for first-order logic. Show that each remains true when first-order logic is replaced with Lω1ω.

(a)Proposition 4.31 (the Tarski–Vaught criterion)

(b)Theorem 4.33 (the Downward L¨owenheim–Skolem theorem)

(c)Theorem 4.47 (the Los–Tarski theorem)

9.8.Let V< = {<}. Describe a V<-sentence in the logic Lω1ω1 that says < is a well-ordering of the underlying set.

9.9.Suppose that Duplicator prevents Spoiler from winning EFω(M , N ). Show that M |= ϕ if and only if N |= ϕ for each V-formula ϕ of Lω1ω. (Use induction on the complexity of ϕ.)

9.10.Prove Proposition 9.10.

9.11.Let S be the set of all finite strings of symbols from the set

{A, B, C, . . . , X, Y , Z, ), (, , ¬}.

406

Beyond first-order logic

We describe a structure M having S as an underlying set. The vocabulary of M contains:

a unary relation a(s) interpreted as s = A or s = B,. . . , or s = Z,

a unary function n(x) interpreted as n(s) = ¬s,

a unary function p(x) interpreted as p(s) = (s), and

a binary function c(x, y) interpreted as p(s, t) = s t,

where s and t denote arbitrary elements of S. Let f orm(s) be a formula that says the string s is a formula of propositional logic. Show that f orm(s) is not a first-order formula. Show that f orm(s) can be expressed in any of the fixed-point logics from Section 9.3.

9.12.Let LQ be the extension of first-order logic that contains a new quantifier Q. The syntax of LQ is defined by adding the following rule to the rules that define the syntax of first-order logic:

(RQ) If ϕ is a formula of LQ, then so is Qxϕ.

The formula Qxϕ(x) is to be interpreted as “there exist uncountably many x such that ϕ(x) holds.” This describes the semantics of LQ. Show that LQ is a logic that possesses compactness but not the Downward L¨owenheim– Skolem Property.

9.13.Show that every formula of second-order logic can be put into prenex

normal form. That is, show that each formula is equivalent to a formula of the form Q1R1i1 Q2R2i2 . . . QkRkik ϕ where each Qj is either or and ϕ is a first-order formula.

9.14.Let M onSO denote monadic second-order logic as defined at the end of

Section 10.1. Using the fact that M onSO has L¨owenheim–Skolem number0 and is compact, show that

(a)there is no sentence of M onSO that holds in connected graphs and only connected graphs;

(b)there does exist a sentence of M onSO that holds in nonconnected graphs and only nonconnected graphs;

(c)Why does M onSO not contradict Lindstr¨om’s theorem?

9.15.Show that LF P ≤ Lω1ω.

9.16.Show that Lω1ω ≤ SOL.

9.17.Show that LF P ≤ IF P .

9.18.Let T be a first-order 0-categorical V-theory. Show that every V-formula of IFP is T -equivalent to a first-order V-formula.

Beyond first-order logic

407

9.19.Let L be an extension of first-order logic. The Hanf number of L is the least cardinal κ such that every sentence of L that has a model of size κ has arbitrarily large models.

(a)Show that L is equivalent to first-order logic if and only if L has L¨owenheim–Skolem number 0 and Hanf number 0.

(b)Show that every extension of first-order logic has a Hanf number.

9.20.(Lindstr¨om) Let L be an extension of first-order logic. Show that L is equivalent to first-order logic if and only if L has L¨owenheim–Skolem number 0 and the set of sentences of L that hold in every model is a recursively enumerable set.

10 Finite model theory

This final chapter unites ideas from both model theory and complexity theory. Finite model theory is the part of model theory that disregards infinite structures. Examples of finite structures naturally arise in computer science in the form of databases, models of computations, and graphs. Instead of satisfiability and validity, finite model theory considers the following finite versions of these properties.

A first-order sentence is finitely satisfiable if it has a finite model.

A first-order sentence is finitely valid if every finite structure is a model.

Finite model theory developed separately from the “classical” model theory of previous chapters. Distinct methods and logics are used to analyze finite structures. In Section 10.1, we consider various finite-variable logics that serve as useful languages for finite model theory. We define variations of the pebble games introduced in Section 9.2 to analyze the expressive power of these logics.

Pebble games are one of the few tools from classical model theory that is useful for investigating finite structures. In Section 10.2, it is shown that many of the theorems from Chapter 4 are no longer true when restricted to finite models. There is no analog for the Completeness and Compactness theorems in finite model theory. Moreover, we prove Trakhtenbrot’s theorem which states that the set of finitely valid first-order sentences is not recursively enumerable.

Descriptive complexity is the subject of 10.3. This subject describes the complexity classes discussed in Chapter 7 in terms of the logics introduced in Chapter 9. We prove Fagin’s theorem relating the class NP to existentional second-order logic. We prove the Cook–Levin theorem as a consequence of Fagin’s Theorem. This theorem states that the Satisfiability Problem for Propositional Logic is NP-complete. We conclude this chapter (and this book) with a section describing the close connection between logic and the P = NP problem.

10.1 Finite-variable logics

In this section, we discuss appropriate logics for the study of finite models. First-order logic, since it describes each finite model up to isomorphism, is too

Finite model theory

409

strong. For this reason, we must weaken the logic. It may seem counter-intuitive that we should gain knowledge by weakening our language. Recall that, for infinite structures, first-order logic is quite weak (compared to logics from the previous chapter). This weakness is demonstrated in the Compactness theorem, the L¨owenheim–Skolem theorems, and the other theorems of Chapter 4. It is precisely these properties that make first-order logic a productive logic for the study of infinite structures. The weakness of first-order logic gives rise to model theory. With this in mind, we consider the following logics.

Definition 10.1 For k N, let Lk be the fragment of first-order logic obtained by restricting to the k variables x1, x2, . . . , xk (or any other set of k variables).

There are two reasons that first-order logic is not appropriate for finite model theory. One reason is that it is too strong. The other reason is that it is too weak. This is the Fundamental Joke of Finite Model Theory. It is too strong for the reasons we have mentioned. First-order logic is too weak because it is incapable of defining basic properties of finite structures. For example, there is no first-order sentence expressing that a finite structure is a connected graph. Also, there is no first-order sentence expressing that a finite structure has an even number of elements. For this reason, we consider various strengthenings of Lk.

Definition 10.2 Let Ck be k-variable logic with counting quantifiers. That is, Ck contains all Lk formulas and is closed under negation, conjunction, and quantification by the counting quantifiers ≤n for each n N.

Since ≤n is first-order expressible, we regard Ck as a fragment of first-order logic. So although Ck is stronger than Lk, it cannot express properties such as connectedness that cannot be expressed in first-order logic.

Definition 10.3 For k N, let Lkω1ω be the fragment of Lω1ω obtained by restricting to the k variables x1, x2, . . . , xk.

Finite model theory also considers finite-variable logics with a fixed-point operator and other extensions of Lk. However, we restrict our attention to the above logics. We demonstrate what can and cannot be expressed in these logics by providing some examples and stating without proof some basic facts.

Consider the logic L3. Since this logic only allows three variables, it is a restrictive language. However, by using the variables in an economical way, we can express more than may be apparent. We can repeatedly use (and re-use) each of the three variables any number of times. For example, let VS be the vocabulary consisting of a single binary relation S. Let ZS = (Z|S) be the VS -structure that interprets S as the successor relation on the integers. That is, ZS |= S(a, b) if and only if b = a + 1. The following VS -formula says that y is the (n + 1)th