Predicate Logic: Sematics Part 1

Similar documents
Predicate Calculus - Semantics 1/4

AAA615: Formal Methods. Lecture 2 First-Order Logic

First-Order Logic (FOL)

Introduction to Sets and Logic (MATH 1190)

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

CS156: The Calculus of Computation Zohar Manna Winter 2010

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

Predicate Logic - Semantic Tableau

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

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

First-Order Logic. Chapter Overview Syntax

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

Discrete Mathematics and Its Applications

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


Predicate Calculus lecture 1

Automated Reasoning Lecture 5: First-Order Logic

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

Predicate Calculus - Syntax

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

Propositional and Predicate Logic

Predicate Logic - Deductive Systems

First Order Logic (FOL) 1 znj/dm2017

2-4: The Use of Quantifiers

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

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

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

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

With Question/Answer Animations. Chapter 2

Informal Statement Calculus

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Herbrand Theorem, Equality, and Compactness

First-Order Predicate Logic. Basics

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.

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Learning Goals of CS245 Logic and Computation

Exercises 1 - Solutions

Lecture 3 : Predicates and Sets DRAFT

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

Logic Part I: Classical Logic and Its Semantics

Predicate Logic. Andreas Klappenecker

Propositional Logic Not Enough

Propositional Logic Language

06 From Propositional to Predicate Logic

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

Propositional Logic. Premises: If Jack knows Jill, then Jill knows Jack. Jack knows Jill. Conclusion: Is it the case that Jill knows Jack?

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.

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

ICS141: Discrete Mathematics for Computer Science I

Propositional Logic: Models and Proofs

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

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

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

Propositional Logic: Syntax

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Formal (Natural) Deduction for Predicate Calculus

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

1.1 Language and Logic

Mathematical Preliminaries. Sipser pages 1-28

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

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s).

Propositional Logic: Gentzen System, G

Introduction to Metalogic

Introduction to first-order logic:

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

03 Review of First-Order Logic

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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

Exercises. Exercise Sheet 1: Propositional Logic

Part I: Propositional Calculus

1.1 Language and Logic

1 Predicates and Quantifiers

1 Completeness Theorem for First Order Logic

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

Predicate Logic: Syntax


Logic: The Big Picture

CHAPTER 2. FIRST ORDER LOGIC

PREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

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

Recall that the expression x > 3 is not a proposition. Why?

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

First order Logic ( Predicate Logic) and Methods of Proof

Math Fundamentals of Higher Math

Logic for Computer Scientists

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Logic for Computer Scientists

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Introduction to Logic in Computer Science: Autumn 2006

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

MAT2345 Discrete Math

Today we will probably finish Course Notes 2.3: Predicates and Quantifiers.

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

Semantics I, Rutgers University Week 3-1 Yimei Xiang September 17, Predicate logic

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Transcription:

Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo

Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with conjunctive words such as and, or, not, if-then, etc. The minimum unit of ideas is a sentence in propositional logic. What if we want something finer-grained?

Domains and Modifiers What can we reason about a sentence itself which deals with its target domain? Jane is taller than Alice (target domain : human being) For natural numbers x and y, x + y (x + y) (target domain: N) What can we reason about a sentence itself which also deal with modifiers like there exists, all, among, and only? Note that these modifiers enable us to reason about an infinite domain because we do not have to enumerate all elements in the domain.

Predicate Calculus Every student is younger than some instructor. The only way to represent this in propositional logic is to capture the whole sentence as a literal, e.g. p. But there is more to it! This statement is about being a student, being an instructor and being younger than somebody else for a set of people in this room.

Predicate Calculus Every student is younger than some instructor. Let us define predicates: S(Suckzoo) for being a student, I (Shin) for being an instructor, Y (Suckzoo, Shin) for one being younger than the other. Also, it is important that we don t have to repeat writing as many formulas as there are pairs of students and instructors in this room: we want variables (again, this is where we leave the sentential form). In other words, we can rewrite the sentence as: Every student x is younger than some instructor y.

Every student x is younger than some instructor y. Finally, we introduce quantifiers to capture actual elements with variables. In other words, we can rewrite the sentence once again as: For every x, if x is a student, then there exists some y who is an instructor such that x is younger than y. x(s(x) ( y(i (y) Y (x, y))))

Relations and predicates The axioms and theorems of mathematics are defined on arbitrary sets (domain) such as the set of integers Z. For example, Fermat s last theorem: If an integer n is greater than 2, then the equation a n + b n = c n has no solutions in non-zero integers a, b, and c. The predicate calculus extends the propositional calculus with predicate letters that are interpreted as relations on a domain. That is, predicates are interpreted upon domain. Definition 1 (7.3) Let R be an n-ary relation on a domain D, that is, R is a subset of D n. The relation R can be represented by the Boolean-valued function P R : D n {T, F } that maps an n-tuple to T if and only if the n-tuple is an element of the relation.

Predicate Formulas Definition 2 (7.15) Let P, A and V be countable sets of symbols called predicate letters, constants, and variables, respectively: P = {p, q, r}, A = {a, b, c}, V = {x, y, z}. Atomic formula Formula argument ::= x for any x V argument ::= a for any a A argument list ::= argument+ atomic formula ::= p(argument list) for any p P formula ::= atomic formula formula ::= formula formula ::= formula formula // similarly for,... formula ::= x formula formula ::= x formula

