Monadic Predicate Logic is Decidable. Boolos et al, Computability and Logic (textbook, 4 th Ed.)

Similar documents
First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Lecture 15: Validity and Predicate Logic

Completeness in the Monadic Predicate Calculus. We have a system of eight rules of proof. Let's list them:

Outline. Logic. Knowledge bases. Wumpus world characteriza/on. Wumpus World PEAS descrip/on. A simple knowledge- based agent

CS 161: Design and Analysis of Algorithms

Herbrand Theorem, Equality, and Compactness

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

Answers to the CSCE 551 Final Exam, April 30, 2008

Sec$on Summary. Definition of sets Describing Sets

Solutions to Sample Problems for Midterm

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

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

Proposi'onal Logic Not Enough

Final Exam (100 points)

Predicate abstrac,on and interpola,on. Many pictures and examples are borrowed from The So'ware Model Checker BLAST presenta,on.

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

W3203 Discrete Mathema1cs. Logic and Proofs. Spring 2015 Instructor: Ilia Vovsha. hcp://

PHIL12A Section answers, 28 Feb 2011

Variable Names. Some Ques(ons about Quan(fiers (but answers are not proven just stated here!) x ( z Q(z) y P(x,y) )

G52DOA - Derivation of Algorithms Predicate Logic

Informal Statement Calculus

Williamson s Modal Logic as Metaphysics

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

1 Completeness Theorem for Classical Predicate

CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre

4.1 Real-valued functions of a real variable

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions

Undecidability of the validity problem

CS 730/730W/830: Intro AI

Introduction to Metalogic

Classical First-Order Logic

Mathematical Logic (IX)

Proof Terminology. Technique #1: Direct Proof. Learning objectives. Proof Techniques (Rosen, Sections ) Direct Proof:

Meta-logic derivation rules

A Resolution Decision Procedure for the Guarded Fragment with Transitive Guards

(i) By Corollary 1.3 (a) on P. 88, we know that the predicate. Q(x, y, z) S 1 (x, (z) 1, y, (z) 2 )

Part II. Logic and Set Theory. Year

First Order Logic: Syntax and Semantics

One-to-one functions and onto functions

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

A set is an unordered collection of objects.

Introduc)on to Ar)ficial Intelligence

Restricted truth predicates in first-order logic

Lecture 13: Soundness, Completeness and Compactness

Frege s Proofs of the Axioms of Arithmetic

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.

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Exclusive Disjunction

Selected problems from past exams

MathQuest: Linear Algebra

Advanced Topics in LP and FP

A Guide to Proof-Writing

Supplementary Material for MTH 299 Online Edition

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Sect Least Common Denominator

Mathematical Preliminaries. Sipser pages 1-28

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

17. C M 2 (C), the set of all 2 2 matrices with complex entries. 19. Is C 3 a real vector space? Explain.

MATH 318/Fall, 2007 Notes on reading formulas and Skolem functions

Proofs. Joe Patten August 10, 2018

MathQuest: Linear Algebra. Answer: (False). We can write the third vector as a linear combination of the first two: v 3 = 3v 1 +2v 2.

Recitation Week 3. Taylor Spangler. January 23, 2012

23.1 Gödel Numberings and Diagonalization

The Vaught Conjecture Do uncountable models count?

Overview of Today s Lecture

Logic: Propositional Logic (Part I)

Math 3013 Problem Set 4

Introduction to Logic in Computer Science: Autumn 2006

Logic Michælmas 2003

A1 Logic (25 points) Using resolution or another proof technique of your stated choice, establish each of the following.

LB 220 Homework 4 Solutions

Math 115 Spring 11 Written Homework 10 Solutions

GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen Anthony Hall

Abstract model theory for extensions of modal logic

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

A Note on the Major Results of Begriffsschrift

Logic for Computer Scientists

Logic for Computer Scientists

- 1.2 Implication P. Danziger. Implication

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

Postulate 2 [Order Axioms] in WRW the usual rules for inequalities

Propositional Logic: Part II - Syntax & Proofs 0-0

1 Completeness Theorem for First Order Logic

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

Outline. Complexity Theory. Introduction. What is abduction? Motivation. Reference VU , SS Logic-Based Abduction

Moreno Mitrović. The Saarland Lectures on Formal Semantics

Gödel s Incompleteness Theorems

The predicate calculus is complete

Foundations of Logic Programming

