I have this formula:
$$\forall y\exists x.\quad P(x,y)\quad \Rightarrow \quad \exists x\forall y.\quad P(x,y)$$
and this one:
$$\exists x\forall y.\quad P(x,y)\quad \Rightarrow \quad \forall y\exists x.\quad P(x,y).$$
I am told that the first one is valid and the second one isn’t.
I am trying to understand how the second formula is not valid in comparison to the first. To me, it seems as if both statements are the same exact thing and I find it very hard to distinguish between the both of them. Please explain this to me like I am 5. I’m just starting to study discrete math, so a lot of this is new to me.
This was taken from MIT OCW's Mathematics for Computer Science
I think you have it backwards. The second one is valid, the first is not. To see that the second is valid, suppose there exists a special $x$ such that $P(x,y)$ holds for all $y$. Then for each $y$ there is an $x$ such that $P(x,y)$, and even more so the same $x$ works for all $y$.
On the other hand, suppose that for every $y$ there is an $x$ such that $P(x,y)$. Then $x$ could be different for every different $y$, so it's not automatically guaranteed that there is an $x$ that works for all $y$.