Quantifiers. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, 2018

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

Section Summary. Section 1.5 9/9/2014

Predicate Calculus lecture 1

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

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

First order Logic ( Predicate Logic) and Methods of Proof

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.

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Quantifiers. P. Danziger

Predicates and Quantifiers. CS 231 Dianna Xu

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

Mat 243 Exam 1 Review

Section 2.1: Introduction to the Logic of Quantified Statements

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

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

Chapter 2: The Logic of Quantified Statements

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

THE LOGIC OF QUANTIFIED STATEMENTS

Basic Logic and Proof Techniques

Direct Proof and Proof by Contrapositive

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

1.3 Predicates and Quantifiers

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

2-4: The Use of Quantifiers

CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:

Introduction to Sets and Logic (MATH 1190)

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

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

Propositional Logic Not Enough

Discrete Structures for Computer Science

Predicate Logic: Sematics Part 1

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

1.1 Language and Logic

Discrete Mathematics and Its Applications

THE LOGIC OF QUANTIFIED STATEMENTS

First-Order Logic (FOL)

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

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

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

III. Elementary Logic

ICS141: Discrete Mathematics for Computer Science I

Logic and Proofs. (A brief summary)

Section 3.1: Direct Proof and Counterexample 1

MATH 215 Discrete Mathematics Worksheets. Which of these are propositions? What are the truth values of those that are propositions?

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

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Foundation of proofs. Jim Hefferon.

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Predicate logic. G. Carl Evans. Summer University of Illinois. Propositional Logic Review Predicate logic Predicate Logic Examples

Math 3320 Foundations of Mathematics

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

Recitation 4: Quantifiers and basic proofs

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

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

Predicate Calculus - Syntax

Section 2.3: Statements Containing Multiple Quantifiers

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

1.1 Language and Logic

Predicate Logic: Introduction and Translations

CS 250/251 Discrete Structures I and II Section 005 Fall/Winter Professor York

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

STRATEGIES OF PROBLEM SOLVING

Equivalence and Implication

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

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

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

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

A. Propositional Logic

DISCRETE MATHEMATICS BA202

With Question/Answer Animations. Chapter 2

Math.3336: Discrete Mathematics. Nested Quantifiers

1.5 MATHEMATICAL LANGUAGE

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

Learning Goals of CS245 Logic and Computation

Symbolising Quantified Arguments

Section 1.3. Let I be a set. When I is used in the following context,

G52DOA - Derivation of Algorithms Predicate Logic

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Quantifiers and Statements

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

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

Strategies for Proofs

Some Review Problems for Exam 1: Solutions

Introduction to first-order logic:

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

Thinking of Nested Quantification

The Process of Mathematical Proof

- First-order formula. Instructor: Yu Zhen Xie

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

Logic and Proofs. (A brief summary)

We have seen that the symbols,,, and can guide the logical

EECS 1028 M: Discrete Mathematics for Engineers

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

MA103 STATEMENTS, PROOF, LOGIC

COMP Intro to Logic for Computer Scientists. Lecture 11

CS70: Discrete Math and Probability. Slides adopted from Satish Rao, CS70 Spring 2016 June 20, 2016

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

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

Topic #3 Predicate Logic. Predicate Logic

Formal Geometry. Conditional Statements

Transcription:

Quantifiers Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February, 2018 Alice E. Fischer Quantifiers... 1/34

1 Predicates and their Truth Sets Sets of Numbers 2 Universal Quantifiers Existential Quantifiers 3 Negating Quantified Statements Proofs 4 Alice E. Fischer Quantifiers... 2/34

Predicates and their Truth Sets Sets of Numbers Predicates and their Truth Sets Sets of Numbers Alice E. Fischer Quantifiers... 3/34

