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 1 , . . . , t n ) } See Brachman and Levesque, Ch 11 a formula Q follows from KB using the CWA iff KB ∪ X KB | = Q Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008 3 4 Quantifiers and Domain Closure Domain Closure If we have a KB with a bunch of concrete statements (say of which areas adjoin Write KB | = CD P if P follows from KB using both CWA and Domain Closure each other), then CWA lets us get another bunch of negated statements (of Assumption. Now it follows that 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 KB | = CD ∀ x A ( x ) iff KB | = CD A ( c i ) for every constant c i every other area that it does not adjoin; but we cannot deduce the universally quantified statement KB | = CD ∃ x A ( x ) iff KB | = CD A ( c i ) for some constant c i and this means that the extended KB is complete for sentences (formulas that ∀ x ¬ adjoin ( eileanan siar, x ) . may have quantifiers, but all variables are bound by some quantifier): for any (Why?) The Domain Closure assumption says that every individual in the such P domain is named by some constant in the KB language: KB | = CD P or else KB | = CD ¬ P ∀ x ( x = c 1 ∨ x = c 2 ∨ · · · ∨ x = c n ) Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008
5 6 Unique Names Assumption Circumscription If we want to reason about how many objects have a certain property, as in What we want (McCarthy): database theory, then we can use the Unique Names Assumption that for any A combination of two different constants c i , c j adds the statement c i � = c j (this is just shorthand for ¬ c i = c j ). • First order logic – rules of inference Now we can reason using equality (we do not explore this here). Note that for both Domain Closure and Unique Names Assumption, we assumed • Circumscription – that there are only finitely many constants in the language. This is not always rule of conjecture the case. Note also that Domain Closure can take us from a consistent to an inconsistent In Predicate Circumscription, objects satisfy the predicate only if they have to; KB. in Domain Circumscription, “known” entities are the only ones that exist. Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008 7 8 Using Circumscription Example ctd How can we formalise and solve the problem, so that the solution can be shown • Plan on the basis of known facts, and use circumscription; to be logically correct? There are some Problems . • Background Assumptions • Update with new information. – Boat can cross the river. – Objects are at a single place. Example – etc There are 3 missionaries and 3 cannibals. A boat seating 2 is present. • Incomplete Description They all want to cross the river. If the Cs outnumber the Ms, the Ms will – Is there a bridge? be eaten. – Can they swim across the river? How can the Cs and Ms cross the river? – Does the boat leak? – etc Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008
9 10 Computing Circumscription Using Circumscription To get a logical deduction, we need that Second order logic allows quantification over predicates. First-order statement: • nothing can go wrong with the boat; ∀ x ∃ y y > x Second-order statement: • no other way of crossing the river ∀ P ( P (0) ∧ ∀ x ( P ( x ) → P ( s ( x ))) → ∀ y P ( y ) Here we can use a standard KB, together with circumscription ( eg there is no bridge (unless one is mentioned)). The second-order quantifier says this holds for any predicate; we can conclude, Unlike CWA, look at particular predicate and make the assumption that the set for example, of entities for which the predicate holds is minimal : that there is no smaller set 0 + z = z + 0 ∧ that can have the property consistently with the given KB. ∀ x ( x + z = z + x ) → ( s ( x ) + z = z + s ( x )) → ∀ y ( y + z = z + y ) Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008 11 12 Second Order Logic Circumscription Axiom Second order logic is more expressive and less tractable than first order logic. Abbreviate: Using second order logic, we can write the circumscription of some formulas T with respect to a predicate P as P ≤ Q ↔ def ∀ x ( P ( x ) → Q ( x )) CIRC ( T, P ) = T ∪ { CA } P = Q ↔ def ∀ x ( P ( x ) ↔ Q ( x )) where the circumscription axiom CA is ∀ P ′ T ( P ′ ) ∧ ∀ x ( P ′ ( x ) → P ( x )) Then the circumscription axiom is → ∀ x ( P ′ ( x ) ↔ P ( x )) ∀ P ′ T ( P ′ ) ∧ P ′ ≤ P → P = P ′ Here T ( P ′ ) is T with each occurrence of P replaced with P ′ . Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008
13 14 Second Order Substitution First-Order Test Suppose that P ′ can be defined without mentioning P . An example of replacing a predicate: suppose that KB ( P ) is if P (0 , 1) KB ( P ) ⊢ KB ( P ′ ) ∧ P ′ ≤ P ∀ x ∃ y P ( x, y ) then CIRC ( KB, P ) = KB ( P ) ∪ { P = P ′ } Let P ′ ( v, w ) ↔ def v 2 < w . So if we can guess P ′ , we can verify that it is correct, just using standard Then KB ( P ′ ) is given by first-order logic. 0 2 < 1 ∀ x ∃ y x 2 < y We can define this formally in the λ -calculus. Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008 15 16 Example Checking Given KB as We need to show • KB ( P ) ⊢ KB ( P ′ ) P ( a ) – this doesn’t need the l.h.s. ∀ x ( Q ( x ) → P ( x )) • KB ( P ) ⊢ P ′ ≤ P ie Guess P ′ ( x ) ↔ def ( Q ( x ) ∨ x = a ) , and apply the test. KB ( P ′ ) is given by KB ( P ) ⊢ ∀ x (( Q ( x ) ∨ x = a ) → P ( x )) Q ( a ) ∨ a = a ∀ x ( Q ( x ) → ( Q ( x ) ∨ x = a ))) which can be checked. Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008
17 18 Example Enlarged theory Suppose KB is as follows. Thus: CIRC ( KB, P ) KB ∪ { P = P ′ } ∀ x s ( x ) � = 0 = ∀ x ∀ y s ( x ) = s ( y ) → x = y = KB ∪ N ( s (0)) { ∀ x P ( x ) ↔ ( Q ( x ) ∨ x = a ) } ∀ x N ( x ) → N ( s ( x )) Note that the Circumscription Axiom is a first-order formula here, so we can use We cannot decide the query N (0) from this KB. standard inference techniques. Consider CIRC ( KB, N ) – here we can show ¬ N (0) . There are cases where there is no first-order circumscription axiom possible. In this case, there is no first-order CA. Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008 19 20 Fact No First-Order CA First-order logic is compact – if So, if Th is inconsistent, then so is a finite subset of Th (why?) Now look at the union of CIRC ( KB, N ) with Th | = Q then there is a finite Th ′ ⊂ Th s.t. { N ( a ) , a � = s (0) , a � = s ( s (0) , a � = s ( s ( s (0))) , . . . } Th ′ | = Q 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 Why? Since we have sound and complete proof systems { s (0) , s ( s (0)) , s ( s ( s (0))) , . . . } . Th | = Q iff T ⊢ I Q So there is no first-order formula that works here. and derivations are finite , so only mention finitely many axioms. Alan Smaill KRI l8 Jan 31 2008 Alan Smaill KRI l8 Jan 31 2008
21 22 Separable predicates Summary Say a formula is separable for predicate P if • Domain Closure • there are no positive occurrences of P ; or • Unique Names Assumption • formula is of the form • Predicate Circumscription ∀ 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 Alan Smaill KRI l8 Jan 31 2008
Recommend
More recommend