Semantic Entailment and Natural Deduction Alice Gao Lecture 6, - - PowerPoint PPT Presentation

โ–ถ
semantic entailment and natural deduction
SMART_READER_LITE
LIVE PREVIEW

Semantic Entailment and Natural Deduction Alice Gao Lecture 6, - - PowerPoint PPT Presentation

Semantic Entailment and Natural Deduction Alice Gao Lecture 6, September 26, 2017 Entailment 1/55 Learning goals Semantic entailment valuation trees, and/or logical identities. Natural deduction in propositional logic inference rules.


slide-1
SLIDE 1

Semantic Entailment and Natural Deduction

Alice Gao

Lecture 6, September 26, 2017

Entailment 1/55

slide-2
SLIDE 2

Learning goals

Semantic entailment

  • Defjne semantic entailment.
  • Explain subtleties of semantic entailment.
  • Determine whether a semantic entailment holds by using truth tables,

valuation trees, and/or logical identities.

  • Prove semantic entailment using truth tables and/or valuation trees.

Natural deduction in propositional logic

  • Describe rules of inference for natural deduction.
  • Prove a conclusion from given premises using natural deduction

inference rules.

  • Describe strategies for applying each inference rule when proving a

conclusion formula using natural deduction.

Entailment 2/55

slide-3
SLIDE 3

A review of the conditional

Consider the formulas ๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3 and ๐‘‘. The following two statements are equivalent:

  • for any truth valuation ๐‘ข, if (๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3) is true, then ๐‘‘ is true.
  • (๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3) โ†’ ๐‘‘ is a tautology.

Entailment 3/55

slide-4
SLIDE 4

Subtleties about the conditional

Consider the formulas ๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3 and ๐‘‘. How many of the following statements are true?

  • a. If ๐‘ž1 is false, then (๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3) โ†’ ๐‘‘ is true.
  • b. If ๐‘ž1 = ๐‘ฆ and ๐‘ž2 = (ยฌ๐‘ฆ), then (๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3) โ†’ ๐‘‘ is false.
  • c. If ๐‘‘ is a tautology, then (๐‘ž1 โˆง ๐‘ž2 โˆง ๐‘ž3) โ†’ ๐‘‘ is true.
  • d. Two of (a), (b), and (c) are true.
  • e. All of (a), (b), and (c) are true.

Entailment 4/55

slide-5
SLIDE 5

Proving arguments valid

Recall that logic is the science of reasoning. One important goal of logic is to infer that a conclusion is true based on a set of premises. A logical argument: Premise 1 Premise 2 ... Premise n โ€”โ€”โ€” Conclusion A common problem is to prove that an argument is valid, that is the set of premises semantically entails the conclusion.

Entailment 5/55

slide-6
SLIDE 6

Formalizing argument validity: Semantic Entailment

Let ฮฃ = {๐‘ž1, ๐‘ž2, ..., ๐‘ž๐‘œ} be a set of premises and let ๐›ฝ be the conclusion that we want to derive. ฮฃ semantically entails ๐›ฝ, denoted ฮฃ โŠจ ๐›ฝ, if and only if

  • Whenever all the premises in ฮฃ are true, then the conclusion ๐›ฝ is true.
  • For any truth valuation ๐‘ข, if every premise in ฮฃ is true under ๐‘ข, then

the conclusion ๐›ฝ is true under ๐‘ข.

  • For any truth valuation ๐‘ข, if ๐‘ข satisfjes ฮฃ (denoted ฮฃ๐‘ข = T), then ๐‘ข

satisfjes ๐›ฝ (๐›ฝ๐‘ข = T).

  • (๐‘ž1 โˆง ๐‘ž2 โˆง ... โˆง ๐‘ž๐‘œ) โ†’ ๐›ฝ is a tautology.

If ฮฃ semantically entails ๐›ฝ, then we say that the argument (with the premises in ฮฃ and the conclusion ๐›ฝ) is valid. What does ฮฃ๐‘ข = T (๐‘ข satisfjes ฮฃ) mean? See the next slide.

Entailment 6/55

slide-7
SLIDE 7

What does ฮฃ๐‘ข = T mean?

ฮฃ๐‘ข = T (๐‘ข satisfjes ฮฃ) means ...

  • Every formula in ฮฃ is true under the valuation ๐‘ข.
  • If a formula ๐›พ is in ฮฃ, then ๐›พ is true under ๐‘ข.

If ฮฃ is the empty set โˆ…, then any valuation satisfjes ฮฃ. Why? The defjnition of โ€œ๐‘ข satisfjes ฮฃโ€ says

  • If a formula ๐›พ is in ฮฃ, then ๐›พ is true under ๐‘ข.

There is no formula in โˆ…, so the premise of the above statement is false, which means the statement is vacuously true. Thus, any valuation satisfjes the empty set โˆ….

