Nested Quantifiers true or false

I have a concern with nested quantifiers.

I have: $$ \forall x \exists y \forall z(x^2-y+z=0) $$ such that $$ x,y,z \in \Bbb Z^+$$

My first question, can it be read like this:

$$ \forall x \forall z \exists y(x^2-y+z=0) $$

The way I did it, is I started off with $x=1, z=1 $

$$ 2-y = 0 $$ $$ y =2 $$

Is this a good approach?


No, you cannot interchange the $\exists y$ and $\forall z$: doing so changes the meaning of the statement. The original statement,

$$\forall x\exists y\forall z\left(x^2-y+z=0\right)$$

says that no matter what positive integer $x$ you choose, I can find a $y\in\Bbb Z^+$ such that $x^2-y+z=0$ no matter what positive integer $z$ you choose. For instance, if you choose $x=1$, I can find some positive integer $y$ such that $1-y+z=0$ for every positive integer $z$. Since $1-y+z=0$ if and only if $z=y-1$, this is clearly false: no matter what $y$ I pick, you can choose for $z$ any positive integer except $y-1$ and ensure that $x^2-y+z$ is not $0$.

The modified statement

$$\forall x\forall z\exists y\left(x^2-y+z=0\right)\;,$$

on the other hand, says something very different: it says that no matter what positive integers you choose for $x$ and $z$, I can find a positive integer $y$ such that $x^2-y+z=0$. And of course I can: I just pick $y=x^2+z$.

Since one statement is true and the other false, they certainly cannot be equivalent.


The original sentence says that for any $x$, there is a $y$, such that whatever $z$ we pick, we have $x^2-y+z=0$.

So the $y$ has to work for all $z$. But that's impossible. If it works for $z=1000$, it fails for all other $z$. The sentence is (very) false.

We cannot interchange the quantifiers $\forall$ and $\exists$ without altering the meaning of the sentence.


Consider $$\forall y. \exists x. x\text{ is the mother of }y$$ means that for every person $y$, there is some person $x$ who is $y$'s mother, which is true; every person has a mother. But $$\exists x.\forall y. x\text{ is the mother of }y$$ says that there is some person $x$, so that for every person $y$, $x$ is $y$'s mother, which is false; there is no person who is everyone's mother.

The order is important.