Predicate Logic - Semantic Tableau

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

Predicate Logic - Deductive Systems

Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST

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

Predicate Logic: Sematics Part 1

Introduction to Logic in Computer Science: Autumn 2006

Exercises 1 - Solutions

Propositional and Predicate Logic - V

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

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

Propositional Logic: Gentzen System, G

α-formulas β-formulas

First-Order Logic. Chapter Overview Syntax

KE/Tableaux. What is it for?

Predicate Calculus - Syntax

Predicate Logic. Andreas Klappenecker

Mathematical Logic Propositional Logic - Tableaux*

Chapter 11: Automated Proof Systems

First-Order Logic (FOL)

Deductive Systems. Lecture - 3

First-Order Predicate Logic. Basics

Propositional Calculus - Deductive Systems

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

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

CS 486: Applied Logic Lecture 7, February 11, Compactness. 7.1 Compactness why?

Propositional and Predicate Logic - IV

17.1 Correctness of First-Order Tableaux

Version January Please send comments and corrections to

AAA615: Formal Methods. Lecture 2 First-Order Logic

Formal (Natural) Deduction for Predicate Calculus

3 Propositional Logic

Predicate Calculus - Semantics 1/4

Introduction to Logic in Computer Science: Autumn 2007

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)

Logic for Computer Scientists

Chapter 11: Automated Proof Systems (1)

Exercises for the Logic Course

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

Propositional Calculus - Soundness & Completeness of H

A Tableau Calculus for Minimal Modal Model Generation

Induction on Failing Derivations

First-Order Logic. Resolution

Prefixed Tableaus and Nested Sequents

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

2-4: The Use of Quantifiers

Logic for Computer Scientists

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Some Rewriting Systems as a Background of Proving Methods

Lecture 13: Soundness, Completeness and Compactness

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

Propositional Logic Language

CS156: The Calculus of Computation Zohar Manna Winter 2010

Classical Propositional Logic

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Cooperation of Background Reasoners in Theory Reasoning by Residue Sharing

Propositional Resolution Introduction

Handout #7 Predicate Logic Trees

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

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


First-order resolution for CTL

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

A Description Logic with Concrete Domains and a Role-forming Predicate Operator

Lloyd-Topor Completion and General Stable Models

Propositional Logic: Models and Proofs

Two hours. Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Automated Reasoning Lecture 5: First-Order Logic

Fuzzy Description Logics

Introduction to Sets and Logic (MATH 1190)

Transparencies to accompany Rosen, Discrete Mathematics and Its Applications Section 1.3. Section 1.3 Predicates and Quantifiers

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

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

CS 250/251 Discrete Structures I and II Section 005 Fall/Winter Professor York

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

Proving Completeness for Nested Sequent Calculi 1

Introduction to Logic in Computer Science: Autumn 2006

Part I: Propositional Calculus

Computational Logic. Standardization of Interpretations. Damiano Zanardini

Cooperation of Background Reasoners in Theory Reasoning by Residue Sharing

First-Order Theorem Proving and Vampire

Saturation up to Redundancy for Tableau and Sequent Calculi

Logic for Computer Scientists

Discrete Mathematics

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

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

CHAPTER 10. Predicate Automated Proof Systems

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

Incomplete version for students of easllc2012 only. 6.6 The Model Existence Game 99

Logic Part I: Classical Logic and Its Semantics

arxiv: v1 [cs.lo] 8 Jan 2013

4 Predicate / First Order Logic

A tableau-based decision procedure for a branching-time interval temporal logic

I thank the author of the examination paper on which sample paper is based. VH

Propositional logic. Programming and Modal Logic

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

CTL-RP: A Computational Tree Logic Resolution Prover

INTRODUCTION TO LOGIC

Handout Proof Methods in Computer Science

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

Transcription:

CS402, Spring 2016

Informal Construction of a Valid Formula Example 1 A valid formula: x(p(x) q(x)) ( xp(x) xq(x)) ( x(p(x) q(x)) ( xp(x) xq(x))) x(p(x) q(x)), ( xp(x) xq(x)) x(p(x) q(x)), xp(x), xq(x) x(p(x) q(x)), xp(x), q(a) x(p(x) q(x)), p(a), q(a) p(a) q(a), p(a), q(a) p(a), p(a), q(a) q(a), p(a), q(a)

Informal Construction of a Valid Formula Note that showing validity with semantic tableau boils down to finding a single counter example. That is, if A is satisfiable, A cannot be valid. xq(x) x q(x) Consequently, we can replace the variable x in xq(x) by a single concrete element, a D (D is the target domain). In other words, we use q(a) instead of xq(x). x(p(x) q(x)), xp(x), xq(x) x(p(x) q(x)), xp(x), q(a) x(p(x) q(x)), p(a), q(a) p(a) q(a), p(a), q(a) p(a), p(a), q(a) q(a), p(a), q(a)

