Trying to learn about predicate formulas. I was told that (let E and F be predicates and Q be a quantifier ∃ or ∀)
E ∧ QxF is logically equivalent to Qx(E∧F), if x is not free in E
So let's take the formula below:
P(x) ∧ ∀xQ(x) is logically equivalent to ∀x(P(x)∧Q(x))
Where P and Q are predicates. I was told these two are logically equivalent only if P(x) is bound. So let's bound P(x) with a ∃.
Let the domain be natural numbers. Let Q(x) : x>=0 and P(x) : x/2 is even number. So far so good?
Q(x) is bound, and says for all x, x>= 0 which is true. P(x) is bound by ∃ and says there exists an integer in natural numbers which is even when divided by 2, which is true (12/2 = 6).
My question is, the x in P(x) was bound with ∃, but when it was moved into ∀x(P(x)∧Q(x)), it is now bound by ∀, which makes the statement not true, right? Because not all x are even when divided by 2?
Question #1) So how is P(x) ∧ ∀xQ(x) logically equivalent to ∀x(P(x)∧Q(x)) when P(x) is bound?
Question #2) I'm going to try to prove that P(x) ∧ ∀xQ(x) is NOT logically equivalent to ∀x(P(x)∧Q(x)) when P(x) is free.
Let P(x) : x/2 is even number and make it free (not bound by ∃ and ∀). Let Q(x) : x>= 0.
To prove these two are not logically equivalent, I will take an x which makes P(x) ∧ ∀xQ(x) true and ∀x(P(x)∧Q(x)) false (am I on the right track)?
Take x = 12. P(x) ∧ ∀xQ(x) is true because 12 divided by 2 is even, and 12>=0. But ∀x(P(x)∧Q(x)) is false because it states that ∀x(P(x) so even though 12 holds true, it is not true for 11.
Is that a valid proof to show that P(x) ∧ ∀xQ(x) is NOT logically equivalent to ∀x(P(x)∧Q(x)) when P(x) is free?
First of all, I would say that it is a bit strange to say that '$P(x) \land \forall x \ Q(x)$ is equivalent to $\forall x (P(x) \land \ Q(x))$ assuming the $x$ in $P(x)$ in the first formula is bound', given that that $x$ is not bound in that formula! And the equivalence of formulas can always be determined on the basis of those formulas, without referring to some implicit larger context.
Anyway, your criticism is on the mark. That is, if we do consider a formula where the $x$ is actually bound, we can of course bind it with an existential. As such: Is $\exists x (P(x) \land \forall x \ Q(x))$ (or the equivalent $\exists x P(x) \land \forall x \ Q(x)$ equivalent to $\forall x (P(x) \land \ Q(x))$? And clearly it is not, as your example clearly demonstrates.
So, yes, the claim is weird and unusual, and even if we are charitable and try to make sense of it, it is plainly false.
About question 2) As stand-alone formulas, we can make sense of what it would take for them being equivalent, as for any free variable we can consider possible variable-assignments. That is, with the $x$ being free in the first formula (again, as a stand-alone formula), we would say something like:
$P(x) \land \forall x \ Q(x)$ is equivalent to $\forall x (P(x) \land \ Q(x))$ if and only if for every any interpretation $I$ and variable-assignment $v$ that maps $x$ to some object $d$ in the domain $D$ of $I$:
$I,v \vDash P(x) \land \forall x \ Q(x)$ iff $I,v \vDash \forall x (P(x) \land \ Q(x))$
Does that biconditional hold? No. We can take your example here. Consider interpretation $I$ with domain $\mathbb{N}$, $P(x)$: $x$ is even and $Q(x)$: $x \ge 0$, and pick variable-assignment $v$ with $v(x) = 12$
Then indeed we have that $I,v \vDash P(x) \land \forall x \ Q(x)$, but we don't have that $I,v \vDash \forall x (P(x) \land \ Q(x))$
So indeed, as stand-alone formulas (and thus with $x$ ion $P(x)$ being free in first formula), $P(x) \land \forall x \ Q(x)$ is not equivalent to $\forall x (P(x) \land \ Q(x))$
So yes, as an answer to question 2) your approach to showing non-equivalence as stand-alone formulas is also good!