Predicates Outline Predicates and their Truth Sets Sets of Numbers In English, a sentence has a subject (noun or pronoun) and a predicate (verb phrase). In logic, a proposition is a sentence that can be true or false but not both. We can write a proposition using symbols but we assign specific meanings to those symbols. Often, the proposition models some real-world situation. If the subject of a sentence is a variable, it is not a proposition. We call it a predicate or an open sentence. The domain of the predicate is the set of all values that can be substituted for the variable. Alice E. Fischer Quantifiers... 4/34

The Truth Set of a Predicate Predicates and their Truth Sets Sets of Numbers The truth set of a predicate, P, is the set of all values, x, in its domain, D, that produce true propositions when substituted for the predicate s variable. {x D P(x)} Suppose our domain is R, the real numbers. Let P be the predicate x 2 > x. What is its truth set? P is true for all values > 1 P is false for values 0... 1, including both end points. P is true for values less than 0 (all their squares are positive). We can diagram this truth set using a number line:... 2... 1...0...1...2... <...true...)(..false..)(...true... > Alice E. Fischer Quantifiers... 5/34

Names for Sets Outline Predicates and their Truth Sets Sets of Numbers In mathematical work, some sets are used so often that someone gave them short names: R: The set of all real numbers. Z: The set of all integers Q: The set of all rational numbers (quotients) Add a superscript + to restrict the set to positive numbers. Add a superscript to restrict the set to negative numbers. Use superscript nonneg for positives plus zero. Alice E. Fischer Quantifiers... 6/34

Universal Quantifiers Existential Quantifiers Universal Conditional Statements Alice E. Fischer Quantifiers... 7/34

Universal Quantifiers Existential Quantifiers In the propositional calculus we have propositions without variables. In the predicate calculus we have predicates containing variables. In the first order predicate calculus we quantify over variables. In the second order predicate calculus, we quantify over sets of variables and/or over uninterpreted predicate symbols, but that is way beyond the scope of this course. Alice E. Fischer Quantifiers... 8/34

The Universal Quantifier Universal Quantifiers Existential Quantifiers We often make universal statements (at the risk of sounding prejudiced): All stars are a long long way from Earth. These can be symbolized using the universal quantifier, Let S be the set of all stars. (Exclude movie stars, sports stars, paper stars, etc.) Let W be the predicate y is a long way from Earth. We can write: y S, W (y) The predicate starts with a quantifier, a variable name, and the domain of that variable and ends with an assertion. Alice E. Fischer Quantifiers... 9/34

The Existential Quantifier Universal Quantifiers Existential Quantifiers We often make claims such as: Somebody out there likes me. These can be symbolized using the existential quantifier, Let P be the set of all people. Let L be the predicate x likes me. We can write: x P, L(x) Alice E. Fischer Quantifiers... 10/34

Universal vs. Existential Universal Quantifiers Existential Quantifiers A universally quantified statement is true if and only if the predicate is true for every element of the domain. Common terms that correspond to universal quantification include: for all, for every, for arbitrary, for any, for each, and given any. An existentially quantified statement is true if the predicate is true for even one element of the domain. Common terms that correspond to existential quantification include: there exists, there is a, we can find a, there is at least one, for some, and for at least one. Alice E. Fischer Quantifiers... 11/34

Universal Quantifiers Existential Quantifiers : From English to a Quantified Statement Start with this sentence: All fish die when removed from the water. Define a symbol for the predicate. What is the domain of your predicate? Symbolize the statement using the universal quantifier. Alice E. Fischer Quantifiers... 12/34

Outline Universal Quantifiers Existential Quantifiers All fish die when removed from the water. Let D be f dies when removed from the water. The domain of D is L: living fish swimming in the water. f L, D(f ) Alice E. Fischer Quantifiers... 13/34

Universal Conditional Statements Universal Quantifiers Existential Quantifiers The universal conditional statement is a generalization of the conditional or implication statement in propositional calculus: P Q. x, if P(x) then Q(x) or x, P(x) Q(x). This might be written P(x) Q(x), meaning that every element x that makes P true makes Q true. There is no existential conditional. Alice E. Fischer Quantifiers... 14/34

Implicit Conditional Statements Universal Quantifiers Existential Quantifiers Vegans do not eat products derived from animal sources. V= vegans A = x eats animal products x V, A(x) or P = all people V = x is vegan A = x eats animal products x P, V (x) A(x) All that glitters is not gold. T= glittery objects G = x is gold x T, G(x) or O = all objects T = x glitters G = x is gold x O, T (x) G(x) Alice E. Fischer Quantifiers... 15/34

Universal Quantifiers Existential Quantifiers : From English to a Quantified Statement Translate these statements into quantified predicates: 1 All UNH students have a student ID number. 2 Some UNH Engineering students are CS majors. 3 A student must work hard to graduate in Engineering. Alice E. Fischer Quantifiers... 16/34

Universal Quantifiers Existential Quantifiers : From English to a Quantified Statement 1 All UNH students have a student ID number. 2 x UNH students, ID(x) or x students, UNH(x) ID(x) 1 Some UNH Engineering students are CS majors. 2 z UNH Engineering students, CS(z) or z students, UNH Engineering(z) CS(z) 1 A student must work hard to graduate in Engineering. 2 s Engineering students, Graduate(s) WorksHard(s) or s students, UNH Engineering(s) Graduate(s) WorksHard(s) Alice E. Fischer Quantifiers... 17/34

Negating Quantified Statements Proofs Negating Quantified Statements Proofs Alice E. Fischer Quantifiers... 18/34

Negating Quantified Statements Negating Quantified Statements Proofs The negation of a universally quantified statement is a negative existential statement. x P, L(x) is equivalent to x P, L(x) This follows from the fact that x P, L(x) really means L(x 1 ) L(x 2 ) L(x 3 )... And then (L(x 1 ) L(x 2 ) L(x 3 )...) is L(x 1 ) L(x 2 ) L(x 3 )..., which is x P, L(x). Alice E. Fischer Quantifiers... 19/34

Negating Quantified Statements Negating Quantified Statements Proofs The negation of a existentially quantified statement is a negative universal statement. x P, L(x) is equivalent to x P, L(x) Why is this true? Alice E. Fischer Quantifiers... 20/34

Negating an Implication Negating Quantified Statements Proofs Implications and their negations are formulas with special importance in logic. The negation follows from all the previous rules. Here we develop the solution step by step. ( x, P(x) Q(x)) x, (P(x) Q(x)) x, P(x) Q(x) Alice E. Fischer Quantifiers... 21/34

Negating Quantified Statements Proofs : Negating Quantified Statements Remember: 1 The negation of a universally quantified statement is a negative existential statement. 2 The negation of a existentially quantified statement is a negative universal statement. For each sentence, write a quantified statement and its negation: 1 All cows have spots. 2 Some babies are born prematurely. 3 Pianos have 88 keys. 4 A bear is in the tree! Alice E. Fischer Quantifiers... 22/34

Negating Quantified Statements Proofs : Negating Quantified Statements 1 All cows have spots. Statement: x cows, Spotted(x) Negation: x cows, Spotted(x) 2 Some babies are born prematurely. Statement: x babies, Premature(x) Negation: x babies, Premature(x) 3 Pianos have 88 keys. Statement: x Instruments, Piano(x) Keys88(x) Negation: x Instruments, Piano(x) Keys88(x) 4 A bear is in the tree! Statement: x animals, Bear(x) intree(x) Negation: x animals, Bear(x) intree(x) Alice E. Fischer Quantifiers... 23/34

: Say it in English Negating Quantified Statements Proofs For each sentence, write a quantified statement and its negation: 1 x squares, Rectangle(x). 2 y triangles, Isoceles(y) 3 z USPresidents, Over 35(z). 4 x, y Z, NonZero(x) NonZero(y) NonZero(x y). Alice E. Fischer Quantifiers... 24/34

: Say it in English Negating Quantified Statements Proofs For each sentence, write a quantified statement and its negation: 1 x squares, Rectangle(x). 2 y triangles, Isoceles(y) 3 z USPresidents, Over 35(z). 4 x, y Z, NonZero(x) NonZero(y) NonZero(x y). Alice E. Fischer Quantifiers... 25/34

Variations on a Universal Theme Let B be the set of all birds. Let W(x) = x has wings. Let F(x) = x can fly. Negating Quantified Statements Proofs Proposition x B, W (x) F (x) If a bird has wings, then it can fly. Inverse x B, W (x) F (x) If a bird does not have wings, then it cannot fly. Converse x B, F (x) W (x) If a bird can fly, then it has wings. Contrapositive x B, F (x) W (x) If a bird cannot fly, then it does not have wings. Two of these are true, two are false. Which ones are which? Alice E. Fischer Quantifiers... 26/34

One or the Other is True. Negating Quantified Statements Proofs A statement is true its negation is false. Proof: Let p be any proposition. p p Assume p is false. Then p is true. Now assume p is false. Then p is true. a statement is true iff its negation is false. Negation law. Elimination Elimination Definition of Alice E. Fischer Quantifiers... 27/34

Proving an Existential Statement Negating Quantified Statements Proofs Symbolize this statement: It is possible to get an A in this course. Let P be the set of all people. Let A be the predicate x got an A in this course. x P, A(x) An existentially quantified predicate can be proved by finding a single example that makes the statement true. Sanjay is a person. Sanjay got an A in this course. Therefore, the statement is true. Alice E. Fischer Quantifiers... 28/34

(Dis)proving a Universal Statement Negating Quantified Statements Proofs Symbolize this statement: All people are good. Let P be the set of all people. Let G be the predicate x is good. x P, G(x) To prove a universally quantified predicate you must show it is true for all possible elements. It is often easier to disprove by finding a single counterexample. Hitler was a person. Hitler was not good. Therefore, the statement is not true. Alice E. Fischer Quantifiers... 29/34

Vacuous Truth Outline Negating Quantified Statements Proofs A universal statement can be true vacuously. All purple cows with green spots eat scrap metal. Unicorns are white with cream-colored horns. A statement is true iff its negation is false. The negations are: a purple cow with green spots that does not eat scrap metal. a unicorn that is not white does not have a cream-colored horn. These negations are false because unicorns and purple cows do not exist, the original statements are true. Alice E. Fischer Quantifiers... 30/34

Alice E. Fischer Quantifiers... 31/34

-1 Outline Names for Sets of Numbers: 1 R, R, R + : Real numbers, negative reals, positive reals. 2 Z, Z, Z + : Integers, negative integers, positive integers. 3 Q, Q, Q + : Rationals, negative rationals, positive rationals. Note: Zero is not considered to be EITHER negative or positive. Terminology: The truth set of a predicate is the set of all values from the relevant domain that make the predicate true. The propositional calculus deals with propositions (statements with symbols, no variables no quantifiers). The predicate calculus deals with predicates and quantifiers over sets of values. Alice E. Fischer Quantifiers... 32/34

-2 Outline Quantifiers: 1 is the universal quantifier and is read for all. 2 You can disprove a universally quantified statement by finding one counter-example. 3 is the existential quantifier and is read there exists. 4 You can disprove an existentially quantified statement by finding one true example. Alice E. Fischer Quantifiers... 33/34

Quiz 5: Predicates 1. What is the truth set of this predicate if its domain is the integers? x 2 < 10 2. In one word, what is the big difference between the propositional calculus and the predicate calculus? 3. Symbolize the statement below. Elderly (over 60) people are poor drivers. 4. Write the negative of the symbolic statement you created in problem 3. 5. How you would go about proving or disproving it? (Just explain how, you don t actually have to do it) Alice E. Fischer Quantifiers... 34/34