introduction to logic natural deductionintrologic.stanford.edu/lectures/lecture_05.pdfnatural...

Post on 24-Jan-2021

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to LogicNatural Deduction

Michael GeneserethComputer Science Department

Stanford University

Example - Transitivity

1. p ⇒ q Premise2. q ⇒ r Premise3. (q ⇒ r) ⇒ (p ⇒ (q ⇒ r)) IC4. (p ⇒ (q ⇒ r)) IE: 2, 35. (p ⇒ (q ⇒ r)) ⇒ ((p ⇒ q) ⇒ (p ⇒ r)) ID6. (p ⇒ q) ⇒ (p ⇒ r) IE: 4, 57. p ⇒ r IE: 1, 6

Given (p ⇒ q) and (q ⇒ r), prove (p ⇒ r).

Structured Proofs

Making Assumptions e.g. assume p

Applying Ordinary Rules of Inference to derive conclusions e.g. derive q

Discharging Assumptions leading to implications e.g. conclude p ⇒ q

Natural Deduction

Conditional Proofs

In a conditional proof, it is permissible to make an arbitrary assumption or hypothetical in a nested proof. The assumption need not be in the original premise set.

Such assumptions can be used within the nested proof. However, they may not be used outside of the subproof in which they appear.

Making Assumptions

Example

An ordinary rule of inference applies to a proof at any level of nesting if and only there is an instance of the rule in which all of the premises occur earlier in the nested proof or in some “superproof” of the nested proof.

Importantly, it is not permissible to apply an ordinary rule of inference to premises in subproofs of a nested proof or in other subproofs of a superproof of a nested proof.

Ordinary Rules of Inference

Example

Bad Proof

XX

Bad Proof

XX

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 φ ⊢ ψ.

This schema is called Implication Introduction.

Structured Rules of Inference

φ ⊢ ψφ ⇒ ψ

A structured rule of inference applies to a nested proof if and only there is an instance of the rule in which all of the premises are satisfied.

A premise that is an ordinary schema is satisfied if and only if it occurs earlier in the nested proof or in any “superproof” of that nested subproof.

A premise of the form φ ⊢ ψ is satisfied if and only if the nested proof has φ as an assumption and terminates in ψ.

Structured Rule Application

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 or structured rule of inference to earlier items in the sequence (subject to the constraints given above).

Structured Proof

Fitch

Negation Introduction (NI):

Negation Elimination (NE):

Negations

φ ⇒ χφ ⇒ ¬χ¬φ

¬¬φφ

And Introduction (AI):

And Elimination (AE):

Conjunctions

φψφ ∧ ψ

φ ∧ ψφψ

Or Introduction (BI):

Or Elimination (BE):

Disjunctions

φφ ∨ ψ

φ ∨ ψφ ⇒ χψ ⇒ χχ

And Introduction (AI):

Implications Elimination (AE):

Implications

φ ⊢ ψφ ⇒ ψ

φ ⇒ ψφψ

Biconditional Introduction (BI):

Biconditional Elimination (BE):

Equivalences / Biconditionals

φ ⇒ ψψ ⇒ φφ ⇔ ψ

φ ⇔ ψφ ⇒ ψψ ⇒ φ

Transitivity - Hilbert Proof

1. p ⇒ q Premise2. q ⇒ r Premise3. (q ⇒ r) ⇒ (p ⇒ (q ⇒ r)) IC4. (p ⇒ (q ⇒ r)) IE: 2, 35. (p ⇒ (q ⇒ r)) ⇒ ((p ⇒ q) ⇒ (p ⇒ r)) ID6. (p ⇒ q) ⇒ (p ⇒ r) IE: 4, 57. p ⇒ r IE: 1, 6

Given (p ⇒ q) and (q ⇒ r), prove (p ⇒ r).

Transitivity - Fitch Proof

Given (p ⇒ q) and (q ⇒ r), prove (p ⇒ r).

Reflexivity - Hilbert Proof

1. p ⇒ (p ⇒ p) IC2. p ⇒ ((p ⇒ p) ⇒ p) IC3 p ⇒ ((p ⇒ p) ⇒ p) ⇒ ((p ⇒ (p ⇒ p)) ⇒ (p ⇒ p)) ID4 (p ⇒ (p ⇒ p)) ⇒ (p ⇒ p) IE: 2, 45. (p ⇒ p) IE: 1, 4

Prove (p ⇒ p).

Reflexivity - Fitch Proof

1. | p Assumption2. p ⇒p Implication Introduction: 1, 1

Prove (p ⇒ p).

Inconsistency - Hilbert Proof

