logic as a tool chapter 4 deductive reasoning in first
play

Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic - PowerPoint PPT Presentation

Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.2 Semantic Tableaux for First-Order Logic Valentin Goranko Stockholm University December 2020 Goranko First-order Semantic Tableau: introduction The system of semantic


  1. Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.2 Semantic Tableaux for First-Order Logic Valentin Goranko Stockholm University December 2020 Goranko

  2. First-order Semantic Tableau: introduction The system of semantic tableau (ST) for first-order logic extends the semantic tableau for propositional logic with additional rules for the quantifiers. It is used to derive logical consequences in first-order logic, based on the same idea, i.e. in order to test the logical consequence A 1 , . . . , A n | = B the system ST tries to falsify it by searching systematically for a counter-model, i.e., a structure and a variable assignment where all A 1 , . . . , A n are true while B is false. If that search fails, i.e. all branches of the tableau close, then the logical consequence is proved by ST, denoted A 1 , . . . , A n ⊢ ST B . It can be proved that the system of semantic tableau introduced here is sound and complete for first-order logic, i.e.: A 1 , . . . , A n ⊢ ST B iff A 1 , . . . , A n | = B . Goranko

  3. Quantifier rules for Semantic Tableau ( ∀ T ) ( ∃ T ) ∀ xA ( x ) : T ∃ xA ( x ) : T ↓ ↓ A [ t / x ] : T A [ c / x ] : T for any term t for a new constant symbol c free for x in A not yet occurring on this branch. ( ∀ F ) ( ∃ F ) ∀ xA ( x ) : F ∃ xA ( x ) : F ↓ ↓ A [ c / x ] : F A [ t / x ] : F for a new constant symbol c for any term t not yet occurring on this branch. free for x in A Goranko

  4. Additional restrictions and strategies 1. In order to avoid unnecessary repeated applications of the rules ( ∃ T ) and ( ∀ F ), we impose the following restriction: On any given branch of the tableau, none of the rules ( ∃ T ) and ( ∀ F ) may be applied more than once to the same formula. 2. Likewise, in order to avoid unnecessary applications of the rules ( ∀ T ) and ( ∃ F ) that can prevent termination in cases when the tableau should close, one can impose the following restriction: On any given branch of the tableau, apply the instantiation rules ( ∀ T ) and ( ∃ F ) only with terms that can be unified with terms already appearing on that branch. (Two terms s and t can be unified when there is a uniform substitution of terms for variables in s and t that makes them identical.) It can be shown that if a tableau closes without these restrictions applied to it, it can still close when the restrictions are applied. A good strategy is on any given branch of the tableau to first apply the rules ( ∃ T ) and ( ∀ F ) and then the rules ( ∀ T ) and ( ∃ F ). Goranko

  5. Notational convention When A = A ( x ) and t is free for substitution for x in A then we will sometimes write A ( t ) instead of A [ t / x ]. Goranko

  6. First-order Semantic Tableau: Example 1 Check if ∀ x ( Q → P ( x )) � Q → ∀ xP ( x ), where x does not occur free in Q . ∀ x ( Q → P ( x )) : T , Q → ∀ xP ( x ) : F ↓ Q : T , ∀ xP ( x ) : F ↓ P ( c ) : F ↓ Q → P ( c ) : T ւ ց Q : F P ( c ) : T × × The tableau closes, therefore the logical consequence holds. Goranko

  7. First-order Semantic Tableau: Example 2 Check if ∃ x ( P ( x ) → Q ( x )) , ∃ xP ( x ) � ∃ xQ ( x ). ∃ x ( P ( x ) → Q ( x )) : T , ∃ xP ( x ) : T , ∃ xQ ( x ) : F ↓ P ( c 1 ) → Q ( c 1 ) : T ↓ P ( c 2 ) : T ↓ Q ( c 1 ) : F ↓ Q ( c 2 ) : F ւ ց P ( c 1 ) : F Q ( c 1 ) : T � × Countermodel over a set { a 1 , a 2 } , where c 1 is interpreted as a 1 , c 2 is interpreted as a 2 , P = { a 2 } and Q = ∅ . Goranko

  8. Example 3: Check if ∀ x ∃ yP ( x , y ) � ∃ xP ( x , c 0 ). ∀ x ∃ yP ( x , y ) : T , ∃ xP ( x , c 0 ) : F ↓ P ( c 0 , c 0 ) : F ↓ ∃ yP ( c 0 , y ) : T ↓ P ( c 0 , c 1 ) : T ↓ P ( c 1 , c 0 ) : F ↓ ∃ yP ( c 1 , y ) : T ↓ P ( c 1 , c 2 ) : T ↓ P ( c 2 , c 0 ) : F . . . The tableau never closes, hence a countermodel exists. Goranko

  9. Algorithmic unsolvability of the logical consequence in first-order logic Unlike the propositional case, none of the deductive systems and methods for checking logical consequence in first order logic is guaranteed to terminate its search for a derivation, even if such a derivation exists. This happens, for instance, when a first-order logical consequence fails, but the countermodel must be infinite. In fact, it was proved by Alonso Church in 1936 that the problem whether a given first-order sentence is valid (and consequently, if a given logical consequence holds) is not algorithmically solvable. Therefore, no sound and complete deductive system for first order logic with always terminating proof search procedure can be designed. Goranko

  10. Semantic Tableaux for FOL with equality Goranko

  11. Semantic Tableaux for first-order logic with equality: rules A [ t / x ] : T (= T ) A [ s / x ] : T for any terms s , t free for x in A such that s = t : T or t = s : T occurs on the branch A [ t / x ] : F (= F ) A [ s / x ] : F for any terms s , t free for x in A such that s = t : T or t = s : T occurs on the branch Besides these rules, an additional condition for closing a branch: if for some term t the signed formula t = t : F occurs on the branch. Goranko

  12. Semantic Tableaux for FOL with equality: example 1 Using Semantic Tableaux with equality, check whether ∀ x ( P ( x ) ↔ x = c ) | = P ( c ), for a constant symbol c . Here is the tableau construction, where we use a rule for A ↔ B : T based on the equivalence A ↔ B := ( A ∧ B ) ∨ ( ¬ A ∧ ¬ B ): ∀ x ( P ( x ) ↔ x = c ) : T , P ( c ) : F P ( c ) ↔ c = c : T P ( c ) : T , c = c : T P ( c ) : F , c = c : F × × Note that the right-hand branch closes due to the new closure rule. Goranko

  13. Semantic Tableaux for FOL with equality: example 2 Check the validity � ∀ x ∀ y ( x = y → ( P ( f ( x )) ↔ P ( f ( y )))), where P is a unary predicate symbol and f is a unary function symbol: ∀ x ∀ y ( x = y → ( P ( f ( x )) ↔ P ( f ( y )))) : F ∀ y ( c = y → ( P ( f ( c )) ↔ P ( f ( y )))) : F ( c = d → ( P ( f ( c )) ↔ P ( f ( d )))) : F c = d : T , ( P ( f ( c )) ↔ P ( f ( d )))) : F c = d : T , P ( f ( c )) → P ( f ( d )) : F c = d : T , P ( f ( d )) → P ( f ( c )) : F c = d : T , P ( f ( c )) : T , P ( f ( d )) : F c = d : T , P ( f ( d )) : T , P ( f ( c )) : F = T = F P ( f ( d )) : T P ( f ( d )) : F Goranko

  14. Here is the tableau again: ∀ x ∀ y ( x = y → ( P ( f ( x )) ↔ P ( f ( y )))) : F ∀ y ( c = y → ( P ( f ( c )) ↔ P ( f ( y )))) : F ( c = d → ( P ( f ( c )) ↔ P ( f ( d )))) : F c = d : T , ( P ( f ( c )) ↔ P ( f ( d )))) : F c = d : T , P ( f ( c )) → P ( f ( d )) : F c = d : T , P ( f ( d )) → P ( f ( c )) : F c = d : T , P ( f ( c )) : T , P ( f ( d )) : F c = d : T , P ( f ( d )) : T , P ( f ( c )) : F = T = F P ( f ( d )) : T P ( f ( d )) : F × × The tableaux closes. The applications of the equality rules are indicated. In both cases there is a choice to apply either of these rules. Goranko

  15. Semantic Tableaux for FOL with equality: example 3 First, let us formalise in FOL the old jazz song’s line: ” Everybody Loves My Baby, but My Baby Don’t Love Nobody but Me ” ∀ xL ( x , MyBaby ) ∧ ∀ y ( ¬ y = Me → ¬ L ( MyBaby , y )) Now, using Semantic Tableaux with equality, prove that ” Everybody Loves My Baby, but My Baby Don’t Love Nobody but Me ” implies that “ I am my baby ”, i.e. ∀ xL ( x , MyBaby ) ∧ ∀ y ( ¬ y = Me → ¬ L ( MyBaby , y )) ⊢ ST MyBaby = Me Goranko

  16. Semantic Tableaux for FOL with equality: example 3 (cont) ∀ xL ( x , MyBaby ) ∧∀ y ( ¬ y = Me →¬ L ( MyBaby , y )): T , MyBaby = Me : F ∀ xL ( x , MyBaby ): T , ∀ y ( ¬ y = Me →¬ L ( MyBaby , y )): T , MyBaby = Me : F L ( MyBaby , MyBaby ): T , ∀ y ( ¬ y = Me →¬ L ( MyBaby , y )): T , MyBaby = Me : F L ( MyBaby , MyBaby ): T , ¬ MyBaby = Me →¬ L ( MyBaby , MyBaby ): T , MyBaby = Me : F L ( MyBaby , MyBaby ): T , ¬ MyBaby = Me : F , L ( MyBaby , MyBaby ): T , ¬ L ( MyBaby , MyBaby ): T , MyBaby = Me : F MyBaby = Me : F L ( MyBaby , MyBaby ): T , MyBaby = Me : T , L ( MyBaby , MyBaby ): T , L ( MyBaby , MyBaby ): F , MyBaby = Me : F MyBaby = Me : F × × Goranko

  17. Semantic Tableaux for FOL: soundness and completeness Theorem (Soundness and Completeness of ST ) Each of the Semantic Tableaux systems ST for FOL, with and without equality, is sound and complete, i.e., for every first-order formulae A 1 , . . . , A n , C of the respective (with or without equality) language: A 1 , . . . , A n , ⊢ ST C iff A 1 , . . . , A n , | = C . Goranko

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend