Testing simple quantification schemas for satisfiability

Slides:



Advertisements
Similar presentations
The Logic of Quantified Statements
Advertisements

Exam #3 will be given on Monday Nongraded Homework: Now that we are familiar with the universal quantifier, try
RMIT University; Taylor's College This is a story about four people named Everybody, Somebody, Anybody and Nobody. There was an important job to be done.
For Friday, read chapter 6, section 2. As nongraded HW, do the problems on p Graded Homework #7 is due on Friday at the beginning of class.
March 10: Quantificational Notions Interpretations: Every interpretation interprets every individual constant, predicate, and sentence letter of PL. Our.
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.
Discrete Structures Chapter 3: The Logic of Quantified Statements
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Key Stone Problem… Key Stone Problem… next Set 22 © 2007 Herbert I. Gross.
Collecting Things Together - Lists 1. We’ve seen that Python can store things in memory and retrieve, using names. Sometime we want to store a bunch of.
Logic CL4 Episode 16 0 The language of CL4 The rules of CL4 CL4 as a conservative extension of classical logic The soundness and completeness of CL4 The.
PART TWO PREDICATE LOGIC. Chapter Seven Predicate Logic Symbolization.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Copyright © Cengage Learning. All rights reserved. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS THE LOGIC OF QUANTIFIED STATEMENTS.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
Theory and Applications
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
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.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Chapter 1 Logic and Proof.
Predicates and Quantified Statements I
Solving Systems of Equations in Two Variables; Applications
Logic II CSE 140 etc..
CSE15 Discrete Mathematics 01/23/17
Theory Of Computer Science
7/3/2018 EMR 17 Logical Reasoning Lecture 11.
7/20/2018 EMR 17 Logical Reasoning Lecture 7.
Copyright © Cengage Learning. All rights reserved.
ARTIFICIAL INTELLIGENCE
Copyright © Cengage Learning. All rights reserved.
CMSC Discrete Structures
Today’s Topics Universes of Discourse
Copyright © Cengage Learning. All rights reserved.
CS201: Data Structures and Discrete Mathematics I
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
1 FUNCTIONS AND MODELS.
Unit 10 Arithmetic-logic Units
The Derivative as a Function
From now on: Combinatorial Circuits:
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
The Fundamental Theorem of Calculus
Copyright © Cengage Learning. All rights reserved.
For Wednesday, read chapter 8, section 2 (pp )
Predicates and Quantifiers
Copyright © Cengage Learning. All rights reserved.
CS201: Data Structures and Discrete Mathematics I
Primitive Recursive Predicates
1.3 Propositional Equivalences
Copyright © Cengage Learning. All rights reserved.
Logical and Rule-Based Reasoning Part I
Predicates and Quantifiers
Theory of Computation Lecture 6: Primitive Recursive Functions I
ECE 352 Digital System Fundamentals
Herbrand Semantics Computational Logic Lecture 15
Validity and Soundness, Again
Logical truths, contradictions and disjunctive normal form
The Satisfiability Problem
Starting out with formal logic
Logical equivalence.
Presentation transcript:

Testing simple quantification schemas for satisfiability 7/18/2018 EMR 17 Deductive Logic Testing simple quantification schemas for satisfiability

Simple quantificational schemata 7/18/2018 Simple quantificational schemata A quantificational schema A counts as simple iff it has one of these forms: ∃xΦ(x) ∀x Φ(x) where Φ(x) is a schema • that contains no quantifiers; and • that has x as its sole free variable. (Obviously, it’s not important that the sole variable be x; it could be y, z, etc.)

Simple quantificational schemata 7/18/2018 Simple quantificational schemata What we will now produce is an exact recipe for analyzing any finite set S of simple quantificational schemata, where: • If S is unsatisfiable, our recipe will say so. • If S is satisfiable, our recipe will say so. And better still: • If S is satisfiable, our recipe will produce an explicit interpretation that makes every member of S true.

7/18/2018 The recipe Remember: S is a set of simple quantificational schemata. Suppose it contains N existential schemata, and M universal schemata: ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) ∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) First step: Rewrite all the existential schemata, so that a different variable is used in each one; let these variables be x1, x2, …, xN: ∃x1Φ1(x1), ∃x2Φ2(x2), …, ∃xNΦN(xN)

7/18/2018 The recipe Second step: Remove the existential quantifier from the beginning of each existential schema, to yield a set of N quantifier-free schemata, each with a single – and different – free variable: Φ1(x1), Φ2(x2), …, ΦN(xN) Third step: For each universal schema, produce N instances of it – one for each of the N variables introduced in the first step: Ψ1(x1), Ψ2(x1), …, ΨM(x1) Ψ1(x2), Ψ2(x2), …, ΨM(x2) What if we started with no existential schemata? Then, at this step, produce just one instance of each universal schema, using the variable “x” in each case. … Ψ1(xN), Ψ2(xN), …, ΨM(xN)

The recipe You will now have a set T of N × (M+1) schemata, where 7/18/2018 The recipe You will now have a set T of N × (M+1) schemata, where • each schema in T is quantifier-free; • each schema in T contains just one free variable (one of the variables x1, x2, …, xN). Fourth step: Replace each basic frame in these schemata by a different sentence-letter (in a uniform way). You will now have a set T* of N × (M+1) truth-functional schemata, constructed from N different sentence-letters.

7/18/2018 The recipe Fifth step: Use methods from truth-functional logic to test the set T* for satisfiability. Result: If T* is truth-functionally satisfiable, then S is satisfiable; if not, not. It would be a good idea to illustrate this recipe, by example.

Illustration Suppose our original schemata are these: ∃xFx ∃x –Gx 7/18/2018 Illustration Suppose our original schemata are these: ∃xFx ∃x –Gx ∀x(Fx ⊃ Gx) First step: ∃x1Fx1 ∃x2 –Gx2 Second step: Fx1 –Gx2

Illustration Third step: Fx1 ⊃ Gx1 Fx2 ⊃ Gx2 Fourth step: Fx1 p –Gx2 7/18/2018 Illustration Third step: Fx1 ⊃ Gx1 Fx2 ⊃ Gx2 Fourth step: Fx1 p –Gx2 –q Fx1 ⊃ Gx1 p ⊃ r s ⊃ q Fx2 ⊃ Gx2

Illustration Fifth step: p –q p ⊃ r s ⊃ q All true when p = T q = ⊥ 7/18/2018 Illustration Fifth step: p –q p ⊃ r s ⊃ q All true when p = T q = ⊥ r = T s = ⊥

Reading off the interpretation 7/18/2018 Reading off the interpretation How, from this procedure, do we construct the needed interpretation? Remember that each sentence-letter stands for a basic frame. So: let the universe have exactly one object for each of the N free variables. (In fact, we might as well let these objects be the variables themselves. After all, why not? Logic doesn’t care what entities it’s talking about!) If the sentence-letter is true, put the given object into the extension of the given predicate. If not, not. Done!

Reading off the interpretation 7/18/2018 Reading off the interpretation In our example: Fx1: p = T Fx2: q = ⊥ Gx1: r = T Gx2: s = ⊥ So our universe is simply {1, 2} (or, if we like, {x1, x2}). Extension of F: {1} (or, if we like, {x1}) Extension of G: {1} (or, if we like, {x1})

7/18/2018 Simplifying slightly It will be convenient to collapse the fourth and fifth steps. Instead of replacing each basic frame by a sentence letter, we will simply allow truth-functional interpretations to directly assign a truth-value to each basic frame. In our example: Fx1 = T Fx1 –Gx2 Fx2 = ⊥ Fx1 ⊃ Gx1 Gx1 = T Fx2 ⊃ Gx2 Gx2 = ⊥

7/18/2018 Another illustration Suppose we want to find out whether there is an interpretation that makes both of these true: ∀x(Fx ≡ –Gx) ∀x[ (Fx v Gx) ⊃ (Hx v Jx) ] but each of these false: ∀x(Fx ⊃ Hx) ∀x(Fx ⊃ Jx) ∀x(Gx ⊃ Hx) ∀x(Gx ⊃ Jx)

7/18/2018 Another illustration That’s exactly the same as finding an interpretation that makes all of these true: ∀x(Fx ≡ –Gx) ∀x[ (Fx v Gx) ⊃ (Hx v Jx) ] ∃x(Fx . –Hx) ∃x(Fx . –Jx) ∃x(Gx . –Hx) ∃x(Gx . –Jx)

