34
Predicates, Quantifiers and Nested Quantifiers

1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Predicates, Quantifiers and Nested Quantifiers

Page 2: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

PredicatesRecall the example of a non-proposition in our first presentation: 2x=1. Let us call this expression 𝑃(𝑥). 𝑃(𝑥) is not a proposition because x is undefined, hence 𝑃 𝑥 has no clearly defined truth value. However, for each 𝑥, 𝑃(𝑥) is a proposition. For example:

𝑃 1 ∶ (2 = 1) is a proposition.

𝑃1

2∶ (1 = 1) is a proposition.

Therefore, 𝑃 is a proposition-valued function. It is a function that assigns to each real number 𝑥 a proposition 𝑃 𝑥 . Proposition-valued functions are also known as predicates, because just like predicates in grammar, they convey an idea about, or express the action of, a subject. The domain (set of input values) of a predicate is also known as the domain of discourse or universe of discourse.

The domain of discourse is often implied – for example, when the predicate is apparently about a number, then we assume that the domain is the largest set of real numbers for which the predicate is meaningful. For example, for the predicate 𝑃 𝑥 =( 𝑥 > 2), the default domain is all non-negative real numbers.

A predicate can be a function of several variables. A predicate of two variables, 𝑃 𝑥, 𝑦is called a binary predicate.

Page 3: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Defining a Predicate Without referring to an Input

Some predicates can be conveniently defined without reference to an input variable.

For example, the predicate D defined on the set of animals by D(x) = “x is a dog” can also be defined by D = “ is a dog”. This variation of the definition strengthens the analogy between the logical and the grammatical concept of predicate, because it makes it clear that D by itself is what is being said about a subject.

This is similar to how we can define some numerical functions without referring to an input variable; instead of writing f(x) = sin(x), we can just write f = sin.

Page 4: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Quantification

We just saw that evaluation turns a predicate 𝑃(𝑥)into a proposition. There is another way to do that: quantification. A quantification of a predicate is the proposition that 𝑃(𝑥) is true for some or all input values. We distinguishTwo basic quantifiers: Notation

Existential quantification: 𝑃(𝑥) is true for at least one 𝑥 in the domain of discourse. ∃𝑥𝑃 𝑥

Universal quantification: 𝑃(𝑥) is true for all 𝑥 values in the domain of discourse. ∀𝑥𝑃 𝑥

The existential quantifier can also be read as “there is” or “there are”, with the understanding that the singular form does not mean to imply that there is only one 𝑥that makes 𝑃(𝑥) true, and the plural does not mean to imply that there is more than one.

Page 5: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Nested Quantified StatementsNested quantified statements have to be parsed from left to right.

This means that ∀𝑥∃𝑦𝑃 𝑥, 𝑦 is the statement ∀𝑥 ∃𝑦𝑃 𝑥, 𝑦 , i.e., the statement that for every x, there exists a y (that usually depends on x) that makes P(x,y) true. Likewise, ∃𝑥∀𝑦𝑃 𝑥, 𝑦 is the statement ∃𝑥 ∀𝑦𝑃 𝑥, 𝑦 , i.e. the statement that there exists a (single) x so that no matter what y is, P(x,y) is true.

You cannot reliably parse nested quantified statements via word substitution because the English word order does not reflect the order of the quantifiers. The meaning of an English sentence is not encoded in the position of the phrases “for all” and “there exists”.

• “There is a lid for every pot” and “for every pot, there is a lid” mean the same thing. Both express the same doubly quantified statement of the form ∀𝑥∃𝑦𝑃 𝑥, 𝑦 .

• “There is a solution for every problem” and “for every problem, there is a solution” have the same meaning. Both express the same doubly quantified statement of the form ∀𝑥∃𝑦𝑃 𝑥, 𝑦 .

Page 6: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

The Perils of Word SubstitutionMere word substitution may incidentally produce a correct translation, but it can just as well fail.

• Word substitution correctly translates ∀𝑥∃𝑦𝑃 𝑥, 𝑦 as for all x, there exists y such that P(x,y).

