# Does the order of quantification matter?

I'm working with the universal and the existential quantifiers and I was wondering is there an order of operations that applies to them? What is the difference between

$(\forall x)P(x)(\exists x)Q(x)$

And

$(\exists x)Q(x)(\forall x)P(x)$

Lets say we have this relationship

(a) $[(\forall x)P(x) \vee (\exists x)Q(x)] \implies (\forall x)[P(x) \vee Q(x) ]$

-
What is the relationship between the first half of the statement and the second half? Is it "and"? Is "x" the same variable in both assertions? – Qiaochu Yuan Feb 3 '11 at 15:49
Compare the definition of continuity over an interval, and of uniform continuity over that same interval: you will find that the only difference is in the order of the quantifiers. – Mariano Suárez-Alvarez Feb 3 '11 at 15:50
@Mariano: even if that is the question the OP meant to ask, that is not the question that is currently being asked. The syntax is different, and if the relationship between the two statements is just "and," then the order does not matter, but this is a property of "and," not of quantification. – Qiaochu Yuan Feb 3 '11 at 15:51
@Qiaochu Yuan: I don't think "And" is being used as a logical operator here. He is just asking the difference between two logical sentences. – PEV Feb 3 '11 at 15:54
@PEV: I am not referring to the relationship between the first and second statements, but between the first and second halves of the first statement. – Qiaochu Yuan Feb 3 '11 at 15:55

## 1 Answer

Here is the question you probably meant to ask, and if it isn't, then here is the question you should have asked. Is there a difference between the statement $(\forall x)(\exists y) P(x, y)$ and the statement $(\exists y)(\forall x) P(x, y)$? The answer is yes. Consider the following simple example:

For all men, there exists a woman who loves them.

is not the same as

There exists a woman who loves all men.

The point is that when we say $(\forall x)(\exists y)$, the $y$ that is meant is a function of $x$, and this is not true in the other order. This is unfortunately hidden by the notation.

-
Yes, they are VERY different. Thanks @Qiaochu – lampShade Feb 3 '11 at 15:59
Note that also the second statement implies the first one! In mathematical analysis this is the difference between a stronger, uniform statement and a weaker, point-wise statement. (BTW, @Qiaochu, that's a wonderful example that I'll recycle in the future.) – Willie Wong Feb 3 '11 at 16:34
@Willie: I prefer the example about the two continuities, because repeating it like a mantra can, in some fortunate cases, result in some students remembering, vaguely, in the future, that the two are not exactly the same! – Mariano Suárez-Alvarez Feb 3 '11 at 16:56
@Mariano: ah, I didn't see your comment up top. – Willie Wong Feb 3 '11 at 18:25