Entailment 7/55

slide-8
SLIDE 8

Subtleties about entailment

Consider a set of formulas ฮฃ and the formula ๐›ฝ. How many of the following statements are true?

  • a. If ๐‘ž1 in ฮฃ is false, then ฮฃ โŠจ ๐›ฝ is false.
  • b. If ฮฃ = {๐‘ฆ, (ยฌ๐‘ฆ)}, then ฮฃ โŠจ ๐›ฝ is true.
  • c. If โˆ… โŠจ ๐›ฝ is true, then ๐›ฝ is a tautology (โˆ… is the empty set).
  • d. Two of (a), (b), and (c) are true.
  • e. All of (a), (b), and (c) are true.

Entailment 8/55

slide-9
SLIDE 9

Proving or disproving entailment

Proving that ฮฃ entails ๐›ฝ, denoted ฮฃ โŠจ ๐›ฝ:

  • Using a truth table: Consider all rows of the truth table in which all of

the formulas in ฮฃ are true. Verify that ๐›ฝ is true in all of these rows.

  • Direct proof: For every truth valuation under which all of the premises

are true, show that the conclusion is also true under this valuation.

  • Proof by contradiction: Assume that the entailment does not hold,

which means that there is a truth valuation under which all of the premises are true and the conclusion is false. Derive a contradiction. Proving that ฮฃ does not entail ๐›ฝ, denoted ฮฃ โŠญ ๐›ฝ:

  • Find one truth valuation ๐‘ข under which all of the premises in ฮฃ are

true and the conclusion ๐›ฝ is false.

Entailment 9/55

slide-10
SLIDE 10

Proving entailment using a truth table

Let ฮฃ = {(ยฌ(๐‘ž โˆง ๐‘Ÿ)), (๐‘ž โ†’ ๐‘Ÿ)}, ๐‘ฆ = (ยฌ๐‘ž), and ๐‘ง = (๐‘ž โ†” ๐‘Ÿ). Based on the truth table, which of the following statements is true?

  • a. ฮฃ โŠจ ๐‘ฆ and ฮฃ โŠจ ๐‘ง.
  • b. ฮฃ โŠจ ๐‘ฆ and ฮฃ โŠญ ๐‘ง.
  • c. ฮฃ โŠญ ๐‘ฆ and ฮฃ โŠจ ๐‘ง.
  • d. ฮฃ โŠญ ๐‘ฆ and ฮฃ โŠญ ๐‘ง.

๐‘ž ๐‘Ÿ (ยฌ(๐‘ž โˆง ๐‘Ÿ)) (๐‘ž โ†’ ๐‘Ÿ) ๐‘ฆ = (ยฌ๐‘ž) ๐‘ง = (๐‘ž โ†” ๐‘Ÿ) 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Entailment 10/55

slide-11
SLIDE 11

Proving entailment

What is {(ยฌ(๐‘ž โˆง ๐‘Ÿ)), (๐‘ž โˆง ๐‘Ÿ)} โŠจ (๐‘ž โ†” ๐‘Ÿ)?

  • a. True
  • b. False

๐‘ž ๐‘Ÿ (ยฌ(๐‘ž โˆง ๐‘Ÿ)) (๐‘ž โˆง ๐‘Ÿ) (๐‘ž โ†” ๐‘Ÿ) 1 1 1 1 1 1 1 1 1 1

Entailment 11/55

slide-12
SLIDE 12

Equivalence and Entailment

Equivalence can be expressed using the notion of entailment.

  • Lemma. ๐›ฝ โ‰ก ๐›พ if and only if both {๐›ฝ} โŠจ ๐›พ and {๐›พ} โŠจ ๐›ฝ.

Entailment 12/55

slide-13
SLIDE 13

Proofs in Propositional Logic: Natural Deduction

Natural Deduction 13/55

slide-14
SLIDE 14

Solution to the previous puzzle

A very special island is inhabited only by knights and knaves. Knights always tell the truth, and knaves always lie. You meet three inhabitants: Alice, Rex and Bob.

  • 1. Alice says, โ€œRex is a knave.โ€ This means Alice and Rex are difgerent.
  • 2. Rex says, โ€œitโ€™s false that Bob is a knave (or Bob is a knight).โ€ This

means Rex and Bob are the same.

  • 3. Bob claims, โ€œI am a knight or Alice is a knight.โ€ Bob is a knight, or

Bob and Alice are both knaves. Based on 1 and 2, Alice and Bob are difgerent, so they cannot both be knaves (2nd option in 3). Thus, the only possibility left is Alice is a knave, and Rex and Bob are knights.

Natural Deduction Overview 14/55

slide-15
SLIDE 15

Labyrinth Puzzle

Natural Deduction Overview 15/55

slide-16
SLIDE 16