• Word substitution incorrectly translates ∃𝑥∀𝑦𝑃(𝑥, 𝑦) as there exists an x for all y such that P(x,y). The meaning expressed by that English phrase is ∀𝑦∃𝑥𝑃 𝑥, 𝑦 , which is a different meaning than ∃𝑥∀𝑦𝑃 𝑥, 𝑦 . A correct translation of ∃𝑥∀𝑦𝑃(𝑥, 𝑦) is there exists an x such that for all y, P(x,y).

The lesson bears repeating: do not attempt to understand formal nested quantified statements via literal word substitution, or try to formalize English statements that contain both an existential and a universal phrase merely by substituting the symbols ∃ and ∀. That method is hit-or-miss.

Page 7: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Translating quantified statements (1)

Let us define the predicate 𝑃 by 𝑃 𝑥, 𝑦 = "𝑥 loves 𝑦“, where 𝑥 and 𝑦represent people, and translate a quantified statement into standard English. Such a translation requires more than a literal reading of the statement. It requires us to understand the statement and then to express the meaning in a way that would be immediately comprehensible to an average person who may not have a mathematical education.

Statement: ∀𝑥∃𝑦𝑃 𝑥, 𝑦

Observe that we don’t use variable names in standard English.

Literal reading Meaningful Translation

For all x, there exists y such that x loves y. Everyone loves someone.

Page 8: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Translating quantified statements (2)

A relationship counselor is talking to a man who has had trouble on the job market. He just can't find a job that's right for him. She attempts to cheer him up by telling him,

For every person, there's the perfect job out there.

While he may not agree, he at least understands immediately what she's saying.

From a discrete math perspective, she could also have said,

Let the domain of x be all people, and the domain of y be all jobs. Let P be the proposition defined by "P(x,y) is the statement that y is the perfect job for x". Then for every x, there exists y such that P(x,y).

No one talks like that, not even mathematicians. Most people would not understand it. The first statement conveys the same meaning in proper English, and would be understood by everyone. The first statement is a translation of the second into proper English.

Notice that the first statement does not have any references to abstract variables. We don't use variables in English. If we want to refer to a person, we say "a person", not "x, where x is in the set of persons".

Page 9: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Translating quantified statements (3)

Suppose L(x,y) is some numerical measure of how much a person x likes an object y (higher number is better). Suppose T is the set of toys. Then

∃𝑥 ∈ 𝑇 ∀𝑦 ∈ 𝑇(𝑦 ≠ 𝑥 → 𝐿 Joey, 𝑥 > 𝐿 Joey, 𝑦 )

could be literally represented as

“There exists an x in the set of toys so that for all y in the set of toys, if y is not x, then Joey's appreciation for x is greater than Joey's appreciation for y."

No one talks that way. This is gobbledygook, not an English sentence. A correct translation of the formal statement into English is

“Joey has a favorite toy.”

Page 10: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

More Translation Examples

Let us use the predicate 𝑃 𝑥, 𝑦 = "𝑥 loves 𝑦“ again and study more translation examples.

*“you” is used in the generic sense here, to express a general rule that holds for every person.

Observe again that the translations do not contain variable names. In proper English, no one uses “x” and “y” to make statements about people and their relationships.

Statement Literal Reading Translation

∃𝑥∀𝑦𝑃 𝑥, 𝑦 There exists x such that for all y, x loves y.

There is someone who loves everyone.

∃𝑥∃𝑦𝑃 𝑥, 𝑦 There exist x and y such that x loves y. Love between people exists.

∀𝑥∀𝑦𝑃 𝑥, 𝑦 For all x and y, x loves y. Everyone loves everyone.

∀𝑥∃𝑦𝑃 𝑥, 𝑦 For all x, there is y such that x loves y. There is always someone who loves you*.

Page 11: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Switching the order of the quantifiers

Statement Translation

∀𝑥∃𝑦𝑃 𝑥, 𝑦 Everyone loves someone.

∃𝑦∀𝑥𝑃 𝑥, 𝑦 Someone is loved by everyone.

Let us investigate what happens when we switch the order of the quantifiers. The following example shows that switching the order of universal and existential quantification may change the meaning of a quantified statement.

The order of two or more quantifiers of the same type can be changed without changing the meaning:

∃𝑥∃𝑦𝑃 𝑥, 𝑦 ≡ ∃𝑦∃𝑥𝑃 𝑥, 𝑦

