Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Similar documents
Section Summary. Section 1.5 9/9/2014

Proposi'onal Logic Not Enough

Thinking of Nested Quantification

Discrete Mathematics and Its Applications

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

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

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

Propositional Logic Not Enough

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

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

Predicate Calculus lecture 1

1.3 Predicates and Quantifiers

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

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

ICS141: Discrete Mathematics for Computer Science I

Introduction to Sets and Logic (MATH 1190)

Discrete Structures for Computer Science

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

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

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

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

Logic and Proof. Aiichiro Nakano

Predicate Calculus - Syntax

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

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

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

Math.3336: Discrete Mathematics. Nested Quantifiers

Predicates and Quantifiers. CS 231 Dianna Xu

First order Logic ( Predicate Logic) and Methods of Proof

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Discrete Structures Lecture 5

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

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

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

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

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

EECS 1028 M: Discrete Mathematics for Engineers

Review: Potential stumbling blocks

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

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

Predicate Logic. Andreas Klappenecker

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

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

1 Predicates and Quantifiers

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

Lecture 3. Logic Predicates and Quantified Statements Statements with Multiple Quantifiers. Introduction to Proofs. Reading (Epp s textbook)

Announcement. Homework 1

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

Predicate Logic & Quantification

Chapter 1, Part II: Predicate Logic

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

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

III. Elementary Logic

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

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

Solutions to Sample Problems for Midterm

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

Negations of Quantifiers

Introduction to Decision Sciences Lecture 2

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

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

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

Math Fundamentals of Higher Math

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

Discrete Structures Lecture Predicates and Quantifiers

Propositional and Predicate Logic

Math 3336: Discrete Mathematics Practice Problems for Exam I

Propositional and Predicate Logic

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

ECOM Discrete Mathematics

Announcements CompSci 102 Discrete Math for Computer Science

Predicates, Quantifiers and Nested Quantifiers

Intro to Logic and Proofs

Mat 243 Exam 1 Review

software design & management Gachon University Chulyun Kim

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

Logic and Propositional Calculus

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

Do not start until you are given the green signal

CSC 125 :: Final Exam May 3 & 5, 2010

DISCRETE MATHEMATICS BA202

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

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

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003


Predicate Logic: Introduction and Translations

Logic and Propositional Calculus

1 The Foundation: Logic and Proofs

For all For every For each For any There exists at least one There exists There is Some

Predicate Logic combines the distinctive features of syllogistic and propositional logic.

1.1 Language and Logic

15414/614 Optional Lecture 3: Predicate Logic

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

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

Solutions to Exercises (Sections )

Symbolising Quantified Arguments

Transcription:

Lecture 4 1.4 Predicates and Quantifiers 1.5 Nested Quantifiers

Predicates The statement "x is greater than 3" has two parts. The first part, "x", is the subject of the statement. The second part, "is greater than 3" is called the predicate.

Quantifiers

Universal Quantification

Existential Quantification

Logical Equivalences Involving Quantifiers Statements involving predicates and quantifiers are logically equivalent iff they have the same truth value for all applications and for all domains of discourse. x ( P( x) Q( x) ) x( P( x) ) x( Q( x) ) xp ( x) x P( x) xp ( x) x P( x) ( P( x) Q( x) ) x( P( x) Q( x) ) x

News Flash! Predicates are not propositions! they are propositional functions A predicate can be turned into a proposition by instantiation of its variables... subject predicate proposition x x was a man. Daniel Boone was a man. x x > 3 2 > 3 x,y Q(x,y) Q(2,3) x,y,z R(x,y,z)=> x+y=z R(1,2,3) true R(0,0,1) false or by quantification... subject predicate proposition x x was a man x(x wasa man) x x>3 x,y Q(x,y) x,y,z R(x,y,z)=> x+y=z x(x > 3) x y ( Q(x,y) ) ( x + y z) x y z =

Binding Variables

DeMorgan's Laws for Quantifiers

Universal Quantifiers and Negation xp(x) P(x) 1 P(x ) 2 L P(x ) n For all x, P(x) is true. To show that the universal quantifier is not true we need only to show a counterexample. That is we demonstrate that the negation of the universal quantifier is true. xp (x) x P(x) xp(x) x P(x) { P(x) P(x ) L P(x )} P(x) 1 1 2 P(x ) L 2 n P(x ) n

Existential Quantifier and Negation Existential quantifiers state that in the domain of discourse there exists as least one member for which the predicate is true. x P(x) P(x) 1 P(x ) 2 L P(x n ) The negation of the existential quantifier says that none of the members of the domain of discourse make the predicate true. xp(x) { P(x) P(x ) L P(x )} 1 P(x) 1 2 P(x ) L 2 n P(x n )

There is more than one way to x a y. We can express the statement, "There is an animal that is a mammal and can fly but is not a bat", as a logical proposition, where, x M(x) F(x) B(x) M(x) = x is a mammal F(x) = x can fly B(x) = x is a bat Alternatively we can create predicates with multiple variables, such as T(x,y) = returns true if x is a y which allows us to rewrite the logical proposition as, x (T x, mammal) F(x) (Tx,bat)

Understanding compound quantifiers ( x + y = ) x y 0 Math Expressions For all x there exists a y such that x+y=0 - additive inverse x y ( x + y = y + x) For all x and y, x+y is equal to y+x. - commutative law x y z ( x + (y + z) = (x + y) + z) For all x,y and z, x plus the quantity y+z is equal to the quantity x+y plus the value z. - associative law x C(x) - x owns a computer F(x,y) - x and y are friends Logical Expressions { C(x) y( C(y) F(x, y) )} "Every student either owns a computer or has a friend that owns a computer."

Order of Quantifiers

Nested Quantifiers: An Example

Negating Compound Quantifiers... Au contraire, mon ami Express the negation of the statement ( ) x y xy = 1 so that no negation precedes a quantifier. x y x y x y x y ( xy = 1) ( xy = 1) ( xy = 1) ( xy 1) It is not true that... There exists some x such that there does not exist a y that makes xy=1 There exists some x such that for all y, x times y does not equal 1.

Compound Quantifiers as Nested Loops ( x + y z) x y z = isa_z = false; for x in x1..xn loop for y in y1..yn loop for z in z1..zn loop if x+y=z then isa_z = true; end if; end loop; end loop; end loop; Nested Loons Propositional quantifiers imply an evaluation of the predicate for all possible values in the domain of discourse. Sometimes the domain is infinite and possibly uncountable, but we can still consider the comparison as being implemented as a nested loop. In the code segment above, is there a more efficient way to represent existential quantifiers?