Learning goals

Natural deduction in propositional logic

  • Describe rules of inference for natural deduction.
  • Prove a conclusion from given premises using natural deduction

inference rules.

  • Describe strategies for applying each inference rule when proving a

conclusion formula using natural deduction.

Natural Deduction Overview 16/55

slide-17
SLIDE 17

The Natural Deduction Proof System

We will consider a proof system called Natural Deduction.

  • It closely follows how people (mathematicians, at least) normally make

formal arguments.

  • It extends easily to more-powerful forms of logic.

Natural Deduction Overview 17/55

slide-18
SLIDE 18

Why would you want to study natural deduction proofs?

  • It is impressive to be able to write proofs with nested boxes and

mysterious symbols as justifjcations.

  • Be able to prove or disprove that Superman exists (on Tuesday).
  • Be able to prove or disprove that the onnagata are correct to insist

that males should play female characters in Japanese kabuki theatres.

  • To realize that writing proofs and problem solving in general is both a

creative and a scientifjc endeavour.

  • To develop problem solving strategies that can be used in many other

situations.

Natural Deduction Overview 18/55

slide-19
SLIDE 19

A proof is syntactic

First, we think about proofs in a purely syntactic way. A proof

  • starts with a set of premises,
  • transforms the premises based on a set of inference rules (by pattern

matching),

  • and reaches a conclusion.

We write ฮฃ โŠขND ๐œ’

  • r simply

ฮฃ โŠข ๐œ’ if we can fjnd such a proof that starts with a set of premises ฮฃ and ends with the conclusion ๐œ’.

Natural Deduction Overview 19/55

slide-20
SLIDE 20

Goal is to show semantic entailment

Next, we think about connecting proofs to semantic entailment. We will answer these questions:

  • (Soundness) Does every proof establish a semantic entailment?

If I can fjnd a proof from ฮฃ to ๐œ’, can I conclude that ฮฃ semantically entails ๐œ’? Does ฮฃ โŠข ๐œ’ imply ฮฃ โŠจ ๐œ’?

  • (Completeness) For every semantic entailment, can I fjnd a proof for

it? If I know that ฮฃ semantically entails ๐œ’, can I fjnd a proof from ฮฃ to ๐œ’? Does ฮฃ โŠจ ๐œ’ imply ฮฃ โŠข ๐œ’?

Natural Deduction Overview 20/55

slide-21
SLIDE 21

Refmexivity / Premise

If you want to write down a previous formula in the proof again, you can do it by refmexivity. Name โŠข-notation inference notation Refmexivity,

  • r Premise

ฮฃ, ๐›ฝ โŠข ๐›ฝ ๐›ฝ ๐›ฝ The notation on the right: Given the formulas above the line, we can infer the formula below the line. The version in the center reminds us of the role of assumptions in Natural

  • Deduction. Other rules will make more use of it.

Natural Deduction Basic Rules 21/55

slide-22
SLIDE 22

An example using refmexivity

Here is a proof of {๐‘ž, ๐‘Ÿ} โŠข ๐‘ž. 1. ๐‘ž Premise 2. ๐‘Ÿ Premise 3. ๐‘ž Refmexivity: 1 Alternatively, we could simply write 1. ๐‘ž Premise and be done.

Natural Deduction Basic Rules 22/55

slide-23
SLIDE 23

For each symbol, the rules come in pairs.

  • An โ€œintroduction ruleโ€ adds the symbol to the formula.
  • An โ€œelimination ruleโ€ removes the symbol from the formula.

Natural Deduction Basic Rules 23/55

slide-24
SLIDE 24

Rules for Conjunction

Name โŠข-notation inference notation โˆง-introduction (โˆงi) If ฮฃ โŠข ๐›ฝ and ฮฃ โŠข ๐›พ, then ฮฃ โŠข (๐›ฝ โˆง ๐›พ) ๐›ฝ ๐›พ (๐›ฝ โˆง ๐›พ) Name โŠข-notation inference notation โˆง-elimination (โˆงe) If ฮฃ โŠข (๐›ฝ โˆง ๐›พ), then ฮฃ โŠข ๐›ฝ and ฮฃ โŠข ๐›พ (๐›ฝ โˆง ๐›พ) ๐›ฝ (๐›ฝ โˆง ๐›พ) ๐›พ

Natural Deduction Conjunction Rules 24/55

slide-25
SLIDE 25

Example: Conjunction Rules

Example. Show that {(๐‘ž โˆง ๐‘Ÿ)} โŠข (๐‘Ÿ โˆง ๐‘ž). 1. (๐‘ž โˆง ๐‘Ÿ) Premise 2. ๐‘Ÿ โˆงe: 1 3. ๐‘ž โˆงe: 1 4. (๐‘Ÿ โˆง ๐‘ž) โˆงi: 2, 3

