Lectur ture e 15 Logic I Intro a and nd PDCL 1 Announ - - PowerPoint PPT Presentation

lectur ture e 15 logic i intro a and nd pdcl
SMART_READER_LITE
LIVE PREVIEW

Lectur ture e 15 Logic I Intro a and nd PDCL 1 Announ - - PowerPoint PPT Presentation

Computer Science CPSC 322 Lectur ture e 15 Logic I Intro a and nd PDCL 1 Announ nouncem emen ents Marked midterms will be available on Thursday (with solutions) Assignment 3 will be posted on Th. Due Wed. Nov 15 2 late


slide-1
SLIDE 1

Computer Science CPSC 322

Lectur ture e 15 Logic I Intro a and nd PDCL

1

slide-2
SLIDE 2

Announ nouncem emen ents

  • Marked midterms will be available on

Thursday (with solutions)

  • Assignment 3 will be posted on Th.
  • Due Wed. Nov 15
  • 2 late days allowed
  • Marks for assignment 3 will lik

likely be available

  • n Th
slide-3
SLIDE 3

Lect cture re O Overvi rview

  • Intro to Logic
  • Propositional Definite Clauses:
  • Syntax
  • Semantics
  • Proof procedures (time permitting)
slide-4
SLIDE 4

Where Are We?

Environment Problem Type Query Planning Deterministic Stochastic Constraint Satisfaction Search Arc Consistency Search Search Logics STRIPS Vars + Constraints Value Iteration Variable Elimination Belief Nets Decision Nets Markov Processes Static Sequential

Representation Reasoning Technique

Variable Elimination

First Part of the Course

4

slide-5
SLIDE 5

Where Are We?

Environment Problem Type Query Planning Deterministic Stochastic Constraint Satisfaction Search Arc Consistency Search Search Logics STRIPS Vars + Constraints Value Iteration Variable Elimination Belief Nets Decision Nets Markov Processes Static Sequential

Representation Reasoning Technique

Variable Elimination

Back to static problems, but with richer representation

5

slide-6
SLIDE 6

Logics in AI: Similar slide to the one for planning

Propositional Logics First-Order Logics Propositional Definite Clause Logics Semantics and Proof Theory Satisfiability Testing (SAT) Description Logics Cognitive Architectures Video Games Ontologies Semantic Web Information Extraction Summarization Production Systems Tutoring Systems Hardware Verification Product Configuration Software Verification

Applications

6

slide-7
SLIDE 7

Logics in AI: Similar slide to the one for planning

Propositional Logics First-Order Logics Propositional Definite Clause Logics Semantics and Proof Theory Description Logics Cognitive Architectures Video Games Hardware Verification Product Configuration Ontologies Semantic Web Information Extraction Summarization Production Systems Tutoring Systems Software Verification

You will know You will know a little

Applications

Satisfiability Testing (SAT)

7

slide-8
SLIDE 8

What hat y you al

  • u alre

ready k kno now abo about l logi

  • gic...
  • From

rom progr programming: Som

  • me

e logi

  • gical opera
  • perator
  • rs
  • If ((amount > 0) && (amount < 1000)) || !(age < 30)
  • ...

Logi Logic i is the l he language anguage of

  • f M

Mat

  • athematics. To define formal structures

(e.g., sets, graphs) and to prove statements about those You know what they mean in a “procedural” way We use logic as a Representation and Reasoning System that can be used to formalize a domain and to reason about it

8

slide-9
SLIDE 9

Logi Logic: a a fram ramework for

  • r repr

represen entation n & reas reasoni ning

  • When we represent a domain about which we have only

partial (but certain) information, we need to represent….

9

slide-10
SLIDE 10

Logi Logic: a a fram ramework for

  • r repr

represen entation n & reas reasoni ning

  • When we represent a domain about which we have only

partial (but certain) information, we need to represent….

  • Objects, properties, sets, groups, actions, events, time, space, …
  • All these can be represented as
  • Objects
  • Relationships between objects
  • Logic is the language to express knowledge about the

world this way

  • http://en.wikipedia.org/wiki/John_McCarthy (1927 - 2011)

Logic and AI “The Advice Taker” Coined “Artificial Intelligence”. Dartmouth W’shop (1956)

