8 30 17
play

8/30/17 Valid arguments in propositional logic Consider the - PowerPoint PPT Presentation

8/30/17 Valid arguments in propositional logic Consider the following argument: CS 220: Discrete Structures and their Applications You need a current password to access department machines You have a current password Logical inference


  1. 8/30/17 Valid arguments in propositional logic Consider the following argument: CS 220: Discrete Structures and their Applications You need a current password to access department machines You have a current password Logical inference Therefore: Section 1.11-1.13 in zybooks You can access department machines Valid arguments in propositional logic Valid arguments in propositional logic We’ll write it in a more formal way: This is an example of a logical argument that has the form: You need a current password to access department machines p → q You have a current password p ∴ You can access department machines ∴ q This inference rule is called Modus ponens 1

  2. 8/30/17 Valid arguments in propositional logic Verifying argument validity using truth tables And more generally: Consider the following argument: p q p ∨ q p → q p 1 p → q p 2 hypotheses p ∨ q T T T T .... ∴ q p n T F T F conclusion F T T T ∴ c F F F T Verifying argument validity using truth tables Verifying argument validity using truth tables Let’s verify the validity of modus ponens: Let’s verify the validity of modus ponens: p q p → q p q p → q p → q p → q p T T T p T T T ∴ q ∴ q T F F T F F F T T F T T F F T F F T 2

  3. 8/30/17 Verifying argument validity using truth tables Verifying argument validity using truth tables Consider the following argument: Consider the following argument: p q p ∨ q p → q p q ¬p p → q p → q ¬p p ∨ q p → q T T T T T T F T ∴ q ∴ ¬q T F T F T F F F The argument is valid F T T T Is it valid? F T T T because whenever the F F F T F F T T hypotheses are true, the conclusion is true as well. Verifying argument validity using truth tables Is there another way of doing this? Consider the following argument: Yes! p q ¬p p → q ¬p p → q T T F T ∴ ¬q T F F F Is it valid? F T T T F F T T 3

  4. 8/30/17 Example Example Let’s prove the validity of the following argument using In propositional logic: inference rules: w: It is windy r: It is raining If it is raining or windy, the game will be cancelled. c: The game will be cancelled The game will not be cancelled. (r ∨ w) → c Therefore, it is not windy. ¬c ∴ ¬w Example Inference rules p p → q In propositional logic: p → q Modus ponens q → r Hypothetical syllogism w: It is windy ∴ q ∴ p → r r: It is raining ¬q c: The game will be cancelled p ∨ q p → q Modus tollens ¬p Disjunctive syllogism ∴ ¬p ∴ q (r ∨ w) → c Proof: ¬c p Addition p ∨ q ∴ ¬w ∴ p ∨ q ¬p ∨ r Resolution 1. (r ∨ w) → c Hypothesis ∴ q ∨ r 2. ¬c Hypothesis Modus tollens p ∧ q Simplification 3. ¬(r ∨ w) Modus tollens, 1, 2 ¬q ∴ p p → q 4. ¬r ∧ ¬w De Morgan's law, 3 ∴ ¬p 5. ¬w Simplification, 4 p q Conjunction ∴ p ∧ q 4

  5. 8/30/17 Validity of inference rules Inference with quantifiers We can prove the validity of inference rules as well. Consider We’d like to make inferences such as: Modus Tollens for example: Every employee who received a large bonus works hard. 1. p → q Hypothesis Linda is an employee at the company. 2. ¬p ∨ q Conditional in terms of disjunction Linda received a large bonus. 3. ¬q Hypothesis 4. ¬p Disjunctive syllogism, 2, 3 ∴ Some employee works hard. Inference rules for quantified statements Inference rules for quantified statements Universal instantiation: Universal generalization c is an element in the domain of P c is an arbitrary element in the domain of P ∀ x P(x) P(c) ∴ P(c) ∴ ∀ x P(x) Example: Example: Sam is a student in the class. Let c be an arbitrary positive integer. Every student in the class completed the assignment. 1 ≤ c Therefore, Sam completed his assignment. c ≤ c 2 Therefore, every integer is less than or equal to its square. 5

  6. 8/30/17 Inference rules for quantified statements Inference rules for quantified statements Existential instantiation Existential instantiation ∃ x P(x) ∃ x P(x) ∴ (c is a particular element in the domain of P) ∧ P(c) ∴ P(c) for some c in the domain of P Example: Example: There is an integer that is equal to its square. There is an integer that is equal to its square. Therefore, c 2 = c, for some integer c. Therefore, c 2 = c, for some integer c. Inference rules for quantified statements particular vs arbitrary elements Existential generalization What is this distinction between particular and arbitrary elements? c is an element in the domain of P P(c) Let’s go back to universal generalization: ∴ ∃ x P(x) c is an arbitrary element in the domain of P P(c) Example: ∴ ∀ x P(x) Sam is a student in the class. Sam completed the assignment. What would happen if we chose a particular element, let’s say Therefore, there is a student in the class who completed the joe instead of an arbitrary element? assignment. 6

  7. 8/30/17 particular vs arbitrary elements More particular elements What is this distinction between particular and arbitrary What is the problem with the following proof? elements? 1. ∃ x P(x) Hypothesis Revisiting existential instantiation: 2. (c is a particular element) ∧ P(c) Existential instantiation, 1 ∃ x P(x) 3. ∃ x Q(x) Hypothesis ∴ (c is a particular element in the domain of P) ∧ P(c) 4. (c is a particular element) ∧ Q(c) Existential instantiation, 3 5. P(c) Simplification, 2 This applied to a particular element, otherwise, it would be true 6. Q(c) Simplification, 4 for all elements. 7. P(c) ∧ Q(c) Conjunction, 5, 6 8. c is a particular element Simplification, 2 9. ∃ x (P(x) ∧ Q(x)) Existential generalization, 7, 8 7

Recommend


More recommend