I’m reading How To Prove It and I’m confused as to how the proof of “$x$ is prime” is correct.
I've written proof given below and also my conclusion after substituting in values for $x$, $y$ and $z$:
$5$ is prime. We have $$\stackrel{(x)}{5} = \stackrel{(y)}{1} \times \stackrel{(z)}{5}.$$ Logical form of $x$ is prime: $$x > 1 \land \lnot \exists y\,\exists z\left(x=yz \land y < x \land z < x\right)$$ Plugging in values for $x$, $y$ and $z$: $$5 > 1 \land \lnot \exists1\,\exists 5 \left(5=1\times 5 \land 1 < 5 \land \boldsymbol{5 < 1}\right)$$ But $5<1$ is false.
My conclusion is that $5 < 1$ is false. What’s wrong?
When you want to prove $\neg \exists y\, (\cdots)$, you can't just pick one value for $y$ and plug that in. That's how you prove $\exists y\, (\cdots)$, but the negation changes everything.
What you need to prove is that one can't pick any value for $y$ that makes the "$(\cdots)$" true, or in other words that every possible value for $y$ makes the "$(\cdots)$" false.
What you show here is just that there is one value for $y$ (and $z$) that makes the rest false -- not that every other value makes it false too.
Concretely, you want to prove $$\neg\exists y\exists z\,(5=yz \land y < 5 \land z < 5)$$ which is the same as $$\forall y \forall z \, \neg(5=yz \land y < 5 \land z < 5)$$ which is the same as $$\forall y \forall z \, (5\ne yz \lor y \ge 5 \lor z \ge 5)$$