logic as a tool chapter 3 understanding first order logic
play

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

Logic as a Tool Chapter 3: Understanding First-order Logic 3.1 First-order structures and languages. Terms and formulae of first-order logic. Valentin Goranko Stockholm University October 2016 Goranko Propositional logic is too weak Goranko


  1. First-order languages: vocabulary 1. Functional, predicate, and constant symbols, used as names for the distinguished functions, predicates and constants we consider in the structures. All these are referred to as non-logical symbols. 2. Individual variables: x , y , z , possibly with indices. 3. Logical symbols, including: 3.1 the Propositional connectives: ¬ , ∧ , ∨ , → , ↔ (or a sufficient subset of these); 3.2 Equality = (optional); 3.3 Quantifiers: ⊲ the universal quantifier ∀ ( ‘all’, ‘for all’, ‘every’, ‘for every ’ ), ⊲ the existential quantifier ∃ ( ‘there exists’, ‘there is’, ‘some’,‘for some’, ‘a’ ). 3.4 Auxiliary symbols, such as ( , ) etc. Goranko

  2. First-order languages: terms Goranko

  3. First-order languages: terms Inductive definition of the set of terms TM ( L ) of a first-order language L : Goranko

  4. First-order languages: terms Inductive definition of the set of terms TM ( L ) of a first-order language L : 1. Every constant symbol in L is a term. Goranko

  5. First-order languages: terms Inductive definition of the set of terms TM ( L ) of a first-order language L : 1. Every constant symbol in L is a term. 2. Every individual variable in L is a term. Goranko

  6. First-order languages: terms Inductive definition of the set of terms TM ( L ) of a first-order language L : 1. Every constant symbol in L is a term. 2. Every individual variable in L is a term. 3. If t 1 , ..., t n are terms and f is an n -ary functional symbol in L , then f ( t 1 , ..., t n ) is a term in L . Goranko

  7. First-order languages: terms Inductive definition of the set of terms TM ( L ) of a first-order language L : 1. Every constant symbol in L is a term. 2. Every individual variable in L is a term. 3. If t 1 , ..., t n are terms and f is an n -ary functional symbol in L , then f ( t 1 , ..., t n ) is a term in L . Construction/parsing tree of a term: like those for propositional formulae. Goranko

  8. Examples of terms Goranko

  9. Examples of terms 1. In the language L N : Goranko

  10. Examples of terms 1. In the language L N : x , Goranko

  11. Examples of terms 1. In the language L N : x , s ( x ), Goranko

  12. Examples of terms 1. In the language L N : x , s ( x ), 0 , Goranko

  13. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), Goranko

  14. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . Goranko

  15. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : Goranko

  16. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 Goranko

  17. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) Goranko

  18. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x Goranko

  19. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. Goranko

  20. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. 2. In the ‘human’ language L H : Goranko

  21. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. 2. In the ‘human’ language L H : • x Goranko

  22. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. 2. In the ‘human’ language L H : • x • Mary Goranko

  23. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. 2. In the ‘human’ language L H : • x • Mary • m( John ) (‘ the mother of John ’) Goranko

  24. Examples of terms 1. In the language L N : x , s ( x ), 0 , s ( 0 ), s ( s ( 0 )), etc. We denote the term s ( ... s ( 0 ) ... ) , where s occurs n times, by n . More examples of terms in L N : • +( 2 , 2 ), which in a more familiar notation is written as 2 + 2 • 3 × y (written in the usual notation) • ( x 2 + x ) × 5 , where x 2 is an abbreviation of x × x • x 1 + s (( y 2 + 3 ) × s ( z )), etc. 2. In the ‘human’ language L H : • x • Mary • m( John ) (‘ the mother of John ’) • f(m( y )) (‘ the father of the mother of x ’), etc. Goranko

  25. First-order languages: atomic formulae Goranko

  26. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Goranko

  27. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: Goranko

  28. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : Goranko

  29. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; Goranko

  30. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , Goranko

  31. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), Goranko

  32. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), Goranko

  33. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), • ( x 2 + x ) × 5 > 0 , Goranko

  34. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), • ( x 2 + x ) × 5 > 0 , • x × ( y + z ) = ( x × y ) + ( x × z ), etc. Goranko

  35. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), • ( x 2 + x ) × 5 > 0 , • x × ( y + z ) = ( x × y ) + ( x × z ), etc. 2. In L H : Goranko

  36. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), • ( x 2 + x ) × 5 > 0 , • x × ( y + z ) = ( x × y ) + ( x × z ), etc. 2. In L H : • x = m( Mary ) (‘ x is the mother of Mary’). Goranko

  37. First-order languages: atomic formulae If t 1 , ..., t n are terms in a language L and p is an n-ary predicate symbol in L , then p ( t 1 , ..., t n ) is an atomic formula in L . Examples: 1. In L N : • < ( 1 , 2 ), or in traditional notation: 1 < 2 ; • x = 2 , • 5 < ( x + 4 ), • 2 + s ( x 1 ) = s ( s ( x 2 )), • ( x 2 + x ) × 5 > 0 , • x × ( y + z ) = ( x × y ) + ( x × z ), etc. 2. In L H : • x = m( Mary ) (‘ x is the mother of Mary’). • L(f( y ) , y ) (‘The father of y loves y ’), etc. Goranko

  38. First-order languages: formulae Goranko

  39. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): Goranko

  40. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): 1. Every atomic formula in L is a formula in L . Goranko

  41. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): 1. Every atomic formula in L is a formula in L . 2. If A is a formula in L then ¬ A is a formula in L . Goranko

  42. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): 1. Every atomic formula in L is a formula in L . 2. If A is a formula in L then ¬ A is a formula in L . 3. If A , B are formulae in L then ( A ∨ B ) , ( A ∧ B ) , ( A → B ) , ( A ↔ B ) are formulae in L . Goranko

  43. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): 1. Every atomic formula in L is a formula in L . 2. If A is a formula in L then ¬ A is a formula in L . 3. If A , B are formulae in L then ( A ∨ B ) , ( A ∧ B ) , ( A → B ) , ( A ↔ B ) are formulae in L . 4. If A is a formula in L and x is a variable, then ∀ xA and ∃ xA are formulae in L . Goranko

  44. First-order languages: formulae Inductive definition of the set of formulae FOR ( L ): 1. Every atomic formula in L is a formula in L . 2. If A is a formula in L then ¬ A is a formula in L . 3. If A , B are formulae in L then ( A ∨ B ) , ( A ∧ B ) , ( A → B ) , ( A ↔ B ) are formulae in L . 4. If A is a formula in L and x is a variable, then ∀ xA and ∃ xA are formulae in L . Construction/parsing tree of a formula, subformulae, main connectives: like in propositional logic. Goranko

  45. Examples of formulae Goranko

  46. Examples of formulae 1. In L Z , with additional binary function − : Goranko

  47. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), Goranko

  48. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), Goranko

  49. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), Goranko

  50. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), Goranko

  51. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), • ∀ x (( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), etc. Goranko

  52. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), • ∀ x (( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), etc. 2. In L H : Goranko

  53. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), • ∀ x (( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), etc. 2. In L H : • John = f( Mary ) → ∃ x L( x , Mary ); Goranko

  54. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), • ∀ x (( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), etc. 2. In L H : • John = f( Mary ) → ∃ x L( x , Mary ); • ∃ x ∀ z ( ¬ L( z , y ) → L( x , z )), Goranko

  55. Examples of formulae 1. In L Z , with additional binary function − : • ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∃ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ∀ x ( 5 < x ∧ x 2 + x − 2 = 0 ), • ( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), • ∀ x (( ∃ y ( x = y 2 ) → ( ¬ x < 0 )), etc. 2. In L H : • John = f( Mary ) → ∃ x L( x , Mary ); • ∃ x ∀ z ( ¬ L( z , y ) → L( x , z )), • ∀ y (( x = m( y )) → (C( y , x ) ∧ ∃ z L( x , z ))). Goranko

  56. Some conventions Goranko

  57. Some conventions Priority order on the logical connectives: Goranko

  58. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, Goranko

  59. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, Goranko

  60. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, • then the implication, and Goranko

  61. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, • then the implication, and • the biconditional has the lowest priority. Goranko

  62. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, • then the implication, and • the biconditional has the lowest priority. Example: ∀ x ( ∃ y ( x = y 2 ) → ( ¬ ( x < 0 ) ∨ ( x = 0 ))) Goranko

  63. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, • then the implication, and • the biconditional has the lowest priority. Example: ∀ x ( ∃ y ( x = y 2 ) → ( ¬ ( x < 0 ) ∨ ( x = 0 ))) can be simplified to ∀ x ( ∃ y x = y 2 → ¬ x < 0 ∨ x = 0 ) Goranko

  64. Some conventions Priority order on the logical connectives: • the unary connectives: negation and quantifiers have the strongest binding power, i.e. the highest priority, • then come the conjunction and disjunction, • then the implication, and • the biconditional has the lowest priority. Example: ∀ x ( ∃ y ( x = y 2 ) → ( ¬ ( x < 0 ) ∨ ( x = 0 ))) can be simplified to ∀ x ( ∃ y x = y 2 → ¬ x < 0 ∨ x = 0 ) On the other hand, for easier readability, extra parentheses can be optionally put around subformulae. Goranko

  65. First-order instances of propositional formulae Goranko

  66. First-order instances of propositional formulae Definition: 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 . Goranko

  67. First-order instances of propositional formulae Definition: 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 ) . Goranko

  68. First-order instances of propositional formulae Definition: 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

  69. First-order instances of propositional formulae Definition: 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 )) . NB: there are infinitely many first-order instances of any given propositional formula that contains propositional variables. Goranko

  70. Unique readability of terms and formulae Let L be an arbitrarily fixed first-order language. Goranko

  71. Unique readability of terms and formulae Let L be an arbitrarily fixed first-order language. Then: Goranko

  72. Unique readability of terms and formulae Let L be an arbitrarily fixed first-order language. Then: 1. Every occurrence of a functional symbol in a term t from TM ( L ) is the beginning of a unique subterm of t . 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