Today Recall CWA Given a KB written in first-order logic, we augment - - PowerPoint PPT Presentation

today recall cwa
SMART_READER_LITE
LIVE PREVIEW

Today Recall CWA Given a KB written in first-order logic, we augment - - PowerPoint PPT Presentation

1 2 Today Recall CWA Given a KB written in first-order logic, we augment KB to get a bigger set of Domain Closure formulas CWA ( KB ) ; the extra formulas we add are: Circumscription X KB = { p ( t 1 , . . . , t n ) : not KB p ( t


slide-1
SLIDE 1

1

Today

  • Domain Closure
  • Circumscription

See Brachman and Levesque, Ch 11

Alan Smaill KRI l8 Jan 31 2008 2

Recall CWA

Given a KB written in first-order logic, we augment KB to get a bigger set of formulas CWA(KB); the extra formulas we add are: XKB = { ¬p(t1, . . . , tn) : not KB ⊢ p(t1, . . . , tn) } a formula Q follows from KB using the CWA iff KB ∪ XKB | = Q

Alan Smaill KRI l8 Jan 31 2008 3

Quantifiers and Domain Closure

If we have a KB with a bunch of concrete statements (say of which areas adjoin each other), then CWA lets us get another bunch of negated statements (of areas that do not adjoin each other). Suppose there is an area that does not adjoin any other area (Na h-Eileanan Siar); CWA will give us a statement for every other area that it does not adjoin; but we cannot deduce the universally quantified statement ∀x ¬adjoin(eileanan siar, x). (Why?) The Domain Closure assumption says that every individual in the domain is named by some constant in the KB language: ∀x (x = c1 ∨ x = c2 ∨ · · · ∨ x = cn)

Alan Smaill KRI l8 Jan 31 2008 4

Domain Closure

Write KB | =CD P if P follows from KB using both CWA and Domain Closure

  • Assumption. Now it follows that

KB | =CD ∀x A(x) iff KB | =CD A(ci) for every constant ci KB | =CD ∃x A(x) iff KB | =CD A(ci) for some constant ci and this means that the extended KB is complete for sentences (formulas that may have quantifiers, but all variables are bound by some quantifier): for any such P KB | =CD P or else KB | =CD ¬P

Alan Smaill KRI l8 Jan 31 2008

slide-2
SLIDE 2

5

Unique Names Assumption

If we want to reason about how many objects have a certain property, as in database theory, then we can use the Unique Names Assumption that for any two different constants ci, cj adds the statement ci = cj (this is just shorthand for ¬ci = cj). Now we can reason using equality (we do not explore this here). Note that for both Domain Closure and Unique Names Assumption, we assumed that there are only finitely many constants in the language. This is not always the case. Note also that Domain Closure can take us from a consistent to an inconsistent KB.

Alan Smaill KRI l8 Jan 31 2008 6

Circumscription

What we want (McCarthy): A combination of

  • First order logic –

rules of inference

  • Circumscription –

rule of conjecture In Predicate Circumscription, objects satisfy the predicate only if they have to; in Domain Circumscription, “known” entities are the only ones that exist.

Alan Smaill KRI l8 Jan 31 2008 7

Using Circumscription

  • Plan on the basis of known facts, and use circumscription;
  • Update with new information.

Example There are 3 missionaries and 3 cannibals. A boat seating 2 is present. They all want to cross the river. If the Cs outnumber the Ms, the Ms will be eaten. How can the Cs and Ms cross the river?

Alan Smaill KRI l8 Jan 31 2008 8

Example ctd

How can we formalise and solve the problem, so that the solution can be shown to be logically correct? There are some Problems.

  • Background Assumptions

– Boat can cross the river. – Objects are at a single place. – etc

  • Incomplete Description

– Is there a bridge? – Can they swim across the river? – Does the boat leak? – etc

Alan Smaill KRI l8 Jan 31 2008

slide-3
SLIDE 3

9

Using Circumscription

To get a logical deduction, we need that

  • nothing can go wrong with the boat;
  • no other way of crossing the river

Here we can use a standard KB, together with circumscription (eg there is no bridge (unless one is mentioned)). Unlike CWA, look at particular predicate and make the assumption that the set

  • f entities for which the predicate holds is minimal: that there is no smaller set

that can have the property consistently with the given KB.

Alan Smaill KRI l8 Jan 31 2008 10

Computing Circumscription

Second order logic allows quantification over predicates. First-order statement: ∀x ∃y y > x Second-order statement: ∀P (P(0) ∧ ∀x (P(x) → P(s(x))) → ∀y P(y) The second-order quantifier says this holds for any predicate; we can conclude, for example, 0 + z = z + 0 ∧ ∀x (x + z = z + x) → (s(x) + z = z + s(x)) → ∀y (y + z = z + y)

Alan Smaill KRI l8 Jan 31 2008 11

Second Order Logic

Second order logic is more expressive and less tractable than first order logic. Using second order logic, we can write the circumscription of some formulas T with respect to a predicate P as CIRC(T, P) = T ∪ { CA } where the circumscription axiom CA is ∀P ′ T(P ′) ∧ ∀x (P ′(x) → P(x)) → ∀x (P ′(x) ↔ P(x)) Here T(P ′) is T with each occurrence of P replaced with P ′.

Alan Smaill KRI l8 Jan 31 2008 12

Circumscription Axiom

Abbreviate: P ≤ Q ↔def ∀x (P(x) → Q(x)) P = Q ↔def ∀x (P(x) ↔ Q(x)) Then the circumscription axiom is ∀P ′ T(P ′) ∧ P ′ ≤ P → P = P ′

Alan Smaill KRI l8 Jan 31 2008

slide-4
SLIDE 4

13

Second Order Substitution

An example of replacing a predicate: suppose that KB(P) is P(0, 1) ∀x ∃y P(x, y) Let P ′(v, w) ↔def v2 < w. Then KB(P ′) is given by 02 < 1 ∀x ∃y x2 < y We can define this formally in the λ-calculus.

Alan Smaill KRI l8 Jan 31 2008 14

First-Order Test

Suppose that P ′ can be defined without mentioning P. if KB(P) ⊢ KB(P ′) ∧ P ′ ≤ P then CIRC(KB, P) = KB(P) ∪ { P = P ′ } So if we can guess P ′, we can verify that it is correct, just using standard first-order logic.

Alan Smaill KRI l8 Jan 31 2008 15

Example

Given KB as P(a) ∀x (Q(x) → P(x)) Guess P ′(x) ↔def (Q(x) ∨ x = a), and apply the test. KB(P ′) is given by Q(a) ∨ a = a ∀x (Q(x) → (Q(x) ∨ x = a)))

Alan Smaill KRI l8 Jan 31 2008 16

Checking

We need to show

  • KB(P) ⊢ KB(P ′)

– this doesn’t need the l.h.s.

  • KB(P) ⊢ P ′ ≤ P

ie KB(P) ⊢ ∀x ((Q(x) ∨ x = a) → P(x)) which can be checked.

Alan Smaill KRI l8 Jan 31 2008

slide-5
SLIDE 5

17

Enlarged theory

Thus: CIRC(KB, P) = KB ∪ { P = P ′ } = KB ∪ { ∀x P(x) ↔ (Q(x) ∨ x = a) } Note that the Circumscription Axiom is a first-order formula here, so we can use standard inference techniques. There are cases where there is no first-order circumscription axiom possible.

Alan Smaill KRI l8 Jan 31 2008 18

Example

Suppose KB is as follows. ∀x s(x) = 0 ∀x ∀y s(x) = s(y) → x = y N(s(0)) ∀x N(x) → N(s(x)) We cannot decide the query N(0) from this KB. Consider CIRC(KB, N) – here we can show ¬N(0). In this case, there is no first-order CA.

Alan Smaill KRI l8 Jan 31 2008 19

Fact

First-order logic is compact – if Th | = Q then there is a finite Th′ ⊂ Th s.t. Th′ | = Q Why? Since we have sound and complete proof systems Th | = Q iff T ⊢I Q and derivations are finite, so only mention finitely many axioms.

Alan Smaill KRI l8 Jan 31 2008 20

No First-Order CA

So, if Th is inconsistent, then so is a finite subset of Th (why?) Now look at the union of CIRC(KB, N) with {N(a), a = s(0), a = s(s(0), a = s(s(s(0))), . . . } Any finite subset is consistent; but the whole set is not, since CIRC(KB, N) says that the set of objects with property N is exactly {s(0), s(s(0)), s(s(s(0))), . . . }. So there is no first-order formula that works here.

Alan Smaill KRI l8 Jan 31 2008

slide-6
SLIDE 6

21

Separable predicates

Say a formula is separable for predicate P if

  • there are no positive occurrences of P; or
  • formula is of the form

∀x (E(x) → P(x)) where E(x) has no occurrences of P; or

  • it is the conjunction or disjunction of separable formulas.

This is quite a wide class; for these formulas, the CA can be computed.

Alan Smaill KRI l8 Jan 31 2008 22

Summary

  • Domain Closure
  • Unique Names Assumption
  • Predicate Circumscription

Alan Smaill KRI l8 Jan 31 2008