valid logical reasoning
play

Valid Logical Reasoning 2/41 If Alfred is a duck, then Alfred can - PowerPoint PPT Presentation

Valid Logical Reasoning 2/41 If Alfred is a duck, then Alfred can swim Alfred is a duck Alfred can swim Predicate Logic Lectures 23 (Chapters 8-10) a = Alfred is a duck b = Alfred can swim val a b a | = = b /


  1. Valid Logical Reasoning 2/41 If Alfred is a duck, then Alfred can swim Alfred is a duck Alfred can swim Predicate Logic Lectures 2–3 (Chapters 8-10) a = ‘Alfred is a duck’ b = ‘Alfred can swim’ val a ⇒ b ∧ a | = = b / department of mathematics and computer science / department of mathematics and computer science Invalid Logical Reasoning Valid Logical Reasoning? 3/41 4/41 Every animal with feathers is a bird If Alfred is a duck, then Alfred can swim Alfred is an animal with feathers Alfred can swim Alfred is a bird Alfred is a duck a = ‘Every animal with feathers is a bird’ a = ‘Alfred is a duck’ b = ‘Alfred is an animal with feathers’ b = ‘Alfred can swim’ c = ‘Alfred is a bird’ val val a ⇒ b ∧ b | � = = a a ∧ b | � = = c / department of mathematics and computer science / department of mathematics and computer science

  2. Predicate Logic Unary predicate (example) 5/41 6/41 Propositional logic only describes how to reason about Consider the statement 4 m < 5 . complete statements about things; it does not describe how Whether the statement is true or false depends on the value of m : to reason about things themselves. 5 4 on Z Predicate logic will extend propositional logical with: − 4 − 3 − 2 − 1 0 1 2 3 4 on R ◮ names for individuals; ◮ predicates to express properties of individuals; 4 m < 5 is a unary predicate ◮ quantifiers to quantify over individuals. / department of mathematics and computer science / department of mathematics and computer science Equivalence of predicates Universal quantification 7/41 8/41 Predicates P ( x ) and Q ( x ) are equivalent if for all x we have that P ( x ) evaluates to true if, and only if, We express the statement Q ( x ) evaluates to true. “for all m ∈ Z it holds that 4 m < 5 ” as ∀ m [ m ∈ Z : 4 m < 5] Example = m < 5 Universal quantifier ∀ m turns the predicate 4 m < 5 into a proposition. val 4 m < 5 = (on R and Z ) 4 (This proposition is false; take, e.g., m = 2 , 3 , . . . .) val = = m ≤ 1 (on Z , but not on R ) . / department of mathematics and computer science / department of mathematics and computer science

  3. Universal quantification Existential quantification 9/41 10/41 We express the statement In general, if P ( x ) and Q ( x ) are predicates, then we write “there exists m ∈ Z such that 4 m < 5 ” ∀ x [ P ( x ) : Q ( x ) ] as � �� � � �� � domain predicate ∃ m [ m ∈ Z : 4 m < 5] for “all x satisfying P satisfy Q .” Existential quantifier ∃ m turns the predicate 4 m < 5 into a proposition. (This proposition is true; take m = 1 , 0 , − 1 , . . . .) / department of mathematics and computer science / department of mathematics and computer science Existential quantification Domain of Quantification 11/41 12/41 What are the truth values associated with the following propositions? ◮ ∃ x [ x ∈ R : x 2 = 1] val In general, if P ( x ) and Q ( x ) are predicates, then we write = = True ◮ ∃ x [ x ∈ R ∧ x > 0 : x 2 = 1] val ∃ x [ P ( x ) : Q ( x ) ] = = True � �� � � �� � domain predicate ◮ ∃ x [ x ∈ R ∧ x > 2 : x 2 = 1] val = = False for ◮ ∀ x [ x ∈ R : x 2 > 1] val = = False “there exists x satisfying P that also satisfies Q .” ◮ ∀ x [ x ∈ R ∧ x > 0 : x 2 > 1] val = = False ◮ ∀ x [ x ∈ R ∧ x > 2 : x 2 > 1] val = = True / department of mathematics and computer science / department of mathematics and computer science

  4. One- or zero-element domains Domain weakening 13/41 14/41 val NB: P ∧ Q | = = P (all x satisfying P ∧ Q also satisfy P ). Empty domain Examples: ∀ x [ False : P ] val = = True “All gnomes are green!” ∃ x [ x ∈ R ∧ x > 0 : x 2 = 1] ∃ x [ False : P ] val = = False = ∃ x [ x ∈ R : x > 0 ∧ x 2 = 1] val = One-element domain ∀ x [ x ∈ Z ∧ x > 1 : x 2 > 1] ∀ x [ x = n : P ] val = = P [ n for x ] = ∀ x [ x ∈ Z : x > 1 ⇒ x 2 > 1] val ∃ x [ x = n : P ] val = = = P [ n for x ] Domain weakening val Example: ∀ m [ m = 3 : 4 · m < 5] = = 4 · 3 < 5 . ∀ x [ P ∧ Q : R ] val = = ∀ x [ P : Q ⇒ R ] ∃ x [ P ∧ Q : R ] val = = ∃ x [ P : Q ∧ R ] / department of mathematics and computer science / department of mathematics and computer science Domain Splitting De Morgan for quantifiers 15/41 16/41 � ∀ is generalised ∧ see book ∀ x [ x ≤ − 2 ∨ x ≥ 1 : x 2 > 1] ∃ is generalised ∨ = ∀ x [ x ≤ − 2 : x 2 > 1] ∧ ∀ x [ x ≥ 1 : x 2 > 1] val = De Morgan ∃ x [ x ≤ − 2 ∨ x ≥ 1 : x 2 = 1] ¬∀ x [ P : Q ] val = = ∃ x [ P : ¬ Q ] not all = there exists one for which not ¬∃ x [ P : Q ] val not one = all not = ∃ x [ x ≤ − 2 : x 2 = 1] ∨ ∃ x [ x ≥ 1 : x 2 = 1] = = ∀ x [ P : ¬ Q ] val = So: We also have: Domain Splitting ∀ x [ P ∨ Q : R ] val ¬∀ = ∃¬ ; and ¬∀¬ = ∃¬¬ = ∃ ; and = = ∀ x [ P : R ] ∧ ∀ x [ Q : R ] ∃ x [ P ∨ Q : R ] val ¬∃ = ∀¬ . ¬∃¬ = ∀¬¬ = ∀ . = = ∃ x [ P : R ] ∨ ∃ x [ Q : R ] / department of mathematics and computer science / department of mathematics and computer science

  5. Substitution Leibniz 17/41 18/41 Leibniz’s Rule is valid for (quantified) predicates. The Substitution Rule is valid for (quantified) predicates. Example: Example We have the following valid equivalence: We have the following valid equivalence: val val ∀ x [ P ∧ Q : R ] = = ∀ x [ P : Q ⇒ R ] ∃ y [ y = 2 : x ≥ y ] = = x ≥ 2 , and hence, by the Substitution Rule, if we substitute Q for P , ¬ P for and hence, by Leibniz’s Rule, we make another valid equivalence by Q , and R ⇒ S for R , then we get another valid equivalence: applying it in a bigger context: val val ∀ x [ Q ∧ ¬ P : R ⇒ S ] = = ∀ x [ Q : ¬ P ⇒ ( R ⇒ S )] . ∀ x [ x ∈ D : ∃ y [ y = 2 : x ≥ y ] ] = = ∀ x [ x ∈ D : x ≥ 2 ] . / department of mathematics and computer science / department of mathematics and computer science Calculation with quantifiers (example) Binary predicates (example) 19/41 21/41 We show with a calculation that The statement 3 m + n > 3 is a binary predicate. val ∀ x [ P ∧ R : S ] ∧ ∀ x [ Q ∧ R : S ] = = ¬∃ x [ P ∨ Q : ¬ ( R ⇒ S )] : 3 m + n = 3 N ¬∃ x [ P ∨ Q : ¬ ( R ⇒ S )] n val = = { De Morgan } ∀ x [ P ∨ Q : ¬¬ ( R ⇒ S )] val = = { Double Negation } ∀ x [ P ∨ Q : R ⇒ S ] val = = { Domain Splitting } ∀ x [ P : R ⇒ S ] ∧ ∀ x [ Q : R ⇒ S ] 1 val = = { Domain Weakening (2 × ) } − 1 0 1 R m ∀ x [ P ∧ R : S ] ∧ ∀ x [ Q ∧ R : S ] . / department of mathematics and computer science / department of mathematics and computer science

  6. Equivalence of binary predicates Binary predicates (example) 22/41 23/41 The statement 3 m + n > 3 is a binary predicate. Predicates P ( x, y ) and Q ( x, y ) are equivalent if for all x, y we have that P ( x, y ) evaluates to true if, and 3 m + n = 3 N only if, Q ( x, y ) evaluates to true. n Example Let x, y ∈ Z . ¬ ( x = 0 ⇒ y > 2) The predicates val = = { Implication } ¬ ( x = 0 ⇒ y > 2) ¬ ( ¬ ( x = 0) ∨ y > 2) val and = = { De Morgan } 1 ¬¬ ( x = 0) ∧ ¬ ( y > 2) x = 0 ∧ y ≤ 2 − 1 val 0 1 m R = = { Double Negation, Mathematics } assignment are equivalent. x = 0 ∧ y ≤ 2 m=0, n=2 (false prop.) / department of mathematics and computer science / department of mathematics and computer science Binary predicates (example) Binary predicates (example) 24/41 25/41 The statement 3 m + n > 3 is a binary predicate. The statement 3 m + n > 3 is a binary predicate. 3 m + n = 3 3 m + n = 3 N N n n 3 m + 2 > 3 val = = 3 m > 1 val = m > 1 = 3 1 1 − 1 − 1 0 1 m R 0 1 R m assignment m=1, n=2 (true prop.) / department of mathematics and computer science / department of mathematics and computer science

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