Natural Deduction Conjunction Rules 25/55

slide-26
SLIDE 26

Example: Conjunction Rules (2)

Example. Show that {(๐‘ž โˆง ๐‘Ÿ), ๐‘ } โŠข (๐‘Ÿ โˆง ๐‘ ). 1. (๐‘ž โˆง ๐‘Ÿ) Premise 2. ๐‘  Premise 3. ๐‘Ÿ โˆงe: 1 4. (๐‘Ÿ โˆง ๐‘ ) โˆงi: 3, 2

Natural Deduction Conjunction Rules 26/55

slide-27
SLIDE 27

Rules for Implication: โ†’e

Name โŠข-notation inference notation โ†’-elimination (โ†’e) (modus ponens) If ฮฃ โŠข (๐›ฝ โ†’ ๐›พ) and ฮฃ โŠข ๐›ฝ, then ฮฃ โŠข ๐›พ (๐›ฝ โ†’ ๐›พ) ๐›ฝ ๐›พ In words: If you assume ๐›ฝ is true and ๐›ฝ implies ๐›พ, then you may conclude ๐›พ.

Natural Deduction Implication Rules 27/55

slide-28
SLIDE 28

Rules for Implication: โ†’i

Name โŠข-notation inference notation โ†’-introduction (โ†’i) If ฮฃ, ๐›ฝ โŠข ๐›พ, then ฮฃ โŠข (๐›ฝ โ†’ ๐›พ) ๐›ฝ . . . . ๐›พ (๐›ฝ โ†’ ๐›พ) The โ€œboxโ€ denotes a sub-proof. In the sub-proof, we starts by assuming that ๐›ฝ is true (a premise of the sub-proof), and we conclude that ๐›พ is true. Nothing inside the sub-proof may come out. Outside of the sub-proof, we could only use the sub-proof as a whole.

Natural Deduction Implication Rules 28/55

slide-29
SLIDE 29

Example: Rule โ†’i and sub-proofs

  • Example. Give a proof of {(๐‘ž โ†’ ๐‘Ÿ), (๐‘Ÿ โ†’ ๐‘ )} โŠข (๐‘ž โ†’ ๐‘ ).

To start, we write down the premises at the beginning, and the conclusion at the end. 1. (๐‘ž โ†’ ๐‘Ÿ) Premise 2. (๐‘Ÿ โ†’ ๐‘ ) Premise 3. ๐‘ž Assumption 4. ๐‘Ÿ โ†’e: 1, 3 5. ๐‘  โ†’e: 2, 4 6. (๐‘ž โ†’ ๐‘ ) ??? What next? The goal โ€œ(๐‘ž โ†’ ๐‘ )โ€ contains โ†’. Letโ€™s try rule โ†’iโ€ฆ. Inside the sub-proof, we can use rule โ†’e. Done!

Natural Deduction Implication Rules 29/55

slide-30
SLIDE 30

Rules of Disjunction: โˆจi and โˆจe

Name โŠข-notation inference notation โˆจ-introduction (โˆจi) If ฮฃ โŠข ๐›ฝ, then ฮฃ โŠข ๐›ฝ โˆจ ๐›พ and ฮฃ โŠข ๐›พ โˆจ ๐›ฝ ๐›ฝ ๐›ฝ โˆจ ๐›พ ๐›ฝ ๐›พ โˆจ ๐›ฝ โˆจ-elimination (โˆจe) If ฮฃ, ๐›ฝ1 โŠข ๐›พ and ฮฃ, ๐›ฝ2 โŠข ๐›พ, then ฮฃ, ๐›ฝ1 โˆจ ๐›ฝ2 โŠข ๐›พ ๐›ฝ1 โˆจ ๐›ฝ2 ๐›ฝ1 . . . . ๐›พ ๐›ฝ2 . . . . ๐›พ ๐›พ โˆจe is also known as โ€œproof by casesโ€.

Natural Deduction Disjunction Rules 30/55

slide-31
SLIDE 31

Example: Or-Introduction and -Elimination

Example: Show that {๐‘ž โˆจ ๐‘Ÿ} โŠข (๐‘ž โ†’ ๐‘Ÿ) โˆจ (๐‘Ÿ โ†’ ๐‘ž).

1. ๐‘ž โˆจ ๐‘Ÿ Premise 2. ๐‘ž Assumption 3. ๐‘Ÿ Assumption 4. ๐‘ž Refmexivity: 2 5. ๐‘Ÿ โ†’ ๐‘ž โ†’i: 3โ€“4 6. (๐‘ž โ†’ ๐‘Ÿ) โˆจ (๐‘Ÿ โ†’ ๐‘ž) โˆจi: 5 7. ๐‘Ÿ Assumption 8. ๐‘ž Assumption 9. ๐‘Ÿ Refmexivity: 7 10. ๐‘ž โ†’ ๐‘Ÿ โ†’i: 8โ€“9 11. (๐‘ž โ†’ ๐‘Ÿ) โˆจ (๐‘Ÿ โ†’ ๐‘ž) โˆจi: 10 12. (๐‘ž โ†’ ๐‘Ÿ) โˆจ (๐‘Ÿ โ†’ ๐‘ž) โˆจe: 1, 2โ€“6, 7โ€“11