10

slide-11
SLIDE 11

Why hy Logi Logics?

  • “Natu

tura ral” wa way to express know nowledge edge about the world e.g. “Every 101 student will pass the course” Course (c1) Name-of (c1, 101)

  • It is easy to incrementally add knowledge
  • It is easy to check and debug knowledge
  • Provides language for asking complex queries
  • Well understood formal properties

) 1 , ( _ ) 1 , ( & ) ( ) ( c z pass will c z registered z student z →  ∀

11

slide-12
SLIDE 12

Log Logic: A A gene neral al fram ramework f for reas

  • r reasoning

General problem: Query answering

  • tell the computer how the world works
  • tell the computer some facts about the world
  • ask a yes/no question about whether other facts must be true

Solving it with Logic

1. Begin with a task domain. 2. Distinguish those things you want to talk about (the ontology) 3. Choose symbols in the computer to denote elements of your ontology 4. Tell the system knowledge about the domain

12

slide-13
SLIDE 13

Example: Electrical Circuit

/ up /down

13

slide-14
SLIDE 14

/ up /down

14

slide-15
SLIDE 15

Log Logic: A A gene neral al fram ramework f for reas

  • r reasoning

General problem: Query answering

  • tell the computer how the world works
  • tell the computer some facts about the world
  • ask a yes/no question about whether other facts must be true

Solving it with Logic

1. Begin with a task domain. 2. Distinguish those things you want to talk about (the ontology) 3. Choose symbols in the computer to denote elements of your ontology 4. Tell the system knowledge about the domain 5. Ask the system whether new statements about the domain are true or false

15

slide-16
SLIDE 16

/ up /down

16

live_w e_w4? ? lit lit_l2?

slide-17
SLIDE 17

To D

  • Def

efine a Log a Logic We N e Nee eed

  • Syntax: specifies the symbols used, and how

they can be combined to form legal sentences

  • Know

nowledge bas edge base e is a set of sentences in the language

  • Semantics: specifies the meaning of symbols

and sentences

  • Reasoning theory or proof procedure: a

specification of how an answer can be produced.

  • Sound
  • und: only generates correct answers with

respect to the semantics

  • Com
  • mpl

plet ete: Guaranteed to find an answer if it exists

17

slide-18
SLIDE 18

Propos

  • position
  • nal

al D Defini nite C e Claus uses

We will start with a simple logic

  • Primitive elements are propositions: Boolean variables that can be

{true, false}

Two kinds of statements:

  • that a proposition is true
  • that a proposition is true if one or more other propositions are true

Why only propositions?

  • We can exploit the Boolean nature for efficient reasoning
  • Starting point for more complex logics

We need to specify: syntax, semantics, proof procedure

18

slide-19
SLIDE 19

Lect cture re O Overvi rview

  • Intro to Logic
  • Propositional Definite Clauses:
  • Syntax
  • Semantics
  • Proof Procedures
slide-20
SLIDE 20

To D

  • Def

efine a Log a Logic We N e Nee eed

  • Syntax: specifies the symbols used, and how

they can be combined to form legal sentences

  • Know

nowledge bas edge base e is a set of sentences in the language

  • Semantics: specifies the meaning of symbols

and sentences

  • Reasoning theory or proof procedure: a

specification of how an answer can be produced.

  • Sound
  • und: only generates correct answers with

respect to the semantics

  • Com
  • mpl

plet ete: Guaranteed to find an answer if it exists

20

slide-21
SLIDE 21

Propositional Definite Clauses: Syntax

Definition (atom) An atom is a symbol starting with a lower case letter Definition (body) A body is an atom or is of the form b1 ∧ b2 where b1 and b2 are bodies. Definition (definite clause) A definite clause is

  • an atom or
  • a rule of the form h ← b where h is an

atom (“head”) and b is a body. (Read this as “h if b”.) Definition (KB) A knowledge base (KB) is a set of definite clauses

Examples: p1; live_l1 Examples: p1 ∧ p2;

  • k_w1 ∧ live_w0

Examples: p1 ← p2; live_w0 ← live_w1 ∧ up_s2

21

slide-22
SLIDE 22

atoms rules definite clauses, KB

22

slide-23
SLIDE 23

PDCL CL Syntax: more examples

a) Sunny_today b) sunny_today ∨ cloudy_today c) vdjhsaekwrq d) high_pressure_system ← sunny-today e) sunny_today ← high_pressure_system ∧ summer f) sunny_today ← high_pressure-system ∧ ¬ winter g) ai_is_fun ← f(time_spent, material_learned) h) summer ← sunny_today ∧ high_pressure_system How many of the clauses below are legal PDCL clauses?

