CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.

Slides:



Advertisements
Similar presentations
The Logic of Quantified Statements
Advertisements

Section 1.3. More Logical Equivalences Constructing New Logical Equivalences We can show that two expressions are logically equivalent by developing.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Predicates and Quantifiers
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
2009/91 Predicates and Quantifiers (§1.3) In the sentence “x is greater than 3”: The phrase “x” denotes the subject - the object or entity that the sentence.
1 Predicate Logic Rosen 6 th ed., § Predicate Logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Predicate Logic and Quantifies
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/25/11 Ming-Hsuan Yang UC Merced 1.
Discrete Structures Chapter 3: The Logic of Quantified Statements
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
1 Predicates and Quantifiers CS 202, Spring 2007 Epp, Sections 2.1 and 2.2 Aaron Bloomfield.
Predicates and Quantifiers
Section 1.3: Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Logical Equivalence & Predicate Logic
資訊科學數學 6 : Predicates, Quantifiers & Mathematical Induction 陳光琦助理教授 (Kuang-Chi Chen)
1.1 CompSci 102© Michael Frank Today’s topics Propositional equivalencesPropositional equivalences Predicate logicPredicate logic Reading: Sections Reading:
1 Predicates and Quantifiers CS/APMA 202, Spring 2005 Rosen, section 1.3 Aaron Bloomfield.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Statements with Multiple Quantifiers. When a statement contains more than one quantifier, we imagine the actions suggested by the quantifiers as being.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Predicates and Quantified Statements
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
1 Sections 1.3 and 1.4 Predicates & Quantifiers. 2 Propositional Functions In a mathematical assertion, such as x < 3, there are two parts: –the subject,
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Discrete Structures – CNS 2300
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
CSci 2011 Recap ^Propositional operation summary not andorconditionalBi-conditional pq ppqqpqpqpqpqpqpqpqpq TTFFTTTT TFFTFTFF FTTFFTTF FFTTFFTT.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
Discrete Mathematics Mathematical reasoning: think logically; know how to prove Combinatorial analysis: know how to count Discrete structures: represent.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
3. The Logic of Quantified Statements Summary
Discrete Math - Module #1 - Logic
CSE15 Discrete Mathematics 01/23/17
Predicates & Quantifiers
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CS 220: Discrete Structures and their Applications
Discrete Math - Module #1 - Logic
Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional.
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

CS 285- Discrete Mathematics Lecture 4

Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional logic (recall) treats simple propositions (sentences) as atomic entities. In contrast, predicate logic distinguishes the subject of a sentence from its predicate. 2 Predicates & Quantifiers

Applications of Predicate Logic It is the formal notation for writing perfectly clear, concise, and unambiguous mathematical definitions, axioms, and theorems Predicate logic with function symbols, the “=” operator, and a few proof-building rules is sufficient for defining any conceivable mathematical system, and for proving anything that can be proved within that system! Predicates & Quantifiers 3

Subjects and Predicates In the sentence “The dog is sleeping”: ▫ The phrase “the dog” denotes the subject - the object or entity that the sentence is about. ▫ The phrase “is sleeping” denotes the predicate – a property that is true of the subject. In predicate logic, a predicate is modeled as a function P(·) from objects to propositions. ▫– P(x) = “x is sleeping” (where x is any object) Predicates & Quantifiers 4

Universes of Discourse (U.D.s) The power of distinguishing subjects from predicates is that it lets you state things about many subjects at once ▫Ex., let P(x)=“x+1>x”. We can then say, “For any number x, P(x) is true” instead of (0+1>0) ∧ (1+1>1) ∧ (2+1>2) ∧... The collection of values that a variable x can take is called x’s universe of discourse. Predicates & Quantifiers 5

Predicates Convention: Lowercase variables x, y, z... Denote subjects; uppercase variables P, Q, R…denote propositional functions (predicates). Keep in mind that the result of applying a predicate P to an object x is the proposition P(x). But the predicate P itself (e.g. P=“is sleeping”) is not a proposition (not a complete sentence). Ex. if P(x) = “x is a prime number”, P(3) is the proposition “3 is a prime number.” Predicates & Quantifiers 6