Natural Deduction Disjunction Rules 31/55

slide-32
SLIDE 32

Negation

We shall treat negation by considering contradictions. We shall use the notation โŸ‚ to represent any contradiction. It may appear in proofs as if it were a formula. The elimination rule for negation: Name โŠข-notation inference notation โŸ‚-introduction, or ยฌ-elimination (ยฌe) ฮฃ, ๐›ฝ, (ยฌ๐›ฝ) โŠข โŸ‚ ๐›ฝ (ยฌ๐›ฝ) โŸ‚ If we have both ๐›ฝ and (ยฌ๐›ฝ), then we have a contradiction.

Natural Deduction Negation 32/55

slide-33
SLIDE 33

Negation Introduction (ยฌi)

If an assumption ๐›ฝ leads to a contradiction, then derive (ยฌ๐›ฝ). Name โŠข-notation inference notation ยฌ-introduction (ยฌi) If ฮฃ, ๐›ฝ โŠข โŸ‚, then ฮฃ โŠข (ยฌ๐›ฝ) ๐›ฝ . . . . โŸ‚ (ยฌ๐›ฝ)

Natural Deduction Negation 33/55

slide-34
SLIDE 34

Example: Negation

  • Example. Show that {๐›ฝ โ†’ (ยฌ๐›ฝ)} โŠข (ยฌ๐›ฝ).

1. ๐›ฝ โ†’ (ยฌ๐›ฝ) Premise 2. ๐›ฝ Assumption 3. (ยฌ๐›ฝ) โ†’e: 1, 2 4. โŸ‚ ยฌe: 2, 3 5. (ยฌ๐›ฝ) ยฌi: 2โ€“4

Natural Deduction Negation 34/55

slide-35
SLIDE 35

The Last Two Basic Rules

Double-Negation Elimination: Name โŠข-notation inference notation ยฌยฌ-elimination (ยฌยฌe) If ฮฃ โŠข (ยฌ(ยฌ๐›ฝ)), then ฮฃ โŠข ๐›ฝ (ยฌ(ยฌ๐›ฝ)) ๐›ฝ Contradiction Elimination: Name โŠข-notation inference notation โŸ‚-elimination (โŸ‚e) If ฮฃ โŠข โŸ‚, then ฮฃ โŠข ๐›ฝ โŸ‚ ๐›ฝ

Natural Deduction Negation 35/55

slide-36
SLIDE 36

A Redundant Rule

The rule of โŸ‚-elimination is not actually needed. Suppose a proof has 27. โŸ‚ โŸจsome ruleโŸฉ 28. ๐›ฝ โŸ‚e: 27. We can replace these by 27. โŸ‚ โŸจsome ruleโŸฉ 28. (ยฌ๐›ฝ) Assumption 29. โŸ‚ Refmexivity: 27 30. (ยฌ(ยฌ๐›ฝ)) ยฌi: 28โ€“29 31. ๐›ฝ ยฌยฌe: 30. Thus any proof that uses โŸ‚e can be modifjed into a proof that does not.

Natural Deduction Negation 36/55

slide-37
SLIDE 37

Example: โ€œModus tollensโ€

The principle of modus tollens: {๐‘ž โ†’ ๐‘Ÿ, (ยฌ๐‘Ÿ)} โŠข (ยฌ๐‘ž). 1. ๐‘ž โ†’ ๐‘Ÿ Premise 2. (ยฌ๐‘Ÿ) Premise 3. ๐‘ž Assumption 4. ๐‘Ÿ โ†’e: 3, 1 5. โŸ‚ ยฌe: 2, 4 6. (ยฌ๐‘ž) ?? Modus tollens is sometimes taken as a โ€œderived ruleโ€: ๐›ฝ โ†’ ๐›พ (ยฌ๐›พ) (ยฌ๐›ฝ)

MT

Natural Deduction Negation 37/55

slide-38
SLIDE 38

Derived Rules

Whenever we have a proof of the form ฮ“ โŠข ๐›ฝ, we can consider it as a derived rule: ฮ“ ๐›ฝ If we use this in a proof, it can be replaced by the original proof of ฮ“ โŠข ๐›ฝ. The result is a proof using only the basic rules. Using derived rules does not expand the things that can be proved. But they can make it easier to fjnd a proof.

Natural Deduction Negation 38/55

