Natural Deduction - Northwestern University

24
Natural Deduction EECS 344 Winter 2008

Transcript of Natural Deduction - Northwestern University

Page 1: Natural Deduction - Northwestern University

Natural Deduction

EECS 344

Winter 2008

Page 2: Natural Deduction - Northwestern University

Overview

• Natural deduction as a domain for thinking

about problem solver ideas

• The KM* system• The KM* system

• Examples with KM*

Page 3: Natural Deduction - Northwestern University

Natural deduction as microworld

• Was in fact studied intensively at various times in AI research

– Originally developed by logicians as a model for how people reasonfor how people reason

• Rarely used in practical systems today

– You’ll see some better techniques soon

• But still useful for understanding tradeoffs in designing reasoning systems

Page 4: Natural Deduction - Northwestern University

Kalish & Montegue

• Developed a set of heuristics for doing logical

proofs

• Introduction rules

– not introduction, and introduction, or introduction,

conditional introduction, biconditional introduction

• Elimination rules

– not elimination, and elimination, or elimination,

conditional elimination and biconditional elimination

• KM* is based on their formalism

Page 5: Natural Deduction - Northwestern University

Kalish & Montegue cont.• Organized along five different connectives:

– not, and, or, implies (⇒⇒⇒⇒), and iff (⇔⇔⇔⇔).

• Rules can either eliminate relations or introduce

new relationsnew relations

– Elimination rules are much like the simplification

rules in Bundy system

– Introduction rules are require more control

knowledge--cannot be used randomly

Page 6: Natural Deduction - Northwestern University

Structure of a proof

• A proof is a set of numbered lines

• Each line has the form

<line number> <statement> <justification>

• Example:

27 (implies P Q) Asn

28 P given

29 Q (CE 27 28)

Page 7: Natural Deduction - Northwestern University

• Use boxes to denote logical contexts

• Example: Indirect proof schemata

h show P (IP i j k)

Proof Rules for KM*

h show P (IP i j k)i (not P) asn

.

.j Q

.

.k (not Q)

Page 8: Natural Deduction - Northwestern University

Not Elimination

i (not (not P))

P (NE i)

Page 9: Natural Deduction - Northwestern University

AND Elimination

i (and P Q)

P (AE i)

Q (AE i)Q (AE i)

Page 10: Natural Deduction - Northwestern University

OR Elimination

i (or P Q)

j (implies P R)

k (implies Q R)k (implies Q R)

R (OE i j k)

Page 11: Natural Deduction - Northwestern University

Conditional Elimination

i (implies P Q)

j P

Q (CE i j)Q (CE i j)

Page 12: Natural Deduction - Northwestern University

Biconditional Elimination

i (iff P Q)

(implies P Q) (BE i)

(implies Q P) (BE i)(implies Q P) (BE i)

Page 13: Natural Deduction - Northwestern University

Not Introduction

show (not P) (NI i j k)

i P Asn

.

j Qj Q

.

k (not Q)

Page 14: Natural Deduction - Northwestern University

And Introduction

i P

j Q

(and P Q) (AI i j)(and P Q) (AI i j)

(and Q P) (AI j i)

Page 15: Natural Deduction - Northwestern University

Or Introduction

i P

(or P Q) (OI i)

(or Q P) (OI i)(or Q P) (OI i)

Page 16: Natural Deduction - Northwestern University

Conditional Introduction

show (implies P Q) (CI i j)

i P Asn

j show Qj show Q

Page 17: Natural Deduction - Northwestern University

Biconditional Introduction

i (implies P Q)

j (implies Q P)

(iff P Q) (BI i j)(iff P Q) (BI i j)

Page 18: Natural Deduction - Northwestern University

KM* Examples

• Several of them in the book

• How to read them:

–Don’t go directly to the proofs: Try proving –Don’t go directly to the proofs: Try proving

them yourself first, then peek.

–Think about what you are doing in the process

of doing a proof. That is the process you will

be modeling soon...

Page 19: Natural Deduction - Northwestern University

Simple KM* Example

• Premises

– If it is spring, there cannot be snow

– It snowed this week

• Show• Show

– It cannot be spring

• Formalization

–(implies spring (not snow))

–snow

–(show (not spring))

Page 20: Natural Deduction - Northwestern University

1. (implies spring (not snow))Premise

2. snow Premise

3. (show (not spring))

Page 21: Natural Deduction - Northwestern University

1. (implies spring (not snow))Premise

2. snow Premise

3. (show (not spring))

4. spring Asn

Page 22: Natural Deduction - Northwestern University

1. (implies spring (not snow))Premise

2. snow Premise

3. (show (not spring))

4. spring Asn

5. (not snow) (CE 1 4)

Page 23: Natural Deduction - Northwestern University

1. (implies spring (not snow))Premise

2. snow Premise

3. (show (not spring)) (NI 4 2 5)

4. spring Asn

5. (not snow) (CE 1 4)

Page 24: Natural Deduction - Northwestern University

Implementing KM* in a reasoning

system

• How to encode the rules?

– Some kind of rule would make sense

–How do we control them? –How do we control them?

• How to do boxes?