Completeness of the SLD-Resolution

Slides:



Advertisements
Similar presentations
Simply Logical – Chapter 2© Peter Flach, 2000 Clausal logic Propositional clausal logic Propositional clausal logic expressions that can be true or false.
Advertisements

Completeness and Expressiveness
Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
Biointelligence Lab School of Computer Sci. & Eng.
SLD-resolution Introduction Most general unifiers SLD-resolution
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
Standard Logical Equivalences
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea
First Order Logic Resolution
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
11 November 2005 Foundations of Logic and Constraint Programming 1 Negation: Declarative Interpretation ­An overview First Order Formulas and Logical Truth.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution 3.7. Natural Deduction.
So far we have learned about:
Discrete Structures Chapter 2 Part B Mathematical Induction
12 October 2006 Foundations of Logic and Constraint Programming 1 Operational Semantics ­An overview The language of programs The computation mechanism.
17 October 2006 Foundations of Logic and Constraint Programming 1 Declarative Semantics ­An overview Algebras (semantics for terms) Interpretations (semantics.
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
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.
Reading and Writing Mathematical Proofs
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
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,
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.5 Application: Correctness of Algorithms 1 [P]rogramming reliability – must be an activity.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 23 Friday, 17 October.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Procedural Semantics Soundness of SLD-Resolution.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 18 of 41 Friday, 01 October.
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
October 3, 2001CSE 373, Autumn Mathematical Background Exponents X A X B = X A+B X A / X B = X A-B (X A ) B = X AB X N +X N = 2X N 2 N +2 N = 2 N+1.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Models of Definite Programs.
Answer Extraction To use resolution to answer questions, for example a query of the form  X C(X), we must keep track of the substitutions made during.
1 Section 8.2 Program Correctness (for imperative programs) A theory of program correctness needs wffs, axioms, and inference rules. Wffs (called Hoare.
1 Proving Properties of Recursive List Functions CS 270 Math Foundations of CS Jeremy Johnson.
Chapter 1 Logic and proofs
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
CMSC Discrete Structures
Models of Definite Programs
Resolution in the Propositional Calculus
Read Once Branching Programs: a model of computation used in CAD.
Computability and Complexity
Great Theoretical Ideas In Computer Science
Disjunctive Normal Form
Proving Properties of Recursive List Functions
Hierarchy of languages
Copyright © Cengage Learning. All rights reserved.
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Prolog syntax + Unification
Soundness of SLD-Resolution
Resolution Proofs for Combinational Equivalence
Models of Definite Programs
CMSC Discrete Structures
Instructor: Aaron Roth
MA/CSSE 474 Theory of Computation
Advanced Analysis of Algorithms
CMSC Discrete Structures
Copyright © Cengage Learning. All rights reserved.
Recurrence Relations Discrete Structures.
Counting Elements of Disjoint Sets: The Addition Rule
Models of Definite Programs
Counting Elements of Disjoint Sets: The Addition Rule
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Herbrand Semantics Computational Logic Lecture 15
Soundness of SLD-Resolution
Proofs (2.7) (How to compute logical consequences of a KB rather that
Presentation transcript:

Completeness of the SLD-Resolution

Soundness of SLD Resolution Completeness of SLD Resolution Structure - 1 Preliminaries Definite Programs Semantics Soundness of SLD Resolution Completeness of SLD Resolution Normal Programs Add Negative Information and Finite Failure Soundness of SLDNF Resolution Completeness of SLDNF Resolution

MGU Lemma Let P be a definite Program and G a definite goal MGU Lemma Let P be a definite Program and G a definite goal. Suppose that P{G} has an unrestricted SLD-refutation (1, 2, … are not neccessarily mgu's). Then P{G} has an SLD-refutation of the same length with the mgu's ‘1… ‘n and there exists a substitution , such that 1… n = ‘1… ‘n. Proof (basis) Induction over the length of the unrestricted refutation. n=1: G0=G, G1=□ with input clause C1 and unifier 1. Suppose ‘1 is an mgu of the selected atom in G and the head of the input clause C1. Then 1= ‘1 for some . Furthermore, P{G} has a refutation G0=G, G1=□ with input clause C1 and MGU ‘1.

Proof (Inductive step) MGU Lemma Let P be a definite Program and G a definite goal. Suppose that P{G} has an unrestricted SLD-refutation (1, 2, … are not neccessarily mgu's). Then P{G} has an SLD-refutation of the same length with the mgu's ‘1… ‘n and there exists a substitution , such that 1… n = ‘1… ‘n. Proof (Inductive step) Hypothesis: result holds for n-1. Suppose P{G} has an unrestricted SLD-refutation G0,G1,…Gn =□ of length n with the input clauses C1… Cn and Unifiers ‘1,2,3…,n such that G1=G‘1. By the inductive hypothesis: P{G‘1} has a refutation G‘1,…,G‘n =□ with mgu's ‘2…‘n such that 2…n= ‘2…‘n  for some . Then P{G} has a refutation G0=G, G1,…,Gn =□ with mgu's ‘1…‘n such that 1…n=‘12…n= ‘1…‘n .

Lifting Lemma Lemma Let P be a definite program, G a definite goal and  a substitution. Suppose P{G} has an SLD-refutation with substitutions 1…n, such that the variables of the input clause are distinct from the variables in  and G. Then there exists an SLD-refutation of P{G} of the same length and mgu's ‘1…‘n and a substitution  such that 1…n=‘1…‘n.

Lifting Lemma Proof Suppose the first input clause for the refutation of P{G} is C1, the first mgu is 1 and G1 is the goal which results from the first step Now 1 is a unifier for the head of C1 and the atom in G which corresponds to the selected atom in G. The result of resolving G and C1 using 1 is exactly G1. We obtain an unrestricted refutation of P{G} – which looks almost like the given refutation of P{G}. Now apply the mgu lemma.

Success Set and Least Herbrand Model Theorem The success set of a definite program P is equal to its least Herbrand model.

Proof : corollary (slide 24, previous slide set). : Show that the least Herbrand model of P is contained in the success set of P. Show per induction over n, that ATPn implies, that P{A} has a refutation and hence A is in the success set. Basis: ATP1 means that A is a ground instance of a unit clause of P. Thus there exists a refutation.

Proof (continued) : Show that the least Herbrand model of P is contained in the success set of P. Show per induction over n, that ATPn implies, that P{A} has a refutation and hence A is in the success set. Inductive step: Hypothesis holds for n-1. Let ATPn. By the definition of TP, there exists a ground instance of a clause BB1,…,Bk such that A=B and {B1,…,Bk}  TP(n-1) for some . By the induction hypothesis P{Bi} has a refutation for i=1,…,k. Because each Bi is ground these refutations can be combined into a refutation of P{(B1 …Bk)}. Thus P{A} has an unrestricted refutation and we can apply the mgu lemma to obtain a refutation of P{A}.

Completeness - 1 Theorem Let P be a definite program and G be a definite goal. Suppose P{G} is unsatisfiable. Then there exists an SLD-refutation of P{G}. Proof Let G= A1,…,Ak. G is false wrt MP. Hence some ground instance Gist false wrt MP. Thus {A1,…,Ak} MP. Therefore there exists a refutation for each.Ai. Because Ai are ground, they can be combined to an SLD-refutation of G. By the lifting lemma, since there is an unrestricted SLD- refutation, we can also find a restricted SLD-refutation. Theorem 8.4

Completeness – 2: Every correct answer an instance of a computed answer Lemma Let P be a definite program and A an atom. Suppose (A) is a logical consequence of P, then there exists an SLD-refutation of P{A} with the identity substitution as the computed answer. Proof introduce new constants for all variables xi in A(={… xi/ai …}). Because of the premise P{A} has a refutation. Because A is ground the corresponding calculated answer is . Since the ai do not appear in P or A, we can keep the xi and obtain the calculated answer .

Completeness – 2: Every correct answer an instance of a computed answer Theorem Let P be a definite Program and G a definite goal. For every correct answer  for P{G} there exists a computed answer  for P{G} and a substitution  such that  and  have the same effect on all variables in G. Proof sketch Let G=A1,…,Ak. Since  is correct,((A1… Ak)) is a logical consequence. Hence there exists a SLD-refutation for P{ Ai} with  as calculated answer. Thus there exists a SLD-refutation for P{(A1… Ak)} with  as calculated answer. Let the composed mgu's be 1…n. By the lifting lemma we have: 1…n=‘1…‘n with mgu's ‘1…‘n for the refutation of P{G}. For this reason we can specify 