I have a question about quantifiers in logic.
I know that we can switch the quantifiers "$\forall$" between them (e.g., $\forall x \in X, \forall y \in Y, p(x, y) \Leftrightarrow \forall y \in Y, \forall x \in X, p(x, y)$), the quantifiers "$\exists$" between them and that we cannot do this for two quantifiers "$\exists$" and "$\forall$" (e.g., we just have : $\exists x \in X, \forall y \in Y, p(x, y) \Rightarrow \forall y \in Y, \exists x \in X, p(x, y)$)
My problem is the following, if I take for example the proposition :
$\forall x \in \mathbb{R}, \forall y \in \{z \in \mathbb{R} | z = x + 3\}, p(x, y)$,
the set to which $y$ belongs depends of $x$ right ? In this case, it does not make any sense for me to switch the two quantifiers "$\forall$" here (because $x$ has to be defined "first").
You could say that it's not a problem because we can switch the two "$\forall"$ in the previous proposition, but then, if we take :
$\exists y \in \{z \in \mathbb{R} | z = x + 3\}, \forall x \in \mathbb{R}, p(x, y)$,
We cannot switch "$\forall$" and "$\exists$" and again, it has no sense for me...
(I have the feeling that it is simply not a good way to write it and that obviously, we have to define $x$ first, but I'm not 100% sure...)
Can you enlight me ? Thank you !
In this case, the use of set theory symbols seems to complicate things.
Assume for simplicity $\mathbb R$ as domain; in this way, we can simply write $\forall x$.
What does it mean : $∀y ∈ \{ z \mid z=x+3 \}$ ? It simply means : $y=x+3$.
Thus, the formula will be : $\forall x \forall y \ (y=x+3 \to p(x,y))$.
In this case, we have no issue with the swap of the two quantifiers.
Regarding the second example, things are different.
In general, we cannot swap $\forall$ and $\exists$.
More specifically : $\exists x \forall y P(x,y)$ implies $\forall y \exists x P(x,y)$, but not vice versa.
Consider the following counterexample :
holds in $\mathbb N$ (it is enough to consider $m+1$), while :
does not.