Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9
CS 471/598 by H. Liu2 Inference with quantifiers zPrevious Rules for propositional logic yModus Ponens yAnd-Elimination yAnd-Introduction yOr-Introduction yResolution (Fig 6.13, p 172) zThree more rules with SUBST( , ) y - binding list, - sentence ySUBST({x/Sam},Sibling(x,John)) = Sibling(Sam,John)
CS 471/598 by H. Liu3 Three new rules zUniversal Elimination For any sentence s, variable v, and ground term g, zExistential Elimination For any s, v, and constant k new to KB, zExistential Introduction For any s, v !in s, g in s,
CS 471/598 by H. Liu4 An example proof The law says that it is a crime for an American to sell weapons to hostile nations. The country Nono, an enemy of America, has some missiles, and all of its missiles were sold to it by Colonel West, who is American. zTo prove (infer) that West is a criminal.
CS 471/598 by H. Liu5 Example (continued) zThe proof is very LONG for such a simple problem. zThe branching factor increases as KB grows. zUniversal Elimination has an enormous branching factor. zCombining atomic sentences to conjunctions, instantiating universal rules to match, then applying Modus Ponens
CS 471/598 by H. Liu6 Generalized Modus Ponens z? zIt takes bigger steps in inference zIt’s focused - not randomly trying UEs zIt uses precompilation done once and for all
CS 471/598 by H. Liu7 Canonical form zEach sentence in the KB is either an atomic sentence or an implication - Horn sentences yWhat does each sentence look like? zPrecompiltion to convert sentences into Horn sentences using Existential- and And-Elimination yAn example? zHow about universal quantifiers?
CS 471/598 by H. Liu8 Unification zUNIFY (p,q)= (unifier - the binding list) where SUBST( ,p) = SUBST( ,q) zSome examples: Unifying Knows(Jo,x) with yKnows(Jo,Ja)Knows(y,Le)Knows(y,Mother(y)) yKnows(x,E) zRename one sentence to avoid name clashes zMost general unifier zRevisit the proof example...
CS 471/598 by H. Liu9 Revisit the proof zNotice the first 9 sentences yCanonical form zThe 4-step proof zSignificantly easier using GMP zHow to use GMP?
CS 471/598 by H. Liu10 Forward chaining zStart with the KB and generate new conclusions zFC is usually used when a new fact is added into the KB -> any new consequences zAlgorithm FC yRenaming - Knows(x,Liz), Knows(y,Liz) yComposition - Compose(Θ 1,Θ 2 ) applying each subst in turn zAn example of adding facts one by one into KB with four rules
CS 471/598 by H. Liu11 Backward chaining zStart with something to be proved and find implication sentences to conclude it zBC is used when there is a goal to be proved zAlgorithm BC zAn example of answering who is criminal - Criminal(x)
CS 471/598 by H. Liu12 Completeness zAn incomplete proof procedure - there are sentences entailed by the KB, the procedure cannot find them. zSignificance of completeness (Math) yAll conjectures can be established mechanically yWe only need a set of fundamental axioms zSignificance to AI - a machine can solve any problem that can be stated in FOL zLook for a complete proof procedure
CS 471/598 by H. Liu13 Completeness theorem zIf KB , then KB R - Godel’s completeness theorem zWhat’s the procedure R ? z“There exists one” does tell us which one zResolution algorithm is one zEntailment in FOL is semidecidable: We can show sentences follow, if they do; but we can’t always show if they don’t.
CS 471/598 by H. Liu14 Resolution zResolution inference rule yGeneralized resolution (implications)
CS 471/598 by H. Liu15 Canonical forms for resolution zConjunctive normal form (CNF) yThe KB is one big, implicit conjunctions zImplicative normal form (INF) zCNF and INF are notational variants zResolution is a generalization of MP yRight hand side can be a disjunction yCan it combine atoms?
CS 471/598 by H. Liu16 Resolution proofs zIt can be used in forward- or backward chaining zRemoving redundant disjunct - Factoring zBack to our earlier KB that can’t be handled by chaining with Modus Ponens: yHow do we start? zChaining with resolution is more powerful, but it’s still not complete yP v !P with an empty KB, we can’t apply Resolution
CS 471/598 by H. Liu17 Refutation zResolution gives a simple, sound, complete way to apply Refutation - proof by contradiction 1. Negate what is to be proved 2. Add it into the KB 3. Apply resolution until we arrive at a contradiction zProve S(A) yNegate it, !S(A)
CS 471/598 by H. Liu18 Conversion to normal form 1. Eliminate implications 2. Move NOT inwards 3. Standardize variables 4. Move quantifiers left 5. Skolemize - removing E-Quantifier introducing a function associated with the variable 6. Distribute ^ over v 7. Flatten nested conjunctions & disjunctions 8. Convert disjunctions to implications (optional)
CS 471/598 by H. Liu19 Example proof Jack owns a dog. Every dog owner is an animal lover. No animal lover kills an animal. Either Jack or Curiosity killed the cat, who is named Tuna. Did Curiosity kill the cat?
CS 471/598 by H. Liu20 Resolution strategies zTo guide the fast proof using refutation yUnit preference xPrefer inferences that produce shorter sentences ySet of support xUse the negated query as the set of support yInput resolution xCombines one of the input sentences (KB or Q) ySubsumption xKeeps KB small by eliminating all sentences that are subsumed by an existing sentence
CS 471/598 by H. Liu21 Completeness of resolution
CS 471/598 by H. Liu22 Summary zSimple FOL proofs are complex and long zGeneralized MP is natural and powerful, used in forward or backward chaining zGeneralized resolution is more general than generalized MP, but not complete zRefutation using resolution is complete zThere are strategies to guide search