Informal Constructon of a Satisfiable Formula Example 2 Satisfiable but not valid: x(p(x) q(x)) ( xp(x) xq(x)) ( x(p(x) q(x)) ( xp(x) xq(x))) x(p(x) q(x)), ( xp(x) xq(x)) x(p(x) q(x)), xp(x), xq(x) x(p(x) q(x)), xp(x), q(a) x(p(x) q(x)), p(a), q(a) p(a) q(a), p(a), q(a) p(a), p(a), q(a) q(a), p(a), q(a) Not satisfiable! What went wrong?

Informal Constructon of a Satisfiable Formula What went wrong? We should use different constants for different formulas: it is ok to use q(a) instead of xq(x). However, it is not ok to use the same element a for a different formula xp(x). A formula with universal quantifiers without negation cannot be simply replaced by just one instance. Universal formulas should never be deleted from the node. Universal formulas remain in the all descendant nodes so as to constrain the possible interpretations of every new constant that is introduced.

Constraining new constants x(p(x) q(x)), xp(x), xq(x) x(p(x) q(x)), xp(x), q(a) x(p(x) q(x)), p(b), q(a) x(p(x) q(x)), p(a) q(a), p(b), q(a) x(p(x) q(x)), p(b) q(b), p(a) q(a), p(b), q(a)

Informal Constructon of a Satisfiable Formula Example 3 Here we go again: x(p(x) q(x)) ( xp(x) xq(x)) x(p(x) q(x)), p(b) q(b), p(a) q(a), p(b), q(a) x(p(x) q(x)), p(b) q(b), p(a), p(b), q(a) x(p(x) q(x)), p(b) q(b), q(a), p(b), q(a) x(p(x) q(x)), p(b), p(a), p(b), q(a) x(p(x) q(x)), q(b), p(a), p(b), q(a)

Infinite Construction Let us consider A = A 1 A 2 A 3, where: A 1 = x yp(x, y) A 2 = x p(x, x) A 3 = x, y, z(p(x, y) p(y, z) p(x, z)) The construction of semantic tableau will not terminate. x yp(x, y), A 2, A 3 x yp(x, y), yp(a 1, y), A 2, A 3 x yp(x, y), p(a 1, a 2 ), A 2, A 3 x yp(x, y), yp(a 2, y), p(a 1, a 2 ), A 2, A 3 x yp(x, y), p(a 2, a 3 ), p(a 1, a 2 ), A 2, A 3...

Infinite Construction Let us consider A = A 1 A 2 A 3, where: A 1 = x yp(x, y) A 2 = x p(x, x) A 3 = x, y, z(p(x, y) p(y, z) p(x, z)) This defines a countably infinite model (for example, N 0 : consider p as the successor relation). Once we introduce a new constant a i by instantiating y, then x should be also instantiated with that constant a i, which brings in another instantiation of y, which introduces another constant a j, which... Semantic tableau will have an infinite sequence of formulas p(a 1, a 2 ), p(a 2, a 3 ),... It neither closes nor terminates.

Infinite Construction Theorem 1 (5.24) A = A 1 A 2 A 3 has no finite model: A 1 = x yp(x, y), A 2 = x p(x, x), A 3 = x, y, z(p(x, y) p(y, z) p(x, z)) Proof. Suppose that A had a finite model. The domain of an interpretation is non-empty so it has at leas one element. By A 1, there is an infinite sequence of elements a 1, a 2,... s.t. ν σi [x a i ][y a j ](p(x, y)) = T for all i and j = i + 1. By A 3, p(a i, a j ) = T for all j > i since it means transitivity. If the model is finite, there exists some k > i such that a k = a i due to pigeon hole principle. For some k > i s.t. a k = a i, p(a i, a k ) = T by A 3. This contradicts A 2 which requires ν σi [x a i ](p(x, x)) = F.

Infinite Construction Observations: Semantic tableau is not a decision procedure for validity in the predicate calculus. Note that, without systematic construction, we may not construct a closed semantic tableau even when it is possible. Consider the order of tree expansion in the example below. A 1 A 2 A 3 x(q(x) q(x)) A 1, A 2, A 3, x(q(x) q(x))

