0

I have a question regarding First Order Logic. I have to express the property "x is a Prime" in First Order logic. So far I have the following solution:

$\forall x\;Prime(x) \leftrightarrow \neg \exists y, z \;y \times z = x \land (y > 1 \land z > 1)$

I think that it is right but I am not 100% sure. My reason for putting a bidirectional there is that

$\forall x\;\neg \exists y,z\;y \times z = x \land (y > 1 \land z > 1) \to Prime(x)$

is also true. But it feels weird as we mostly use $\to$ with a universal quantifier.

Same goes for the formula:

$\forall x\;Even(x) \leftrightarrow \exists y\;y + y = x$ (x is even)

EDIT

After thinking a lot about it again and taking into account the comments below, I came up with this:

PROBABLY RIGHT:

$\forall x\; Prime(x) \leftrightarrow x \neq 0 \land x \neq 1 \land \neg \exists y, z [(y \times z = x) \land y \neq x \land z \neq x]$ P.S.

markus_p
  • 163

1 Answers1

1

One has to be careful here. To express that $x$ is even, simply use $$\tag1 \exists y\; y+y=x.$$ This allows us to extend the language by a unary predicate $\operatorname{even}(x)$, which we define thus: $$ \operatorname{even}(x)\ :\leftrightarrow\ \exists y\; y+y=x$$ (or possibly with other symbols such as $\equiv$, but it should at least be distinguished from the biconditional), by which we can eliminate $\operatorname{even}()$ from any statement, and which makes $$\tag2\forall x \operatorname{even}(x)\leftrightarrow\exists y\; y+y=x$$ (somewhat trivially) true. So to repeat, the statement that $x$ is even is not expressed by $(2)$, but rather by $(1)$.

That being said, your definition of $\operatorname{Prime}(x)$ would make $1$ and $0$ primes, so you should also double check the condition itself.

  • I agree with you that the definition of the new predicate "even(x)" must be stated as (e.g.) $\operatorname{even}(x) =_{def} \exists y (y + y = x)$, but - I think - in order to make he "machinery" formally correct, we have to add to the theory we are working with, also the new axiom : $\forall x \operatorname{even}(x) \leftrightarrow \exists y (y + y = x)$ - please, see my answer to this post. – Mauro ALLEGRANZA Apr 15 '14 at 20:38
  • but in general the biconditional is correct? – markus_p Apr 15 '14 at 20:55
  • why would my definitin make 1 and 0 primes? because I require y and z to be bigger than 1 this can not happen right? – markus_p Apr 15 '14 at 20:56
  • @markus_p - because there do not exists numbers $y,z > 1$ such that $1 = y \times z$, the condition $\lnot \exists y\exists z [(y > 1 \land z > 1) \land (1 = y \times z)]$ is vacuosly satisfied. If you "move inside" the negation, you will get : $\forall y \forall z[(y > 1 \land z > 1) \rightarrow \lnot (1 = y \times z)$, and this is true because each couple $y,z$ that satisfy the antecedent will also satisfy the consequent. – Mauro ALLEGRANZA Apr 16 '14 at 06:15
  • thanks, that is true. didnt catch that – markus_p Apr 16 '14 at 09:22
  • @MauroALLEGRANZA Come to think of it, to be valid in a more general context (say, beyond predicate calculus) instead of an axiom one may need something like "can be relaced in any context (obeying possible type/variable restrictions)", I assume – Hagen von Eitzen Apr 16 '14 at 10:40