CS344: Introduction to Artificial Intelligence Lecture: 22-23 Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

First-Order Logic.
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Biointelligence Lab School of Computer Sci. & Eng.
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
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),
Standard Logical Equivalences
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea
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.
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
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.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Lecture 23. Subset Sum is NPC
Logic Concepts Lecture Module 11.
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2011 Adina Magda Florea
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Inference and Resolution for Problem Solving
Logic seminar 4 Herbrand’s theorem Slobodan Petrović.
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.
Logic seminar 2 Propositional logic Slobodan Petrović.
Restricted Satisfiability (SAT) Problem
Advanced Topics in FOL Chapter 18 Language, Proof and Logic.
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
Lecture 22 More NPC problems
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.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
First Order Predicate Logic
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Logic Logic can be traced back to Aristotle, and more recently to Frege who introduced predicate logic as a language for representing and reasoning about.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Resolution Strategies One common strategy for applying resolution is called level saturation. Here you try to resolve every pair of clauses from the original.
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.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
28.
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.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Predicate Calculus CS 270 Math Foundations of Computer Science Jeremy Johnson Presentation uses material from Huth and Ryan, Logic in Computer Science:
Introduction to Logic for Artificial Intelligence Lecture 2
Formal Modeling Concepts
Knowledge Representation and Reasoning
Computability and Complexity
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Logics for Data and Knowledge Representation
NP-Completeness Proofs
Propositional Equivalences
Back to “Serious” Topics…
PROPOSITIONAL LOGIC - SYNTAX-
Herbrand Logic Semantics
Presentation transcript:

CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic logic and mechanical theorem proving) By Raunak Pilani Under the guidance of Prof. P. Bhattacharyya

Basic Definitions Interpretation: Assignment of meaning to the symbols of a language Interpretations of Predicate logic requires defining: Domain Of Discourse (D), which is a set of individuals that the quantifiers will range over Mappings for every constant, n-ary function and n-ary predicate to elements, n-ary functions (D n  D) and n- ary relations on D, respectively

Basic Definitions (contd.) Satisfiability (Consistency) A formula G is satisfiable iff there exists an interpretation I such that G is evaluated to “T” (True) in I I is then called a model of G and is said to satisfy G Unsatisfiability (Inconsistency) G is inconsistent iff there exists no interpretation that satisfies G

Need for the theorem Proving satisfiability of a formula is better achieved by proving the unsatisfiability of its negation Proving unsatisfiability over a large set of interpretations is resource intensive Herbrands Theorem reduces the number of interpretations that need to be checked Plays a fundamental role in Automated Theorem Proving

Skolem Standard Form Logic formulae need to first be converted to the Skolem Standard Form, which leaves the formula in the form of a set of clauses This is done in three steps Convert to Prenex Form Convert to CNF (Conjunctive Normal Form) Eliminate existential Quanitifiers using Skolem functions

Step 1: Converting to Prenex Form Involves bringing all quantifiers to the beginning of the formula (Q i x i ) (M), i=1, 2..., n Where, - Q i is either V (Universal Quantifier) or Ǝ (Existential Quanitifier) and is called the prefix - M contains no Quantifiers and is called the matrix

Example

Step 2: Converting to CNF Remove and Apply De Morgan’s laws Apply Distributive laws Apply Commutative as well as Associative laws

Example

Step 3: Skolemization Consider the formula, (Q 1 x 1 )… (Q n x n )M If an existential quantifier, Q r is not preceded by any universal quantifier, then x r in M can be replaced by any constant c and Q r can be removed Otherwise, if there are ‘m’ universal quantifiers before Q r, then An m-place function f(p 1, p 2,…, p m ) can replace x r where p 1, p 2,…, p m are the variables that have been universally quantified Here, c is a skolem variable while f is a skolem function

Example

Herbrand Universe It is infeasible to consider all interpretations over all domains in order to prove unsatisfiability Instead, we try to fix a special domain (called a Herbrand universe) such that the formula, S, is unsatisfiable iff it is false under all the interpretations over this domain

Herbrand Universe (contd.) H 0 is the set of all constants in a set of clauses, S If there are no constants in S, then H 0 will have a single constant, say H 0 = {a} For i=1,2,3,…, let H i+1 be the union of H i and set of all terms of the form f n (t 1,…, t n ) for all n-place functions f in S, where t j where j=1,…,n are members of the set H H ∞ is called the Herbrand universe of S

