1 Proofs Using Truth Tables 2 Proofs Using Inference Rules
Total Page:16
File Type:pdf, Size:1020Kb
Summer 2016 Lecture 7: Inference Rules 1 Proofs using Truth Tables How you prove a logical equivalence with a truth table: Implication Law • Start by creating the truth table: p ! q ≡ :p _ q p q :p p ! q :p _ q T T F T T T F F F F F T T T T F F T T T • Write down which columns prove the equivalence. In this case columns 4 and 5 are the same, thus proving the equivalence. How you prove a rule of inference with a truth table: Similar idea but with a more involved set up Hypothetical Syllogism • Notice that I have 3 free variables, p, q and r. That means I have 23 = 8 rows. If you want to use integers instead, that’s fine, remember 1 is True and 0 is False. (p ! q) ^ (q ! r) ! (p ! r) p q r p ! q q ! r p ! r (p ! q) ^ (q ! r) (p ! q) ^ (q ! r) ! (p ! r) T T T T T T T T T T F T F F F T T F T F T T F T T F F F T F F T F T T T T T T T F T F T F T F T F F T T T T T T F F F T T T T T • Write down which columns prove the equivalence. The last column in the logical equivalence is a tautology, thus proving the logical equivalence. You can set up all logical equivalences in the same fashion. 2 Proofs using Inference Rules How you should set these problems up for this recitation and for the homework: • You should have separate columns for the step, the statement and the reason. • You will always use all of the axioms (Given). • State the reason (the rule you used) and also state the steps used. Given: :p ^ q, r ! p, :r ! s, s ! t Prove: t Step Statement Reason 1 :p ^ q Given 2 :p Simplification (1) 3 r ! p Given 4 :r Modus Tollens (2,3) 5 :r ! s Given 6 s Modus Ponens (4,5) 7 r Given 8 s ! t Modus ponens (6, 7) Problem 1. How many rows would the previous inference proof take using a truth table? Problem 2. Show that the hypotheses "If you send me an email message, then I will finish writing the program," "If you do not send me an email message, then I will go to sleep early," and "If I go to sleep early, then I will wake up feeling refreshed" lead to the conclusion "If I do not finish writing the program, then I will wake up feeling refreshed." Let: p: q: r: s: Given: Prove: Hint, you may want to use the contrapositive definition we learned yesterday! Step Statement Reason Problem 3. Given: (p ^ q) ! r, :s ! q, p, :s Prove: r Step Statement Reason Page 2 3 Proofs using Logical Equivalences With these proofs, you are trying to make the two sides of the equation match each other by other equivalences (the bottom half of the page). • Begin with exactly the left-hand side statement • End with exactly what is on the right • Justify EVERY step with a logical equivalence • Each step should derive from the last, there is no need to state the previous step number. Prove: p ! q ,:q !:p Step Statement Reason 1 p ! q Given 2 ,:p ^ q Implication Law #1 3 , q ^ :p Commutative Law 4 ,:(:q) ^ :p Double Negation 5 ,:q !:p Implication Law #1 Problem 4. Prove: (p ^ :q) _ q , p _ q Need commutative law Step Statement Reason Page 3.