slide-39
SLIDE 39

Strategies for natural deduction proofs

  • 1. Work forward from the premises. Can you apply an elimination rule?
  • 2. Work backwards from the conclusion. What introduction rule do you

need to use at the end?

  • 3. Stare at the formula. Notice its structure. Use it to guide your proof.
  • 4. If a direct proof doesnโ€™t work, try a proof by contradiction.

Natural Deduction Additional Examples and Techniques 39/55

slide-40
SLIDE 40

Further Examples of Natural Deduction

Example. Show that {๐‘ž โ†’ ๐‘Ÿ} โŠข (๐‘  โˆจ ๐‘ž) โ†’ (๐‘  โˆจ ๐‘Ÿ). In the sub-proof, try โˆจ-elimination on the assumption (step 2).

1. ๐‘ž โ†’ ๐‘Ÿ Premise 2. ๐‘  โˆจ ๐‘ž Assumption 3. ๐‘  Assumption 4. ๐‘  โˆจ ๐‘Ÿ โˆจi: 3 5. ๐‘ž Assumption 6. ๐‘Ÿ โ†’e: 5, 1 7. ๐‘  โˆจ ๐‘Ÿ โˆจi: 6 8. ๐‘  โˆจ ๐‘Ÿ โˆจe: 2, 3โ€“4, 5โ€“7 9. (๐‘  โˆจ ๐‘ž) โ†’ (๐‘  โˆจ ๐‘Ÿ) โ†’i: 2โ€“8

Natural Deduction Additional Examples and Techniques 40/55

slide-41
SLIDE 41

Lifeโ€™s Not Always So Easyโ€ฆ

Example. Show that โŠข ((๐‘ž โ†’ ๐‘Ÿ) โ†’ ๐‘ž) โ†’ ๐‘ž. 1. (๐‘ž โ†’ ๐‘Ÿ) โ†’ ๐‘ž Assumption 2. No elimination applies. 3. 4. ????? 5. ๐‘ž No connective. 6. ((๐‘ž โ†’ ๐‘Ÿ) โ†’ ๐‘ž) โ†’ ๐‘ž Try โ†’iโ€ฆ Time to try something ingeniousโ€ฆ.

Natural Deduction Additional Examples and Techniques 41/55

slide-42
SLIDE 42

Some Common Derived Rules

Proof by contradiction (reductio ad absurdum): if ฮฃ, (ยฌ๐›ฝ) โŠขโŸ‚, then ฮฃ โŠข ๐›ฝ. The โ€œLaw of Excluded Middleโ€ (tertiam non datur): โŠข ๐›ฝ โˆจ (ยฌ๐›ฝ). Double-Negation Introduction: if ฮฃ โŠข ๐›ฝ then ฮฃ โŠข (ยฌ(ยฌ๐›ฝ)). You can try to prove these yourself, as exercises. (Hint: in the fjrst two, the last step uses rule ยฌยฌe: (ยฌ(ยฌ๐›ฝ)) โŠข ๐›ฝ.) Or see pages 24โ€“26 of Huth and Ryan.

Natural Deduction Additional Examples and Techniques 42/55

slide-43
SLIDE 43

Soundness and Completeness

  • f Natural Deduction

for Propositional Logic

Natural Deduction Soundness and Completeness 43/55

slide-44
SLIDE 44

Soundness and Completeness of Natural Deduction

We want to prove that Natural Deduction is both sound and complete. Soundness of Natural Deduction means that the conclusion of a proof is always a logical consequence of the premises. That is, If ฮฃ โŠขND ๐›ฝ, then ฮฃ โŠจ ๐›ฝ . Completeness of Natural Deduction means that all logical consequences in propositional logic are provable in Natural

  • Deduction. That is,

If ฮฃ โŠจ ๐›ฝ, then ฮฃ โŠขND ๐›ฝ .

Natural Deduction Soundness and Completeness 44/55

slide-45
SLIDE 45

Proof of Soundness

To prove soundness, we use induction on the length of the proof: For all deductions ฮฃ โŠข ๐›ฝ which have a proof of length ๐‘œ or less, it is the case that ฮฃ โŠจ ๐›ฝ. That property, however, is not quite good enough to carry out the

  • induction. We actually use the following property of a natural number ๐‘œ.

Suppose that a formula ๐›ฝ appears at line ๐‘œ of a partial deduction, which may have one or more open sub-proofs. Let ฮฃ be the set of premises used and ฮ“ be the set of assumptions of

  • pen sub-proofs. Then ฮฃ โˆช ฮ“ โŠจ ๐›ฝ.

Natural Deduction Soundness and Completeness 45/55

slide-46
SLIDE 46

Basis of the Induction

Base case. The shortest deductions have length 1, and thus are either 1. ๐›ฝ Premise.

  • r

