Nested Quantifiers Doubt: "If $xy$ is equal to $x$ for all $y$, then $x=0$" If $P(x,y,z)$ represents $xy=z$.
Then represent the following statement using quantifiers,connectives etc.
"If $xy$ is equal to $x$ for all $y$, then $x=0$".
The answer given is  $\forall x[ \forall y P(x,y,x)\to x=0]$.
Can't we write the same as: $\forall x\forall y[P(x,y,x)\to x=0]$.
Please help me out when can I take the quantified variables outside and when can I not.

No, that is not the same at all.


*

*The first expression says is that for any $x$, the statement "For any $y$ we have $xy = x$" implies the statement "$x = 0$".

*The second expression says that for any $x$ and $y$, the statement "$xy = x$" implies the statement "$x = 0$".
The second expression isn't true, and particulary the case $y = 1$ throws a wrench in the works, since in that case $xy = x$ holds also for values of $x$ which aren't $0$.
