Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Compactness Hans Halvorson March 4, 2013 1 Compactness theorem for propositional logic Recall that a set T of sentences is said to be finitely satisfiable just in case: for each finite F ⊆ T , there is an L structure MF such that MF |= φ for all φ ∈ F . The set T is said to be satisfiable just in case there is an L structure M such that M |= φ for all φ ∈ T . Theorem 1 (Compactness). If T is finitely satisfiable then T is satisfiable. For the case of propositional logic, we have already assembled all the facts we need for the proof of compactness. Proof. (Propositional case) Let T be a finitely satisfiable set of sentences of propositional logic. It follows then that the set Cn(T ) of consequences of finite subsets of T is a proper filter. We have seen that every proper filter is contained in an ultrafilter. (To prove this fact, we needed some version of the axiom of choice.) Hence T is contained in Cn(T ), which is contained in an ultrafilter U . An exercise in the previous set of notes showed that there is a truth valuation h such that h(φ) = 1 iff φ ∈ U . Therefore h(φ) = 1 for all φ ∈ T , and T is satisfiable. Exercise 1. Show that compactness implies the following claim: if T is a set of sentences and T |= φ, then T contains a finite subset F such that F |= φ. Exercise 2. Let T be a set of sentences with the following property: for every L structure M , there is some sentence φ ∈ T such that M |= φ. Show that there are sentences ψ1 , . . . , ψn ∈ T such that ψ1 ∨ · · · ∨ ψn is a tautology, i.e. is true in every structure. Exercise 3. For each natural number n, let ∃>n denote the sentence ∃x0 ∃x1 . . . ∃xn (x0 6= x1 ∧ x0 6= x2 ∧ · · · ∧ xn−1 6= xn ). 1 Then for any structure M , ∃>n is true in M just in case |M | has more than n elements. Now let T be the set {∃>n | n ∈ N}, and let φ be a sentence that says there are infinitely many things. Then T |= φ. By the previous exercise, there is a finite subset F of T such that F |= φ. Since F is finite, there is a largest number n such that ∃>n ∈ F . Thus, if there are more than n things, then there are infinitely many things. Dissolve this paradox. y 2 Compactness theorem: general case A proof for the general case will be more difficult, because we need more than just a truthvaluation on T : we need a full-blown L structure, including a domain |M | and assignments of relevant structures on |M | to all the non-logical vocabulary of L. In what follows, we work with a fragment of first-order logic where the only connectives are ∧ and ¬ and the only quantifier is ∃. This restriction is made only for convenience: every theorem we prove for this fragment of first-order logic also holds for full first-order logic. The reason that this claim is true is because full-first order logic is reducible — in a precise sense — to this fragment. Definition. Let L be a first-order language and let T be a set of sentences in L. We say that (L, T ) has the C properties just in case: C1. For every closed term t of L, t = t ∈ T ; C2. For any closed terms t and t0 of L, if φ(t) ∈ T and t = t0 ∈ T then φ(t0 ) ∈ T ; C3. If φ ∧ ψ ∈ T then φ ∈ T and ψ ∈ T ; C4. If φ ∈ T and ψ ∈ T then φ ∧ ψ ∈ T ; C5. If φ(t) ∈ T , where t is a closed term, then ∃xφ(x) ∈ T ; C6. If ∃xφ(x) ∈ T then φ(t) ∈ T for some closed term t of L; C7. If φ ∈ T then ¬φ 6∈ T ; C8. If φ 6∈ T then ¬φ ∈ T . Exercise 4. Let M be an L structure, and let T h(M ) = {φ | M |= φ}. Then T h(M ) satisfies all the C properties except one. Which one can fail? Under what conditions on the structure M would it hold? 2 Exercise 5. Suppose that the set T is finitely satisfiable, and let Cn(T ) = {φ|F |= φ, some finite F ⊆ T }. Show that Cn(T ) is finitely satisfiable. Lemma 2. If T is finitely satisfiable and satisfies C8, then T satisfies all of the C properties except possibly C6. Proof. C1. Since {t 6= t} is not satisfiable, t 6= t 6∈ T . By the contrapositive of C8, t = t ∈ T. C2. The set {t = t0 , φ(t), ¬φ(t0 )} is not satisfiable. Thus, if t = t0 ∈ T and φ(t) ∈ T then ¬φ(t0 ) 6∈ T , in which case φ(t0 ) ∈ T . C3. As before, the set {φ ∧ ψ, ¬φ} is not satisfiable. So, if φ ∧ ψ ∈ T then ¬φ 6∈ T and by C8, φ ∈ T . Similarly, if φ ∧ ψ ∈ T then ψ ∈ T . C4. The set {φ, ψ, ¬(φ ∧ ψ)} is not satisfiable. So, if φ ∈ T and ψ ∈ T then ¬(φ ∧ ψ) 6∈ T and φ ∧ ψ ∈ T . C5. The set {φ(c), ¬∃φ(x)} is not satisfiable. If φ(c) ∈ T then ¬∃φ(x) 6∈ T , from which it follows that ∃xφ(x) ∈ T . C7. The set {φ, ¬φ} is not satisfiable. C8. By stipulation. Lemma 3. If T is a finitely satisfiable set of sentences, then T is contained in a set T + that is finitely satisfiable and such that either φ ∈ T + or ¬φ ∈ T + for every sentence φ. Proof. Let {φ1 , φ2 , . . . } be an enumeration of the sentences in L. Following the procedure we outlined previously, we let T0 = T . If Ti is finitely satisfiable, then either Ti ∪ {φi } is finitely satisfiable or Ti ∪{¬φi } is finitely satisfiable. We let Ti+1 = Ti ∪{φi } if it is finitely satisfiable, S otherwise we let Ti+1 = Ti ∪ {¬φi }. Finally we let T + = ∞ i=1 Ti . It is straightforward to + 0 verify that T is finitely satisfiable, and either φ ∈ T or ¬φ ∈ T + for all sentences φ. Lemma 4. Suppose that T is a finitely satisfiable set of sentences in the language L. Then there is a language Lw ⊇ L and a finitely satisfiable set T w ⊇ T of sentences in Lw such that if ∃xφ(x) ∈ T then φ(c) ∈ T w for some constant symbol c of Lw . 3 Proof. If ∃xφi (x) ∈ T , introduce a new constant symbol ci . Let Lw be the union of L and these new constant symbols, and let T w = T ∪ {φi (ci )|∃xφi (x) ∈ T }. We claim that T w is finitely satisfiable. Let F be a finite subset of T w . Then F has the form F1 ∪ F2 where F1 is a finite subset of T and F2 = {φi (ci )|i = 1, . . . , n}. Let F0 = F1 ∪ {∃xφi (x)|i = 1, . . . , n}. Since T is finitely satisfiable, there is an L structure M that satisfies F0 . We extend M to M a Lw structure as follows: choose cM i to be some element of the non-empty set [x.φi (x)] , and it then follows that M |= φi (ci ). The extended structure satisfies F0 ∪ F2 and hence F = F1 ∪ F2 . Therefore T w is finitely satisfiable. Proposition 5. Suppose that T is a finitely satisfiable set of sentences in a language L. Then there is a language L∗ ⊇ L and a set T ∗ ⊇ T of sentences in L∗ such that (L∗ , T ∗ ) has the C properties. Proof. We define a sequence of languages L0 ⊆ L1 ⊆ L2 ⊆ · · · and a sequence of sets of sentences T0 ⊆ T1 ⊆ T2 ⊆ · · · in the respective languages. Let L0 = L and let T0 = T . Now suppose that Li and Ti are already given. If i is even, then we let Li+1 = (Li )w and Ti+1 = (Ti )w , as defined in Lemma 4. If i is odd, then we let Li+1 = Li , and we let Ti+1 = (Ti )+ as defined in Lemma 3. S∞ S ∗ ∗ Now let L∗ = ∞ i=0 Ti . We claim that T has the C properties. i=1 Li and let T = First we use Lemma 2 to show that T ∗ has all the C properties except possibly the witness property. To see that T ∗ is finitely satisfiable, let F be a finite subset of T ∗ . Then F must already be contained in Ti for some finite i. But Ti is finitely satisfiable, hence F is satisfiable. Now let φ be an arbitrary sentence of the language L∗ . Then φ is a sentence of the language Li for some finite i. For each i, Ti+2 contains either φ or ¬φ for each sentence φ of Li . Thus, S ∗ T∗ = ∞ i=0 Ti contains either φ or ¬φ. So, by Lemma 2, T satisfies all of the C properties with the possible exception of the witness property. To see that (L∗ , T ∗ ) has the witness property, let ∃xφ(x) ∈ T ∗ . Then there is an i such that ∃xφ(x) ∈ Ti . By construction, φ(c) ∈ Ti+2 ⊆ T ∗ for some constant symbol c in Li+2 ⊆ L∗ . Therefore (L∗ , T ∗ ) has the witness property. Proposition 6. If (L, T ) has the C properties then there is an L structure M such that M |= φ iff φ ∈ T . The proof of this proposition consists of two lemmas. But first let’s define the relevant structure M . Consider the set M0 of constant symbols in L. Define a relation c ∼ d just in case c = d ∈ T . We verify that ∼ is an equivalence relation. 1. Reflexivity follows from C1. 4 2. Symmetry follows from C1 and C2: by C1, c = c ∈ T . If c = d ∈ T then C2 entails that d = c ∈ T . 3. Transitivity follows from C1 and C2. Let M be the set of equivalence classes of elements of M0 under the relation ∼. We will use t∗ to denote the equivalence class containing a closed term t. We now define the extensions of the non-logical symbols of L. 1. For a constant symbol c of L, let cM = c∗ . 2. For a relation symbol R, let hc∗1 , . . . , c∗n i ∈ RM iff R(c1 , . . . , cn ) ∈ T. We need to check that this definition is independent of the particular constant symbols ci chosen from the equivalence classes c∗i . Indeed, if ci ∼ di , then ci = di ∈ T . Then C2 entails that R(c1 , . . . , cn ) ∈ T if and only if R(d1 , . . . , dn ) ∈ T . 3. For a function symbol f , let f M (c∗1 , . . . , c∗n ) = d∗ iff f (c1 , . . . , cn ) = d ∈ T. As before, one must check that this definition is independent of the particular constant symbols chosen from the equivalence classes. Lemma 7. For any term t and constant symbols c1 , . . . , cn , d tM (c∗1 , . . . , c∗n ) = d∗ iff t(c1 , . . . , cn ) = d ∈ T. Proof. We prove this claim by induction on the construction of t. For simplicity, we will write the proof as if t contains at most one free variable. The general case only involves more complicated notation. Step 1. If t is a constant symbol c, then tM = cM = c∗ . By the definition of the equivalence relation ∼, c∗ = d∗ if and only if c = d ∈ T . Step 2. If t is a variable v, then v M is the identity function on M . Thus v M (c∗ ) = c∗ = d∗ if and only if c = d ∈ T . Step 3. Suppose that the result has already been proven for terms t1 , . . . , tn , and let f be a function symbol. For each i, the sentence ∃y(ti (c) = y) is a tautology, and so is 5 contained in T . Since T has the witness property, there is a constant symbol ei such ∗ ∗ that ti (c) = ei ∈ T . By the inductive hypothesis, tM i (c ) = ei . Thus, [f (t1 , . . . , tn )]M (c∗ ) = d∗ ∗ ∗ M ∗ (defn of L structures) iff f M (tM 1 (c ), . . . , tn (c )) = d iff f M (e∗1 , . . . , e∗n ) = d∗ ∗ ∗ (since tM i (c ) = ei ) iff f (e1 , . . . , en ) = d ∈ T (defn of M ) iff f (t1 (c), . . . , tn (c)) = d ∈ T. (C2) Lemma 8. For any formula φ with free variables among ~x, and for any constant symbols c1 , . . . , c n , M |=~x φ(c∗1 , . . . , c∗n ) iff φ(c1 , . . . , cn ) ∈ T. Proof. We prove this claim by induction on the construction of φ. In some steps, we will write the formula φ as if it only has one free variable x; but the proof generalizes directly to the case of any number of free variables. Step 1. Suppose that φ(x) has the form t1 (x) = t2 (x). For i = 1, 2, C1 entails that ti (c) = ti (c) ∈ T . Thus by C5, ∃y(ti (c) = y) ∈ T , and by C6, there is a constant ∗ ∗ symbol di of L such that ti (c) = di ∈ T . By the previous lemma, tM i (c ) = di . Thus, M M M M |= φ(c) iff tM 1 (c ) = t2 (c ) ∗ M ∗ iff tM 1 (c ) = t2 (c ) (defn of L structures) (since cM = c∗ ) iff d∗1 = d∗2 ∗ ∗ (since tM i (c ) = di ) iff d1 ∼ d2 (defn of d∗i ) iff d1 = d2 ∈ T (defn of ∼) M iff tM 1 (c) = t2 (c) ∈ T (C2). Step 2. Suppose that φ(x) has the form R(t1 (x), . . . , tn (x)). Using the same idea as the previous step, we find constant symbols d1 , . . . , dn such that ti (c) = di ∈ T ; and 6 ∗ ∗ the previous lemma entails that tM i (c ) = di . Then, ∗ M ∗ M M |= φ(c∗ ) iff htM 1 (c ), . . . , tn (c )i ∈ R (defn of L structures) iff hd∗1 , . . . , d∗n i ∈ RM ∗ ∗ (since tM i (c ) = di ) iff R(d1 , . . . , dn ) ∈ T (defn of M ) iff R(t1 (c), . . . , tn (c)) ∈ T (C2). Step 3. We now suppose that the claim has been proven for formulas φ(x), ψ(x). We show that the claim also holds for φ(x) ∧ ψ(x). M |= φ(c) ∧ ψ(c) iff M |= φ(c) and M |= ψ(c) iff φ(c) ∈ T and ψ(c) ∈ T (defn of L structures) (inductive hypothesis) iff φ(c) ∧ ψ(c) ∈ T (C3,C4). Step 4. Suppose that the claim holds for φ(x). We show that it also holds for ¬φ(x). M |= ¬φ(c∗ ) iff M 6|= φ(c∗ ) (defn of L structures) iff φ(c) 6∈ T (inductive hypothesis) iff ¬φ(c) ∈ T (C7,C8). Step 5. For the case of the existential quantifier, we consider a formula φ(x, y) with two free variables. Supposing that the claim has been proven true for φ(x, y), we show that it also holds for ∃yφ(x, y). Indeed, M |=x ∃yφ(c∗ , y) iff M |= φ(c∗ , d∗ ), some d∗ ∈ M (defn of L structures) iff φ(c, d) ∈ T, some constant d (inductive hypothesis) iff ∃yφ(c, y) ∈ T 3 (C5,C6). Consequences of compactness We briefly consider some consequences of compactness. Example. Let L = {+, ·, <, 0, 1}, and let N be the natural numbers with the standard interpretation of the symbols. Let T h(N) be the set of all true L sentences in the structure 7 N. We claim that T h(N) has a model with a number ω greater than any natural number. Indeed, let L = L ∪ {c}, where c is a constant symbol, let φn (c) ≡ (1 + · · · + 1 < c), and let T = T h(N) ∪ {φn (c)|n ∈ N}. Then T is finitely consistent, and the compactness theorem implies that T has a model M . In the structure M , the element cM is greater than every natural number. y Example. Let L = {+, ·, <, 0, 1}, and let R be the real numbers with the standard interpretation of the symbols. Let T h(R) be the set of all true L sentences in the structure R. We claim that T h(R) has a model with infinitesimal numbers. Indeed, let L = L ∪ {c}, where c is a constant symbol, let φn (c) ≡ 0 < c < n−1 , and let T = T h(R) ∪ {φn |n ∈ N}. Again, by compactness, there is a model M of T , and in this model 0 < cM , but cM is smaller than any positive real number. y Proposition 9. Let T be a set of sentences with arbitrarily large finite models. Then T also has an infinite model. Proof. For each n ∈ N, let ∃≥n be the sentence ∃x0 ∃x1 . . . ∃xn (x0 6= x1 ∧ x0 6= x2 ∧ · · · ∧ xn−1 6= xn ). Let S = {∃≥n |n ∈ N}. We show that T ∪ S is finitely satisfiable. Any finite subset of T ∪ S is of the form F 0 ∪ F where F 0 ⊆ T and F ⊆ S are finite. If F is finite, then there is a natural number n such that if ∃≥i ∈ F then i < n. Since T has arbitrarily large finite models, there is a model M of T such that M |= ∃≥i for all i < n. Thus, M is a model of F 0 ∪ F . Therefore T ∪ S is finitely satisfiable. By compactness, T ∪ S has a model N , and since N |= ∃≥n for all n ∈ N, |N | is infinite. Therefore T has an infinite model. A famous theorem by the logicians Leopold Löwenheim and Thoralf Skølem shows that if a set of sentences has an infinite model, then it has models of all other infinite cardinalities. Our proof of the compactness theorem entails a baby version of the Löwenheim-Skølem theorem. First, the “upward” Löwenheim-Skølem theorem shows that satisfiable sets of sentences have large models. Theorem 10. If T is a set of sentences with an infinite model, then T has an uncountably infinite model. 8 Proof. Let L0 = L ∪ {cr : r ∈ R}, where the cr are constant symbols that do not occur in L. Let S = {cr 6= cs |r 6= s}. We claim that T ∪ S is finitely satisfiable. Let F 0 ∪ F be a finite subset of T ∪ S. Then F contains only finitely many sentences of the form c 6= d. Let M be an infinite model of T . We extend M to a L0 structure N as follows: if c 6= d ∈ F , then choose cN and dN so that cN 6= dN . For those c that do not occur in F , cN can be chosen arbitrarily. It follows that N satisfies F 0 . Furthermore, since the constants cr do not occur in F 0 , N still satisfies F 0 . Therefore T ∪ S is finitely satisfiable, and by compactness, satisfiable. But any model of T ∪ S is uncountably infinite; hence T has an uncountably infinite model. Second, the “downward” Löwenheim-Skølem theorem shows that satisfiable sets of sentences have small models. Theorem 11. Let T be a set of sentences in a countable language. If T has an infinite model then T has a countably infinite model. Proof. This theorem follows from the proof of compactness, and in particular from the definition of the model M . We claim that if the language L is countable then the model M is countable. Recall that the domain of M consists of equivalence classes of constant symbols in the extended language L∗ . Thus, it suffices to note that if the original language L is countable, then the extended language L∗ is countable. Recall that L∗ is a union of a countable family {Li |i ∈ N} of languages, where Li+1 may add new constant symbols, but no more such symbols than there are sentences in Li . But if the language Li is countable, then Li has countably many sentences; and thus the language Li+1 is countable. Since a countable union of countable sets is countable, it follows that L∗ is countable. 9