Quantifiers and properties, why and when do they "commute"? An elementary perpective of "non logician" Let $x \in X, \ y \in Y, \ z \in Z$ and $w \in W$. Let $P_1(x,y), \ P_2(y,z), \ P_3(z,w)$ be some properties or sentences(for example, if $R \subseteq X \times Y$, then $P_1(x,y)$ may be $xRy$).
I can't get my head around the following fact:
Say, $x$ and $w$ are fixed. The sentence "$\exists z \in Z: \ (\exists y \in Y: P_1(x,y) \wedge P_2(y,z)) \wedge P_3(z,w)$" is true if and only if "$\exists y \in Y: P_1(x,y) \wedge (\exists z \in Z: P_2(y,z) \wedge P_3(z,w))$" is. So, they are the same.
Why is that? Sure, one recommendation would pick up a book on mathematical logic and study it. But the problem is that I'm not studying logic at all, I've just encountered the need for such a proof in a book on set theory (namely, Halmos-"Naive Set Theory"). This is not my first math book, I've studied (pure and rigorous) mathematics before, but there were no need for such "logically sophisticated" proofs. How do I understand that? 
 A: There are two fundamental equivalences behind this:


*

*For any formula $\varphi(x,y)$, we have that:


$\exists x \exists y \varphi(x,y) \Leftrightarrow \exists y \exists x \varphi(x,y)$
This is because both sentences say the exact same thing: there are two objects standing in some relationship as expressed by $\varphi(x,y)$. So, if you have two quantifiers of the same type (it also works for two universals) right next to each other, then you can swap them. But they have to be the same type (you can't change $\forall x \exists y$ to $\exists y \forall x$) and they have to be right next to each other (e.g you can't change $\exists x \neg \exists y$ to $\exists y \neg \exists x$)


*For any formula $\varphi(x)$ and any formula $\psi$, where $\psi$ does not contain $x$ as a free variable, we have that:


$\psi \land \exists x \varphi(x) \Leftrightarrow \exists x (\psi \land \varphi(x))$
To understand this, note that an existential can be seen as kind of disjunction, that is, if $a,b,c,...$ denote the objects in your domain, then you can think of an existential like this:
$\exists x \varphi(x) \approx \varphi(a) \lor \varphi(b) \lor \varphi(c) \lor ...$ 
Now, this is certainly not an official equivalence, as I am really mixing semantics and syntax here, but again, it serves to at least conceptuall understand why we can bring out an existential over a conjunct if that conjunct does not contain the relevant free variable, because we now get:
$\psi \land \exists x \varphi(x) \approx \psi \land (\varphi(a) \lor \varphi(b) \lor \varphi(c) \lor ....) \Leftrightarrow (\psi \land \varphi(a)) \lor (\psi \land \varphi(b)) \lor (\psi \land \varphi(c)) \lor ... \approx \exists x (\psi \land \varphi(x))$
Applying these two principles to your statement, we get:
$\exists z \in Z \exists y \in Y (P_1(x,y) \land P_2(y,z) \land P_3(z,w)) \Leftrightarrow$ (use principle 1)
$\exists y \in Y \exists z \in Z (P_1(x,y) \land P_2(y,z) \land P_3(z,w)) \Leftrightarrow$ (use principle 2)
$\exists y\in Y (P_1(x,y) \land \exists z (P_2(y,z) \land P_3(z,w)))$