7/18/2018 Another illustration First step: we deal with the existential schemata: ∀x(Fx ≡ –Gx) ∀x[ (Fx v Gx) ⊃ (Hx v Jx) ] ∃x(Fx . –Hx) ∃y(Fy . –Jy) ∃x(Fx . –Jx) ∃x(Gx . –Hx) ∃z(Gz . –Hz) ∃x(Gx . –Jx) ∃w(Gw . –Jw)

7/18/2018 Another illustration First step: we deal with the existential schemata: ∃x(Fx . –Hx) (Fx . –Hx) ∃y(Fy . –Jy) (Fy . –Jy) ∃z(Gz . –Hz) (Gz . –Hz) ∃w(Gw . –Jw) (Gw . –Jw)

7/18/2018 Another illustration Since we have four variables, we need four instances of each of the two universal schemata: ∀x(Fx ≡ –Gx) ∀x[ (Fx v Gx) ⊃ (Hx v Jx) ] (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

Another illustration We thus end up with 16 basic frames: 7/18/2018 Another illustration We thus end up with 16 basic frames: Fx Gx Hx Jx Fy Gy Hy Jy Fz Gz Hz Jz Fw Gw Hw Jw And we need to determine whether there is an assignment of truth-values to them that makes all of the following true: (Fx . –Hx) (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy . –Jy) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Gz . –Hz) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Gw . –Jw) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

Another illustration Don’t use a truth-table!! It’s easier than that: 7/18/2018 Another illustration Don’t use a truth-table!! It’s easier than that: Fx T Gx ⊥ Hx ⊥ Jx T Fy Gy Hy Jy Fz Gz Hz Jz Fw Gw Hw Jw We can start by focusing on the schemata that are just “about” x: (Fx . –Hx) (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy . –Jy) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Gz . –Hz) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Gw . –Jw) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

Another illustration Don’t use a truth-table!! It’s easier than that: 7/18/2018 Another illustration Don’t use a truth-table!! It’s easier than that: Fx T Gx ⊥ Hx ⊥ Jx T Fy T Gy ⊥ Hy T Jy ⊥ Fz Gz Hz Jz Fw Gw Hw Jw And then the ones that are just “about” y: (Fx . –Hx) (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy . –Jy) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Gz . –Hz) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Gw . –Jw) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

Another illustration Don’t use a truth-table!! It’s easier than that: 7/18/2018 Another illustration Don’t use a truth-table!! It’s easier than that: Fx T Gx ⊥ Hx ⊥ Jx T Fy T Gy ⊥ Hy T Jy ⊥ Fz ⊥ Gz T Hz ⊥ Jz T Fw Gw Hw Jw And then the ones that are just “about” z: (Fx . –Hx) (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy . –Jy) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Gz . –Hz) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Gw . –Jw) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

Another illustration Don’t use a truth-table!! It’s easier than that: 7/18/2018 Another illustration Don’t use a truth-table!! It’s easier than that: Fx T Gx ⊥ Hx ⊥ Jx T Fy T Gy ⊥ Hy T Jy ⊥ Fz ⊥ Gz T Hz ⊥ Jz T Fw ⊥ Gw T Hw T Jw ⊥ And then the ones that are just “about” w: (Fx . –Hx) (Fx ≡ –Gx) (Fx v Gx) ⊃ (Hx v Jx) (Fy . –Jy) (Fy ≡ –Gy) (Fy v Gy) ⊃ (Hy v Jy) (Gz . –Hz) (Fz ≡ –Gz) (Fz v Gz) ⊃ (Hz v Jz) (Gw . –Jw) (Fw ≡ –Gw) (Fw v Gw) ⊃ (Hw v Jw)

7/18/2018 Why does it work? We’ve seen the recipe. It works. Now, why does it work? This is really two questions: If the original set S is satisfiable, why is our recipe guaranteed to say so? If our recipe says that the set S is satisfiable, why does that show that it really is satisfiable? We will take these questions in turn.

∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) ∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) 7/18/2018 First direction Suppose the set S is satisfiable. That means: There is some interpretation I that makes all of these schemata true: ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) ∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) Focus on the existential schemata.

∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) 7/18/2018 First direction ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) There is some way of choosing a value for x from I’s domain, so that Φ1(x) is true There is some way of choosing a value for x from I’s domain – not necessarily the same way! – so that Φ2(x) is true And so on, for each of the N existential schemata.

∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) 7/18/2018 First direction ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) It follows that there is some way of selecting, from I’s domain, a value for x1, and a value for x2, …, and a value for xN, so that Φ1(x1) is true Φ2(x2) is true … ΦN(xN) is true Let us settle on such a choice.

∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) 7/18/2018 First direction Now focus on the universal schemata: ∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) Our interpretation I makes each of these true, as well. In that case, given our choice of values for x1, x2, …, xN, I must also make each of these instances true: Ψ1(x1), Ψ2(x1), …, ΨM(x1) Ψ1(x2), Ψ2(x2), …, ΨM(x2) … Ψ1(xN), Ψ2(xN), …, ΨM(xN)

7/18/2018 First direction Now we must remember how it is that I (together with an assignment of values to free variables) makes one of the schemata true. It does so by • giving a truth-value to each basic frame in the given schema; • letting the truth-functional connectives in that schema do the rest. (Remember: the schemata are quantifier-free!) Then that very assignment of truth-values to basic frames shows that the quantifier-free schemata generated by our recipe are jointly truth-functionally satisfiable.

Second direction Now we turn to the remaining question. 7/18/2018 Second direction Now we turn to the remaining question. Suppose our recipe says that S is satisfiable. In other words, we have shown that the quantifier-free schemata generated by our recipe are jointly truth-functionally satisfiable: Φ1(x1), Φ2(x2), …, ΦN(xN) Ψ1(x1), Ψ2(x1), …, ΨM(x1) Ψ1(x2), Ψ2(x2), …, ΨM(x2) … Ψ1(xN), Ψ2(xN), …, ΨM(xN)

7/18/2018 Second direction So there is at least one assignment of truth-values to the basic frames appearing in these schemata that makes all of the schemata true. Starting with these truth-values, we can read off an interpretation I that makes every member of S true. First, let the universe of discourse of I be this: {x1, x2, …, xN} (That’s right: the objects I talks about are the variables themselves.)

7/18/2018 Second direction Now we need to specify, for each predicate used in the schemata, the extension of that predicate. Suppose “F” is one such predicate. Then, for each i, the variable xi is in the extension of F iff our recipe assigned the truth-value true to the basic frame “Fxi”. Proceeding in this way, our interpretation will specify extensions for each predicate. And then we’re done: the interpretation I has been specified completely.

7/18/2018 Second direction Let’s observe that there is a way of choosing, from I’s domain, values for x1, x2, …, xN, so that each of these schemata are true: Φ1(x1), Φ2(x2), …, ΦN(xN) Ψ1(x1), Ψ2(x1), …, ΨM(x1) Ψ1(x2), Ψ2(x2), …, ΨM(x2) … Ψ1(xN), Ψ2(xN), …, ΨM(xN) Just assign each variable to itself!

∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) 7/18/2018 Second direction Now we just need to check that I does indeed make each schema in S true. Start with the existential schemata: ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x)

∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x) 7/18/2018 Second direction We already saw that • there is an object in I’s domain which, when assigned to the variable x, makes Φ1(x) true; • there is an object in I’s domain which, when assigned to the variable x, makes Φ2(x) true; • there is an object in I’s domain which, when assigned to the variable x, makes Φ3(x) true; • etc. It follows that I makes each of these schemata true: ∃xΦ1(x), ∃xΦ2(x), …, ∃xΦN(x)

∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x) 7/18/2018 Second direction We also saw that • every object in I’s domain is such that, when it is assigned to the variable x, it makes Ψ1(x) true; • every object in I’s domain is such that, when it is assigned to the variable x, it makes Ψ2(x) true; • every object in I’s domain is such that, when it is assigned to the variable x, it makes Ψ3(x) true; • etc. It follows that I makes each of these schemata true: ∀xΨ1(x), ∀xΨ2(x), …, ∀xΨM(x)