190 likes | 350 Views
CS 1502 Formal Methods in Computer Science. Lecture Notes 11. Example. Infer A C from A B and B C. A B B C A C This argument is known as the Transitivity of the Biconditional. Using Resolution. A B is ( A B) (B A)
E N D
CS 1502 Formal Methods in Computer Science Lecture Notes 11
Example • Infer A C from A B and B C. • A B B C A C This argument is known as the Transitivity of the Biconditional.
Using Resolution • A B is (A B) (B A) • B C is (B C) (C B) • (A C) is (A C ) (A C) {A, B} {B,A} {B, C} {C, B} {A, C} {A, C} Resolution Proof: In Lecture
A Tautology Law of Excluded Middle • P P
Using DeMorgan’s, but we do the work…(turns out to be redundant)
Law of Excluded Middle • P P Use with V-Elim in Proofs! To introduce it: Use Taut Con, if the rules allow Otherwise, insert proof 6.33
Exercise 8.53 (on LPL Web site) Note: Fitch lines after line 4 And 11 were eaten by adobe. They should be there.
Example • Prove this argument is valid from no premises. (P Q) (P Q) Logical truth
Prove this argument • Horned(unicorn) (Elusive(unicorn) Dangerous(unicorn)) (Elusive(unicorn) Mythical(unicorn)) Rare(unicorn) Mammal(unicorn) Rare(unicorn)Horned(unicorn) Mammal(unicorn) • Proof is on the next slide; Go through it for practice on your own.
1. Horned(unicorn) (Elusive(unicorn) Dangerous(unicorn) 2. (Elusive(unicorn) Mythical(unicorn)) Rare(unicorn) 3. Mammal(unicorn) Rare(unicorn) 4. Horned(unicorn) 5. Elusive(unicorn) Dangerous(unicorn) Elim 1,4 6. Elusive(unicorn) Elim 57. Elusive(unicorn) Mythical(unicorn) Intro8. Rare(unicorn) Elim 2,79. Mammal(unicorn) 10. Rare(unicorn) Elim 3,911. Intro 8,1012. Mammal(unicorn) Intro 9-1113.Horned(unicorn) Mammal(unicorn) Intro 4-12
Informal Proof Example • Prove there exists irrational numbers b and c such that bc is rational.Proof:Consider = 22. This number is either rational or irrational. If is rational we are finished since b = c = 2 . Assume is irrational. Consider 2 = 2. Again we are finished since b = and c = 2.
English Translation EGsP Q If P then Q (If you are human then you are a mammal) P implies Q (Being a human implies being a mammal) If P, Q (If you are human, you are a mammal) P only if Q (You’ll live a long time only if you eat veggies) P is sufficient for Q (Knowing you’re living a long time is sufficient to know you eat veggies) Q is necessary for P (Eating veggies is necessary to live a long time) Q if P (You are a mammal if you are human)
P Q Home(max) Library(claire)Large(b) Cube(b) If not P then QIf Max is not home, then Claire is at the library If b is not large, then it is a cube Unless P, QUnless Max is at home, Claire is at the library Unless b is large, b is a cube Q, unless P Claire is at the library unless Max is home B is a cube unless b is large Why not for last two? (section 7.3 and lecture)
Lecture: look at related questions on Assignment 3, in 7.12 and 7.15