logic as a tool chapter 3 understanding first order logic
play

Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 - PowerPoint PPT Presentation

Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 Truth, validity, logical consequence and equivalence in first-order logic Valentin Goranko Stockholm University December 2020 Goranko Truth of sentences in structures Goranko


  1. Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 Truth, validity, logical consequence and equivalence in first-order logic Valentin Goranko Stockholm University December 2020 Goranko

  2. Truth of sentences in structures Goranko

  3. Truth of sentences in structures. Models and countermodels. A sentence is a formula with no free variables. Hence, the truth of a sentence in a given structure does not depend on the variable assignment. Therefore, for a structure S and sentence A we can simply write S | = A if S , v | = A for any/every variable assignment v . We then say that S is a model of A and that A is true in S , or that A is satisfied by S . Otherwise we write S �| = A and say that S is a counter-model for A . Goranko

  4. Truth of first-order sentences: more examples ? • H | = ∀ x ∀ y ( C ( x , y ) ∨ ¬ C ( y , x )). ? • H | = ∀ x ∃ y ( C ( x , y ) ∨ C ( y , x )). ? • H | = ∀ x ∃ y ( C ( x , y ) ∨ C ( y , x )). ? • H | = ∃ x ∀ y ( C ( x , y ) → C ( y , x )). ? • H | = ∀ x ∀ y ∀ z ( C ( x , y ) ∧ C ( y , x ) → C ( z , z )). ? • H | = ∃ x ( Drinks ( x ) → ∀ x Drinks ( x )). • H | = ∀ x ∀ y ( ∃ z ( x = m( z ) ∧ y = m( z )) → x = y ). (Is this sentence only true for the standard interpretation of m?) ? • N | = ( ∀ x ( ∀ y ( y < x → P ( y )) → P ( x )) → ∀ xP ( x )), where P is any (uninterpreted) unary predicate. True or false? What does this sentence say about N ? Is it true in Z , too? Goranko

  5. Satisfiability, validity, and logical consequence Goranko

  6. Satisfiability and validity of sentences A sentence A is: • satisfiable if S | = A for some structure S ; • (logically) valid, denoted | = A , if S | = A for every structure S ; • falsifiable, if it is not logically valid, i.e. if it has a counter-model. Goranko

  7. Satisfiability and validity of any first-order formulae A first-order formula A is: • A is satisfiable if S , v | = A for some structure S and some variable assignment v in S . • (logically) valid, denoted | = A , if S , v | = A for every structure S and every variable assignment v in S . • falsifiable, if it is not logically valid. Let A = A ( x 1 , . . . , x n ) be any first-order formula all free variables in which are amongst x 1 , . . . , x n . The sentence ∃ x 1 . . . ∃ x n A ( x 1 , . . . , x n ) is a existential closure of A ; the sentence ∀ x 1 . . . ∀ x n A ( x 1 , . . . , x n ) is a universal closure of A . Claim: • A ( x 1 , . . . , x n ) is satisfiable iff ∃ x 1 . . . ∃ x n A ( x 1 , . . . , x n ) is satisfiable. • | = A ( x 1 , . . . , x n ) iff | = ∀ x 1 . . . ∀ x n A ( x 1 , . . . , x n ). Goranko

  8. Satisfiability and validity of formulae: examples • The formula P ( x ) is satisfiable, because its existential closure ∃ xP ( x ) is satisfiable. • However, P ( x ) is not valid, because its universal closure ∀ xP ( x ) is not valid. • The formula P ( x ) ∨ ¬ P ( x ) is valid, because ∀ x ( P ( x ) ∨ ¬ P ( x )) is valid. • The formula P ( x ) ∧ ¬ P ( x ) is not satisfiable, because its existential closure ∃ x ( P ( x ) ∧ ¬ P ( x )) is not satisfiable. Goranko

  9. First-order instances of propositional formulae Any uniform substitution of first-order formulae for the propositional variables in a propositional formula A produces a first-order formula, called a first-order instance of A . Example: take the propositional formula A = ( p ∧ ¬ q ) → ( q ∨ p ) . The uniform substitution of ( 5 < x ) for p and ∃ y ( x = y 2 ) for q in A results in the first-order instance (( 5 < x ) ∧ ¬∃ y ( x = y 2 )) → ( ∃ y ( x = y 2 ) ∨ ( 5 < x )) . Goranko

  10. Satisfiability and validity of first-order instances • If a propositional formula A is valid (tautology), then every first-order instance of A is valid. Thus, for instance, | = ¬¬ ( x > 0 ) → ( x > 0 ) and | = Q ( x , y ) ∨ ¬ Q ( x , y ) . What about vice versa? Yes. Why? • Likewise, a propositional formula A is satisfiable if and only if some first-order instance of A is satisfiable. Why? Goranko

  11. Logical consequence in first order logic We fix an arbitrary first-order language L . Given a set of L -formulae Γ, an L -structure S , and a variable assignment v in S , we write S , v | = Γ to say that S , v | = A for every A ∈ Γ. A formula A follows logically from a set of formulae Γ, denoted Γ | = A , if for every structure S and a variable assignment v : VAR →S : S , v | = Γ implies S , v | = A . Note that ∅ | = A iff | = A . Why? Goranko

  12. Logical consequence: examples • If A 1 , . . . , A n , B are prop. formulae such that A 1 , . . . , A n | = B , and n , B ′ are first-order instances of A 1 , . . . , A n , B obtained by A ′ 1 , . . . , A ′ the same substitution, then A ′ 1 , . . . , A ′ = B ′ . n | For example: ∃ xA , ∃ xA → ∀ yB | = ∀ yB . • ∀ xP ( x ) , ∀ x ( P ( x ) → Q ( x )) | = ∀ xQ ( x ). NB: this is not an instance of a propositional logical consequence. • ∃ xP ( x ) ∧ ∃ xQ ( x ) �| = ∃ x ( P ( x ) ∧ Q ( x )). Indeed, the structure N ′ obtained from N where P ( x ) is interpreted as ‘ x is even ’ and Q ( x ) is interpreted as ‘ x is odd ’ is a counter-model: N ′ | = ∃ xP ( x ) ∧ ∃ xQ ( x ), while N ′ �| = ∃ x ( P ( x ) ∧ Q ( x )). Goranko

  13. Logical consequence: some basic properties Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent: 1. A 1 , . . . , A n | = B . 2. A 1 ∧ · · · ∧ A n | = B . 3. | = A 1 ∧ · · · ∧ A n → B . 4. | = A 1 → ( A 2 → · · · ( A n → B ) . . . ). Furthermore, for any first-order formula A and a term t that is free for substitution for x in A : 1. ∀ xA | = A [ t / x ]. 2. A [ t / x ] | = ∃ xA . Goranko

  14. First-order logical consequence: more basic properties 1. If A 1 , . . . , A n | = B then ∀ xA 1 , . . . , ∀ xA n | = ∀ xB . 2. If A 1 , . . . , A n | = B and x does not occur free in A 1 , . . . , A n then A 1 , . . . , A n | = ∀ xB . 3. If A 1 , . . . , A n | = B and A 1 , . . . , A n are sentences, then A 1 , . . . , A n | = ∀ xB , and hence A 1 , . . . , A n | = B , where B is any universal closure of B . 4. If A 1 , . . . , A n | = B [ c / x ], where c is a constant symbol not occurring in A 1 , . . . , A n , B , then A 1 , . . . , A n | = ∀ xB ( x ). 5. If A 1 , . . . , A n , A [ c / x ] | = B , where c is a constant symbol not occurring in A 1 , . . . , A n , A , or B , then A 1 , . . . , A n , ∃ xA | = B . Goranko

  15. Equality in first-order logic Goranko

  16. Equality in first-order logic The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of objects in the domain of discourse. The equality is very useful to specify constraints on the size of the model: 1. The sentence � λ n = ∃ x 1 · · · ∃ x n ( ¬ x i = x j ) 1 ≤ i � = j ≤ n states that the domain has at least n elements. 2. The sentence µ n = ¬ λ n +1 or, equivalently, � µ n = ∀ x 1 · · · ∀ x n +1 ( x i = x j ) 1 ≤ i � = j ≤ n +1 states that the domain has at most n elements. 3. The sentence σ n = λ n ∧ µ n states that the domain has exactly n elements. Proof: exercises. Goranko

  17. Using equality for counting The sentences λ n , µ n , σ n are easily relativised for every formula A ( x ) containing (possibly amongst others) the free variable x to the subset of the domain consisting of the elements satisfying A . For instance: • “ At least two students scored distinction in the exam ” can be formalised in the domain of all humans as ∃ x 1 ∃ x 2 ( Student ( x 1 ) ∧ Student ( x 2 ) ∧ ¬ x 1 = x 2 ∧ Dist ( x 1 ) ∧ Dist ( x 2 )) • “ Exactly two students scored distinction in the exam ” can likewise be formalised as: ∃ x 1 ∃ x 2 ( Student ( x 1 ) ∧ Student ( x 2 ) ∧ x 1 � = x 2 ∧ Dist ( x 1 ) ∧ Dist ( x 2 )) ∧ ∀ y (( Student ( y ) ∧ y � = x 1 ∧ y � = x 2 ) → ¬ Dist ( y )) (where � = stands for ¬ =) Goranko

  18. Using equality to express uniqueness, functionality, etc. 1. For any formula A ( x ) (which may also contain other free variables), the formula ∃ ! xA ( x ) := ( A ( x ) ∧ ∀ y ( A ( y ) → x = y )) states that there is a unique element in the domain of discourse satisfying A , for the current values of the parameters ¯ z . 2. Thus, the sentence ∀ x ∃ ! yR ( x , y ) in the language with = and a binary relational symbol R states that the relation R is functional, i.e. every element of the domain is R -related to a unique element. 3. The sentence ∀ x ∀ y ( f ( x ) = f ( y ) → x = y )) in the language with = and a unary functional symbol f states that the function f is injective, that is (read by contraposition), assigns different values to different arguments. Goranko

  19. Using equality in first-order logic: more examples Sometimes the equality is implicit in natural language expressions, such as • “ Everyone, except possibly John, understood the joke. ”. It becomes explicit and readily translatable (exercise) to FOL when rephrased as “ Everyone, who is not (equal to) John, understood the joke. ” • Likewise, “ Only John and Mary enjoyed the party. ” can be rephrased as “ John and Mary enjoyed the party and everyone who is not (equal to) John and not (equal to) Mary, did not enjoy the party ”. Exercise: Formalise these in FOL with equality. Goranko

Recommend


More recommend