CS 730/830: Intro AI First-Order Inference Semantics FOL Odds and Ends “Spock had a big, big effect on me. I am so much more Spock-like today than when I first played the part in 1965 that you wouldn’t recognize me. I’m not talking about appearance, but thought processes. Doing that character, I learned so much about rational logical thought that it reshaped my life.” – Leonard Nimoy (1931–2015) 1 handout: slides Wheeler Ruml (UNH) Lecture 13, CS 730 – 1 / 16
First-Order Inference ■ Clausal Form ■ Example ■ Break Semantics FOL Odds and Ends First-Order Inference Wheeler Ruml (UNH) Lecture 13, CS 730 – 2 / 16
Clausal Form 1. Eliminate → using ¬ and ∨ First-Order Inference 2. Push ¬ inward using de Morgan’s laws ■ Clausal Form ■ Example 3. Standardize variables apart ■ Break 4. Eliminate ∃ using Skolem functions Semantics 5. Move ∀ to front FOL Odds and Ends 6. Move all ∧ outside any ∨ (CNF) 7. Can finally remove ∀ and ∧ Wheeler Ruml (UNH) Lecture 13, CS 730 – 3 / 16
Example 1. Anyone who can read is literate. First-Order Inference 2. Dolphins are not literate. ■ Clausal Form ■ Example 3. Some dolphins are intelligent. ■ Break 4. Prove: someone intelligent cannot read. Semantics FOL Odds and Ends Skolem, standardizing apart Wheeler Ruml (UNH) Lecture 13, CS 730 – 4 / 16
Break asst 6, 7 ■ First-Order Inference preliminary proposals due at next Tuesday’s class ■ Clausal Form ■ ■ Example now is the time to talk ■ Break wait to start project until I comment on your proposal Semantics FOL Odds and Ends Wheeler Ruml (UNH) Lecture 13, CS 730 – 5 / 16
First-Order Inference Semantics ■ Semantics ■ Terminology ■ Refuatation ■ Another Example FOL Odds and Ends Semantics Wheeler Ruml (UNH) Lecture 13, CS 730 – 6 / 16
Semantics A possible world is: First-Order Inference Semantics Propositional: a truth assignment for symbols. Exponential ■ Semantics number of worlds. ■ Terminology ■ Refuatation First-order: a set of objects and an interpretation for ■ Another Example constants, functions, and predicates (fixing referent of every FOL Odds and Ends term). Unbounded number of worlds. No unique names assumption: constants not distinct. No closed world assumption: unknown facts not false. α valid iff true in every world α | = β iff β true in every model of α Wheeler Ruml (UNH) Lecture 13, CS 730 – 7 / 16
Terminology Formally, First-Order Inference Semantics Interpretation: maps constant symbols to objects in the world, ■ Semantics each function symbol to a particular function on objects, and ■ Terminology ■ Refuatation each predicate symbol to a particular relation. ■ Another Example Model of P : an interpretation in which P is true. Eg, FOL Odds and Ends Famous(LadyGaga) is true under the intended interpretation but not when the symbol LadyGaga maps to Joe Shmoe. Satisfiable: ∃ a model for P . Eg, P ∧ ¬ P is not satisfiable. Entailment: if Q is true in every model of P , then P | = Q . Eg, P ∧ Q | = P . Valid: true in any interpretation. Eg, P ∨ ¬ P . Wheeler Ruml (UNH) Lecture 13, CS 730 – 8 / 16
The Basis for Refutation Recall α | = β iff β true in every model of α . First-Order Inference Semantics 1. Assume KB | = α . ■ Semantics ■ Terminology 2. So if a model i satisfies KB, then i satisfies α . ■ Refuatation 3. If i satisfies α , then doesn’t satisfy ¬ α . ■ Another Example 4. So no model satisfies KB and ¬ α . FOL Odds and Ends 5. So KB ∧¬ α is unsatisfiable. Another way: 1. Suppose no model that satisfies KB also satisfies ¬ α . In other words, KB ∧¬ α is unsatisfiable (= inconsistent = contradictory). 2. In every model of KB, α must be true or false. 3. Since in any model of KB, ¬ α is false, α must be true in all models of KB. Resolution is not complete: cannot derive P ∧ ¬ P Wheeler Ruml (UNH) Lecture 13, CS 730 – 9 / 16
Another Example 1. Anyone whom Mary loves is a football star. First-Order Inference 2. Any student who does not pass does not play. Semantics ■ Semantics 3. John is a student. ■ Terminology 4. Any student who does not study does not pass. ■ Refuatation ■ Another Example 5. Anyone who does not play is not a football star. FOL Odds and Ends 6. Prove: If John does not study, then Mary does not love John. Wheeler Ruml (UNH) Lecture 13, CS 730 – 10 / 16
First-Order Inference Semantics FOL Odds and Ends ■ Completeness ■ Equality ■ Specific Answers ■ Res. Strategies ■ EOLQs FOL Odds and Ends Wheeler Ruml (UNH) Lecture 13, CS 730 – 11 / 16
Refutation Completeness G¨ odel’s Completeness Theorem (1930) says a complete set of First-Order Inference inference rules exists for FOL. Semantics FOL Odds and Ends Herbrand base: substitute all constants and combinations of ■ Completeness ■ Equality constants and functions in place of variables. Potentially infinite! ■ Specific Answers ■ Res. Strategies Herbrand’s Theorem (1930): If a set of clauses is unsatisfiable, ■ EOLQs then there exists a finite subset of the Herbrand base that is also unsatisfiable. Ground Resolution Theorem: If a set of ground clauses is unsatisfiable, then the resolution closure of those clauses contains ⊥ . Robinson’s Lifting Lemma (1965): If there is a proof on ground clauses, there is a corresponding proof in the original clauses. FOL is semi-decidable: if entailed, will eventually know Wheeler Ruml (UNH) Lecture 13, CS 730 – 12 / 16
Equality Equality: ∀ xy ( Holding ( x ) ∧ ¬ ( x = y ) → ¬ Holding ( y )) First-Order Inference Semantics FOL Odds and Ends Unique: ∃ ! xP ( x ) ≡ ∃ x ( P ( x ) ∧ ∀ y ( ¬ ( x = y ) → ¬ P ( y ))) ■ Completeness ■ Equality ■ Specific Answers ■ Res. Strategies ■ EOLQs Wheeler Ruml (UNH) Lecture 13, CS 730 – 13 / 16
Specific Answers Use the “answer literal”: First-Order Inference Semantics 1. FatherOf(Alice, Bob) FOL Odds and Ends ■ Completeness 2. FatherOf(Caroline, Bob) ■ Equality 3. FatherOf(x, y) → ParentOf(x, y) ■ Specific Answers ■ Res. Strategies ■ EOLQs Query: Who is Caroline’s parent? Wheeler Ruml (UNH) Lecture 13, CS 730 – 14 / 16
Resolution Strategies Breadth-first: all first-level resolvents, then second-level... First-Order Inference Semantics Complete, slow ■ FOL Odds and Ends Set of Support: at least one parent comes from SoS ■ Completeness ■ Equality Complete if non-SoS are satisfiable, nice ■ Specific Answers ■ ■ Res. Strategies ■ EOLQs Input Resolution: at least one parent from the input set Complete for Horn KBs ■ Simplifications: remove tautologies, subsumbed clauses, and pure literals. Wheeler Ruml (UNH) Lecture 13, CS 730 – 15 / 16
EOLQs Please write down the most pressing question you have about First-Order Inference the course material covered so far and put it in the box on your Semantics way out. FOL Odds and Ends ■ Completeness Thanks! ■ Equality ■ Specific Answers ■ Res. Strategies ■ EOLQs Wheeler Ruml (UNH) Lecture 13, CS 730 – 16 / 16
Recommend
More recommend