∀𝑥∀𝑦𝑃 𝑥, 𝑦 ≡ ∀𝑦∀𝑥𝑃 𝑥, 𝑦

Page 12: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Reverse Translation Examples

Given the predicate 𝑃 𝑥, 𝑦 = "𝑥 loves 𝑦“, let us express the following statements using 𝑃:

Love is always reciprocal:∀𝑥∀𝑦(𝑃 𝑥, 𝑦 → 𝑃 𝑦, 𝑥 )

Joe loves only one person:

∃𝑥 𝑃 Joe, 𝑥 ∧ ∀𝑦 𝑃 Joe, 𝑦 → 𝑦 = 𝑥

Ishaan loves exactly two people:

∃𝑥∃𝑦 𝑃 Ishaan, 𝑥 ∧ 𝑃 Ishaan, 𝑦 ∧ ∀𝑧 𝑃 Ishaan, 𝑧 → 𝑧 = 𝑥 ∨ 𝑧 = 𝑦

People who don’t love themselves don’t love anyone else either:

∀𝑥(¬𝑃 𝑥, 𝑥 → ∀𝑦¬𝑃 𝑥, 𝑦 )

Page 13: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

The unique existential quantifier

There is a variation of the existential quantifier that signifies the existence of exactly one object of a type. This quantifier is written as ∃! or ∃1.

Using this quantifier, we could have translated Joe loves only one person on the previous slide as

∃1𝑥 𝑃 Joe, 𝑥

The unique existential quantifier is derivative because its meaning can be expressed using the standard existential and universal quantifiers as exemplified on the previous page.

Generally, if 𝑃 is a predicate, then

∃1𝑥𝑃 𝑥 = ∃𝑥 𝑃 𝑥 ∧ ∀𝑦 𝑃 𝑦 → 𝑦 = 𝑥 .

Page 14: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Universal quantification with a domain restriction

Sometimes, we wish to make a statement only about all objects in a certain subset of a given domain of discourse. Such a domain restriction can be implemented in two ways. We will study an example first.

The proposition Every positive real number has a real square root can be expressed as

∀𝑥 > 0∃𝑦 𝑦2 = 𝑥

but also as

∀𝑥∃𝑦 𝑥 > 0 → 𝑦2 = 𝑥

This illustrates the general rule: a domain-restricted universal quantification of a predicate is logically equivalent to the unrestricted universal quantification of a conditional in which the domain restriction is the premise, and the predicate is the conclusion.

All Swedish people are tall is logically equivalent to saying It is true for all people that if they are Swedish, then they are tall.

Page 15: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Existential quantification with a domain restriction

We will now study the interaction of domain restriction with existential quantification. Let us consider an example first.

The proposition There is a positive real number whose square is 2 can be expressed as

∃𝑥 > 0 𝑥2 = 2

but also as

∃𝑥 𝑥 > 0 ∧ 𝑥2 = 2

This illustrates the general rule: a domain-restricted existential quantification of a predicate is logically equivalent to the unrestricted existential quantification of the conjunction of the domain restriction and the predicate.

There is a Chinese dog that is blue is logically equivalent to saying There is a dog that is Chinese and blue.

Page 16: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Domain Restricted Quantification in the Notation of Sets

Using set notation that we will introduce when we learn about sets, we can give a general formula for the two different ways of expressing domain-restricted quantifications.

Let us assume that 𝑆 is a subdomain of a given domain of discourse 𝐷, and that 𝑃 is a predicate defined on 𝐷. Then the following equivalences hold:

∀𝑥 ∈ 𝑆 𝑃 𝑥 ≡ ∀𝑥 𝑥 ∈ 𝑆 → 𝑃 𝑥

∃𝑥 ∈ 𝑆 𝑃(𝑥) ≡ ∃𝑥 𝑥 ∈ 𝑆 ∧ 𝑃(𝑥)

(We could write ∀𝑥 ∈ 𝐷 or ∃𝑥 ∈ 𝐷 on the right side, but that is unnecessary since the default domain is the full domain of discourse 𝐷.)

Page 17: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Bound vs. Free Variables

A bound variable is a variable that is subject to a quantifier. A variable that is not bound is called free.