Definition (definite clause) A definite clause is

  • an atom or
  • a rule of the form h ← b where h is an atom (‘head’) and b is a body.

(Read this as ‘h if b.’)

23

slide-24
SLIDE 24

PDCL CL Syntax: more examples

a) Sunny_today b) sunny_today ∨ cloudy_today c) vdjhsaekwrq d) high_pressure_system ← sunny-today e) sunny_today ← high_pressure_system ∧ summer f) sunny_today ← high_pressure-system ∧ ¬ winter g) ai_is_fun ← f(time_spent, material_learned) h) summer ← sunny_today ∧ high_pressure_system How many of the clauses below are legal PDCL clauses?

Definition (definite clause) A definite clause is

  • an atom or
  • a rule of the form h ← b where h is an atom (‘head’) and b is a body.

(Read this as ‘h if b.’)

24

  • A. 3
  • B. 4
  • C. 5
  • D. 6
slide-25
SLIDE 25

PDC C Synt ntax ax: m more e e examples es

a) Sunny_today b) sunny_today ∨ cloudy_today c) vdjhsaekwrq d) high_pressure_system ← sunny-today e) sunny_today ← high_pressure_system ∧ summer f) sunny_today ← high_pressure-system ∧ ¬ winter g) ai_is_fun ← f(time_spent, material_learned) h) summer ← sunny_today ∧ high_pressure_system

Do any of these statements mean anything? Syntax doesn't answer this question!

Legal PDC clause Not a legal PDC clause

25

  • B. 4
slide-26
SLIDE 26

To D

  • Def

efine a Log a Logic We N e Nee eed

  • Syntax: specifies the symbols used, and how

they can be combined to form legal sentences

  • Know

nowledge bas edge base e is a set of sentences in the language

  • Semantics: specifies the meaning of symbols

and sentences

  • Reasoning theory or proof procedure: a

specification of how an answer can be produced.

  • Sound
  • und: only generates correct answers with

respect to the semantics

  • Com
  • mpl

plet ete: Guaranteed to find an answer if it exists

26

slide-27
SLIDE 27

Lect cture re O Overvi rview

  • Intro to Logic
  • Propositional Definite Clauses:
  • Syntax
  • Semantics
  • Proof Procedures
slide-28
SLIDE 28

Propos

  • position
  • nal

al Defi finite te Clause ses: s: Sema mantics cs

  • Semantics allows one to relate the symbols in the

logic to the domain to be modeled.

  • If our domain has 8 atoms, how many

interpretations are there?

Def efini nition (

  • n (int

nterpretation)

  • n)

An int nter erpretation I

  • n I assigns a truth value to each atom.
  • B. 8*2
  • C. 82
  • A. 8+2
  • D. 28

28

slide-29
SLIDE 29

Propos

  • position
  • nal

al Defi finite te Clause ses: s: Sema mantics cs

  • Semantics allows one to relate the symbols in the logic to

the domain to be modeled.

  • If our domain has 8 atoms, how many interpretations are

there?

  • 2 values for each atom, so 28 combinations
  • Similar to possible worlds in CSPs

Def efini nition (

  • n (int

nterpretation)

  • n)

An int nter erpretation I

  • n I assigns a truth value to each atom.

29

slide-30
SLIDE 30

Propos

  • position
  • nal

al Defi finite te Clause ses: s: Sema mantics cs

  • Semantics allows one to relate the symbols in the logic to

the domain to be modeled. We can use the interpretation to determine the truth value of clauses Def efini nition (

  • n (int

nterpretation)

  • n)

An int nter erpretation I

  • n I assigns a truth value to each atom.