Herbrand Universe (contd.) Atom Set: Set of the ground atoms of the form P n (t 1,…, t n ) for all n-place predicates P n occuring in S, where t 1,…, t n are elements of the Herbrand Universe of S Also called the Herbrand Base A ground instance of a clause C of a set of clauses is a clause obtained by replacing variables in C by members of the Herbrand Universe of S

Example

H-Interpretations For a set of clauses S with its Herbrand universe H, we define I as an H-Interpretation if: I maps all constants in S to themselves An n-place function f is assigned a function that maps (h 1,…, h n ) (an element in H n ) to f (h 1,…, h n ) (an element in H) where h 1,…, h n are elements in H Or simply stated as I={m 1, m 2, …, m n, …} where m j = A j or ~A j (i.e. A j is set to true or false) and A = {A 1, A 2, …, A n, …}

H-Interpretations (contd.) Not all interpretations are H-Interpretations Given an interpretation I over a domain D, an H- Interpretation I* corresponding to I is an H- Interpretation that: Has each element from the Herbrand Universe mapped to some element of D Truth value of P(h 1,…, h n ) in I* must be same as that of P(d 1,…, d n ) in I

Example

Use of H-Interpretations If an interpretation I satisfies a set of clauses S, over some domain D, then any one of the H- Interpretations I* corresponding to I will also satisfy H A set of clauses S is unsatisfiable iff S is false under all H-Interpretations of S

Semantic Trees Finding a proof for a set of clauses is equivalent to generating a semantic tree A semantic tree is a tree where each link is attached with a finite set of atoms or their negations, such that: Each node has only a finite set of immediate links For each node N, the union of sets connected to links of the branch down to N does not contain a complementary pair If N is an inner node, then its outgoing links are marked with complementary literals

Semantic Trees (Contd.) Every path to a node N does not contain complementary literals in I(N), where I(N) is the set of literals along the edges of the path A Complete Semantic Tree is one in which every path contains every literal in Herbrand base either +ve or –ve, but not both A failure node N is one which falsifies I N but not I N’, where N’ is predecessor of N A semantic tree is closed if every path contains a failure node

Example S’ is satisfiable because it has at least one branch without a failure node Image courtesy:

Example S is unsatisfiable as the tree is closed Image courtesy:

Herbrand’s Theorem (Ver. 1) Theorem: A set S of clauses is unsatisfiable iff corresponding to every complete semantic tree of S, there is a finite closed semantic tree Proof: Part 1: Assume S is unsatisfiable - Let T be the complete semantic tree for S - For every branch B of T, we let I B be the set of all literals attached to the links in B

Version 1 Proof (contd.) - I B is an interpretation of S (by definition) - As S is unsatisfiable, I B must falsify a ground instance of a clause C in S, let’s call it C’ - T is complete, so, C’ must be finite and there must exist a failure node N B (a finite distance from root) on branch B - Every branch of T has a failure node, so we find a closed semantic tree T’ for S - T’ has a finite no. of nodes (Konig’s Lemma) Hence, first half of thm. is proved

Version 1 Proof (contd.) Part 2: If there is a finite closed semantic tree for every complete semantic tree of S - Then every branch contains a failure node - i.e. every interpretation falsifies S - Hence, S is unsatisfiable Thus, both halves of the theorem are proved

Herbrand’s Theorem (Ver. 2) Theorem: A set S of clauses is unsatisfiable iff there is a finite unsatisfiable set S’ of ground instances of clauses of S Proof: Part 1: Assume S is unsatisfiable - Let T be a complete semantic tree of S - By ver. 1 of Herbrand Thm., there is a finite closed semantic tree T’ corresponding to T

Version 2 Proof (contd.) - Let S’ be a set of all the ground instances of clauses that are falsified at all failure nodes of T’ - S’ is finite since T’ contains a finite no. of failure nodes - Since S’ is false in every interpretation of S’, S’ is also unsatisfiable Hence first half of thm. is proved

Version 2 Proof (contd.) Part 2: Suppose S’ is a finite unsatisfiable set of gr. instances of clauses in S - Every interpretation I of S contains an interpretation I’ of S’ - So, if I’ falsifies S’, then I must also falsify S’ - Since S’ is falsified by every interpretation I’, it must also be falsified by every interpretation I of S - i.e. S is falsified by every interpretation of S - Hence S is unsatisfiable Thus, both halves of the thm. are proved

Example

References Chang, Chin-Liang and Lee, Richard Char-Tung Symbolic Logic and Mechanical Theorem Proving Academic Press, New York, NY, 1973