Computational Logic. Standardization of Interpretations. Damiano Zanardini

Similar documents
Computational Logic. Recall of First-Order Logic. Damiano Zanardini

First-Order Predicate Logic. Basics

First-Order Logic (FOL)

CS156: The Calculus of Computation Zohar Manna Winter 2010

Predicate Logic: Sematics Part 1

First-Order Logic. Resolution

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

Exercises 1 - Solutions

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Predicate Logic - Semantic Tableau

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

AAA615: Formal Methods. Lecture 2 First-Order Logic

ISTITUTO DI ANALISI DEI SISTEMI ED INFORMATICA

Computational Logic. Introduction. Damiano Zanardini

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Introduction to Sets and Logic (MATH 1190)


A consistent theory of truth for languages which conform to classical logic

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Herbrand Theorem, Equality, and Compactness

Chapter 4: Classical Propositional Semantics

arxiv: v1 [math.lo] 8 Mar 2018

4 Predicate / First Order Logic

Propositional Logic Language

Predicate Calculus - Semantics 1/4

4 The semantics of full first-order logic

Definite Logic Programs

Two New Definitions of Stable Models of Logic Programs with Generalized Quantifiers

University of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Predicate Logic. Andreas Klappenecker

Mathematical Logics. 12. Soundness and Completeness of tableaux reasoning in first order logic. Luciano Serafini

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Tecniche di Verifica. Introduction to Propositional Logic

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Logic for Computer Scientists

First order logic. Example The deduction of statements: This reasoning is intuitively correct. Every man is mortal. Since Ade is a man, he is mortal.

1.1 Language and Logic

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Classical Propositional Logic

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Logic: Propositional Logic (Part I)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Lloyd-Topor Completion and General Stable Models

Predicate Calculus - Semantic Tableau (2/2) Moonzoo Kim CS Division of EECS Dept. KAIST

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Theory of Computation

Logic for Computer Scientists

First-Order Logic. Chapter Overview Syntax

First-Order Stable Model Semantics and First-Order Loop Formulas

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Some Rewriting Systems as a Background of Proving Methods

2-4: The Use of Quantifiers

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science

CONTENTS. Appendix C: Gothic Alphabet 109

Propositional Logic Not Enough

ICS141: Discrete Mathematics for Computer Science I

Part II Logic and Set Theory

Paucity, abundance, and the theory of number: Online Appendices

Handout #7 Predicate Logic Trees

Notation for Logical Operators:

Introduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1)

CHAPTER 2. FIRST ORDER LOGIC

Predicate Logic: Semantics

Automated Reasoning Lecture 5: First-Order Logic

arxiv: v1 [cs.lo] 8 Jan 2013

Normal Forms of Propositional Logic

Logical Consequences of Formulae. Definite Clauses

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Resolution for mixed Post logic

3 Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

1.1 Language and Logic

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Axioms for Set Theory

Logic for Computer Scientists

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.4 Prenex normal form. Skolemization. Clausal form.

Informal Statement Calculus

Part I: Propositional Calculus

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

T -resolution: Refinements and Model Elimination

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/26)

Part Two: The Basic Components of the SOFL Specification Language

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Logical reasoning - Can we formalise our thought processes?

Comp487/587 - Boolean Formulas

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Propositional Logic: Models and Proofs


cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

CS 173 Lecture 2: Propositional Logic

Type decompositions in NIP theories

Transcription:

Computational Logic Standardization of Interpretations Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic Year 2009/2010 D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 1 / 1

Satisfiability and Interpretationsp The problem F is unsatisfiable iff there is no interpretation I such that I(F ) = t in order to check this, we should consider all models: if F is propositional with n different propositions, then there are 2 n models in a first order formula, the number of interpretations can be uncountable! it would be useful to have a subset of interpretations of F such that it contains a smaller (finite or countable) number of interpretations analyzing it is enough in order to decide the satisfiability of F such interpretations exist for every formula, and are called Herbrand interpretations D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 2 / 1

Satisfiability and Interpretationsp Jacques Herbrand (Paris, France, February 12, 1908 - La Bérarde, Isère, France, July 27, 1931) PhD at École Normale Superieure, Paris, in 1929 joined the army in October 1929 H. universe, H. base, H. interpretation, H. structure, H. quotient Herbrand s Theorem: actually, two different results have this name introduced the notion of recursive function worked with John von Neumann and Emmy Noether died falling from a mountain in the Alps while climbing D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 2 / 1

Satisfiability and Interpretationsp Jacques Herbrand (Paris, France, February 12, 1908 - La Bérarde, Isère, France, July 27, 1931) PhD at École Normale Superieure, Paris, in 1929 joined the army in October 1929 H. universe, H. base, H. interpretation, H. structure, H. quotient Herbrand s Theorem: actually, two different results have this name introduced the notion of recursive function worked with John von Neumann and Emmy Noether died falling from a mountain in the Alps while climbing not exactly like him... D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 2 / 1

