I am stuck with a question, and wanted to ask here.
Let $p$ and $q$ be predicates
I know that $\forall x\exists y p(x ,y) \implies \exists y\forall x p(x ,y)$ isn't always right.
But, what goes on when there is two predicates like the one in the title. I'm having hard times to evaluate this proposition: $\forall x\exists y (p(x) \lor q(y)) \implies \exists y\forall x (p(x) \lor q(y)) $
I would be happy if you help me to understand this.
All answers will be appreciated, thank you.
Yes, that holds. In fact, they are equivalent, i.e. we have:
$\forall x\exists y (p(x) \lor q(y)) \iff \exists y\forall x (p(x) \lor q(y))$
The key difference with the general $\forall x\exists y p(x,y)$, where you cannot swap the quantifiers, is that in $\forall x\exists y (p(x) \lor q(y)) $ you do not have any predicate that refers to both $x$ and $y$ at once. Hence, you apply the Prenex Equivalence Laws:
Prenex Laws
Where $\varphi$ is any formula and where $x$ is not a free variable in $\psi$:
$ \forall x \ \varphi \lor \psi \Leftrightarrow \forall x (\varphi \lor \psi)$
$ \psi \lor \forall x \ \varphi \Leftrightarrow \forall x (\psi \lor \varphi)$
$ \exists x \ \varphi \lor \psi \Leftrightarrow \exists x (\varphi \lor \psi)$
$ \psi \lor \exists x \ \varphi \Leftrightarrow \exists x (\psi \lor \varphi)$
Therefore:
$$\forall x\exists y (p(x) \lor q(y)) \iff $$
$$\forall x (p(x) \lor \exists y \ q(y)) \iff $$
$$\forall x p(x) \lor \exists y \ q(y) \iff $$
$$\exists y (\forall x p(x) \lor \ q(y)) \iff $$
$$\exists y\forall x (p(x) \lor q(y))$$