Formal Construction Formal construction of semantic tableau consists of two steps. 1 Construction rules (α, β rule, γ rule for x, and δ rule for y.) 2 Systematic construction rules, which specify the order of applying rules. Definition 1 (5.25) A literal is closed atomic formula p(a 1,..., a k ) or the negation of such a formula. If a formula has no free variable, it is closed. Therefore, if an atomic formula is closed, all of its arguments are constants. γ γ(a) δ δ(a) xa(x) xa(x) A(a) A(a) xa(x) xa(x) A(a) A(a)

Systematic Construction Algorithm The algorithm takes a predicate calculus formula A as input, and produces a semantic tableau T as output. Each node of T, n is labelled with a set of formulas with a pair of sets, W (n) = (U(n), C(n)), where U(n) = {A n1,..., A nk }, and a set of constants, C(n) = {c n1,..., c nm }. Initially, T for φ is a single node n 0, labelled with {φ}, {a 0 }, where a 0 is the first constant in the constant pool. All branches are either: infinite finite and open, finite and closed. T is inductively built by choosing an unmarked leaf l, labelled with (U(l), C(l)), and applying the first applicable rule in the following list:

Systematic Construction Algorithm 1 U(l) contains complementary pair of literals: mark l closed. 2 U(l) is not a set of literals: choose A U(l) that is α, β, or δ formula: A is a α formula: create a new node l, labelled with W (l ) = ((U {A}) {A 1, A 2 }, C(l)). A is a β formula: create two new nodes, l and l. Label them with: W (l ) = ((U(l) = {A}) {A 1}, C(l)) W (l ) = ((U(l) = {A}) {A 2}, C(l)) A is a δ formula: create a new node l as a child of l and label it with W (l ) = ((U(l) {A}) {δ(a )}, C(l) {a }), where a is a constant that does not applear in U(l). 3 Let γ l1,..., γ lm U(l) be all the γ formulas in U(l) and let C(l) = {c l1,..., c lk }. Create a new node l and label it with W (l ) = (U(l) { m k i=1 j=1 γ l i (c lj )}, C(l)). However, if U(l) consists only of literals and γ formulas and if U(l ) as constructed would be the same as U(l), do not create node l ; instead, mark the leaf l as open.

Soundness Theorem 2 (5.28) Let A be a formula in the predicate calculus and let T be a tableau for A. If T closes, then A is unsatisfiable. Proof. The proof is by induction on the height h of node n. Cases for h = 0, and the inductive cases for α, β formulas is the same as the proof in the propositional calculus. The γ-rule was used: Then U(n) = U 0 xa(x) and U(n ) = U 0 { xa(x), A(a)}. Assume that U(n) is satisfiable with model I, so that ν I (A i ) = T for all A i U 0 (n) and also ν I ( xa(x )) = T. By Thm 5.15, ν I ( xa(x)) = T iff ν σi = T for all assignments σi, in particular for any assignment that assigns the same domain element to x that I does to a. But ν I (A(a)) = T contradicts the inductive hypothesis that U(n ) is unsatisfiable.

Soundness Proof. The δ-rule was used: Then U(n) = U 0 { xa(x)} and U(n ) = U 0 {A(a)} for some constant a which does not occur in a formula of U(n). Assume that U(n) is satisfiable and let I = (D, {R 1,..., R n }, {d 1,..., d k }) be a satisfying interpretation. Then ν I ( xa(x)) = T, so for the relation R i assigned to A and for some d D, (d) R i. Extend I to the interpretation I = (D, {R 1,..., R n }, {d 1,..., d k, d}) by assigning d to the constant a. Then ν I (A(a)) = T, and since ν I (U 0 ) = ν I (U 0 ) = T, we can conclude that ν I (U(n )) = T, contradicting the inductive hypothesis that U(n ) is unsatisfiable.

Completeness Theorem 3 (5.34) Let A be a valid formula. Then the systematic semantic tableau for A closes. Definition 2 (5.31) Let U be a set of formulas in the predicate calculus. U is a Hintikka set iff the following conditions hold for all formulas A U: If A is a closed atomic formula, either A / U or A / U If A is an α-formula, α 1 U and α 2 U If A is a β-formula, β 1 U or β 2 U If A is a γformulas, γ(α) U for all constants a appearing in formulas in U If A is a δ-formula, δ(a) U for some constant a

Completeness Theorem 4 (5.32 ) Let b be an open branch of a systematic tableau and U = n b U(n). The U is a Hintikka set. Lemma 1 (5.33) Hintikka s lemma: Let U be a Hintikka set. Then there is a model for U. Proof of Completeness (Thm 5.34). Let A be a valid formula and suppose that the systematic tableau for A does not close. By Thm 5.32, there is an open branch b s.t. U = U n b U(n) is a Hintikka set. By Lem 5.33, there is a model I for U. But A U so I = A, contradicting the assumption that A is valid.