Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relational Proofs Computational Logic Lecture 7

Similar presentations


Presentation on theme: "Relational Proofs Computational Logic Lecture 7"— Presentation transcript:

1 Relational Proofs Computational Logic Lecture 7
Michael Genesereth Autumn 2011

2 Logical Entailment A set of premises  logically entails a conclusion  ( |= ) if and only if every interpretation that satisfies  also satisfies .

3 Propositional Interpretations
For a language with n constants, there are 2n interpretations.

4 Relational Interpretations
|i| a b r {,}   {} {,}   {} {,}   {} {,}   {, } {,}   {} {,}   {} {,}   {} {,}   {, } {,}   {} {,}   {} {,}   {} {,}   {, } . . . Infinitely many interpretations!

5 Logical Entailment and Provability
Good News: If  logically entails , then there is a finite proof of  from . And vice versa. More Good News: If  logically entails , it is possible to find such a proof in finite time. Sad News: If  does not logically entail , the process of finding a proof may run forever. Not So Bad News: In many cases, the process can be stopped after finitely many steps.

6 Formal Proofs A formal proof of  from  is a sequence of sentences terminating in  in which each item is either: 1. a premise (a member of ) 2. an instance of an axiom schema 3. the result of applying a rule of inference to earlier items in the sequence.

7 Old Rules of Inference Modus Ponens (MP) Modus Tolens (MT)
And Introduction (AI) And Elimination (AE)

8 Universal Generalization
Rule of Inference Examples: p(x) p(x)  q(x) x.p(x) x.(p(x)  q(x))

9 Existential Generalization
Rule of Inference Examples: p(a) p(a)  q(a) x.p(x) x.(p(x)  q(x))

10 Idea for Universal Instantiation
Warning: This is not quite right.

11 Examples y.hates(jane,y) hates(jane,jill) yjill
hates(jane,mother(jane)) ymother(jane) hates(jane,y) yy hates(jane,z) yz x.y.hates(x,y) y.hates(jane,y) xjane y.hates(y,y) xy Wrong!!

12 mother(x) is bound by y in x.hates(x,y).
Bounding A term  is bound by  in  if and only if  contains a variable  and there is some free occurrence of  in  and that occurrence lies in the scope of a quantifier of . mother(x) is bound by y in x.hates(x,y). Why? The term mother(x) contains a variable x. There is a free occurrence of y in x.hates(x,y). That occurrence of y lies in scope of quantifier of x.

13 Substitutability A term  is substitutable for  in  if and only if it is not bound by  in . Some texts say “x is free for y in ” instead of “x is substitutable for y in ”. mother(jane) is free for y in hates(jane,y). mother(x) is free for y in hates(jane,y). mother(x) is free for y in z.hates(z,y). mother(x) is not free for y in x.hates(x,y). mother(x) is free for y in (x.y.l(x,y)  z.h(z,y)).

14 Universal Instantiation

15 Existential Instantiation I

16 Examples y.p(y) p(c) y.y*y=0 1*1=0 Wrong! y.y*y=x c*c=x Wrong!

17 Existential Instantiation II

18 Examples y.y*y=x f(x)*f(x)=x f(4)*f(4)=4 f(6)*f(6)=6
sqrt(x)*sqrt(x)=x log(x)*log(x)=x Wrong!

19 Formal Proofs A formal proof of  from  is a sequence of sentences terminating in  in which each item is either: 1. a premise (a member of ) 2. an instance of an axiom schema 3. the result of applying a rule of inference to earlier items in the sequence.

20 Example Everybody loves somebody. Everybody loves a lover. Show that Jack loves Jill.

21 Harry and Ralph Every horse can outrun every dog. Some greyhounds can outrun every rabbit. Harry is a horse. Ralph is a rabbit. Can Harry outrun Ralph?

22 Harry and Ralph (continued)

23 Harry and Ralph (continued)

24 Mendelson Logic Mendelson Logic is that subset of Relational Logic in which there are only two operators, viz.  and , and one quantifier, viz. . Fortunately, all sentences in Relational Logic can be reduced to logically equivalent sentences with these operators by applying the following rules. (  )  ((  )  (  )) (  )  (  ) (  )  (  ) (  )  (  ) . .

25 Mendelson Rules of Inference
Modus Ponens (MP) Universal Generalization (UG)

26 Mendelson Axiom Schemata
II:   (  ) ID: (  (  ))  ((  )  (  )) CR: (  )  ((  )  ) (  )  ((  )  ) UD: .(  )  (. .) UI: .  [] where  is free for  in 

27 Provability A relational sentence  is provable from a set of relational sentences  if and only if there is a finite formal proof of  from  using only Modus Ponens, Universal Generalization, and the Mendelson axiom schemata.

28 Soundness and Completeness
Soundness Theorem: If  is provable from , then  logically entails . Completeness Theorem (Godel): If  logically entails , then  is provable from .

29 Propositional Metatheorems
Propositional Deduction Theorem:  |- (  ) if and only if {} |- . Propositional Substitution Theorem:  |- (  ) and  |- , then it is the case that  |- . Propositional Chaining Theorem: If  |- (  ) and  |- (  ), then  |- (  ).

30 Results Bad News: As stated, none of these hold for Relational Logic.
Good News: Variations of these metatheorems do hold.

31 Deduction Theorem Propositional Deduction Theorem:  |- (  ) if and only if {} |- . : {} : p(x) : x.p(x) It is easy to show that {p(x)} |- x.p(x). One application of Universal Generalization. What about  |- (p(x)  x.p(x))? This is equivalent to  |- (x.p(x)  x.p(x))? Obviously, can be false.

32 Relational Deduction Theorem
Relational Deduction Theorem: If  has no free variables, then  |- (  ) if and only if {} |- .


Download ppt "Relational Proofs Computational Logic Lecture 7"

Similar presentations


Ads by Google