1. p Premise2. ¬p Premise3 ¬p ⇒ (¬q ⇒ ¬p) IC4 ¬q ⇒ ¬p IE: 3, 25. (¬q ⇒ ¬p) ⇒ (p ⇒ q) IR6. p ⇒ q IE: 5, 47. q IE: 6, 1

Given p and ¬p, prove q.

Inconsistency - Fitch Proof

Given p and ¬p, prove q.

1. p Premise2. ¬p Premise3 | ¬q Assumption4 | p Reiteration: 15. ¬q ⇒ p Implication Introduction: 3, 46. | ¬q Assumption7. | ¬p Reiteration: 28. ¬q ⇒ ¬p Implication Introduction: 6, 7 9. ¬¬q Negation Introduction: 5, 810. q Negation Elimination: 9

Negation Elimination - Hilbert Proof

1 ¬¬p ⇒ (¬¬¬¬p ⇒ ¬¬p) IC2. (¬¬¬¬p ⇒ ¬¬p) ⇒ (¬p ⇒ ¬¬¬p) IR4. ¬¬p ⇒ (¬p ⇒ ¬¬¬p) Transitivity: 1, 25. (¬p ⇒ ¬¬¬p) ⇒ (¬¬p ⇒ p) IR6. ¬¬p ⇒ (¬¬p ⇒ p) Transitivity: 4, 57. (¬¬p ⇒ (¬¬p ⇒ p)) ⇒

((¬¬p ⇒ ¬¬p) ⇒ (¬¬p ⇒ p))ID

8. (¬¬p ⇒ ¬¬p) ⇒ (¬¬p ⇒ p) IE: 7, 69. ¬¬p ⇒ ¬¬p Reflexivity10. ¬¬p ⇒ p IE: 8, 9

Prove (¬¬p ⇒ p).

Prove (¬¬p ⇒ p).

Negation Elimination - Fitch Proof

1 | ¬¬p Assumption2. | p Negation Elimination: 14. ¬¬p ⇒ p Implication Introduction: 1, 2

Negation Introduction - Hilbert Proof

1. p ⇒ p Reflexivity2. ¬p ⇒ ¬p Reflexivity3. p ⇒ ¬¬p Contradiction: 1, 2

Prove (p ⇒ ¬¬p).

Negation Introduction - Fitch Proof

1. | p Assumption2. | | ¬p Assumption3. | | p Reiteration: 14. | ¬p ⇒ p

ppp¬p Implication Introduction: 2, 3

5. | | ¬p Assumption6. | ¬p ⇒ ¬p Implication Introduction: 5, 57. | ¬¬p Negation Introduction: 4, 68. p ⇒ ¬¬p Implication Introduction: 1, 7

Prove (p ⇒ ¬¬p).

Soundness and 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 φ).

Logical Entailment and Provability

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 logical conclusion is provable.

If Δ ⊨ φ, then Δ ⊢ φ.

Soundness and Completeness

Theorem: Fitch is sound and complete for Propositional Logic.

Δ |= ϕ if and only if Δ ⊢Fitch φ.

Upshot: The truth table method and the proof method succeed in exactly the same cases!

Fitch

Practical Matters

Tip 1: If the goal has the form (φ ⇒ ψ), it is often good to assume φ and prove ψ and then use Implication Introduction to derive the goal.

Reasoning Tips

1. q Premise

2. | p Assumption

3. | q Reiteration: 1

4. p ⇒ q IE: 2, 3

Tip 2: If the goal has the form (φ ∧ ψ), prove φ and then prove ψ and then use And Introduction to derive (φ ∧ ψ).

Tip 3: If the goal has the form (φ ∨ ψ), try to prove φ or prove ψ (but we do not need to prove both), then use Or Introduction to disjoin with anything else.

Reasoning Tips

Tip 4: If the goal has the form ¬φ, (a) assume φ and derive the sentence (φ ⇒ ψ), (b) assume φ again and derive the sentence ¬ψ leading to (φ ⇒ ¬ψ), and (c) use Negation Introduction to derive ¬φ as desired.

Tip 5: To prove any sentence φ, assume ¬φ, prove a contradiction as just discussed, thereby deriving ¬¬φ, and then apply Negation Elimination to get φ.

Reasoning Tips

Tip 6: Given a premise of the form (φ ⇒ ψ) and a goal ψ, try proving φ and then use Implication Elimination to derive ψ.

Tip 7: Given a premise (φ ∨ ψ) and our goal is to prove χ, try proving (φ ⇒ χ) and (ψ ⇒ χ) and use Or Elimination to derive χ.

Reasoning Tips

top related