Download presentation

Presentation is loading. Please wait.

Published byChaz Blye Modified over 3 years ago

1
CS1502 Formal Methods in Computer Science Lecture Notes 3 Consequence Rules Boolean Connectives

2
Symmetry of Identity a = b a = b 1) 2) 3) a = a = Introduction b = a = Elimination 1, 2

4
Example Informal Proof Prove: If a is smaller than b and c is identical to b then c is larger than a. Since we are given that a is smaller than b, it follows that b must be larger than a. Moreover, since c is identical to b, it follows that c must be larger than a. QED

5
Consequence Rules There are three consequence “rules” in Fitch –Tautological Consequence (Taut Con) –First-order Consequence (FO Con) –Analytic Consequence (Ana Con) Cons rules are proof seekers that work behind the scenes. Success is indicated by the beloved blue check mark. Failure is indicated by the infamous red X. Cons rules are proof seekers that work behind the scenes. Success is indicated by the beloved blue check mark. Failure is indicated by the infamous red X.

6
Taut Con Weakest of the three Cons “rules” Attempts to prove if the current step follows from the cited statements by virtue of the truth-functional connectives. E.g., p ^ q can be replaced by p v q.

7
FO Con More powerful than Taut Con but weaker than Ana Con Attempts to prove if the current step follows from the cited steps by virtue of the truth-functional connectives, the quantifiers, and the identity predicate. E.g., a=b ^ b=c can be replaced by a=c.

8
Ana Con Most powerful Cons “rule” Attempts to prove if the current step follows from the cited steps by virtue of the truth-functional connectives, the quantifiers, the identity predicate and the meanings predicates of Tarski’s World. E.g., Cube(a) v Tet(a) v Dodec(a) is true under Ana Con

9
Example Formal Proof Larger(a,b) c = b Larger(a,b) c = b Smaller(b,a)Ana Con 1 c = c = Introduction b = c = Elim 2, 4 Smaller(c,a) = Elim 5, 3 1) 2) 3) 4) 5) 6) Prove: c is smaller than a

10
Explicit Proof of an Ana Con Step Proof performed by the system, behind the scenes

11
Showing Non-consequence To show Q is not a consequence of premises P 1, P 2, …, P n, create a world where the premises are all true and the conclusion Q is false.

12
Invalid Argument 1. SameRow(b,c) 2. SameRow(a,d) 3. SameRow(d,f) 4. LeftOf(a,b) 5. LeftOf(f,c) 1. SameRow(b,c) 2. SameRow(a,d) 3. SameRow(d,f) 4. LeftOf(a,b) 5. LeftOf(f,c)

14
Boolean Connectives Negation Conjunction Disjunction These are truth-functional connectives It is not the case that And, but, moreover Or

15
Negation P PPPP TF FT

16
Negation Facts One translation of P is It is not the case that P. (a = b) is equivalent to a b P is equivalent to P P PPPP P P P P TFT FTF

17
The Game Used to understand the truth value of a complex sentence Strategy: Given a sentence of the form P that you believe to be True (False) implies P is False (True) implies P is True (False) implies P is False (True)

18
Assessment is incorrect

19
Conjunction and Disjunction PQ P Q P Q TTTT TFFT FTFT FFFF

20
Game Revisited If you believe P Q is true you will be asked to select the disjunct that is true. If you believe P Q is false Tarski’s World will attempt to find a disjunct that is true. If you believe P Q is true Tarski’s World will attempt to find a conjunct that is false. If you believe P Q is false you will be asked to select a conjunct that is false.

21
Game Example In lecture

22
Translation Both A and B Either A or B Neither A nor B A B A B (A B) Both c and e are cubes. Cube(c) Cube(e) Either c or e is a cube. Cube(c) Cube(e) Neither c nor e is a cube. (Cube(c) Cube(e))

23
Translation John entered the car and drove to his home Entered ^ Drove(john,car(john),house(john)) –OK? No – the truth functional connectives connect sentences, not predicates Entered(john,car(john)) ^ Drove(john,house(john)) –This is OK English sentences often convey more information than their straightforward logical meanings, e.g., temporal order in “John entered the car and drove home” That’s OK: in this class, you can just give the straightforward translation into logic

24
Translation I will vote for Smith or I will vote for Jones Straightforward literal translation: Vote(I,smith) v Vote(I,jones) Vote(I,smith) v Vote(I,jones) Logic “or” is inclusive or. But “or” in our English sentence is exclusive or – I’ll vote for one of them but not both We can define exclusive or using ^ and v: P xor Q equiv: (P ^ ~Q) v (Q ^ ~P) (Vote(I,smith) ^ ~Vote(I,jones)) v (Vote(I,jones) ^ ~Vote(I,smith)) Unless the text says otherwise, assume inclusive “or” (even when it says “Either A or B”)

25
Avoid Ambiguity A B C(A B) C Both either A or B and C A (B C) Either A or both B and C A B C(A B) C Either both A and B or C A (B C) Both A and either B or C Either both Max is at home and Claire is tall or Carl is happy. [Home(Max) Tall(Claire)] Happy(Carl)

26
Avoid Ambiguity Let’s look at that example again; Either both Max is at home and Claire is tall or Carl is happy [Home(max) ^ Tall(claire)] v Happy(carl) Home(max) ^ (Tall(claire) v Happy(carl)) Translation: Both Max is at home and either Claire is tall or Carl is happy.

27
Equivalences Two FOL sentences P and Q mean the same thing (are logically equivalent, written P Q) iff they have the same truth value in all situations. If two sentences are logically equivalent, you can substitute one for the other. Identity Laws: P ^ T P; P v F P Domination Laws: P v T T; P ^ F F Idempotent Laws: P v P P; P ^ P P Double Negation: ~~P P Commutative Laws: P v Q Q v P; P ^ Q Q ^ P Associative Laws: (P v Q) v R P v (Q v R) (P ^ Q) ^ R P ^ (Q ^ R) (P ^ Q) ^ R P ^ (Q ^ R) Distributive Laws: P v (Q ^ R) (P v Q) ^ (P v R) P ^ (Q v R) (P ^ Q) v (P ^ R) P ^ (Q v R) (P ^ Q) v (P ^ R) DeMorgan’s Laws: ~(P ^ Q) ~P v ~Q ~(P v Q) ~P ^ ~Q ~(P v Q) ~P ^ ~Q

Similar presentations

Presentation is loading. Please wait....

OK

Propositional Logic Review

Propositional Logic Review

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on power line communication bridge Ppt on obesity management systems Ppt on power system operation and control Ppt on programmable logic arrays Ppt on catenation of carbon Ppt on fuel cell technology Ppt on regular expression library Ppt on p&g products online Ppt on regional trade agreements in asia Download ppt on bill gates biography