Introduction to Logic: Natural Deduction and Proof Systems

Introduction to Logic: Natural Deduction and Proof Systems
Slide Note
Embed
Share

Delve into the fundamental concepts of logic through natural deduction and proof systems like Hilbert, Fitch, and Gentzen. Explore examples of transitivity proofs and the deduction theorem within a structured framework presented by Michael Genesereth from Stanford University.

  • Logic
  • Natural Deduction
  • Proof Systems
  • Transitivity
  • Deduction Theorem

Uploaded on Mar 22, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Introduction to Logic Natural Deduction Michael Genesereth Computer Science Department Stanford University

  2. Proof Systems Popular Types of Proof Systems: Direct Proofs (Hilbert) Natural Deduction (Fitch) Refutation proofs (Resolution / Robinson) Others: Gentzen Systems Sequent Calculi and so forth

  3. Example - Transitivity Proof Given (p q) and (q r), prove (p r). 1. p q 2. q r 3. (q r) (p (q r)) 4. (p (q r)) 5. (p (q r)) ((p q) (p r)) 6. (p q) (p r) 7. p r Premise Premise IC IE: 2, 3 ID IE: 4, 5 IE: 1, 6 How do we choose instances of IC and ID?

  4. Transitivity - Related Proof Given (p q) and (q r) and p, prove r. 1. p q 2. q r 3. p 4. q 5. r Premise Premise Premise IE: 1, 3 IE: 2, 4

  5. Deduction Theorem ( ) if and only if { }

  6. Deduction Theorem Deduction Theorem: ( ) if and only if { } {(p q), (q r)} (p r) if and only if {(p q), (q r), p} r There is a proof of (p r) from {(p q), (q r)} if and only if there is a proof of r from {(p q), (q r), p}.

  7. Transitivity - Hilbert Proof Given (p q) and (q r), prove (p r). 1. p q 2. q r 3. (q r) (p (q r)) 4. (p (q r)) 5. (p (q r)) ((p q) (p r)) 6. (p q) (p r) 7. p r Premise Premise IC IE: 2, 3 ID IE: 4, 5 IE: 1, 6 NB: This is a proof of (p r) from (p q) and (q r).

  8. Transitivity - Related Proof Given (p q) and (q r) and p, prove r. 1. p q 2. q r 3. p 4. q 5. r Premise Premise Premise IE: 1, 3 IE: 2, 4 NB: This is not itself a proof of (p r) from (p q) and (q r), but the deduction theorem tells us there is such a proof.

  9. Natural Deduction

  10. Natural Deduction Natural Deduction incorporates the deduction theorem in a new type of inference rule and an extended notion of proof. More "natural" for most people. No need for axiom schemata!!

  11. Essence of Natural Deduction Making Assumptions e.g. assume p Using Assumptions e.g. derive q Discharging Assumptions leading to implications e.g. conclude p q

  12. Making Assumptions In a natural deduction proof, it is permissible to make an arbitrary assumption in a nested proof. NB: We can assume anything we like. We can assume anything we like. We can assume anything we like. p p q p p p p This is okay since (1) an assumption is used only within a subproof and (2) everything we prove in that subproof depends on that assumption (as we shall see in a moment).

  13. Using Assumptions Such assumptions can be used withinsubproofs to derive conclusions using ordinary rules of inference. 1. p q 2. q r Premise Premise 3. | p Assumption 4. | q Implication Elimination: 1, 3 5. | r Implication Elimination: 2, 4 NB: This is a proof of runder the assumption that p is true. It is not a proof of r from the premises alone.

  14. Discharging Assumptions After exiting a subproof, we infer an implication with the assumption as antecedent and the conclusion as consequent. 1. p q 2. q r Premise Premise 3. | p Assumption 4. | q Implication Elimination: 1, 3 5. | r p r Implication Elimination: 2, 4 6. Implication Introduction: 3, 5 Everything we prove in a subproof depends on the assumption, and we capture that dependence in the derived implication.

  15. Our Transitivity Example

  16. Caveat An ordinary rule of inference applies to a subproof at any level of nesting if and only if there is an instance of the rule in which all of the premises occur earlier in the subproof or in a superproof of that subproof. Importantly, it is not permissible to apply an ordinary rule of inference to items that occur in other subproofs.

  17. Bad Proof X X

  18. Bad Proof X X

  19. Terminology A structured rule of inference is a pattern of reasoning consisting of one or more schemas, called premises, and one or more additional schemas, called conclusions, in which one of the premises is a condition of the form . Translation: If there is a subproof with assumption and conclusion , then we conclude outside the subproof. This new rule of inference is called Implication Introduction.

  20. Terminology A structured proof of a conclusion from a set of premises is a sequence of (possibly nested) sentences terminating in an occurrence of the conclusion at the top level of the proof. Each step in the proof must be either (1) a premise (at the top level), (2) an assumption, or (3) the result of applying an ordinary rule of inference or a structured rule of inference to earlier items in the sequence.

  21. Fitch

  22. Implications Implication Introduction (II): Implication Elimination (IE):

  23. Negations Negation Introduction (NI): Negation Elimination (NE):

  24. Conjunctions And Introduction (AI): And Elimination (AE):

  25. Disjunctions Or Introduction (OI): Or Elimination (OE):

  26. Equivalences / Biconditionals Biconditional Introduction (BI): Biconditional Elimination (BE):

  27. Examples

  28. Mary and Pat and Quincy If Mary loves Pat, then Mary loves Quincy. If it is Monday, then Mary loves Pat or Quincy. If it is Monday, does Mary love Quincy? Premises: p q m p q Goal: m q

  29. Proof Goal: m q 1. p q 2. m p q Premise Premise

  30. Proof Goal: m q 1. p q 2. m p q 3. | m Premise Premise Assumption

  31. Proof Goal: m q 1. p q 2. m p q 3. | m 4. | p q ppp p Premise Premise Assumption Implication Elimination: 2, 3

  32. Proof Goal: m q 1. p q 2. m p q 3. | m 4. | p q ppp p 5. | |q 6. | q q Premise Premise Assumption Implication Elimination: 2, 3 Assumption Implication Introduction: 5, 5

  33. Proof Goal: m q 1. p q 2. m p q 3. | m 4. | p q ppp p 5. | |q 6. | q q 7. | q Premise Premise Assumption Implication Elimination: 2, 3 Assumption Implication Introduction: 5, 5 Or Elimination: 4, 1, 6

  34. Proof Goal: m q 1. p q 2. m p q 3. | m 4. | p q ppp p 5. | |q 6. | q q 7. | q 8. m q Premise Premise Assumption Implication Elimination: 2, 3 Assumption Implication Introduction: 5, 5 Or Elimination: 4, 1, 6 Implication Introduction: 3, 7

  35. Reflexivity - Hilbert Proof Prove (p p). 1. p (p p) 2. p ((p p) p) 3. p ((p p) p) ((p (p p)) (p p)) 4 (p (p p)) (p p) 5. (p p) IC IC ID IE: 2, 3 IE: 1, 4

  36. Reflexivity - Fitch Proof Prove (p p). 1. 2. p p | p Assumption Implication Introduction: 1, 1

  37. Negation Elimination - Hilbert Proof Prove ( p p). p ( p p) ( p p) ( p p) p ( p p) ( p p) ( p p) p ( p p) ( p ( p p)) (( p p) ( p p)) ( p p) ( p p) p p p p 1 2. 3. 4. 5. 6. IC IR Transitivity: 1, 2 IR Transitivity: 3, 4 ID 7. 8. 9. IE: 6, 5 Reflexivity IE: 7, 8

  38. Negation Elimination - Fitch Proof Prove ( p p). | p |p p p 1 2. 3. Assumption Negation Elimination: 1 Implication Introduction: 1, 2

  39. Soundness and Completeness

  40. Logical Entailment and Provability Completeness A set of premises logically entails a conclusion ( ) if and only if every interpretation that satisfies also satisfies . If there exists a proof of a sentence from a set of premises using the rules of inference in R, we say that is provable from using R (written R ).

  41. Soundness and Completeness A proof system is sound if and only if every provable conclusion is logically entailed. If , then . A proof system is complete if and only if every logically entailed conclusion is provable. If , then .

  42. Fitch Theorem: Fitch is sound and complete for Propositional Logic. if and only if Fitch . Upshot: The truth table method and the Fitch method succeed in exactly the same cases!

  43. Comparative Power Fitch can do anything Hilbert can do!*+# * No axiom schemata necessary. + More intuitive than Hilbert. # Proofs are usually shorter.

  44. Implication Creation Prove (p (q p)). 1. | p 2. | | q Assumption Assumption n Reiteration II: 2, 3 II: 1, 4 3 4 5. p (q p) | | p | q p

  45. Implication Distribution Prove (p (q r)) ((p q) (p r)). 1. | p (q r) 2. | | p q 3 | | | p 4 | | | q 5. | | | q r 6. | | | r 7. | | p r 8. | (p q) (p r) 9. (p (q r)) ((p q) (p r)) II: 1, 8 Assumption Assumption Assumption IE: 2, 3 IE: 1, 3 IE: 5, 4 II: 3, 6 II: 2, 7

  46. Implication Reversal Prove ( q p) (p q). 1. | q p 2. | | p 3 | | | q 4 | | | p 5. | | q p 6. | | q 7. | | q 8. | p q 9. ( q p) (p q) Assumption Assumption Assumption Reiteration II: 3, 4 NI: 5, 1 NE: 6 II: 2, 7 II: 1, 8

  47. Practical Matters

  48. Theorem Proving Requires Search Good News: There is an algorithm for determining logical entailment in Propositional Logic (using Truth tables). Bad News: Truth tables can be very large. Good News: Proofs, once found, are usually smaller than truth tables. Moreover, there are algorithms for finding Propositional Logic proofs using Hilbert and Fitch. Bad News: These algorithms can be expensive. (In fact, the worst case is no better than the truth table method!) Theorem proving requires search. Good News: In many cases, proofs can be found quickly.

  49. Reasoning Tips Tip 1: Given a goal ( ), it is often good to assume , prove , and then use Implication Introduction. 1. q Premise 2. | p Assumption 3. | q Reiteration: 1 4. p q II: 2, 3

  50. Reasoning Tips Tip 2: Given a goal ( ), prove , prove , and then use And Introduction to derive ( ). 1. p q 2. p r 3. p 4. q 5. r 6. q r Premise Premise Premise IE: 1, 3 IE: 2, 3 AI: 4, 5

More Related Content