Def efini nition (

  • n (truth v

val alues ues of

  • f statem

ements)

  • A body

body b b1 ∧ b2 is true in I if and only if b1 is true in I and b2 is true in I.

  • A rul

ule h e h ← b is false in I if and only if b is true in I and h is false in I.

30

slide-31
SLIDE 31

h b h ← b I1 F F T I2 F T F I3 T F T I4 T T T

PDC Sema mantics: cs: E Examp mple

a1 a2 a1 ∧ a2 I1 F F F I2 F T F I3 T F F I4 T T T

Truth values under different interpretations F=false, T=true

31

slide-32
SLIDE 32

h b h ← b I1 F F T I2 F T F I3 T F T I4 T T T

PDC Sema mantics: cs: E Examp mple

Truth values under different interpretations F=false, T=true

h ← b is false only when b is true and h is false h a1 a2 h ← a1 ∧ a2 I1 F F F I2 F F T I3 F T F I4 F T T I5 T F F I6 T F T I7 T T F I8 T T T

33

slide-33
SLIDE 33

h b h ← b I1 F F T I2 F T F I3 T F T I4 T T T

PDC C Semant antics: E Exampl ple f e for t truth h values ues

Truth values under different interpretations F=false, T=true

h ← a1 ∧ a2 Body of the clause is a1 ∧ a2 Body is true only if both a1 and a2 are true in I h a1 a2 h ← a1 ∧ a2 I1 F F F T I2 F F T T I3 F T F T I4 F T T F I5 T F F T I6 T F T T I7 T T F T I8 T T T T

34

slide-34
SLIDE 34

Propos

  • position
  • nal

al Defi finite te Clause ses: s: Sema mantics cs

Semantics allows you to relate the symbols in the logic to the domain you're trying to model. We can use the interpretation to determine the truth value of clauses

Definition (interpretation) An interpretation I assigns a truth value to each atom. Definition (truth values of statements)

  • A body b1 ∧ b2 is true in I if and only if b1 is true in

I and b2 is true in I.

  • A rule h ← b is false in I if and only if b is true in I

and h is false in I.

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

35

slide-35
SLIDE 35

Propos

  • position
  • nal

al D Defini nite C e Claus uses: Sema mantics cs

Definition (model) A model of a knowledge base KB is an interpretation in which KB is true.

Similar to CSPs: a model of a set of clauses is an interpretation that makes all of the clauses true

Definition (interpretation) An interpretation I assigns a truth value to each atom. Definition (truth values of statements)

  • A body b1 ∧ b2 is true in I if and only if b1 is true in

I and b2 is true in I.

  • A rule h ← b is false in I if and only if b is true in I

and h is false in I.

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

36

slide-36
SLIDE 36

PDC Semant emantics cs: K Know nowledge B edge Bas ase ( e (KB)

p q r s I1 false true true false

p r s ← q ∧ p

r s ← p q ← p ∧ s

r q s ← q

  • A. KB1
  • C. KB2
  • B. KB3

Whi hich ch of

  • f the

he thre hree e KB abov above e is T s True rue in n I1

1

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

37

slide-37
SLIDE 37

PDC Semant emantics cs: K Know nowledge B edge Bas ase ( e (KB)

p q r s I1 false true true false

r s ← p q ← p ∧ s

  • C. KB2

Whi hich ch of

  • f the

he thre hree e KB abov above e is T s True rue in n I1

1

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

38

slide-38
SLIDE 38

PDC C Semant antics: E Exampl ple f e for model dels

p ← q KB = s s ← r Definition (model) A model of a knowledge base KB is an interpretation in which every clause in KB is true.

p q r s I1 T T T T I2 F F F T I3 T T F F I4 T T T F I5 T T F T Which of the interpretations below are models of KB?

  • B. I1 , I2
  • C. I1, I2, I5
  • D. All of them
  • A. I1

39

slide-39
SLIDE 39

PDC C Semant antics: E Exampl ple f e for m model dels

p q r s p ← q s s ← r KB I1 T T T T I2 F F F T I3 T T F F I4 T T T F I5 T T F T

Definition (model) A model of a knowledge base KB is an interpretation in which every clause in KB is true. p ← q KB = s s ← r

Which of the interpretations below are models of KB? All interpretations where KB is true

40

slide-40
SLIDE 40

PDC C Semant antics: E Exampl ple f e for m model dels

Definition (model) A model of a knowledge base KB is an interpretation in which every clause in KB is true. p ← q KB = s s ← r

Which of the interpretations below are models of KB? All interpretations where KB is true: I1, I2, and I5

41

p q r s p ← q s s ← r KB I1 T T T T T T T T I2 F F F T T T T T I3 T T F F T F T F I4 T T T F T F T F I5 T T F T T T T T

  • C. I1, I2, I5
slide-41
SLIDE 41

OK but but….

…. …. Who c ho car ares es? Wher here ar are e we goi e going w ng with t h thi his? Remember what we want to do with Logic

1) Tell the system knowledge about a task domain.

  • This is your KB
  • which expresses true statements about the world

2) Ask the system whether new statements about

the domain are true or false.

  • We want the system responses to be

– Sound: only generates correct answers with respect to the semantics – Complete: Guaranteed to find an answer if it exists

42

slide-42
SLIDE 42

For

  • r Ins

nstan ance… ce…

1) Tell the system knowledge about a task domain. 2) Ask the system whether new statements about