Herbrand Universep Herbrand universe H(F ) of a formula F determines the domain of interpretation of F for Herbrand interpretations consists of all terms which can be formed with the constants and functions occurring in F Herbrand universe: definition Const(F ) = set of constant symbols in F Fun(F ) = { set of function symbols in F Const(F ) if Const(F ) H 0 = {a} if Const(F ) = H i+1 = {f (t 1,.., t n ) t j (H 0.. H i ), f /n Fun(F )} H(F ) = H 0.. H i.. is the Herbrand universe D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 3 / 1

Herbrand Universep Herbrand universe: examples F = {p(x), q(y)} H 0 = {a} H 1 = H 2 =.. = H(F ) = {a} F = {p(x, a), q(y) r(b, f (x))} H 0 = {a, b} H 1 = {f (a), f (b)} H 2 = {f (f (a)), f (f (b))}... H(F ) = {a, b, f (a), f (b), f (f (a)), f (f (b)), f (f (f (a))), f (f (f (b))),..} = {f n (a), f n (b)} n 0 D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 3 / 1

Herbrand Basep Herbrand base of F ground atom: an atom which is obtained by applying a predicate symbol of F to terms from the Herbrand universe of F the Herbrand base of F is the set of all the possible ground atoms of F Herbrand base: definition Pred(F ) is the set of predicate symbols in F HB(F ) = {p(t 1,.., t n ) t j H(F ), p/n Pred(F )} D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 4 / 1

Herbrand Basep Herbrand base: examples F = {p(x), q(y)} H(F ) = {a} HB(F ) = {p(a), q(a)} F = {p(a), q(y) p(f (x))} H(F ) = {a, f (a), f (f (a)),..} = {f n (a)} n 0 HB(F ) = {p(a), p(f (a)), p(f (f (a))),.., q(a), q(f (a)), q(f (f (a))),..} = ({{p(t), q(t)} t H(f )}) F = {p(a), q(y) r(b, f (x))} H(F ) = {a, b, f (a), f (b), f (f (a)), f (f (b)),..} = {f n (a), f n (b)} n 0 HB(F ) = ({{p(t), q(t), r(t, t )} t, t H(F )}) D. Zanardini (damiano@fi.upm.es) Computational Logic Ac. Year 2009/2010 4 / 1

An Herbrand interpretation of F is an interpretation I H = (H(F ), I H ) on H(F ) such that: every constant a Const(F ) is assigned to itself: I H (a) = a every function symbol f /n Fun(F ) is assigned to I H (f /n) = F : (H(F )) n H(F ), such that F(u 1,.., u n) = f (u 1,.., u n) H(F ) where u i H(F ) every predicate symbol p/n Pred(F ) is assigned as I H (p/n) = P : (H(F )) n {t, f}, such that I H (p(u 1,.., u n)) = P(I H (u 1),.., I H (u n)) = P(u 1,.., u n) {t, f} every (ground) atom of HB(F ) has a truth value. Which one? It is not required by the definition, every interpretation decides

Herbrand interpretations: notation An Herbrand interpretation can be represented as the set of ground atoms in HB(F ): positive if they are interpreted as true, negative otherwise HB(F ) = {A 1, A 2, A 3,..} I H = {A 1, A 2, A 3,..} if I H (A 1 ) = t, I H (A 2 ) = f, I H (A 3 ) = f,.. Terminology the notions of Herbrand universe, base, and interpretations will often refer to a set of clauses, written as C, which can be actually the result of the standardization of a generic formula F in practice, F will be usually taken to be in clause form because we (computational logicians) are smarter than formal logicians?

Herbrand interpretations: examples F = {p(x), q(y)} H(F ) = {a}, HB(F ) = {p(a), q(a)} there are 4 possible Herbrand interpretations: IH 1 = {p(a), q(a)} IH 2 = {p(a), q(a)} IH 3 = { p(a), q(a)} IH 4 = { p(a), q(a)} F = {p(a), q(y) p(f (x))} H(F ) = {f n (a)} n 0, HB(F ) = ({{p(t), q(t)} t H(F )}) there are an infinite (how many?) number of Herbrand interpretations IH 1 = ({{p(t), q(t)} t H(F )}) IH 2 = {p(a)} { p(t) t H(F ) \ {a}} {q(t) t H(F )} IH 3 = {p(t) t H(F )} { q(t) t H(F )}...

Ground instances A ground instance of a clause is a formula, in clause form, which results from replacing the variables of the clause by terms from its Herbrand universe by means of an Herbrand interpretation, it is possible to give a truth value to a formula starting from the truth value of its ground instances Example: F = {p(a), q(b) p(x)} H(F ) = {a, b} I H = {p(a), p(b), q(a), q(b)} HB(F ) = {p(a), p(b), q(a), q(b)} the first clause is true since its only instance, p(a), is true in I H the second clause is false since one instance, q(b) p(b), is true in I H, but the other, q(b) p(a), is false since F is the conjunction of both clauses, it is false for I H (we ll see why)

I H corresponding to I Given I = (D, I ), an Herbrand interpretation I H = (D H, I H ) corresponds to I for F if it satisfies the following condition: I is a total mapping from H(F ) to D, such that I (c) = d if I (c) = d (constants) I (f (t 1,.., t n)) = F(I (t 1),.., I (t n)) where I (f /n) = F/n for every ground atom p(t 1,.., t n ) HB(F ), I H (p(t 1,.., t n )) = t (resp., f) if I (p)(i (t 1 ),.., I (t n )) = t (resp., f) this definition may look overly complicated, but simpler ones can be imprecise... let h 1,.., h n be elements of H(F ) let every h i be mapped to some d i D if p(d 1,.., d n ) is assigned t (resp., f) by I, then p(h 1,.., h n ) is also assigned t (resp., f) by I H [Chang and Lee. Symbolic Logic and Mechanical Theorem Proving]

Example: F = {p(x), q(y, f (y, a))}, D = {1, 2} I (a) = 2 I (f /2) = F/2: F(1, 1) = 1 F(1, 2) = 1 F(2, 1) = 2 F(2, 2) = 1 I (p/1) = P/1: P(1) = t P(2) = f I (q/2) = Q/2: Q(1, 1) = f Q(1, 2) = t Q(2, 1) = f Q(2, 2) = t In this case, I comes to be the same as I (on H(F )) I H (p(a)) = I (p(a)) = P(I (a)) = P(2) = f I H (q(a, a)) = I (q(a, a)) = Q(I (a), I (a)) = Q(2, 2) = t I H (p(f (a, a))) = I (p(f (a, a))) = P(F(2, 2)) = P(1) = t...

Multiple Herbrand interpretations There can be more than one corresponding I H when F has no constants. In this case, there is no I -interpretation of H 0 (i.e., I I ), so that the I H -interpretation of a H 0 is arbitrary.: F = {p(x)}, D = {1, 2}, p(x) means that x is even H(F ) = {a}, HB(F ) = {p(a)} I (a) = 1 and I (a) = 2 are both legal I 1 H I 2 H Lemma = { p(a)} supposing a 1 = {p(a)} supposing a 2 If an interpretation I = (D, I ) satisfies F, then all Herbrand interpretations of F which correspond to I also satisfy F ex: F = xp(x) xq(f (x))

Theorem A formula F is unsatisfiable iff it is false for all its Herbrand interpretations Proof ( ). ❶ F is unsatisfiable ❷ it is false for every interpretation on every domain ❸ in particular, all Herbrand interpretations make it false

Theorem A formula F is unsatisfiable iff it is false for all its Herbrand interpretations Proof ( ). ❶ F is false for all Herbrand interpretations ❷ suppose F be satisfiable ❸ there exists an interpretation I satisfying F (by ❷) ❹ by the previous lemma, the corresponding Herbrand interpretations also satisfy F ❺ contradiction between ❶ and ❹, therefore ❷ is false ❻ F is unsatisfiable (by ❺)

In practice In order to study the unsatisfiability of a formula F, it is enough to study the Herbrand interpretations of its clause form CF (F ) For every Herbrand interpretation of CF (F ) compute the ground instances of the clauses assign a truth value to every instance CF (F ) is true in I H iff every ground instance of every clause is true in I H F is satisfiable iff some Herbrand interpretation makes CF (F ) true

Example: F = {p(x), q(y)} H(F ) = {a} HB(F ) = {p(a), q(a)} There are 4 Herbrand interpretations IH 1 IH 2 IH 3 IH 4 = {p(a), q(a)} = {p(a), q(a)} = { p(a), q(a)} = { p(a), q(a)} Ground instances: {p(a), q(a)} I 1 H is a model since it verifies both instances IH 2, I3 H and I4 H are countermodels since they falsify at least one instance Therefore, F is satisfiable

Example: F = {p(y), q(a) p(f (x)), q(x)} H(F ) = {f n (a) n 0} HB(F ) = {p(t) t H(F )} {q(t) t H(F )} There are infinite Herbrand interpretations. For example I 1 H I 2 H = {p(t) t H(F )} {q(t) t H(F )} = {q(a)} { q(t) t H(F ) \ {a}} {p(t) t H(F )} Ground instances p(y) p(a), p(f (a)), p(f (f (a))),.. q(a) p(f (x)) q(a) p(f (a)), q(a) p(f (f (a))),.. q(x) q(a), q(f (a)),.. Every Herbrand interpretation falsifies at least one instance, so that F is unsatisfiable