I am looking for an example of a formula of the form in the title of this post which is not valid.
I am very much looking forward to your replies!
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityEssentially anything you try will work! For example, the following formula is not valid, when $P$ and $Q$ are unary relation symbols: $$(\forall x\, P(x) \rightarrow \forall x\, Q(x))\rightarrow \forall x\, (P(x)\rightarrow Q(x))$$
For a countermodel, let $M = \{a,b\}$, with $P^M = \{a\}$ and $Q^M = \emptyset$.
Consider $$(\forall x(x\in\{\varnothing\})\Rightarrow\forall x(x\in\varnothing))\Rightarrow\forall x(x\in\{\varnothing\}\Rightarrow x\in\varnothing)\tag 1$$ $\forall x(x\in\{\varnothing\})$ is false, hence $\forall x(x\in\{\varnothing\})\Rightarrow\forall x(x\in\varnothing)$ is true. On the other hand, $\forall x(x\in\{\varnothing\}\Rightarrow x\in\varnothing)$ is false, hence $(1)$ is false.
Rather than approaching it in an ad hoc way, just negate the formula:
$$\lnot\bigg((\forall x \ \phi \rightarrow \forall x \ \psi) \rightarrow \forall x (\phi \rightarrow \psi)\bigg)$$
$$(\forall x \ \phi \rightarrow \forall x \ \psi) \land \lnot\bigg(\forall x (\phi \rightarrow \psi)\bigg)$$
$$(\lnot \forall x \ \phi \lor \forall x \ \psi) \land \exists x \lnot\bigg(\phi \rightarrow \psi\bigg)$$
$$(\exists x \ \lnot \phi \lor \forall x \ \psi) \land \exists x (\phi \land \lnot \psi)$$
$\exists x \ \lnot \psi$ contradicts $\forall x \ \psi$, so the left hand side can be simplified
$$(\exists x \ \lnot \phi) \land \exists x (\phi \land \lnot \psi)$$
So you just need an example where $\phi$ is sometimes false, sometimes true, and somewhere it is true that $\psi$ is false.
So $\phi ~:~ \text{x is even}$ is sometimes true and sometimes false. Pick a point where it is true, $x=4$, and make $\psi$ false there, $\psi(x) \equiv (x \ne 4)$.