Example: in the expression ∀𝑥𝑃(𝑥, 𝑦), 𝑥 is bound, 𝑦 is free. Due to the free variable, ∀𝑥𝑃 𝑥, 𝑦 is not a proposition, but a propositional function of 𝑦. A proposition can only contain bound variables, no free variables.

Page 18: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Precedence of Quantifiers and Scope

The quantifiers enjoy a higher precedence than all logical operators. Therefore, if we wish to say that for all 𝑥, both 𝑃(𝑥) and 𝑄(𝑥) are true, we must use parentheses:

∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥

The expression without parentheses, ∀𝑥𝑃 𝑥 ∧ 𝑄 𝑥

means (∀𝑥𝑃 𝑥 ) ∧ 𝑄 𝑥 , which is not even a proposition, but a propositional function of 𝑥, because the 𝑥 in 𝑄 𝑥 is free, and not the same 𝑥 as the one in ∀𝑥𝑃 𝑥 . You should think of the former 𝑥 as a local variable that is only valid inside the parentheses.

The part of an expression that a quantifier acts on is called the scope of the quantifier. In the expression ∀𝑥𝑃 𝑥 ∧ 𝑄 𝑥 , the scope of the universal quantifier ends at the first closing parenthesis. The 𝑥 in 𝑄 𝑥 is free because it is outside the scope of the universal quantifier.

Page 19: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Logical Equivalence of Statements involving Predicates

When we state the logical equivalence of two statements involving predicates, we mean that the two sides are logically equivalent regardless of the predicates and their domain.

This means that in order to show logical non-equivalence, it is sufficient to come up with (a) specific predicate(s) for which the two statements in question do not share the same truth value.

Page 20: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Quantification and NegationWe will now study how the quantifiers interact with negation. Let us consider an example first and assume for simplicity that all dogs are either small or large.

If it false that all dogs are large, then does it follow logically that all dogs are small? The answer is no: if not every dog is large, then all we can conclude is that at least one dog must be small. This illustrates the general principle that the negation of a universal quantification is logically equivalent to the existential quantification of the negation.

¬∀𝑥𝑃(𝑥) ≡ ∃𝑥¬𝑃(𝑥)

Likewise, if it is false that there exists a large dog, then we conclude that every dog must be small. This illustrates that the negation of an existential quantification is logically equivalent to the universal quantification of the negation:

¬∃𝑥𝑃 𝑥 ≡ ∀𝑥¬𝑃 𝑥These two laws are also known as De Morgan’s laws for quantifiers.

The following rule is a consequence of these laws: when you move a negation symbol from left to right past several quantifiers, each quantifier changes into the opposite quantifier. Example:

¬∃𝑥∀𝑦∃𝑧∀𝑤 𝑥 + 𝑦 < 𝑧 + 𝑤 = ∀𝑥∃𝑦∀𝑧∃𝑤 𝑥 + 𝑦 ≥ 𝑧 + 𝑤

Page 21: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

The Negation of Domain Restricted Quantification (1)

When you negate an – apparently - domain restricted quantified statement, you must take care not to negate the domain restriction. Let us study an example first.

What is the negation of “All Swedes are tall.“ ?

The proper negation of that is “There is at least one Swede who is not tall.”

The negation is not “There is at least one non-Swede who is tall”, nor is it “There is at least one non-Swede who is not tall”.

The negation is a statement about the same set of people.

This is clear if we adopt a different perspective about the problem: who says that there is a restricted domain in the first place? We can think of the set of all Swedes simply as the domain of discourse of the predicate “.. is tall” and then apply the rule given in the previous slide.

Page 22: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

The Negation of Domain Restricted Quantification (2)

Let us apply what we just learned to an example that involves an inequality. Let us find the negation of

∀𝑥 > 1(𝑥2 > 𝑥)

The pitfall here is the temptation to want to negate the condition 𝑥 > 1. This is wrong because 𝑥 > 1 merely specifies the restricted domain about which we are making a statement. We are only giving a rule about the real numbers that are larger than one, so the negation is again a rule about the real numbers that are larger than one:

∃𝑥 > 1(𝑥2 ≤ 𝑥)

Page 23: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

The Negation of Domain Restricted Quantification (3)

Let us prove that domain restrictions don’t change when we negate restricted quantified statements.