Midterm 1 Solutions Thursday, February 26

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

20.1 2SAT. CS125 Lecture 20 Fall 2016

On some Metatheorems about FOL

SYMBOLIC LOGIC UNIT 10: SINGULAR SENTENCES

Expressiveness of predicate logic: Some motivation

Transcription:

Monadic Predicate Logic is Decidable Boolos et al, Computability and Logic (textbook, 4 th Ed.)

These slides use A instead of E instead of & instead of - instead of Nota>on Equality statements are atomic formulas: x=y, a=b, x=a, etc sentence = formula with no free variables

Monadic First- Order Predicate Logic (FOPL) The fragment of Predicate logic that uses no predicates with more than 1 argument In: Ex F(x) & Ey - F(y) AxEy - (x=y) (equality statements permised!) G(a) v G(b), etc. Out: AxEy (R(x,y)) R(a,b,b) v Ex F(x) (because they use a dyadic/triadic/etc predicates)

Some reasoning tasks For given sentences ϕ and ψ, does ψ follow from ϕ? ( Does ϕ have ψ as a logical consequence? ) More precisely: Is it true that for all models M, if M = ϕ then M = ψ? For given a sentence ϕ, is ϕ sa>sfiable? We mean: Is there a model that M such that M = ϕ? E.g., ExF(x) & Ex- F(x) is sa>sfiable Analogous for formulas with free variables

Monadic FOPL sa>sfiability is decidable

Key theorem (Lőwenheim- Skolem 1915) If S is a monadic sentence that has a model, then S is true in some model whose domain consist of at most 2 k.r members, where k is the number of predicate lesers in S and r the number of variables in S. Part 1, proof: The Key Theorem Part 2, proof: It follows that monadic FOPL is decidable

Proof of Part 1 (= Key Theorem) Let S be a sentence of monadic FOPL. Its predicates are P 1,..,P k Let M = S, and let D be the domain of M D may be infinite Let the signature of d in D (henceforth sig(d)) be the sequence <j 1,..,j k > where j i =1 if M specifies that P i is true of d and j i =0 otherwise sig(d) tell us which predicates in S are true of d given S, there are exactly 2 k different possible signatures

We call d and d similar if sig(d)=sig(d ) This means that d and d happen to share all their proper>es P 1,..,P k. similar is an equivalence rela>on, so each d in D belongs to an equivalence class of similar domain elements Each equivalence class is a subset of D there are at most 2 k equivalence classes

Towards a smaller model M Construct a subset E D as follows: Choose r elements from each equivalence class If a class has fewer than r elements then choose them all E cannot have more than 2 k.r elements (r for each equivalence class) Define: M is the restric>on of M to E just like M, but defined for elements of E only To be proven: M = S

A useful concept: match Informally: Two sequences of elements of E that are of the same length match if their elements are similar and differences within each sequence are respected in the other: Formally: c 1,..,c n matches d 1,..,d n iff 1. c i is similar to d i (for every 1<= i <= n) 2. c i = c j iff d i = d j (for every 1 <= i,j <= n)

Example These 2 sequences of domain objects do not match: c 1,..,c n = a,b,a d 1,..,d n = a,b,c If a and c are similar then clause 1 is fulfilled, but clause 2 is not (because c 1 =c 3 but d 1 <>d 3 ) Reason behind clause 2: equality statements in FOPL (e.g. in the sentence AxEy - (x=y))

Another useful concept A formula ϕ containing at most the free variables x 1,..,x n is sa?sfied by elements d 1,..,d n in a model M iff M = ϕ (x 1 :=d 1,..,x n :=d n ) (A simple extension of the idea of sa>sfiability)

Lemma Let G(x 1,..,x n ) be any subformula of S, containing at most the free variables x 1,..,x n d 1,..,d n a sequence of elements of D (the original domain) e 1,..,e n a sequence of elements of E (dom constructed above) d 1,..,d n matches sequence e 1,..,e n Then G(x 1,..,x n ) is sa>sfied by d 1,..,d n in M iff G(x 1,..,x n ) is sa>sfied by e 1,..,e n in M

Why does this lemma hold? (informally) As far as the predicates P 1,..,P k occurring in S are concerned, each element d i is just like e i Clause 1 of match The only other thing that can maser (because of equality statements!) is whether two elements in a given sequence are iden>cal Clause 2 of match