Free and bound variables Definition 3 (7.7, 7.11) is the universal quantifier and is read for all. is the existential quantifier and is read there exists. In a quantified formula xa, x is the quantified variable and A is its scope: x does not have to appear in A. Definition 4 (7.12) Let A be a formula. An occurrence of a variable x in A is a free variable of A iff x is not within the scope of a quantified variable x. Notation: A(x 1,..., x n ) indicates that the set of free variables of the formula A is a subset of x 1,..., x n. A variable which is not free is bound. If a formula has no free variable it is closed. If {x 1,..., x n } are all the free variables of A, the universal closure of A is x 1 x n A and the existential closure is x 1 x n A.

Example 1 (7.14) In xp(x) q(x), the occurrence of x in p(x) is bound and the occurrence in q(x) is free. The universal closure is x( xp(x) q(x)). Obviously, it would have been better to write the formula as xp(x) q(y), where y is the free variable. The closure then would be y( xp(x) q(y))

Interpretations Definition 5 (5.10) Let A be a formula where {p 1,..., p m } are all the predicates appearing in A and {a 1,..., a k } are all the constants appearing in A. An interpretation I A for A is a triple: (D, {R 1,..., R m }, {d 1,..., d k }), where: D is a non-empty set called the domain, R i is an n i -ary relation on D that is assigned to the n i -ary predicate p i (notation: p I i = R i ) d i is an element of D that is assigned to the constant a i

Interpretations Example 2 (7.17) Given x(p(a, x)), here are three numerical interpretations: I 1 = (N, { }, {0}), I 2 = (N, { }, {1}), I 3 = (Z, { }, {0}) The formula can also be interpreted over strings: I 4 = (S, {substr}, { }) where S is the set of strings on some alphabet.

Interpretations Definition 6 (7.18) Let I A be an interpretation for formula A. An assignment σ IA : V D is a function which maps every free variable v V to an element d D, the domain of I A. σ I [x i d i ] is an assignment that is the same as σ IA except that x i is mapped to d i. Definition 7 (7.19) Let A be a formula, I A an interpretation, and σ IA an assignment. ν σia (A), the truth value of A, is defined by Let A = p k (c 1,..., c n ) be an atomic formula where each c i is either a free variable x i or a constant a i. ν σia (A) = T iff {d 1,..., d n } R k where R k is the relation assigned by I A to p k and d i is the domain element assigned to c i, either by I A if c i is a constant or by σ IA if c i is a variable.

Definition 7 Cont. ν σ ( A) = T iff ν σ (A) = F ν σ (A 1 A 2 ) iff ν σ (A 1 ) = T or ν σ (A 2 ) = T ν σ ( xa) = T iff ν σ[x d] (A) = T for all d D ν σ ( x(a)) = T iff ν σ[x d] (A) = T for some d D Remember: Interpretation (I A ): maps constants in A to domain. Assignment under interpretation (σ IA ): maps free variables in A to domain.

Interpretations Theorem 1 (7.20) Let A be a closed formula. Then ν σia (A) does not depend on σ IA. Theorem 2 (7.22) Let A = A(x 1,..., x n ) be a non-closed formula with free variables x 1,..., x n, and let I be an interpretation. Then: ν σia (A ) = T for some assignment σ IA iff ν I ( x 1... x n A ) = T ν σia (A ) = T for all assignment σ IA iff ν I ( x 1... x n A ) = T

Interpretations Definition 8 (7.23) Let A be a closed first order formula: A is true in I, or I is a model for A, iff ν I (A) = T. Notation: I A. A is valid if for all interpretations I, I A. Notation: A. A is satisfiable if for some interpretation I, I A. A is unsatisfiable if it is not satisfiable. A is falsifiable if it is not valid. Note: we only need I because A is closed.

Interpretations Example 3 (7.24) = ( xp(x)) p(a) Proof. Suppose that it is not. Then there must be an interpretation I = (D, {R}, {d}) such that ν I ( xp(x)) = T and ν I (p(a)) = F. By Theorem 2, from ν I ( xp(x)) = T it follows that ν σi (p(x)) = T for all assignment σ I, in particular for the assignment σ I that assigns d to x. But p(a) is closed, so ν σ I (p(a)) = ν I (p(a)) = F, which is a contradiction.

Semantics Analysis of Predicate Formulas Example 4 (7.25) x y(p(x, y) p(y, x)): this formula is satisfiable in an interpretation where p is assigned with a symmetric relation such as =. x y(p(x, y)): The formula is satisfiable in an interpretation where p is assigned a relation that is a total function, for example, (x, y) R iff y = x + 1 for x, y Z. The formula would be falsified if the domain is changed to the negative numbers because there is no negative number y such that y = 1 + 1. x y(p(x) p(y)): This formula is satisfiable only in a domain with at least two elements.

Semantics Analysis of Predicate Formulas Example 5 (5.20) x(p(a, x)): This expresses the existence of an element with special properties. For example, if p is interpreted by the relation on the domain N, then the formula is true for a = 0. If we change the domain to Z the formula is false for the same assignment of to p. x(p(x) q(x)) ( x(p(x)) x(q(x))): The formula is valid. We prove the forward direction and leave the converse as an exercise. Let I = (D, {R 1, R 2 }, {}) be an arbitrary interpretation. By Theorem 2, ν σi (p(x) q(x)) = T for all assignments σ I, and by the inductive definition of an interpretation, ν σi (p(x)) = T and ν σi (q(x)) = T for all assignments σ I. Again by Theorem 2, ν I ( x(p(x))) = T and ν I ( x(q(x))) = T, and by the definition of an interpretation ν I ( x(p(x)) x(q(x))) = T.

Exercises Show that does not distribute over disjunction by constructing a falsifying interpretation for x(p(x) q(x)) ( xp(x) xq(x)).