We know that we can code the domain restriction in a universal quantification as the premise of a conditional:

∀𝑥 ∈ 𝑆 𝑃 𝑥 ≡ ∀𝑥 𝑥 ∈ 𝑆 → 𝑃 𝑥

We now apply negation rules, then rewrite the conditional using 𝑝 → 𝑞 ≡ ¬𝑝 ∨ 𝑞 and use De Morgan:

¬∀𝑥 ∈ 𝑆 𝑃 𝑥 ≡ ¬∀𝑥 𝑥 ∈ 𝑆 → 𝑃 𝑥

≡ ∃𝑥¬ 𝑥 ∈ 𝑆 → 𝑃 𝑥

≡ ∃𝑥¬ ¬𝑥 ∈ 𝑆 ∨ 𝑃 𝑥

≡ ∃𝑥 𝑥 ∈ 𝑆 ∧ ¬𝑃 𝑥

≡ ∃𝑥 ∈ 𝑆 ¬𝑃 𝑥

In the last step, we have used that a domain-restricted existential quantification of a predicate is logically equivalent to the unrestricted existential quantification of the conjunction of the domain restriction and the predicate. We have proved

¬∀𝑥 ∈ 𝑆 𝑃 𝑥 ≡ ∃𝑥 ∈ 𝑆 ¬𝑃 𝑥 .

You should prove the corresponding statement for existential quantification as an exercise.

Page 24: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Quantification and ConjunctionLet us explore the interaction of the universal quantifier with conjunction using the following example:

Every person has a cat and every person has a dog. Then it is logical to conclude that Every person has a cat and a dog, and the converse of that reasoning would also be valid. This illustrates the following equivalence:

∀𝑥(𝑃(𝑥) ∧ 𝑄(𝑥)) ≡ ∀𝑥𝑃(𝑥) ∧ ∀𝑥𝑄(𝑥)

This raises the question of whether the same relationship holds for existential quantification: is ∃𝑥(𝑃(𝑥) ∧ 𝑄(𝑥)) logically equivalent to ∃𝑥𝑃(𝑥) ∧ ∃𝑥𝑄(𝑥)? The answer is no.

To show that, we need to select specific predicates 𝑃 and 𝑄 for which the two sides have different truth values. Suppose 𝑃 𝑥 = "𝑥 owns a dog“, Q 𝑥 = "𝑥 owns a cat“, and the common domain of 𝑃 and 𝑄 is a set of exactly two people. One of these people only owns a dog, and the other one only owns a cat.

Then the statements ∃𝑥𝑃(𝑥) and ∃𝑥𝑄 𝑥 are both true, and their conjunction is true as well. However, the statement ∃𝑥(𝑃(𝑥) ∧ 𝑄(𝑥)) is false, because there isn’t one person who owns both a dog and a cat. We conclude

∃𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ≢ ∃𝑥𝑃 𝑥 ∧ ∃𝑥𝑄 𝑥 .

Page 25: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Quantification and DisjunctionLet us explore the interaction of the existential quantifier with disjunction using the following example:

There is someone who has a cat, or there is someone who has a dog. Then it follows that there is someone who has a cat or a dog. Conversely, if there is someone who has a cat or a dog, then we know that There is someone who has a cat, or there is someone who has a dog.

This illustrates the following equivalence:

∃𝑥(𝑃(𝑥) ∨ 𝑄(𝑥)) ≡ ∃𝑥𝑃(𝑥) ∨ ∃𝑥𝑄(𝑥)

Naturally, we wonder whether the same relationship holds for universal quantification: is ∀𝑥(𝑃(𝑥) ∨ 𝑄(𝑥)) logically equivalent to ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥)? The answer is no.

To justify, we use the same scenario as on the previous slide. Then the statements ∀𝑥𝑃(𝑥) and ∀𝑥𝑄(𝑥) are both false, because not everyone owns a dog, and not everyone owns a cat. Their disjunction is therefore false as well. However, the statement ∀𝑥(𝑃(𝑥) ∨ 𝑄(𝑥)) is true, because every person owns one of the two types of pet. Therefore,

∀𝑥 𝑃 𝑥 ∨ 𝑄 𝑥 ≢ ∀𝑥𝑃 𝑥 ∨ ∀𝑥𝑄 𝑥 .

