Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

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

Thinking of Nested Quantification

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

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Chapter 1, Part II: Predicate Logic

Section Summary. Section 1.5 9/9/2014

Propositional Logic Not Enough

Proposi'onal Logic Not Enough

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

1.3 Predicates and Quantifiers

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Announcements CompSci 102 Discrete Math for Computer Science

Introduction to Sets and Logic (MATH 1190)

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

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

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Predicate Logic & Quantification

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

First order Logic ( Predicate Logic) and Methods of Proof

Mat 243 Exam 1 Review

CS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks

Discrete Structures for Computer Science

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

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

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

Discrete Mathematics and Its Applications

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

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

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

Topic #3 Predicate Logic. Predicate Logic

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

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof

Predicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function

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

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Review: Potential stumbling blocks

Lecture 4. Predicate logic

Logical equivalences 12/8/2015. S T: Two statements S and T involving predicates and quantifiers are logically equivalent

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

Announcement. Homework 1

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

Predicate Calculus lecture 1

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Logic and Proof. Aiichiro Nakano

Predicate Logic: Introduction and Translations

Lecture 3 : Predicates and Sets DRAFT

Logic Overview, I. and T T T T F F F T F F F F

Introduction to first-order logic:

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional.

Predicates and Quantifiers. CS 231 Dianna Xu

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

DISCRETE MATHEMATICS BA202

Math.3336: Discrete Mathematics. Nested Quantifiers

Predicates, Quantifiers and Nested Quantifiers

Philosophy 240 Symbolic Logic Russell Marcus Hamilton College Fall 2014

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

Department of Mathematics and Statistics Math B: Discrete Mathematics and Its Applications Test 1: October 19, 2006

MAT2345 Discrete Math

ITS336 Lecture 6 First-Order Logic

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

Logic. Propositional Logic: Syntax. Wffs

2. Use quantifiers to express the associative law for multiplication of real numbers.

Section 2.1: Introduction to the Logic of Quantified Statements


Chapter 3. The Logic of Quantified Statements

Predicate Calculus - Syntax

Discrete Structures Lecture 5

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

06 From Propositional to Predicate Logic

At least one of us is a knave. What are A and B?

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Announcements. CS311H: Discrete Mathematics. Introduction to First-Order Logic. A Motivating Example. Why First-Order Logic?

Section 2.3: Statements Containing Multiple Quantifiers


Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Discrete Structures Lecture Predicates and Quantifiers

Formal (Natural) Deduction for Predicate Calculus

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

CS0441 Discrete Structures Recitation 3. Xiang Xiao

Reasoning. Inference. Knowledge Representation 4/6/2018. User

CS 1571 Introduction to AI Lecture 14. First-order logic. CS 1571 Intro to AI. Midterm

EECS 1028 M: Discrete Mathematics for Engineers

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

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

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

A Little Deductive Logic

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

Proving Arguments Valid in Predicate Calculus

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 and First-Order Logic

Solutions to Exercises (Sections )

Bits and Bit Operations. Today s topics

Mathematical Logic Part Three

Transcription:

Predicate Logic

Today s Menu Predicate Logic Quantifiers: Universal and Existential Nesting of Quantifiers Applications

Limitations of Propositional Logic Suppose we have: All human beings are mortal. Sachin is a human being. Does it follow that Sachin is mortal? Cannot be represented using propositional logic. Need a language that talks about objects, their properties, and their relations.

Predicate Logic Predicate logic uses the following new features: Variables: x, y, z which can be replaced by elements from their domain. Predicates: P(x, y), M(x) are propositions with variables Quantifiers: for all, there exists Example: P(x, y): x = y + 3. P(4, 1) is TRUE. P(4, 1) is FALSE. P(2, 1) is FALSE. P(2, 1) is TRUE. Note: We talk about the truth value of a propositional function P(x, y) when we assign values to x and y from their domains, e.g. setting x = 4 and y = 1 to obtain P(4, 1) which is now a proposition.

Quantifiers Domain of Discourse, U: The domain of a variable in a propositional function. Universal Quantification: P(x) is the proposition: P(x) is true for all values of x in U. Universal Quantifier, For all, symbol: Written as: x P(x) which asserts P(x) is true for all x in U. Existential Quantification: P(x) is the proposition: There exists an element x in U such that P(x) is true. Existential Quantifier, There exists, symbol: Written as: x P(x) which asserts P(x) is true for some x in U. The truth value depends on the choice of U and P(x).

Universal Quantifier (similar to ) Thursday, January 17, 2013 x P(x) is read as For all x, P(x) or For every x, P(x) x P(x) Same as P(x 1 ) P(x 2 )... P(x n )... for all x i in U Examples: 1. If P(x) denotes x is an undergraduate student and U is {Enorlled Students in COMPSCI 230}, then x P(x) is TRUE. 2. If P(x) denotes x > 0 and U is the integers, then x P(x) is FALSE. 3. If P(x) denotes x > 0 and U is the positive integers, then x P(x) is TRUE. 4. If P(x) denotes x is even and U is the integers, then x P(x) is FALSE. 5. If P(x) denotes x is mortal and U represents all human beings, then x P(x) is TRUE.

