DOC PREVIEW
Stanford CS 157 - Lecture 08 - Relational Proofs

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Relational ProofsComputational Logic Lecture 8Michael Genesereth Autumn 20072Logical EntailmentA set of premises logically entails a conclusion if andonly if every interpretation that satisfies the premisesalso satisfies the conclusion.23Propositional Interpretationsp q r0 0 00 0 10 1 00 0 11 0 01 0 11 1 01 1 1For a language with n constants, there are 2n interpretations.4Relational Interpretations |i| a b r{,}   {}{,}   {}{,}   {}{,}   {, }{,}   {}{,}   {}{,}   {}{,}   {, }{,}   {}{,}   {}{,}   {}{,}   {, } . . .Infinitely many interpretations.35Logical Entailment and ProvabilityGood News: If Δ logically entails ϕ, then there is afinite proof of ϕ from Δ. And vice versa.More Good News: If Δ logically entails ϕ, it ispossible to find such a proof in finite time.Sad News: If Δ does not logically entail ϕ, theprocess of finding a proof may run forever.Not So Bad News: In many cases, the process canbe stopped after finitely many steps.6Formal ProofsA formal proof of ϕ from Δ is a sequence ofsentences terminating in ϕ in which each item iseither:1. a premise (a member of Δ)2. an instance of an axiom schema3. the result of applying a rule of inference toearlier items in the sequence.47Old Rules of InferenceModus Ponens (MP) Modus Tolens (MT)And Introduction (AI) And Elimination (AE)ϕ⇒ψϕψϕ⇒ψ¬ψ¬ϕϕ∧ψϕψϕψϕ∧ψ8Universal GeneralizationRule of InferenceExamples: p(x) p(x) ⇒ q(x) ∀x.p(x) ∀x.(p(x) ⇒ q(x))€ ϕ∀ν.ϕ59Existential GeneralizationRule of InferenceExamples: p(a) p(a) ∨ q(a) ∃x.p(x) ∃x.(p(x) ∨ q(x))€ ϕ[τ]∃ν.ϕ[ν]10Idea for Universal Instantiation€ ∀ν.ϕϕ[ν←τ]Warning: This is not quite right.611Examples∀y.hates(jane,y)hates(jane,jill) y←jillhates(jane,mother(jane)) y←mother(jane)hates(jane,y) y←yhates(jane,z) y←z∀x.∃y.hates(x,y)∃y.hates(jane,y) x←jane∃y.hates(y,y) x←y Wrong!!12BoundingA term τ is bound by ν in ϕ if and only if τ contains avariable µ 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.713SubstitutabilityA term τ is substitutable for ν in ϕ if and only if it isnot bound by ν in ϕ.Some texts say “x is free for y in ϕ” instead of “x issubstitutable 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)).14InappropriatenessAn occurrence of a term τ is inappropriate for avariable ν in ϕ if and only if τ contains a variable µand there is some free occurrence of ν in ϕ that liesin the scope of a quantifier of µ.mother(x) is inappropriate for y in ∃x.hates(x,y).815SubstitutabilityA term τ is substitutable for ν in ϕ if and only if it isnot inappropriate with ν in ϕ.Some texts say “x is free for y in ϕ” instead of “x issubstitutable 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)).16Universal Instantiation€ ∀ν.ϕϕ[ν←τ]where τ is free for ν in ϕ917Existential Instantiation I€ ∃ν.ϕϕ[ν←σ]where ∃ν.ϕ contains no free variableswhere σ is a new object constant18Examples∃y.p(y)p(c)∃y.y*y=01*1=0 Wrong!∃y.y*y=xc*c=x Wrong!c*c=4c*c=61019Existential Instantiation II€ ∃ν.ϕϕ[ν←π(τ1,...,τn)]where τ1,...,τn are free in ∃ν.ϕwhere π is a new function constant20Examples∃y.y*y=xf(x)*f(x)=xf(4)*f(4)=4f(6)*f(6)=6∃y.y*y=xsqrt(x)*sqrt(x)=xlog(x)*log(x)=x Wrong!1121Formal ProofsA formal proof of ϕ from Δ is a sequence ofsentences terminating in ϕ in which each item iseither:1. a premise (a member of Δ)2. an instance of an axiom schema3. the result of applying a rule of inference toearlier items in the sequence.22ExampleEverybody loves somebody. Everybody loves alover. Show that Jack loves Jill.1. ∀x.∃y.loves(x, y) Premise2. ∀u.∀v.∀w.(loves(v, w) ⇒ loves(u, v)) Premise3. ∃y.loves( jill, y) UI :14. loves( jill,mike) EI : 35. ∀v.∀w.(loves(v, w) ⇒ loves( jack, v)) UI : 26. ∀w.(loves( jill, w) ⇒ loves( jack, jill)) UI : 57. loves( jill,mike) ⇒ loves( jack, jill) UI : 68. loves( jack, jill) MP : 7, 41223Harry and RalphEvery horse can outrun every dog. Some greyhounds canoutrun every rabbit. Harry is a horse. Ralph is a rabbit. CanHarry outrun Ralph?1. ∀x.∀y.( h(x) ∧ d(y) ⇒ f (x, y)) Premise2. ∃y.(g(y) ∧ ∀z.(r(z) ⇒ f (y, z))) Premise3. ∀y.( g(y) ⇒ d(y)) Premise4. ∀x.∀y.∀z.( f (x, y) ∧ f (y,z) ⇒ f (x, z)) Premise5. h(harry) Premise6. r(ralph) Premise24Harry and Ralph (continued)€ 7. g(greg)∧ ∀z.(r(z) ⇒ f (greg, z)) EI : 28. g(greg) AE : 79. ∀z.(r(z) ⇒ f (greg, z)) AE : 710. r(ralph) ⇒ f (greg,ralph) UI : 911. f (greg, ralph) MP :6,1012. g(greg) ⇒ d(greg) UI : 313. d(greg) MP : 12, 814. ∀y.(h(harry)∧ d(y) ⇒ f (harry, y)) UI :115. h(harry)∧ d(greg) ⇒ f (harry, greg) UI :1416. h(harry)∧ d(greg) AI : 5,1317. f (harry, greg) MP : 15,161325Harry and Ralph (continued)18. ∀y.∀z.( f (harry, y) ∧ f (y, z) ⇒ f (harry, z)) UI : 419. ∀z.( f (harry, greg) ∧ f (greg, z) ⇒ f (harry, z)) UI :1820. f (harry, greg) ∧ f (greg, ralph) ⇒ f (harry, ralph)) UI : 1921. f (harry, greg) ∧ f (greg, ralph) AI :17,1122. f (harry, ralph) MP : 20, 2126Mendelson LogicMendelson Logic is that subset of Relational Logic inwhich there are only two operators, viz. ¬ and ⇒, andone quantifier, viz. ∀. Fortunately, all sentences inRelational Logic can be reduced to logicallyequivalent sentences with these operators by applyingthe following rules.(ψ ⇔ ϕ) → ((ϕ ⇒ ψ) ∧ (ψ ⇒ ϕ))(ϕ ⇐ ψ) → (ψ ⇒ ϕ) (ψ ∧ ϕ) → ¬(¬ϕ ⇒ ψ) (ψ ∨ ϕ) → (¬ϕ ⇒


View Full Document

Stanford CS 157 - Lecture 08 - Relational Proofs

Documents in this Course
Lecture 1

Lecture 1

15 pages

Equality

Equality

32 pages

Lecture 19

Lecture 19

100 pages

Epilog

Epilog

29 pages

Equality

Equality

34 pages

Load more
Download Lecture 08 - Relational Proofs
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 08 - Relational Proofs and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 08 - Relational Proofs 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?