Page 26: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Summary of Logical Equivalences and Non-Equivalences

¬∀𝑥𝑃(𝑥) ≡ ∃𝑥¬𝑃(𝑥)¬∃𝑥𝑃 𝑥 ≡ ∀𝑥¬𝑃 𝑥

∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ≡ ∀𝑥𝑃 𝑥 ∧ ∀𝑥𝑄 𝑥

∃𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 ≢ ∃𝑥𝑃 𝑥 ∧ ∃𝑥𝑄 𝑥

∃𝑥 𝑃 𝑥 ∨ 𝑄 𝑥 ≡ ∃𝑥𝑃 𝑥 ∨ ∃𝑥𝑄 𝑥

∀𝑥 𝑃 𝑥 ∨ 𝑄 𝑥 ≢ ∀𝑥𝑃 𝑥 ∨ ∀𝑥𝑄 𝑥

Page 27: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Another Look at Non-Equivalence

We have explained why the two propositions ∃𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 and ∃𝑥𝑃 𝑥 ∧ ∃𝑥𝑄 𝑥 are not logically equivalent. Our explanation was to give a counterexample to the alleged equivalence. Perhaps you would prefer a more abstract version of this counterexample. This can be done as follows:

Let the domain of discourse be the set 𝑥1, 𝑥2 . Let 𝑃 and 𝑄 be defined by the following truth table:

Then ∃𝑥𝑃(𝑥) and ∃𝑥𝑄 𝑥 are true statements, and their conjunction is therefore also true, but ∃𝑥(𝑃(𝑥) ∧ 𝑄(𝑥)) is false.

𝑥 𝑃(𝑥) 𝑄(𝑥)

𝑥1 𝑇 𝐹

𝑥2 𝐹 𝑇

Page 28: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Determining the truth value of nested quantified mathematical statements

Let us study mathematical statements that involve nested quantifiers and determine their truth values. In the following example, let 𝑥 and 𝑦 represent arbitrary real numbers:

∀𝑥∃𝑦 𝑥𝑦 = 1

This statement is false. To see that, it is helpful to think of the statement as a challenge-response game: someone else gives you the number x. You have no control over x. Your job is to respond to the x by finding a y that makes the equation 𝑥𝑦 = 1 true. If you can always win this game by doing that, then the statement above is true. If not, then the statement is false.

At first glance, you might think that for any real number x, you can just pick 𝑦 =

1

𝑥to satisfy 𝑥𝑦 = 1. But that thinking overlooks that x might be zero. In

fact, if your opponent picks 𝑥 = 0, then no choice for 𝑦 will make 𝑥𝑦 equal to 1. Therefore, you cannot force a win in this game.

Page 29: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Nested Statements, Example 2

Consider∀𝑥∃𝑦 𝑥 + 𝑦 = 1

This statement is true. For any 𝑥 that the challenger gives us, we can select a 𝑦 to make the equation 𝑥 + 𝑦 = 1 true, namely 𝑦 = 1 − 𝑥.

Observe that without specifying the 𝑦, our explanation would have been incomplete and question-begging. Just declaring it to be so doesn’t make it true. We had to produce the 𝑦. If we just say that the 𝑦 exists, then we commit the error of assuming the conclusion or proof by affirmation.

Also observe that the statement would not be true if the domain of discourse was changed. If we only admit positive integers for 𝑥 and 𝑦, then we cannot satisfy 𝑥 + 𝑦 = 1.

Page 30: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Nested Statements, Example 3

Consider∃𝑦∀𝑥 𝑥 + 𝑦 = 1

This statement is false. This challenge-response game may seem like the same game as that in the previous example, but there is a crucial difference. Rather than being allowed to pick the 𝑦 in response to your opponent’s 𝑥, now you have to pick your 𝑦 first, and commit to it. Then, your opponent is free to choose any 𝑥 she wants, and for all 𝑥 except one, the equation 𝑥 + 𝑦 = 1 is false.

Inspired by this interpretation of the statement as a game, we now give the following proof of why the statement is false:

Given 𝑦, there is an 𝑥, namely 𝑥 = −𝑦, which makes the equation 𝑥 +𝑦 = 1 false, since 𝑥 + 𝑦 = 0. Therefore, for the given 𝑦, 𝑥 + 𝑦 = 1 is not true for all 𝑥. This makes the original statement false.

Page 31: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Nested Statements, Example 4

Consider∀𝑥∃𝑦 (𝑥𝑦 = 1) → (𝑥𝑦 = 2)

This statement is true. This may seem absurd- surely, if 𝑥𝑦 is 1, it can’t also be 2?

To understand why the statement is true, we must go beyond a merely intuitive understanding of the conditional and apply the exact formal definition of the conditional. Recall that if the premise of a conditional is false, the conditional is true by default. The question we should be asking ourselves therefore is, can we always respond to the challenge “x” with a “y” that makes the premise of the conditional false?

The answer is that we can. No matter what 𝑥 is, we can select 𝑦 = 0. That forces 𝑥𝑦 to be zero, which makes the premise of the conditional false, and the conditional true. (There are many other ways to pick 𝑦 in response to 𝑥 to always make 𝑥𝑦 ≠ 1.)

Page 32: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Nested Statements, Example 5

Consider

∀𝑥∃𝑦∀𝑧∃𝑤 𝑥𝑦 ≥ 𝑧𝑤

This is like a challenge-response game in 4 rounds. First, your opponent gives you the 𝑥. Then, you select the 𝑦.Then, your opponent gives you the 𝑧, and finally, you get to pick the 𝑤. Can you always prevail in this game and force the inequality 𝑥𝑦 ≥ 𝑧𝑤 to be true?

The answer is yes. The following is a winning strategy: Given 𝑥, select 𝑦 = 0. Then, for the given 𝑧, select 𝑤 =0. This makes 𝑥𝑦 ≥ 𝑧𝑤 true because both sides are zero.

Page 33: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Incorrect Generalizations and Ambiguous Quantification (1)

Sometimes, people communicate carelessly that a theorem no longer holds if we weaken its premises. For example, in every right triangle with sides a, b, c (c being the hypotenuse, the side opposite to the right angle), 𝑎2 + 𝑏2 = 𝑐2. The conclusion holds only for right triangles- it is false for a non-right triangle.

Someone might express this fact by saying “𝑎2 + 𝑏2 ≠ 𝑐2 for a general triangle.” The word “general” is a way of expressing universal quantification, so the statement says that for any triangle with sides a,b,c, we have 𝑎2 +𝑏2 ≠ 𝑐2. This is false, because “any triangle” includes the right triangles.

What this person was intending to say is that for a general triangle, 𝑎2 + 𝑏2 =𝑐2 is not necessarily true. It is true in some cases, false in others.

The lesson here is to be careful when communicating the breakdown of generalizations of mathematical laws and to keep in mind the negation laws for the quantifiers: “Not always true” is not equivalent to “always false”. It is equivalent to “false in some cases”.

Page 34: 1.4 Predicates and Quantifiers - Arizona State Universityboerner/mat243/1.4 Predicates... · 2019-01-08 · substitution because the English word order does not reflect the order

Incorrect Generalizations and Ambiguous Quantification (2)

Another example of common quantifier ambiguity is the non-commutative law for matrix multiplication. Someone might say

“For general square matrices 𝐴, 𝐵, 𝐴𝐵 ≠ 𝐵𝐴.”

What they mean by that is not that 𝐴𝐵 ≠ 𝐵𝐴 for all square matrices 𝐴, 𝐵. That is in fact false, because there are exceptional cases of square matrices 𝐴, 𝐵which commute with each other, i.e. satisfy 𝐴𝐵 = 𝐵𝐴. For example, if 𝐴, 𝐵 are diagonal, then 𝐴𝐵 = 𝐵𝐴.

What they mean is that for arbitrary 𝐴, 𝐵, the equality 𝐴𝐵 = 𝐵𝐴 is not guaranteed. It may be true, it may be false. A technically correct phrasing of the statement above would have been:

“It is not true that 𝐴𝐵 = 𝐵𝐴 holds for all square matrices 𝐴, 𝐵.”

This is logically equivalent to: “There exist square matrices 𝐴, 𝐵 such that 𝐴𝐵 ≠𝐵𝐴.”