Converting arbitrary wffs to CNF A wff is in prenex form iff it consists of a string of quantifiers (called a prefix) followed by a quantifier free formula.

Slides:



Advertisements
Similar presentations
Resolution Proof System for First Order Logic
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
Inference Rules Universal Instantiation Existential Generalization
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
AR for Horn clause logic Introducing: Unification.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
Resolution.
First Order Logic Resolution
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.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Chapter 6 Logical Reasoning Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Logic seminar 5 The resolution principle Slobodan Petrović.
AI - Week 16 Logic and Reasoning in AI: Resolution Refutation Lee McCluskey, room 2/07
Inference and Resolution for Problem Solving
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Slides 05 1 The Principal-Type Algorithm In general a typable term has an infinite set of types in TA. For example, it is possible to assign to I  x 
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
Binary Decision Diagrams for First Order Predicate Logic By: Jan Friso Groote Afsaneh Shirazi.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
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.
Advanced Topics in FOL Chapter 18 Language, Proof and Logic.
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.
1 Chapter 8 Inference and Resolution for Problem Solving.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Section 7.2 Equivalent Formulas Two wffs A and B are equivalent, written A  B, if they have the same truth value for every interpretation. Property:
First Order Predicate Logic
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Unification We can represent any substitution by a set of ordered pairs: s = { t 1 /v 1, t 2 /v 2, …, t n /v n } where: t i /v i means that the term i.
Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Procedural Semantics Soundness of SLD-Resolution.
The Law of Resolution Formal Aspects of Computer Science - Week 7 The Law of Resolution Lee McCluskey, room 2/07
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
1 Section 9.1 Automatic Reasoning Recall that a wff W is valid iff ¬ W is unsatisfiable. Resolution is an inference rule used to prove unsatisfiability.
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
General resolution Method1 General Resolution method in FOL Lesson 8.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Hojjat Ghaderi, University of Toronto, Fall 2006 CSC384: Intro to Artificial Intelligence Knowledge Representation III ● Required Readings: 9.1, 9.2,
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Introduction to Logic for Artificial Intelligence Lecture 2
Propositional Logic Resolution
The function of knowledge representation scheme is
Horn Clauses and Unification
Chapter 1 The Foundations: Logic and Proofs
Unification Algorithm ChuChen
Soundness of SLD-Resolution
Horn Clauses and Unification
Horn Clauses and Unification
Horn Clauses and Unification
Horn Clauses and Unification
Predicates and Quantifiers
Resolution in predicate Logic
Resolution Proof System for First Order Logic
Soundness of SLD-Resolution
Resolution Preliminaries
Presentation transcript:

Converting arbitrary wffs to CNF A wff is in prenex form iff it consists of a string of quantifiers (called a prefix) followed by a quantifier free formula called a matrix. 5. Convert to Prenex Form At this stage there is no remaining existential quantifiers and each universal quantifier has its own variable symbol. We may now move all of the universal quantifiers to the front of the wff and let the scope of each quantifier include the entirety of the wff following it. The resulting wff is in prenex form. From (1*)  X(  P(X) v  Y((  P(Y) v P(f(X, Y)))  Q(X, h(X))   P(h(X))))  X  Y(  P(X) v ((  P(Y) v P(f(X, Y)))  Q(X, h(X))   P(h(X))))

Converting arbitrary wffs to CNF 6. Eliminate universal quantifiers Since all the variables in the wff we use must be within the scope of a quantifier, we are assured that all the variables remaining at this step are universally quantified. Furthermore, the order of universal quantification is unimportant, so we may eliminate the explicit occurrence of universal quantifiers and assume, by convention, that all variables in the matrix are universally quantified.

Converting arbitrary wffs to CNF 7. Put the Matrix in CNF Distribute  over v : (A  B) v C becomes (A v C)  (B v C) Flatten nested conjunctions and disjunctions : (A v B) v C becomes (A v B v C) (A  B)  C becomes (A  B  C) At this point we have a conjunction of clauses ; We must have a set of clauses ! separate the conjuncts

Substitution A substitution  is a set of ordered pairs:  = {X 1 / t 1,...., X n / t n } where X i is a variable and t i is a term such that all X i are distinct. A simple expression is either an atom or a term. Example: E 1 = P(X, X, Y),  = {X / bill, Y / Z} E 1  = P(bill, bill, Z) Means that for each pair x i / t i, the term t i is substituted simultaneoulsy for every occurrence of the variable x i throughout the scope of the substitution (E 1 )

Composition Let  = {X 1 / s 1,...., X m / s m } and α = {Y 1 / t 1,...., Y n / t n } be substitutions. The composition of  and α, denoted by  α, is the substitution consisting of the bindings in the resulting sequence: a) consider the sequence of bindings (apply α to the terms of  and concatenate the result with α) X 1 / (s 1 α),...., X m / (s m α), Y 1 / t 1,...., Y n / t n b)delete from this sequence: any binding X i / (s i α) for which X i = (s i α) and any binding Y j / t j for which Y j є {X 1,...., X m }.

Composition Examples: 1) Let  = { X / f(Y), Z / U} and α = {Y / b, U / Z}, then  α = {X / f(b), Y / b, U / Z} 2) Let  = { X / Y } and α = {X / a, Y / a}, then  α = {X / a, Y /a}

Unification Let Σ be a finite set of simple expressions. A unifier for the set Σ = {E 1, E 2 } is a substitution  such that Σ  is a singleton: E 1  = E 2  Σ is said to be unifiable iff there exists such . If  is a unifier for Σ, and if for any unifier α for Σ there exists a substitution φ such that α =  φ, then  is called a most general unifier (mgu). A mgu is unique except for variables renaming (alphabetic variants).

Unification Example: Let Σ = {R(X, f(Y), B), R(Z, f(B), B)}. Then  = {X /Z, Y / B} is a mgu for Σ. Although {X / A, Z / A, Y / B} is a unifier for Σ it is not a mgu (the simplest) since there does not exist a substitution φ such that {X /Z, Y / B} = {X / A, Z / A, Y / B} φ Notice that {X / A, Z / A, Y / B} = {X /Z, Y / B}{Z / A}

Unification Let Σ be a finite set of simple expressions. The Disagreement set of Σ is defined as follows. Locate the leftmost symbol position at which not all members of Σ have the same symbol, and extract from each expression in Σ the subexpression begining at that symbol position. The set of all these subexpressions is the disagreement set. Example: let Σ be the set {P(x, y), P (x, f(g(a)))} then D = {y, f(g(a))}

Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton, then stop:  k is an mgu for Σ. Else find the disagreement set D k of Σ  k. 3. If there exists X and t in D k such that X is a variable not occurring in t, then set  k+ 1 =  k {x / t}, increment k by 1 and go to step 2. Else report that Σ is not unifiable, and stop.