Sketch of a formal proof (by formula induc>on) Base Cases: G is atomic. G is of the form P i (t) or of the form t 1 =t 2 (t, t 1, and t 2 are variables or constants) 1. Let G = P i (t). We need to prove: P i (t) is sa>sfied by d 1 in M iff P i (t) is sa>sfied by e 1 in M But d 1 and e 1 are similar, hence the same predicates hold true of d 1 and e 1 (including the predicate P i ). This proves the first Base Case.

Sketch of proof by formula induc>on Base Cases: G is atomic. G is of the form P i (t) or of the form t 1 =t 2. 2. Let G = t 1 =t 2. We need to prove t 1 =t 2 is sa>sfied by d 1, d 2 in M iff t 1 =t 2 is sa>sfied by e 1, e 2 in M But the sequences d 1 d 2 and e 1 e 2 match, hence d 1 = d 2 iff e 1 =e 2. This proves the second Base Case.

Sketch of proof by formula induc>on Induc?ves Cases: [Proofs omised, but see Ques>ons for the Prac>cal] It suffices to address -, v, A. (1) Assume the Lemma holds for ϕ. Prove that it holds for φ. (2) Assume the Lemma holds for φ and ψ. Prove that it holds for φ v ψ. (3) Assume the Lemma holds for φ. Prove that it holds for Axφ.

S is itself a subformula of S, hence it follows directly (with n=0) from the Lemma that S is true in M iff S is true in M Recall: M may be infinite, but M is finite, with at most 2 k.r elements

Proof of Part 2 Let S be a FOPL sentence Associate with S a quan>fier- free formula S such that S is sa?sfiable iff S is. (Next page) If we manage to do this then we deduce: The sa>sfiability of S can be decided using truth tables (since these suffice for deciding the sa>sfiability of S ) Hence the sa>sfiability of S can be decided

Proof of Part 2 Making use of Part 1, associate with S a quan>fier- free formula S which is sa>sfiable iff S is. As follows: Induc>vely associate a quan>fier- free H with each subformula H of S, as follows: If H is atomic: H =H (no change!) If H is a truth func>onal compound: H =H If H=ExF: H =F(a 1 )v..vf(a m ) m=2 k.r If H=AxF: H =F(a 1 )&..&F(a m ) m=2 k.r S itself is a subformula of S, so this constructs a quan>fier- free S as well. The construc>on guarantees: S is sa>sfiable iff S is sa>sfiable

Example (using an arbitrary S) Consider S = ((ExF(x) & ExG(x)) & - (Ex(F(x)&G(x)))) Here k=2, r=3, so 2 k.r=12 The following formula is constructed: F(a 1 ) v.. v F(a 12 ) & G(a 1 ) v.. v G(a 12 ) & - ((F(a 1 )&G(a 1 )) v..v (F(a 12 )&G(a 12 )))

Example F(a 1 ) v.. v F(a 12 ) & G(a 1 ) v.. v G(a 12 ) & - ((F(a 1 )&G(a 1 )) v..v (F(a 12 )&G(a 12 ))) Proposi>onal formula with 24 atoms Each can be True or False => truth table has 2 24 rows. Try to find a row that is True. Example: F(a 1 ),F(a 2 ),..F(a 12 ), G(a 1 ),G(a 2 ),G(a 3 ),..G(a 12 ) T F F F T F F

Example F(a 1 ),F(a 2 ),..F(a 12 ), G(a 1 ),G(a 2 ),G(a 3 ),..G(a 12 ) T F F F T F F We can read off from this a model with 12 elements that sa>sfies the formula. The same model must sa>sfy the original (quan>fied) formula S too.

Concluding The proof suggests an algorithm for deciding whether a formula is sa>sfiable Not sa>sfiable è no row of the truth table is True Also applicable to logical consequence Implementa>ons exist 2 k implies Exponen>al in complexity (though faster methods exist) Decidability proofs oqen tell us something about the worst- case run?me of a program

Other FOPL fragments For every n, it is decidable whether a given formula of FOPL has a model of size m <= n Not proven here However, dyadic FOPL is undecidable If >me permits, we will prove this later For now, just one observa>on

Observe: Key Theorem does not hold for dyadic FOPL Example: the following FOPL sentence does not have a finite model Ex(x=x) & AxEy(x<y) & Axyz((x<y & y<z) à x<z) & Ax- (x<x) Why not?