Skip to main content

Subsection 4.2.3 When Does Quantifier Order Matter?

Does it matter in what order we write the quantifiers?

  • If they are the same, often it doesn’t matter.

If we write, for example, ∀x (∀y ((Friends(x, y) → Friends(y, x))), we’re saying that for every combination of values of x and y, the statement holds. Order doesn’t matter. To understand why it doesn’t matter, recall that:

  • ∀ can be thought of as a large conjunction (expressions anded together). Order doesn’t matter in conjunctions since and is both associative and commutative.

  • ∃ can be thought of as a large disjunction (expressions ored together). Again, order doesn’t matter because or is both associative and commutative.

But, to see why we can’t say that it never matters, consider this claim (similar to the bus boarding claim that we just considered):

[1] \(\forall \)x (\(\forall \)y (FinishWork(y)) \(\rightarrow \) Invited(x))

Notice that the scope of y ends before the \(\rightarrow \) . We are saying that, for any x, if everyone finishes their work, then x will be invited to the event. In other words, if everyone finishes, everyone is invited. If we try to swap the quantifiers, we must also adjust the parentheses to make sure that every variable is bound by the appropriate quantifier. Doing that, we get:

[2] \(\forall \) y (\(\forall \)x (FinishWork(y) \(\rightarrow \) Invited(x)))

Now we have that, for any y, if y finishes the work, everyone will be invited. In other words, if even one person finishes, everyone will be invited. Very different.

  • If they are different, it usually does matter.

Suppose, on the other hand, that we are writing expressions over the domain of people. Then we might write:

[2] \(\forall \)x (\(\exists \)y (Father-Of(y, x)))

In other words, every person has a father. Notice that \(\exists \)y (Father-of(y, x) occurs within the scope of \(\forall \)x. So, for any particular x, we know that there’s someone who is x’s father. Definitely not necessarily the same father for every x. Suppose, on the other hand, that we’d written:

[3] \(\exists \)y (\(\forall \)x (Father-Of(y, x)))

This says something quite different. It says that there is someone (y) who is the father of everyone (all possible values of x, including himself). This is patently false.

Of course, it’s not that the other order is necessarily false. It’s just that it produces a different statement, whose truth value may be different. There are cases where the two orders happen to produce statements with the same truth value.

Define: Hates(x, y): True if x hates y.

These two statements have the same truth value (in the real world):

[5] \(\exists \)y (\(\forall \)x (Hates(x, y)))

[6] \(\forall \)x (\(\exists \)y (Hates(x, y)))

Since everyone hates Flu, both [5] and [6] are true.

Big Idea

Be careful when mixing quantifiers. Order often matters. The only way to be sure that two different expressions are logically equivalent is to use sound identities and inference rules to prove that they are. In the next chapter, we’ll see how to do that.

Exercises Exercises

1.

1. Suppose that we want to represent the fact that friends care about each other. Consider the following predicate logic expressions:

I. ∀x (∀y (Friends(x, y) → (Friends(y, x) ∧ CaresAbout(x, y))))

II. ∀y (∀x (Friends(x, y) → (Friends(y, x) ∧ CaresAbout(x, y))))

III. ∀x (∀y (Friends(x, y) → (Friends(y, x) ∧ CaresAbout(y, x))))

Which (one or more) of these expressions captures our fact:

  1. Just I.

  2. Just II.

  3. Just III.

  4. Just I and II.

  5. All three

Answer.
Correct answer is E.
Solution.
Explanation: Because both quantifiers are universal, it doesn’t matter what order they go in. Since friendship goes in both directions, it doesn’t matter which order the arguments to CaresAbout go in

2.

2. Suppose that we want to represent the fact that somewhere within the mass of humanity, there’s a pair of people who are friends. (And we’ll allow for a completely narcissistic society in which it counts if you’re friends with yourself.) Which of the following statements captures that fact:

  1. x (∀y (Friends(y, x)))

  2. x (∃y (Friends(y, x)))

  3. x (∀y (Friends(y, x)))

  4. x (∃y (Friends(y, x)))

Answer.
Correct answer is D.
Solution.
Explanation: Only (d) says that there’s one person (x) and one independently chosen person (y) (who might be the same person) and they are friends.

Exercise Group.

3. Let’s talk about cooking. Define the following predicates:

Chef(x) True whenever x is a chef.

Dish(x) True whenever x is a food dish.

Makes(x, y) True whenever x makes y.

For each of the following claims, indicate the predicate logic expression that corresponds to it:

1.

(Part 1) Every chef makes every dish.

  1. x (∀y ((Chef(x) ∧ Dish(y)) → Makes(x, y)))

  2. x (Chef(x) → ∃y (Dish (y) ∧ Makes(x, y)))

  3. y (Dish(y) ∧ ∀x (Chef(x) → Makes(x, y)))

  4. x (Chef(x) ∧ (∀y (Dish(y) → Makes(x, y)))

Answer.
Correct answer is A.
2.

(Part 2) Every chef makes at least one dish. (Or how could she be a chef?)

  1. x (∀y ((Chef(x) ∧ Dish(y)) → Makes(x, y)))

  2. x (Chef(x) → ∃y (Dish y) ∧ Makes(x, y)))

  3. y (Dish(y) ∧ ∀x (Chef(x) → Makes(x, y)))

  4. x (Chef(x)∧ ∀y (Dish(y) → Makes(x, y)))

Answer.
Correct answer is B.
3.

(Part 3) There’s a chef who makes every dish. (Then maybe we should fire all the others.)

  1. x (∀y ((Chef(x) ∧ Dish(y)) → Makes(x, y)))

  2. x (Chef(x) → ∃y (Dish(y) ∧ Makes(x, y)))

  3. y (Dish(y) ∧ ∀x (Chef(x) → Makes(x, y)))

  4. x (Chef(x) ∧ ∀y (Dish(y) → Makes(x, y)))

Answer.
Correct answer is D.
4.

(Part 4) There are some dishes every chef makes. (Note that we actually will write this as there exists some dish that every chef makes. We won’t distinguish between “at least one” and “several” or something like that.)

  1. x (∀y ((Chef(x) ∧ Dish(y)) → Makes(x, y)))

  2. x (Chef(x) → ∃y (Dish(y) ∧ Makes(x, y)))

  3. y (Dish(y) ∧ ∀x (Chef(x)→ Makes(x, y)))

  4. x (Chef(x) ∧ ∀y (Dish(y) → Makes(x, y)))

Answer.
Correct answer is C.