Existential Quantifier (similar to ) Thursday, January 17, 2013 x P(x) is read as there exists x, P(x) or For some x, P(x) or there exists at least one x such that P(x) x P(x) Same as P(x 1 ) P(x 2 )... P(x n )... for all x i in U Examples: 1. If P(x) denotes x is a Duke student and U is the set of all Enorlled Students in COMPSCI 230, then x P(x) is TRUE. 2. If P(x) denotes x = x + 1 and U is the integers, then x P(x) is FALSE. 3. If P(x) denotes x = x * 2 and U is the integers, then x P(x) is TRUE. 4. If P(x) denotes x is a friend of Mickey mouse and U is the cartoon characters, then x P(x) is TRUE. Namely, Minnie mouse! 5. If P(x) denotes x is the oldest person in this room and U is everyone present in the classroom now, then x P(x) is TRUE. Namely, your instructor!

Uniqueness Quantifier! How to express the following using quantifiers? There is a unique x such that P(x). There is one and only one x such that P(x). Examples: 1. If P(x) denotes x + 1 = 0 and U is the integers, then!x P(x) is TRUE. 2. But if P(x) denotes x > 0, then!x P(x) is FALSE. The uniqueness quantifier is not really needed as the restriction that there is a unique x such that P(x) can be expressed as: x (P(x) y (P(y) y =x))

Thinking about Quantifiers When the domain of discourse U is finite, we can think of quantification as looping through the elements of the domain. To evaluate x P(x) loop through all x in the domain. If at every step P(x) is TRUE, then x P(x) is TRUE. If at a step P(x) is FALSE, then x P(x) is FALSE and the loop terminates. To evaluate x P(x) loop through all x in the domain. If at some step, P(x) is TRUE, then x P(x) is TRUE and the loop terminates. If the loop ends without finding an x for which P(x) is TRUE, then x P(x) is FALSE. Even if the domains are infinite, we can still think of the quantifiers this fashion, but the loops will not terminate in some cases.

Precedence of Quantifiers Operator Precedence 1 2 3 4 5 6 The quantifiers and have higher precedence than all the logical operators.

Old Example Revisited Our Old Example: Suppose we have: All human beings are mortal. Sachin is a human being. Does it follow that Sachin is mortal? Solution: Let H(x): x is a human being. Let M(x): x is mortal. The domain of discourse U is all human beings. All human beings are mortal. translates to x (H(x) M(x)) Sachin is a human being. translates to H(Sachin) Therefore, for H(Sachin) M(Sachin) to be true it must be the case that M(Sachin). Later we will show this formally.

Equivalences in Predicate Logic Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value for every predicate substituted into these statements and for every domain of discourse used for the variables in the expressions. The notation S T indicates that S and T are logically equivalent. Example: x S(x) x S(x)

Negating Quantified Expressions Take home message: Example: There is an honest politician. Let H(x): x is honest. U consists of all politicians. Then, x H(x). There does not exist an honest politician. x H(x). x H(x) is equivalent to x H(x). However, this statement has a different meaning: Not all politicians are honest. How do you express this? Thursday, January 17, 2013

The Lewis Carroll Example Premises: 1. All lions are fierce. 2. Some lions do not drink coffee. Conclusion: Can we conclude the following? 3. Some fierce creatures do not drink coffee. Let L(x): x is a lion. F(x): x is fierce. and C(x): x drinks coffee. Then the above three propositions can be written as: 1. x (L(x) F(x)) 2. x (L(x) C(x)) 3. x (F(x) C(x)) Later we ll show how to conclude 3 from 1 and 2.

Validity and Satisfiability An assertion involving predicates and quantifiers is valid if it is true for all domains for every propositional function substituted for the predicates in the assertion. Example: An assertion involving predicates is satisfiable if it is true for some domains some propositional functions that can be substituted for the predicates in the assertion. Otherwise it is unsatisfiable. Example: not valid but satisfiable Example: unsatisfiable The scope of a quantifier is the part of an assertion in which variables are bound by the quantifier.

Example: x y (x + y = 0) x y (xy = yx) x y (xy = x (y + 1)) x y (x has name Mickey and y has name Minnie) Nested Quantifiers U when TRUE U when FALSE Z N Z alphabet Z Z + Disney World COMPSCI 230 Example: Let U be the real numbers, Define P(x,y) : x/y = 1 What is the truth value of the following: 1. x yp(x,y) Answer: FALSE 2. x yp(x,y) Answer: TRUE 3. x y P(x,y) Answer: FALSE 4. x y P(x,y) Answer: TRUE

Quantifications of Two Variables Statement When True? When False P(x,y) is true for every pair x,y. There is a pair x, y for which P(x,y) is false. For every x there is a y for which P(x,y) is true. There is an x for which P(x,y) is true for every y. There is a pair x, y for which P(x,y) is true. There is an x such that P(x,y) is false for every y. For every x there is a y for which P(x,y) is false. P(x,y) is false for every pair x,y

More Examples Example 1: Brothers are siblings. Solution: x y (B(x,y) S(x,y)) Example 2: Siblinghood is symmetric. Solution: x y (S(x,y) S(y,x)) Example 3: Everybody loves somebody. Solution: x y L(x,y) Example 4: There is someone who is loved by everyone. Solution: y x L(x,y) Example 5: There is someone who loves someone. Solution: x y L(x,y) Example 6: Everyone loves himself Solution: x L(x,x)