Chapter 2: The Logic of Quantified Statements Topics include 2.1, 2.2 Predicates and Quantified Statements, 2.3 Statements with Multiple Quantifiers, and 2.4 Arguments with Quantified Statements. cs1231y only 1
Introduction Chapter 1 deals with propositional calculus. compound statements symbolically. It analyzes ordinary Chapter 2 deals with predicate calculus. It analyzes quantified statements symbolically. cs1231y only 2
Predicates A predicate is a sentence that contains a finite number of variables and becomes a statement when the variables are specialized (given specific values). The domain of a predicate variable is the set of (all) values that may be substituted in place of the variable. cs1231y only 3
Notation and Terminology for Sets (Digression) A set is a collection of known objects. The objects of a set are called elements or members of a set. The notation x A means object x is a member of the set A. notation x A means object x is not a member of the set A. The One way to describe a set is to lists its elements (or members) within a pair of braces. For example, the set of decimal digits D can be written as D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} cs1231y only 4
Important Sets (Digression) R is the set of (all) real numbers. Q is the set of (all) rational numbers. Z is the set of (all) integers, Z + is the set of (all) positive integers, Z is the set of (all) non-zero integers. Sometimes the ellipsis... is used to represent elements that are understood. For example, the set of (all) integers can be written as Z = {..., 2, 1, 0, 1, 2,...} cs1231y only 5
Example: Finding the Truth Value of a Predicate Let P (x) = x 2 > x be a predicate with domain the set R of (all) real numbers. x P (x) Statement Truth Value 2 P (2) 4 > 2 T 0.5 P (0.5) 0.25 > 0.5 F 1 2 P ( 1 2 ) 0.25 > 0.5 T cs1231y only 6
The Truth Set of a Predicate Let P (x) be a predicate with domain D. The truth set of P (x) is the set of all elements x of D such that P (x) is true. The truth set of P (x) can be written {x D P (x)} which means the set of all x in D such that P (x). cs1231y only 7
Example: Finding The Truth Set of a Predicate What is the truth set of Q(x) = x 8 (meaning x divides 8)? If the domain is the set of positive integers, the truth set is {1, 2, 4, 8}. But if the domain is the set of integers, the truth set is { 1, 1, 2, 2, 4, 4, 8, 8}. cs1231y only 8
The Universal Quantifier and Universal Statements A universal statement is a statement of the form x D, P (x) where P (x) is a predicate with domain D. The universal statement is true if and only if P (x) is true for all (or for every, for arbitrary, for any, for each, given any) x in D. It is false if and only if P (x) is false for at least one x in D. An x for which P (x) is false is called a counter example to the universal statement. The symbol is called the universal quantifier. cs1231y only 9
Example: Truth and Falsity of Universal Statements 1 Since the statement is true. 1 2 1, 2 2 2, 3 2 3, 4 2 4, 5 2 5, x {1, 2, 3, 4, 5}, x 2 x cs1231y only 10
Example: Truth and Falsity of Universal Statements 2 Since the statement is false. 0.5 2 = 0.25 < 0.5, For all real number x, x 2 x Note that the phrase For all real number x is just another way of saying x R where R is the set of (all) real numbers. cs1231y only 11
The Existential Quantifier and Existential Statements An existential statement is a statement of the form x D such that P (x) where P (x) is a predicate with domain D. The existential statement is true if and only if there exists (or there is a, there is at least one, for some, for at least one, we can find a) x in D such that P (x) is true. It is false if and only if P (x) is false for all x in D. The symbol is called the existential quantifier. cs1231y only 12
Example: Truth and Falsity of Existential Statements The statement is true because x Z such that x 2 = x 0 2 = 0, 1 2 = 1. The statement x { 1, 2, 3} such that x 2 = x is false because there is no such x in the domain: ( 1) 2 = 1 1, 2 2 = 4 2, 3 2 = 9 3, cs1231y only 13
Universal Conditional Statements A universal conditional statement is a statement of the form x D, if P (x) then Q(x) where P (x), Q(x) are predicates with domain D. The universal conditional statement is true if and only if for all x in D the conditional P (x) Q(x) is true. It is false if and only if P (x) Q(x) is false for some x in D. cs1231y only 14
Equivalent Forms of Universal Statements Observe that x D, P (x) Q(x) x T (P ), Q(x) where T (P ) is the truth set of P (x): T (P ) = {x D P (x)}. To facilitate the following discussion, we define the false set of P : F (P ) = {x D P (x)}. cs1231y only 15
Establishing Equivalence The possible truth value combinations of two statement forms P and Q are: P Q P Q? T T OK T F NO F T NO F F OK Thus one way to show that two statement forms P and Q are logically equivalent is to show that P Q is true and Q P is true. cs1231y only 16
Explanation: Equivalent Forms of Universal Statements We need to show that the truth of A = x D, P (x) Q(x) implies the truth of and conversely. B = x T (P ), Q(x) cs1231y only 17
Explanation: A B We write A B to mean the statement A B is true. For any x T (P ), P (x) is true by definition, together with A, we know Q(x) is true. Thus A B. cs1231y only 18
Explanation: B A Recall that we write B A to mean the statement B A is true. For any x D, there are two cases: x T (P ) or x F (P ). If x T (P ), P (x) is true by definition and Q(x) is true by B. Thus the if in A is true. If x F (P ), P (x) is false by definition and the if in A is true by default. In either case, the if in A is true. Thus, B A. cs1231y only 19
Equivalent Forms of Existential Statements Observe that the statement x D, such that P (x) Q(x) can be rewritten into x {y D P (y)}, such that Q(x) or x {y D Q(y)}, such that P (x) cs1231y only 20
Negation of Universal Statements The negation of the universal statement x in D, P (x) is x in D, such that P (x) Symbolically, ( x D, P (x)) x D, such that P (x) cs1231y only 21
Example: Negation of Universal Statements For example, the negation of for all primes p, p is odd is there is a prime p, such that p is not odd Note that the negation is not for all primes p, p is not odd cs1231y only 22
Negation of Existential Statements The negation of the existential statement x in D, such that P (x) is x in D, P (x) Symbolically, ( x D such that P (x)) x D, P (x) cs1231y only 23
Example: Negation of Existential Statements The negation of There exists a triangle such that the sum of its angles is 200. is the statement For all triangles T, the sum of the angles of T is not 200. cs1231y only 24
Negation of Universal Conditional Statements As discussed previously, we have ( x, P (x) Q(x)) x such that (P (x) Q(x)) But Thus we have (P (x) Q(x)) P (x) Q(x) ( x, P (x) Q(x)) x such that (P (x) Q(x)) cs1231y only 25
Universal Statments are Like Conjunction Statements The universal statement x {x 1,..., x n }, P (x) is logically equivalent to P (x 1 )... P (x n ) cs1231y only 26
Existential Statments are Like Disjunction Statements The existential statement x {x 1,..., x n }, such that P (x) is logically equivalent to P (x 1 )... P (x n ) cs1231y only 27
Vacuous Truth of Universal Statements The universal statement x D, P (x) Q(x) is vacuously true, or true by default, if and only if P (x) is false for every x in D. In other words, the truth set of P (x) is empty. That is {x D P (x)} = {} or {x D P (x)} = D cs1231y only 28
Example: Vacuous Truth of Universal Statements Let B be a set of colored balls and no balls are placed in a bowl. Let B be the domain, and P (x) = x is in the bowl, Q(x) = x is blue. Is the following universal statement true? x B, P (x) Q(x) The answer is yes. It is vacuously true, or true by default, because P (x) is false for all x B. cs1231y only 29
Alternative Vacuous Truth Justification Let T (P ) = {} for the statement R = x B, P (x) Q(x). The negation of R is x B, such that P (x) Q(x) But this existential statement is plainly false: there is no x B such that P (x), never mind what the truth value of Q(x) is. Since the negation is false, so the given universal statement has to be true! cs1231y only 30
Variants of Universal Conditional Statements The contrapositive, converse, and inverse of the universal conditional statement x D, P (x) Q(x) are respectively x D, Q(x) P (x) x D, Q(x) P (x) x D, P (x) Q(x) cs1231y only 31
Variants of Universal Conditional Statements and Logical Equivalence We have x D, P (x) Q(x) x D, Q(x) P (x) but x D, P (x) Q(x) x D, Q(x) P (x) x D, P (x) Q(x) x D, P (x) Q(x) cs1231y only 32
Sufficiency, Necessity, If and Only If for Universal Conditional Statements x D, P (x) is a sufficient condition for Q(x) x D, P (x) Q(x) x D, Q(x) is a necessary condition for P (x) x D, P (x) Q(x) x D, P (x) only if Q(x) x D, Q(x) P (x) x D, P (x) Q(x) cs1231y only 33
Double Quantifiers: For All, There Exists The statement x D, y E such that P (x, y) means for any x D, we can find a y E, such that P (x, y). The element y is usually but not necessarily always dependent on x. cs1231y only 34
Examples: For All, There Exists 1. For any even number x, there is an integer y such that 2y = x. For x = 10, choose y = 5. For x = 0, choose y = 0. For x = 8, choose y = 4. 2. For any person x, there is a person y such that y is the father of x. 3. For any real number x, there is an integer y, such that x < y. In fact, for any x R, there are infinitely many y Z such that x < y. cs1231y only 35
Double Quantifiers: There Exists, For All The statement x D such that y E, P (x, y) means an x D can be found, such that for any y E, we have P (x, y). cs1231y only 36
Examples: There Exists, For All 1. There is a positive integer x such that for all positive integer y, x y. x = 1 is the only such positive integer. 2. There is an integer x such that for all non-negative integer y, x y. We can take any negative integer x. cs1231y only 37
Example: There Exists, For All and Variants Food in Station Uta Tim Yuen green salad fruit salad spaghetti fish pie cake milk soda coffee cs1231y only 38
Example: Quantified Statements What is the truth value of the following quantified statements? 1. There is an item I such that for all students S, S chose I. 2. There is a student S such that for all items I, S chose I. 3. There is a student S such that for all stations Z, there is an item I in Z such that S chose I. 4. For all students S and for all stations Z, there is an item I in Z such that S chose I. cs1231y only 39
Triple Qunatifiers: The Definition of Limit Let be a sequence. We have if and only if a 1, a 2,... lim n a n = L ɛ > 0, integer N such that integers n, if n > N then a n L < ɛ cs1231y only 40
An Illustration We have 0. 9 = 1. 0. That is, 0.99999 = 1.00000 In other words, the sequence a 1 = 0.9, a 2 = 0.99, a 3 = 0.999, a 4 = 0.9999, approaches the number 1. For any ɛ > 0, pick N such that 0.1 N < ɛ, when n > N, we have 0 < 1 a n = 0.1 n < 0.1 N < ɛ cs1231y only 41
Negation of Multiply-Quantified Statements: ( x D, y E such that P (x, y)) x D, such that ( y E such that P (x, y)) x D, such that y E, P (x, y) cs1231y only 42
Negation of Multiply-Quantified Statements: ( x D, such that y E, P (x, y)) x D, ( y E, P (x, y)) x D, y E such that P (x, y) cs1231y only 43
Order of Qunatifiers If a statement contains two different quantifiers, reversing the order of the quantifiers can change the truth value of the statement to its opposite. For example, everyone loves someone : people x, a person y such that x loves y is not the same as there is someone loved by everyone : a person y such that people x, x loves y However, two adjacent quantifiers of the same type can be stated in any order. cs1231y only 44
Formal Logical Notation Universal statements can be written symbolically as x D, P (x) x(x D P (x)) Existential statements can be written symbolically x D such that P (x) x(x D P (x)) cs1231y only 45
Negating Formal Logical Notation Using (p q) p q, we have ( x(x D P (x))) x(x D P (x)) Using De Morgan s law, we have ( x(x D P (x))) x(x D P (x)) cs1231y only 46
The Rule of Universal Instantiation If some property is true of every member in a domain, then it is true of any particular member in the domain. We have been using this rule all along, perhaps without knowing that the rule has such a glorified name. For example, we substitute values into formulas to obtain results even in primary school days. cs1231y only 47
Universal Instantiation and Universal Modus Ponens x D, P (x) Q(x) a D, P (a) Q(a) cs1231y only 48
Universal Instantiation and Universal Modus Tollens x D, P (x) Q(x) a D, Q(a) P (a) cs1231y only 49
Valid Arguments with Quantified Statements An argument form with quantified statements is valid if and only if no matter what particular predicates are substituted for the predicate symbols in its premises, if the resulting premise statements are all true, then the conclusion is also true. An argument is valid if and only if its form is valid. cs1231y only 50
Subsets (Diagression) If every member of a set A is a member of a set B, then A is a subset of B and we express this relationship with A B For example, They can be combined as Z Q, Q R Z Q R cs1231y only 51
Universal Statements and Subsets The universal statement x D, P (x) Q(x) amounts to truth set of P truth set of Q D cs1231y only 52
Universal Statements and Subsets D (all living things?) Q (mortal living things) P (human beings) cs1231y only 53
Example: Contrapositive All human beings are mortal. Zeus is not mortal. Zeus is not a human being. (An element not in the truth set of Q cannot be in the truth set of P.) cs1231y only 54
Example: Converse Error All human beings are mortal. Felix is mortal. Felix is a human being. (Wrong!) (An element in the truth set of Q may or may not be in the truth set of P. This is known as converse error.) cs1231y only 55
Example: Inverse Error All human beings are mortal. Felix is not a human being. Felix is immortal. (Wrong!) (An element not in the truth set of P may or may not be in the truth set of Q. This is known as inverse error.) cs1231y only 56
Summary: Variants of Universal Conditional Statements and Subset Relations If A B C, the following statement ( ) is true: x C, (x A) (x B) The contrapositive of ( ) is true: x C, (x B) (x A) The converse of ( ) is false if A B: x C, (x B) (x A) cs1231y only 57
but an instance of the converse can be either true or false; and a related existential statement is true: x C, (x B) (x A) The inverse of ( ) is false if A B: x C, (x A) (x B) but an instance of the inverse can be either true or false; and a related existential statement is true if B C: x C, (x A) (x B) cs1231y only 58