1. ๐›ฝ Assumption. 2. We have either ๐›ฝ โˆˆ ฮฃ (in the fjrst case), or ๐›ฝ โˆˆ ฮ“ (in the second case). Thus ฮฃ โˆช ฮ“ โŠจ ๐›ฝ, as required.

Natural Deduction Soundness and Completeness 46/55

slide-47
SLIDE 47

Proof of Soundness: Inductive Step

Inductive step. Hypothesis: the property holds for each ๐‘œ < ๐‘™; that is, If some formula ๐›ฝ appears at line ๐‘™ or earlier of some partial deduction, with premises ฮฃ and un-closed assumptions ฮ“, then ฮฃ โˆช ฮ“ โŠจ ๐›ฝ. To prove: if ๐›ฝโ€ฒ appears at line ๐‘™ + 1, then ฮฃ โˆช ฮ“โ€ฒ โŠจ ๐›ฝโ€ฒ (where ฮ“โ€ฒ = ฮ“ โˆช ๐›ฝโ€ฒ when ๐›ฝโ€ฒ is an assumption, and ฮ“โ€ฒ = ฮ“ otherwise). The case that ๐›ฝโ€ฒ is an assumption is trivial. Otherwise, formula ๐›ฝโ€ฒ must have a justifjcation by some rule. We shall consider each possible rule.

Natural Deduction Soundness and Completeness 47/55

slide-48
SLIDE 48

Inductive Step, Case I

Case I: ๐›ฝโ€ฒ was justifjed by โˆงi. We must have ๐›ฝโ€ฒ = ๐›ฝ1 โˆง ๐›ฝ2, where each of ๐›ฝ1 and ๐›ฝ2 appear earlier in the proof, at steps ๐‘›1 and ๐‘›2, respectively. Also, any sub-proof open at step ๐‘›1 or ๐‘›2 is still open at step ๐‘™ + 1. Thus the induction hypothesis applies to both; that is, ฮฃ โˆช ฮ“ โŠจ ๐›ฝ1 and ฮฃ โˆช ฮ“ โŠจ ๐›ฝ2. By the defjnition of โŠจ, this yields ฮฃ โˆช ฮ“ โŠจ ๐›ฝโ€ฒ, as required.

Natural Deduction Soundness and Completeness 48/55

slide-49
SLIDE 49

Inductive Step, Case II

Case II: ๐›ฝโ€ฒ was justifjed by โ†’i. Rule โ†’i requires that ๐›ฝโ€ฒ = ๐›ฝ1 โ†’ ๐›ฝ2 and there is a closed sub-proof with assumption ๐›ฝ1 and conclusion ๐›ฝ2, ending by step ๐‘™. Also, any sub-proof open before the assumption of ๐›ฝ1 is still open at step ๐‘™ + 1. The induction hypothesis thus implies ฮฃ โˆช (ฮ“ โˆช {๐›ฝ1}) โŠจ ๐›ฝ2. Hence ฮฃ โˆช ฮ“ โŠจ ๐›ฝ1 โ†’ ๐›ฝ2, as required.

Natural Deduction Soundness and Completeness 49/55

slide-50
SLIDE 50

Inductive Step, Cases III fg.

Case III: ๐›ฝโ€ฒ was justifjed by ยฌe. This requires that ๐›ฝโ€ฒ be the pseudo-formula โŸ‚, and that the proof contain formulas ๐›ฝ and (ยฌ๐›ฝ) for some ๐›ฝ, each using at most ๐‘™ steps. By the induction hypothesis, both ฮฃ โŠจ ๐›ฝ and ฮฃ โŠจ (ยฌ๐›ฝ). Thus ฮฃ is contradictory, and ฮฃ โŠจ ๐›ฝโ€ฒ for any ๐›ฝโ€ฒ. Cases IVโ€“XIII: The other cases follow by similar reasoning. This completes the inductive step, and the proof of soundness.

Natural Deduction Soundness and Completeness 50/55

slide-51
SLIDE 51

Completeness of Natural Deduction

We now turn to completeness. Recall that completeness means the following. Let ฮฃ be a set of formulas and ๐œ’ be a formula. If ฮฃ โŠจ ๐œ’, then ฮฃ โŠข ๐œ’ . That is, every consequence has a proof. How can we prove this?

Natural Deduction Proof of Completeness 51/55

slide-52
SLIDE 52

Proof of Completeness: Getting started

We shall assume that the set ฮฃ of hypotheses is fjnite. The theorem is also true for infjnite sets of hypotheses, but that requires a completely difgerent proof.

Suppose that ฮฃ โŠจ ๐œ’, where ฮฃ = {๐œ1, ๐œ2, โ€ฆ , ๐œ๐‘›}. Thus the formula (๐œ1 โˆง ๐œ2 โˆง โ€ฆ โˆง ๐œ๐‘›) โ†’ ๐œ’ is a tautology.

  • Lemma. Every tautology is provable in Natural Deduction.

