Presentation is loading. Please wait.

Presentation is loading. Please wait.

Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson.

Similar presentations


Presentation on theme: "Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson."— Presentation transcript:

1 Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson

2 Outline 1.An example 1.Validity by truth table 2.Validity by proof 2.What’s a proof 1.Proof checker 3.Rules of natural deduction 4.Provable equivalence 5.Soundness and Completeness

3 An Example If the train arrives late and there are no taxis at the station, then John is late for his meeting. John is not late for his meeting. The train did arrive late. Therefore, there were taxis at the station. If it is raining and Jane does not have here umbrella with her, then she will get wet. Jane is not wet. It is raining. Therefore, Jane has her umbrella with her.

4 An Example

5

6 Validity by Truth Table pqr qq rrp  q(p  q)  r FFFTTFT FFTTFFT FTFFTFT FTTFFFT TFFTTTF TFTTFTT TTFFTFT TTTFFFT

7 Proof

8 A proof is a sequence of formulas that are either premises or follow from the application of a rule to previous formulas Each formula must be labeled by it’s justification, i.e. the rule that was applied along with pointers to the formulas that the rule was applied to It is relatively straightforward to check to see if a proof is valid

9 Validity by Deduction 1premise 2 3 4assumption 5 6r 7 8 9q

10 Rules of Natural Deduction Natural deduction uses a set of rules formally introduced by Gentzen in 1934 The rules follow a “natural” way of reasoning about Introduction rules Introduce logical operators from premises Elimination rules Eliminate logical operators from premise producing a conclusion without the operator

11 Conjunction Rules Introduction Rule Elimination Rule    i     e1      e2 

12 Implication Rules Introduction Rule Assume  and show  Elimination Rule (Modus Ponens)      e   …   i   

13 Disjunction Rules Introduction Rule Elimination Rule (proof by case analysis)   i1     e    i2    …… ……

14 Negation Rules

15 Introduction Rule  leads to a contradiction Double negation     e 

16 Proof by Contradiction Derived Rule Assume  and derive a a contradiction Derived rules can be used like the basic rules and serve as a short cut (macro) Sometimes used as a negation elimination rule instead of double negation

17 Law of the Excluded Middle 1  (p  p) assumption 2Assumption 3 (p  p) 4 5  p 6 p  p 7 8  (p  p) 9 p  p

18 ProofLab The ProofLab tool from the Logic and Proofs course from the CMU online learning initiative allows you to experiment with natural deduction proofs

19 ProofLab

20 Provable Equivalence

21 De Morgan’s Law  (P  Q)   P   Q 1 (P  Q)(P  Q) premise 2assumption 3 P  QP  Q  i1 2 4  e 1,3 5 PP 6Q 7 P  QP  Q  i2 6 8  e 1,7 9 10 P  QP  Q  i 5,9

22 De Morgan’s Law  (P  Q)   P   Q 1 P  QP  Q premise 2  e1 1 3  e2 1 4assumption 5P 6  e 2,5 7Q  i2 6 8  e 3,7 9  e 4,5-6, 7-8 10 (P  Q)(P  Q)  i 4-9

23 Semantic Entailment

24 Soundness and Completeness


Download ppt "Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson."

Similar presentations


Ads by Google