Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Resolution Proof System for First Order Logic
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Knowledge Representation Methods
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
First-Order Logic. Limitations of propositional logic Suppose you want to say “All humans are mortal” –In propositional logic, you would need ~6.7 billion.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference and Resolution for Problem Solving
Knoweldge Representation & Reasoning
Predicate Calculus.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
UIUC CS 497: Section EA Lecture #3 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Logical Agents Logic Propositional Logic Summary
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
CS6133 Software Specification and Verification
C. Varela1 Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Carlos Varela Rennselaer Polytechnic Institute November.
Reasoning using First-Order Logic
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
First-Order Logic Chapter 8 (not 8.1). Outline Why FOL? Why FOL? Syntax and semantics of FOL Syntax and semantics of FOL Using FOL Using FOL Wumpus world.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Introduction to Logic for Artificial Intelligence Lecture 2
Knowledge Representation using First-Order Logic
First-Order Logic Chapter 8.
Logical Inference: Through Proof to Truth
First-Order Logic Chapter 8.
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
Horn Clauses and Unification
Search techniques.
Predicates and Quantifiers
CSNB234 ARTIFICIAL INTELLIGENCE
Chapter 1: Propositional and First-Order Logic
RESOLUTION.
First-Order Logic Chapter 8.
Resolution Proof System for First Order Logic
Presentation transcript:

Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #9

Last Time: First-order logic First-order logic (FOL) models the world Vocabulary: object-Constant symbols, Predicate symbols, Function symbols Connectives: &, v, ~, … Quantifiers: Exists (  x), For-all (  x) Interpretations Models

First-Order Theories Vocabulary L: –Function symbols (f(x,y)) –Predicate (relation) symbols (P(x,A)) –Constant symbols (A,B,C,…) FOL language: quantification over objects

Quantifier Scope Switching the order of universal quantifiers does not change the meaning: –(  x)(  y)P(x,y) (  y)(  x) P(x,y) Similarly, you can switch the order of existential quantifiers: –(  x)(  y)P(x,y) (  y)(  x) P(x,y) Switching the order of universals and existential does change meaning: –Everyone likes someone: (  x)(  y) likes(x,y) –Someone is liked by everyone: (  y)(  x) likes(x,y)

Quantifiers Universal quantifiers are often used with “implies” to form “rules”: –(  x) student(x) => smart(x) means “All students are smart” Universal quantification is rarely used to make blanket statements about every individual in the world: –(  x)student(x)^smart(x) means “Everyone in the world is a student and is smart” Existential quantifiers are usually used with “and” to specify a list of properties about an individual: –(  x) student(x) ^ smart(x) means “There is a student who is smart” A common mistake is to represent this English sentence as the FOL sentence: –(  x) student(x) => smart(x) What’s the problem?

Model Theory Structure/Interpretation: –U = Universe of elements –I = Mapping of Constant symbols to elements in U Predicate symbols to relations over U Function symbols to functions over U M T - M satisfies T –T is a theory, i.e., a set of FOL sentences in language L for which M is an interpretation ╨

Logical Entailment ? ╨     ╨  L={man, woman, loves} M 1 = U 1 ={Sue,Kim,Pat} I 1 [man]={Pat} I 1 [woman]={Sue,Kim} I 1 [loves]={, } ? M1  ╨ ╨ 

Deduction Theorem Theorem: For FOL sentences A,B, A|=B iff |= A  B Equivalent Theorem: For FOL sentences A,B, A|=B iff A&-B is not satisfiable Reason: A&-B  -(A  B)

Connections between All and Exists We can relate sentences involving  and  using De Morgan’s laws: (  x) ~P(x) ~(  x) P(x) ~(  x)P(x) (  x) ~P(x) (  x) P(x) ~ (  x) ~P(x) (  x) P(x) ~(  x) ~P(x)

Reasoning in FOL Goal: for theory T and query Q –Check if T |= Q –Notice: T |= Q iff T & -Q is satisfiable Algorithm: 1.Convert T & -Q to Clausal form 2.Run Resolution algorithm 3.If resolution returns FALSE, we return TRUE

Clausal Form Every FOL formula is consistency- equivalent to conjunction of F.O. clauses. First-order clause –Only universal quantifiers (which are implicit) –Disjunction of literals (atoms or their negation)

Conversion to Clausal Form 1.“  ” replaced by “  ”, ”  ” 2.Negations in front of atoms 3.Standardize variables (unique vars.) 4.Eliminate existentials (Skolemization) 5.Drop all universal quantifiers 6.Move disjunctions in (put into CNF) 7.Rename vars. (standardize vars. apart)

Take a Breath Until now: –First-order logic basics –How to convert a general FOL sentence to clausal form From now: Resolution theorem proving –Search in the space of proofs Later: Temporal reasoning

Next Time Reasoning procedure for FOL –Proving entailment using Resolution

Axioms, definitions and theorems Axioms are facts and rules that attempt to capture all of the (important) facts and concepts about a domain; axioms can be used to prove theorems –Mathematicians don’t want any unnecessary (dependent) axioms –ones that can be derived from other axioms –Dependent axioms can make reasoning faster, however –Choosing a good set of axioms for a domain is a kind of design problem A definition of a predicate is of the form “p(X) …” and can be decomposed into two parts –Necessary description: “p(x) => …” –Sufficient description “p(x) <= …” –Some concepts don’t have complete definitions (e.g., person(x))

Axioms for Set Theory in FOL 1. The only sets are the empty set and those made by adjoining something to a set:  s set(s) (s=EmptySet) v (  x,r Set(r) ^ s=Adjoin(s,r)) 2. The empty set has no elements adjoined to it: ~  x,s Adjoin(x,s)=EmptySet 3. Adjoining an element already in the set has no effect:  x,s Member(x,s) s=Adjoin(x,s) 4. The only members of a set are the elements that were adjoined into it:  x,s Member(x,s)  y,r (s=Adjoin(y,r) ^ (x=y  Member(x,r))) 5. A set is a subset of another iff all of the 1st set’s members are members of the 2nd:  s,r Subset(s,r) (  x Member(x,s) => Member(x,r)) 6. Two sets are equal iff each is a subset of the other:  s,r (s=r) (subset(s,r) ^ subset(r,s)) 7. Intersection  x,s1,s2 member(X,intersection(S1,S2)) member(X,s1) ^ member(X,s2) 8. Union  x,s1,s2 member(X,union(s1,s2)) member(X,s1)  member(X,s2)

Model Checking Given an interpretation, how do we decide if it satisfies a formula (i.e., gives it a truth value of TRUE)? What happens when the formula is not closed?

Proof and Theorems Axiom systems and rule systems –Propositional axioms: -A v A –Substitution axioms: A x [a]   xA –Identity axioms: x=x –Equality axioms: x1=y1  …  xn=yn  f(x1,…,xn)=f(y1,…,yn) x1=y1  …  xn=yn  p(x1,…,xn)  p(y1,…,yn) Rules:...

Proof and Theorems Axiom systems and rule systems –… Rules: –Expansion Rule: Infer BvA from A –Contraction Rule: Infer A from AvA –Associative Rule: Infer (AvB)vC from Av(BvC) –Cut Rule: Infer BvC from AvB and –AvC –  -introduction rule: If x not free in B, then infer  xA  B from A  B

Proofs and Theorems Nonlogical axioms: Axioms made for a certain theory Proofs – what are they? Completeness, Soundness (of an inference procedure) Incompleteness of FOL (as a language) for some intended models