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 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
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
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
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
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
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
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
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
Semantic Tableaux for FOL with equality Goranko
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
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
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
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
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
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
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
Recommend
More recommend