Propositional Functions Predicate logic generalizes the grammatical notion of a predicate to also include propositional functions of any number of arguments. ▫Ex. let P(x,y,z) = “x gave y the grade z”, then if x=“Mike”, y=“Mary”, z=“A”, then P(x,y,z) = “Mike gave Mary the grade A.” ▫Let P(x) denote the statement `x > 3’. What are the truth values of P(4) and P(2)? ▫Let Q(x,y) denote the statement “x = y+3’’. What are the truth values of the propositions Q(1,2) and Q(3,0)? Predicates & Quantifiers 7

Quantifier Expressions Quantifiers provide a notation that allows us to quantify (count) how many objects in the univ. of disc. satisfy a given predicate. ▫“ ∀ ” = ``FOR ALL’’ or universal quantifier. ▫ ∀ x P(x) means for all x in the u.d., P holds. ▫“ ∃ ” = ``there exists’’ or existential quantifier. ▫ ∃ x P(x) means there exists an x in the u.d. (that is, one or more) such that P(x) is true. Predicates & Quantifiers 8

The Universal Quantifier ∀ -- I Example: ▫Let the u.d. of x be parking spaces at UF. ▫Let P(x) be the predicate “x is full.” Then the universal quantification of P(x), ∀ x P(x), is the proposition: “All parking spaces at UF are full.” i.e., “Every parking space at UF is full.” i.e., “For each parking space at UF, that space is full. Predicates & Quantifiers 9

The Universal Quantifier ∀ -- II Let P(x) denote the statement ``x+1>x’’. What is the truth value of the quantification ∀ x P(x) where the domain consists of all real numbers? Same question for the statement Q(x) corresponding to “x < 2’’. Same question for the statement P(x) corresponding to “x 2 < 10’’ and the domain consists of the positive integers not exceeding 4. What is the truth value of (x 2 ≥ x) if the domain consists of all real numbers? If the domain consists of all integers? Predicates & Quantifiers 10

The Existential Quantifier ∃ --- I Example: ▫Let the u.d. of x be parking spaces at UF. ▫Let P(x) be the predicate “x is full.” Then the existential quantification of P(x), ∃ x P(x), is the proposition: “Some parking space at UF is full.” “There is a parking space at UF that is full.” “At least one parking space at UF is full.” Predicates & Quantifiers 11

The Existential Quantifier ∃ --- II Let P(x) denote the statement ``x>3’’. What is the truth value of the quantification ∃ x P(x) where the domain consists of all real numbers? Same question when P(x) denotes the statement “x = x + 1’’. Same question for the statement P(x) corresponding to “x 2 > 10’’ and the domain consists of the positive integers not exceeding Predicates & Quantifiers 12

Quantifiers with Restricted Domains What do the following statements mean, where the domain in each case consists of the real numbers? ▫ ∀ x 2 ) ▫ ∀ y ≠ 0 ( y3 > 0) ▫ ∃ z > 0 (z 2 = 2 ) Predicates & Quantifiers 13

Precedence of Quantifiers The quantifiers ∀ and ∃ have higher precedence than all logical operators from propositional calculus ▫Example, how do you evaluate ∀ x P(x) ∨ Q(x)? Predicates & Quantifiers 14

Free and bound Variables An expression like P(x) is said to have a free variable x (meaning, x is undefined). A quantifier (either ∀ or ∃ ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables Ex. ▫P(x,y) has 2 free variables, x and y ▫ ∀ x P(x,y) has 1 free variable, and one bound variable. [Which is which?] ▫“P(x), where x=3” is another way to bind x. ▫An expression with one or more free variables is still only a predicate: e.g. let Q(y) = ∀ x P(x,y) Predicates & Quantifiers 15

Logical Equivalences Involving Quantifiers Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. ▫Ex. Show that ∀ x (P(x) ∧ Q(x)) and ∀ x P(x) ∧ ∀ x Q(x) are logically equivalent, where the same domain is used throughout (A is true iff B is true). Predicates & Quantifiers 16

Negating Quantified Expressions Find the negation of “Every student in your class has taken a course in calculus’’. We have the following two logical equivalences, also denoted by De Morgan’s laws for quantifiers: ▫¬ ∀ x P(x) is equivalent to ∃ ¬ P(x) ▫¬ ∃ x Q(x) is equivalent to ∀ x ¬Q(x) Predicates & Quantifiers 17

De Morgan’s Laws for Quantifiers -- I ¬ ∀ x P(x) is equivalent to ∃ ¬ P(x) When is Negation True? ▫For every x, P(x) is false. When is Negation False? ▫There is an x for which P(x) is true. Predicates & Quantifiers 18

De Morgan’s Laws of Quantifiers -- II ¬ ∃ x P(x) is equivalent to ∀ x ¬P(x) When is Negation True? ▫There is an x for which P(x) is false. When is Negation False? ▫P(x) is true for every x. Predicates & Quantifiers 19

Examples What are the negations of the statements ``There is an honest politician’’ and ``All Americans eat cheeseburgers’’? What are the negations of the statements ∀ x(x 2 > x) and ∃ x(x 2 = 2) Show that ¬ ∀ xP(x) and ∃ x (P(x) ∧ ¬Q(x)) are logically equivalent. Predicates & Quantifiers 20

Translating from English Express the following statements using predicates and quantifiers: ▫“Every student in this class has studied calculus’’. ▫Some student in this class has visited Mexico. ▫ Every student in this class has visited either Canada or Mexico. Predicates & Quantifiers 21