Once we prove the Lemma, the result follows. Given a proof of (๐œ1 โˆง ๐œ2 โˆง โ€ฆ โˆง ๐œ๐‘›) โ†’ ๐œ’, one can use โˆงi and โ†’e to complete a proof of ฮฃ โŠข ๐œ’.

Natural Deduction Proof of Completeness 52/55

slide-53
SLIDE 53

Tautologies Have Proofs

For a tautology, every line of its truth table ends with T. We can mimic the construction of a truth table using inferences in Natural Deduction.

  • Claim. Let ๐œ’ have ๐‘™ variables ๐‘ž1, โ€ฆ , ๐‘ž๐‘™. Let ๐‘ค be a valuation,

and defjne โ„“1, โ„“2, โ€ฆ , โ„“๐‘™ as โ„“๐‘— = โŽง { โŽจ { โŽฉ ๐‘ž๐‘— if ๐‘ค(๐‘ž๐‘—) = T ยฌ๐‘ž๐‘— if ๐‘ค(๐‘ž๐‘—) = F. If ๐œ’๐‘ค = T, then {โ„“1, โ€ฆ โ„“๐‘™} โŠข ๐œ’, and if ๐œ’๐‘ค = F, then {โ„“1, โ€ฆ โ„“๐‘™} โŠข (ยฌ๐œ’). To prove the claim, use structural induction on formulas (which is induction on the column number of the truth table). Once the claim is proven, we can prove a tautology as followsโ€ฆ.

Natural Deduction Proof of Completeness 53/55

slide-54
SLIDE 54

Outline of the Proof of a Tautology

1. ๐‘ž1 โˆจ (ยฌ๐‘ž1) L.E.M. 2. ๐‘ž2 โˆจ (ยฌ๐‘ž2) L.E.M. โ‹ฎ โ‹ฎ ๐‘™. ๐‘ž๐‘™ โˆจ (ยฌ๐‘ž๐‘™) L.E.M. ๐‘™ + 1. ๐‘ž1 assumption ๐‘ž2 assumption โ‹ฎ ๐œ’ (ยฌ๐‘ž2) assumption โ‹ฎ ๐œ’ ๐‘›. ๐œ’ โˆจe: 2, โ€ฆ ๐‘› + 1. (ยฌ๐‘ž1) assumption โ‹ฎ โ‹ฎ ๐œ’ โˆจe: ๐‘› + 1, โ€ฆ ๐‘œ. ๐œ’ โˆจe: 1, ๐‘› โˆ’ (๐‘™ + 1), ๐‘œ โˆ’ (๐‘› + 1) Once each variable is assumed true or false, the previous claim provides a proof.

Natural Deduction Proof of Completeness 54/55

slide-55
SLIDE 55

Proving the Claim

Hypothesis: the following hold for formulas ๐›ฝ and ๐›พ: If {โ„“1, โ€ฆ , โ„“๐‘™} โŠจ ๐›ฝ, then {โ„“1, โ€ฆ , โ„“๐‘™} โŠข ๐›ฝ; If {โ„“1, โ€ฆ , โ„“๐‘™} โŠญ ๐›ฝ, then {โ„“1, โ€ฆ , โ„“๐‘™} โŠข (ยฌ๐›ฝ); If {โ„“1, โ€ฆ , โ„“๐‘™} โŠจ ๐›พ, then {โ„“1, โ€ฆ , โ„“๐‘™} โŠข ๐›พ; and If {โ„“1, โ€ฆ , โ„“๐‘™} โŠญ ๐›พ, then {โ„“1, โ€ฆ , โ„“๐‘™} โŠข (ยฌ๐›พ). If {โ„“1, โ€ฆ , โ„“๐‘™} โŠจ (๐›ฝ โˆง ๐›พ), put the two proofs of ๐›ฝ and ๐›พ together, and then infer (๐›ฝ โˆง ๐›พ), by โˆงi. If {โ„“1, โ€ฆ , โ„“๐‘™} โŠญ (๐›ฝ โ†’ ๐›พ) (i.e., {โ„“1, โ€ฆ , โ„“๐‘™} โŠจ ๐›ฝ and {โ„“1, โ€ฆ , โ„“๐‘™} โŠญ ๐›พ),

  • Prove ๐›ฝ and (ยฌ๐›พ).
  • Assume (๐›ฝ โ†’ ๐›พ); from it, conclude ๐›พ (โ†’e) and then โŸ‚ (ยฌe).
  • From the sub-proof, conclude (ยฌ(๐›ฝ โ†’ ๐›พ)), by ยฌi.

The other cases are similar.

Natural Deduction Proof of Completeness 55/55