the domain are true or false p? p? r? r? s? s?

     ← ← = . . . s r q q p KB

43

slide-43
SLIDE 43

Or, Mor More I e Int nter erest stingl ngly

1) Tell the system knowledge about a task domain. 2) Ask the system whether new statements about

the domain are true or false

  • live_w

e_w4? ? lit lit_l2?

44

slide-44
SLIDE 44

To

  • Obt

btai ain T n Thi his W We e Need eed One ne Mor More D e Def efini nition

  • n

45

slide-45
SLIDE 45

To

  • Obt

btai ain T n Thi his W We e Need eed One ne Mor More D e Def efini nition

  • n

Def efini nition (

  • n (logi
  • gical

al cons

  • nseq

eque uenc nce) If KB is a set of clauses and G is a conjunction of atoms, G is a logical consequence of KB, written KB ⊧ G, if if G is true in every model of KB.

  • we also say that G logically follows from KB, or that KB

entails G.

  • In other words, KB ⊧ G if there is no interpretation in which

KB is true and G is false.

  • when KB is TRUE, then G must be TRUE
  • We want a reasoning procedure that can find all and only the

logical consequences of a knowledge base

46

slide-46
SLIDE 46

   ∧ ← = . . q r q p KB

Example o e of Logi gic E Entai ailment ent

How many models are there?

  • A. 1
  • B. 2
  • C. 3
  • D. 4
  • E. 5

47

slide-47
SLIDE 47

   ∧ ← = . . q r q p KB

Interpretations

r q p T T T T T F T F T T F F F T T F T F F F T F F F

Example o e of Logi gic E Entai ailment ent

How many models are there?

  • A. 1
  • B. 2
  • C. 3
  • D. 4
  • E. 5

48

slide-48
SLIDE 48

   ∧ ← = . . q r q p KB

Interpretations

r q p T T T T T F T F T T F F F T T F T F F F T F F F

Model

  • dels

Which atoms are logically entailed?

Example o e of Logi gic E Entai ailment ent

  • We want a reasoning procedure that can find all and only

the logical consequences of a knowledge base

49

  • C. 3
slide-49
SLIDE 49

   ∧ ← = . . q r q p KB

Interpretations

r q p T T T T T F T F T T F F F T T F T F F F T F F F

Model

  • dels

Which atoms are logically entailed? q

Example o e of Logi gic E Entai ailment ent

  • We want a reasoning procedure that can find all and only

the logical consequences of a knowledge base

50

  • C. 3
slide-50
SLIDE 50

Example: e: L Logi gical al Cons nseque quenc nces es

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false I3 true true false false I4 true true false true I5 false true true true I6 false true true false I7 false true false false I8 false true false true I9 true false true true I10 true false true false I11 true false false false I12 true false false false ….. …… ….. …… …….

Which of the following is true?

  • A. KB ⊧ q and KB ⊧ r
  • B. KB ⊧ q, and KB ⊧ s
  • C. KB ⊧ q, and KB ⊧ p
  • D. KB ⊧ r, KB ⊧ s,
  • E. None of the above

51

slide-51
SLIDE 51

Example: e: L Logi gical al Cons nseque quenc nces es

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false I3 true true false false I4 true true false true I5 false true true true I6 false true true false I7 false true false false I8 false true false true I9 true false true true I10 true false true false I11 true false false false I12 true false false false ….. …… ….. …… …….

Which of the following is true?

  • KB ⊧ q,
  • KB ⊧ p,
  • KB ⊧ s,
  • KB ⊧ r

52

slide-52
SLIDE 52

Example: e: L Logi gical al Cons nseque quenc nces es

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false I3 true true false false I4 true true false true I5 false true true true I6 false true true false I7 false true false false I8 false true false true I9 true false true true I10 true false true false I11 true false false false I12 true false false false ….. …… ….. …… …….

Which of the following is true?

  • KB ⊧ q,
  • KB ⊧ p,
  • KB ⊧ s,
  • KB ⊧ r

53

models

slide-53
SLIDE 53

Example: e: L Logi gical al Cons nseque quenc nces es

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false I3 true true false false I4 true true false true I5 false true true true I6 false true true false I7 false true false false I8 false true false true I9 true false true true I10 true false true false I11 true false false false I12 true false false false ….. …… ….. …… …….

Which of the following is true?

  • KB ⊧ q,
  • KB ⊧ p,
  • KB ⊧ s,
  • KB ⊧ r

T T F F

54

models

  • C. KB ⊧ q, and KB ⊧ p
slide-54
SLIDE 54

User er’s ’s View o w of S Semant antics

  • Choose a task domain: intended interpretation.
  • For each proposition you want to represent,

associate a proposition symbol in the language.

  • Tell the system clauses that are true in the

intended interpretation: axiomatize the domain.

  • Ask questions about the intended interpretation.
  • If KB |= g , then g must be true in the intended

interpretation.

55

slide-55
SLIDE 55

Comput puter er’s V View w of S Semant antics

  • The computer doesn’t have access to the

intended interpretation.

  • All it knows is the knowledge base.
  • The computer can determine if a formula is a

logical consequence of KB.

  • If KB |= g then g must be true in the intended

interpretation.

  • Otherwise, there is a model of KB in which g is false.

This could be the intended interpretation.

The he com compu puter woul

  • uldn't know

know!

56

slide-56
SLIDE 56

Comput puter er’s V View w of S Semant antics

  • Otherwise, there is a model of KB in which g is
  • false. This could be the intended interpretation.

The computer wouldn't know

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false

57

slide-57
SLIDE 57

Comput puter er’s V View w of S Semant antics

  • Otherwise, there is a model of KB in which g is
  • false. This could be the intended interpretation.

The computer wouldn't know

     ← ← = . . . s r q q p KB

p q r s I1 true true true true I2 true true true false

58

I1 and I2 above are both models for KB, each could be the intended interpretation. The computer cannot know, thus it cannot say anything about the truth value of s

slide-58
SLIDE 58

Lea Learning G Goal

  • als for Log
  • r Logic U

Up T p To

  • Her

ere

  • PDCL syntax & semantics
  • Verify whether a logical statement belongs to the

language of propositional definite clauses

  • Verify whether an interpretation is a model of a PDCL KB.

‾ Verify when a conjunction of atoms is a logical consequence of a knowledge base

Next: Proof Procedures (5.2.2)

59

slide-59
SLIDE 59

Lect cture re O Overvi rview

  • Intro to Logic
  • Propositional Definite Clauses:
  • Syntax
  • Semantics
  • Proof Procedures
slide-60
SLIDE 60

To D

  • Def

efine a Log a Logic We N e Nee eed

  • Syntax: specifies the symbols used, and how

they can be combined to form legal sentences

  • Know

nowledge bas edge base e is a set of sentences in the language

  • Semantics: specifies the meaning of symbols

and sentences

  • Reasoning theory or proof procedure: a

specification of how an answer can be produced (sound and complete)

  • Bo

Bottom-up up and d Top-Dow

  • wn Proof
  • of Proc
  • cedur

dure e for Finding ng Logi gical al Cons nseque quenc nce

Slide 61

slide-61
SLIDE 61

Proof

  • of P

Procedur dures

  • A proof procedure is a mechanically derivable

demonstration that a formula logically follows from a knowledge base.

  • Given a proof procedure P, KB ⊦ P g means g can be

derived from knowledge base KB with the proof procedure.

  • If I tell you I have a proof procedure for PDCL
  • What do I need to show you in order for you to trust my

procedure?

That is sound and complete

Slide 62

slide-62
SLIDE 62

Soundn undnes ess a and C d Compl plet etene eness

  • Completeness of proof procedure P: need to prove that

If If g is true in all models of KB (KB ⊧ g) then hen g is derived by the procedure (KB ⊦P g) Def efini nition (

  • n (compl

pleten enes ess) A proof procedure P is complete if KB ⊧ g implies KB ⊦P g.

complete: every atom that logically follows from KB is derived by P

  • Soundness of proof procedure P: need to prove that

Def efini nition (

  • n (sou
  • und

ndne ness) A proof procedure P is sound if KB ⊦P g implies KB ⊧ g. If If g can be derived by the procedure (KB ⊦P g) then hen g is true in all models of KB (KB ⊧ g)

sound: every atom derived by P follows logically from KB (i.e. is true in every model)

Slide 63

slide-63
SLIDE 63

Simpl ple P e Proof

  • of P

Procedur dure

problem with this approach?

Simple proof procedure S

  • Enumerate all interpretations
  • For each interpretation I, check whether it is a model of KB

i.e., check whether all clauses in KB are true in I

  • KB ⊦S g if g holds in all such models

64

slide-64
SLIDE 64

Simpl ple P e Proof

  • of P

Procedur dure

problem with this approach?

  • If there are n propositions in the KB, must

check all the interpretations!

Simple proof procedure S

  • Enumerate all interpretations
  • For each interpretation I, check whether it is a model of KB

i.e., check whether all clauses in KB are true in I

  • KB ⊦S g if g holds in all such models

65

slide-65
SLIDE 65

Simpl ple P e Proof

  • of P

Procedur dure

problem with this approach?

  • If there are n propositions in the KB, must

check all the 2n interpretations! Goal of proof theory

  • find sound and complete proof procedures that allow

us to prove that a logical formula follows from a KB avoiding to do the above Simple proof procedure S

  • Enumerate all interpretations
  • For each interpretation I, check whether it is a model of KB

i.e., check whether all clauses in KB are true in I

  • KB ⊦S g if g holds in all such models

66

slide-66
SLIDE 66

Botto tom-up up proof

  • of p

proc

  • cedu

edure

  • One rule of derivation, a generalized form of modus

ponens:

  • If “h ← b1 ∧ … ∧ bm" is a clause in the knowledge base,

and each bi has been derived, then h can be derived.

  • This rule also covers the case when m = 0.

67

slide-67
SLIDE 67

Botto tom-up up (BU) U) p proof

  • of p

proc

  • cedu

edure

C :={}; repeat epeat sel elect ect clause “h ← b1 ∧ … ∧ bm” in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ { h } unt until no more clauses can be selected.

KB ⊦BU

BU G if G ⊆ C at the end of this procedure

The C at the end of BU procedure is a fixed point:

  • Further applications of the rule of derivation will not

change C!

68

slide-68
SLIDE 68

C := {}; repe peat at select clause h ← b1 ∧ … ∧ bm in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ {h} unt until no more clauses can be selected.

Botto tom-up up p proof

  • of proc
  • cedu

edure: e: e exam ampl ple

a ← b ∧ c a ← e ∧ f b ← f ∧ k c ← e d ← k e. f ← j ∧ e f ← c j ← c {}

69

slide-69
SLIDE 69

C := {}; repe peat at select clause h ← b1 ∧ … ∧ bm in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ {h} unt until no more clauses can be selected.

Botto tom-up up p proof

  • of proc
  • cedu

edure: e: e exam ampl ple

a ← b ∧ c a ← e ∧ f b ← f ∧ k c ← e d ← k e. f ← j ∧ e f ← c j ← c {} {e} {c,e} {c,e,f} {c,e,f,j} {a,c,e,f,j} Done.

70