Math 4680, Topics in Logic and Computation, Winter 2012 2. t is substitutable for x in ¬ ϕ iff t is substitutable for x in ϕ. Lecture Notes 4: Soundness, Completeness, and Consequences for t is substitutable for x in ϕ ψ iff t is substitutable for x in ϕ and t is First-Order Logic substitutable for x in ψ. Peter Selinger 3. t is substitutable for x in ∀y.ϕ iff either (a) x is not free in ∀y.ϕ or 1 Substitution (b) y is not free in t and t is substitutable for x in ϕ. t is substitutable for x in ∃y.ϕ iff either We write t1[t/x] for the result of substituting the term t for the variable x in the term t1, and ϕ[t/x] for the result of substituting t for x in the formula ϕ. Here, (a) x is not free in ∃y.ϕ or only free occurrences of x are substituted. More precisely, substitution is defined (b) is not free in and is substitutable for in . recursively as follows. On terms: y t t x ϕ Convention. From now on, whenever we write ϕ[t/x], it is always implicitly x[t/x] = t assumed that t is substitutable for x in ϕ. If t is not substitutable for x in ϕ, then y[t/x] = y if x, y are different variables we implicitly rename the bound variables in ϕ so that t becomes substitutable for f(t1,...,t )[t/x] = f(t1[t/x],...,t [t/x]) n n x in ϕ. On formulas: In the proofs of soundness and completeness, we often need to relate substitutions 1. P (t1,...,tn)[t/x] = P (t1[t/x],...,tn[t/x]) to the interpretation of the involved terms in a structure. The following lemma ≈ ≈ (t1 t2)[t/x] = t1[t/x] t2[t/x] provides the necessary facts. 2. (¬ ϕ)[t/x] = ¬(ϕ[t/x]) (ϕ ψ)[t/x] = (ϕ[t/x]) (ψ[t/x]) Lemma 1 (Substitution Lemma). Suppose A is a structure and s is a valuation. 3. (∀x.ϕ)[t/x] = ∀x.ϕ Suppose t a term, x a variable, and s¯(t)= a. Let s′ = s(a|x). Then (∀y.ϕ)[t/x] = ∀y.(ϕ[t/x]) if x, y are different variables ′ (∃x.ϕ)[t/x] = ∃x.ϕ 1. s¯(t1[t/x]) = s¯(t1) for all terms t1. ∃ ∃ ( y.ϕ)[t/x] = y.(ϕ[t/x]) if x, y are different variables ′ 2. |=A ϕ[t/x][s] iff |=A ϕ [s ], for all formulas ϕ such that t is substitutable Substitution is a more subtle notion than meets the eye. In particular, one has to for x in ϕ. be careful that t does not contain any free variables which get captured when t is substituted into some formula. Consider the formula ∃y.x 6≈ y. In a structure Proof. By induction on terms and formulas. with two or more elements, this statement is true for any x. On the other hand, if we substitute y for x, we obtain ∃y.y 6≈ y, which is false! We want to rule out situations like this. 2 Natural Deduction We say that t is substitutable for x in ϕ if we can substitute t for x in ϕ without worrying about free variables of t intruding the scope of quantifiers in ϕ. More The natural deduction rules for first-order logic are those for sentential logic, plus precisely, this concept is defined by recursion on ϕ: the rules given below. Note that since we are already using lower-case roman letters for variables, we are now using numbers to identify canceled hypotheses. 1. If ϕ is atomic, then t is always substitutable for x in ϕ. Also, in the rules for quantifiers, whenever we write ϕ[t/x], it is always implicitly 1 2 assumed that t is substitutable for x in ϕ. Note the side conditions in the (∀I) 3 Soundness and Completeness and (∃E) rules. These conditions ensure that we have not made any unwarranted assumptions about the variable a. Theorem 2 (Soundness and Completeness). If Γ is a set of formulas, and ϕ is a Rules for quantifiers: formula, then Γ ⊢ ϕ iff Γ |= ϕ. Γ The left-to-right implication is called soundness, and the right-to-left implication . is called completeness. ϕ[a/x] (∀I) if a is a variable not free in Γ or ϕ ∀x.ϕ Proof. Soundness is proved by induction on the size of derivations, and by a case distinction on what the last rule in the derivation is. The substitution lemma is Γ needed in the cases of the quantifier rules. For the proof of completeness, see e.g. van Dalen’s book [?]. ∀x.ϕ (∀E) if t is a term ϕ[t/x] 4 Compactness and consequences Γ . The following theorem is a trivial consequenceof the soundness and completeness . theorem, but it has many interesting and surprising applications. Recall that a set ϕ (∃I) if t is a term of formulas is called satisfiable if there exists a structure and a valuation that ϕ[t/x] makes all formulas in the set true. Γ Γ, [ϕ[a/x]]1 Theorem 3 (Compactness). Let Γ be a set of formulas. If every finite subset of Γ . is satisfiable, then Γ is satisfiable. ∃x.ϕ ψ 1 (∃E) if a is a variable not free in Γ, ϕ, or ψ Proof. We prove the contrapositive. Suppose Γ is not satisfiable. Then Γ |= ⊥. ψ By completeness, Γ ⊢ ⊥. But natural deductions are finite, hence any deduction ′ Rules for equality: can only use finitely many hypotheses. It follows that Γ ⊢ ⊥ for some finite Γ′ ⊆ Γ. By soundness, Γ′ |= ⊥, and thus Γ′ is not satisfiable, as desired. s ≈ t r ≈ s s ≈ t t ≈ t (refl) t ≈ s (symm) r ≈ t (trans) Several applications of the compactness theorem are demonstrated in the exercises ′ s ≈ s′ s ≈ s ϕ[s/x] of Problem Set 9. Here are some more examples of such applications: ≈ ′ (cong1) ′ (cong2) t[s/x] t[s /x] ϕ[s /x] Theorem 4. Suppose Σ is a set of sentences. If Σ has arbitrarily large finite As before, we write Γ ⊢ ϕ if there is a natural deduction derivation, all of whose models, then it has an infinite model. uncanceled hypotheses are in Γ, and whose conclusion is ϕ. Proof. Suppose Σ has arbitrarily large finite models. For every n ∈ N, let λn be the sentence that states “there are at least n distinct object”. Notice that λn is first-order definable, for instance λ3 = ∃x∃y∃z(x 6≈ y ∧ x 6≈ z ∧ y 6≈ z). 3 4 Consider the set of sentences Φ=Σ ∪{λn | n ∈ N}. Since Σ has arbitrarily Proof. “⇒”: Suppose K is finitely axiomatizable. Then surely K is axioma- c large finite models, every finite subset of Φ has a model. By compactness, Φ has tizable. To show that K is axiomatizable, let K = Mod(σ1,...,σn). Let c a model. But any model of Φ is infinite, and it is also a model of Σ. Thus, Σ has σ = σ1 ∧ ... ∧ σn. Then A ∈ K iff |=A σ. Consequently A ∈ K iff 6|=A σ, iff c an infinite model. |=A ¬ σ. Thus, K = Mod(¬ σ). “⇐”: Suppose both K and Kc are axiomatizable. Let K = Mod(Σ) and Kc = Recall that a class K of structures is called axiomatizable if K = Mod(Σ), Mod(Γ). Since no structure is in K and Kc, the set Σ ∪ Γ is unsatisfiable. By for some set of sentences Σ. Also, K is called finitely axiomatizable if K = compactness, there exists a finite subset Σ′ ∪ Γ′ which is unsatisfiable. Clearly Mod(σ1,...,σn) for finitely many sentences σ1,...,σn. every model of Σ is a model of Σ′. Conversely, let A be a model of Σ′. Then A ′ A c A Theorem 5. The class of all infinite structures is axiomatizable, but not finitely does not satisfy Γ , and hence not Γ. Thus 6∈ K , thus ∈ K. We have: axiomatizable. ′ K = Mod(Σ) ⊆ Mod(Σ ) ⊆ K, N ′ Proof. Let K be the class of infinite structures. The set {λn | n ∈ } axiomatizes and hence K = Mod(Σ ). Thus K is finitely axiomatizable, as desired. K. Suppose, on the other hand, that K was finitely axiomatizable. Then there exist sentences σ1,...,σn such that K = Mod(σ1,...,σn). Let σ = σ1 ∧ ... ∧ A σn, then K = Mod(σ). Thus, a structure is infinite iff |=A σ. Equivalently, a 5 Size of models structure A is finite iff |=A ¬ σ. But then the class of finite structures would be axiomatizable, contradicting Theorem 4. The cardinality of a set is the number of elements in the set. Different infinite The following theorem is often useful in proving that a certain class of structures sets can have different cardinalities; for instance, the set of natural numbers has is not finitely axiomatizable: a smaller cardinality than the set of real numbers. We say the cardinality of a structure A is the cardinality of its carrier |A|. The cardinality of a language L is Theorem 6. If K is a finitely axiomatizable class of structures, and if K = the cardinality of L, considered as a set of sentences. ′ ′ Mod(Σ), then there exists a finite subset Σ ⊆ Σ such that K = Mod(Σ ). Remark. If P and F are the sets of predicate symbols, respectively function sym- bols, of the language L, then the cardinality of L is κ = max(card P∪F, ℵ0).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-