How can I express that 2 is the only prime number that is even using predicate logic

225 Views Asked by At

I defined some predicates below:

$B(a)$: a is a prime number

$C(a, b)$: b is divisible by $a$

Let $a, b$ be integers greater than $1$

My attempt is below, but I am not sure whether it is correct.

$$\forall a\in \mathbb{Z}, a = 2 \Leftrightarrow B(a) \land C(a, 2) $$

2

There are 2 best solutions below

0
On

This is also known as a definite descriptions in Bertrand Russell's theory of descriptions,
There is only one $x$ satisify $P$:

$$\exists x_0, P(x_0)\wedge (\forall x_1,P(x_1)\rightarrow x_0=x_1)\tag{1}$$

There is only one $x$ satisify $P$, and that $x$ satisify $Q:$

$$\exists x_0, P(x_0)\wedge (\forall x_1,P(x_1)\rightarrow x_0=x_1)\land Q(x_0)\tag{2}$$

In some sense, this also read as $Q$ is the only thing satisify $P$.
So we want the property $P(x)$ be $x$ is prime and even, $Q$ be $x$ equal to $2$.
(Note that statement didn't claime the uniqueness of "been a $2$".)

Define$P(x):(\forall m,m\mid x\to(m=1\lor m=p))\land 2\mid x\tag{$x$ is prime, also even}$
Also $Q(x):x=2$, then In math notation, we can write: \begin{align} &\exists x_0, (\forall m,m\mid x_0\to(m=1\lor m=p))\land 2\mid x_0\\ &\wedge (\forall x_1,(\exists x_1, (\forall m,m\mid x_1\to(m=1\lor m=p))\land 2\mid x_1)\rightarrow x_0=x_1)\land x_0=2\\ \end{align}

Use predicates, that is same as $(2)$.

0
On

Your

$$\forall a\in \mathbb{Z}, a = 2 \Leftrightarrow B(a) \land C(a, 2) $$

is correct

Even simpler would be:

$$\forall a\in \mathbb{Z}, a = 2 \Leftrightarrow P(a) \land E(a) $$

where $P(x)$ stands for $x$ is prime (if you are using predicate letters, you might as well use something more 'suggestive') and $E(x)$ stands for $x$ is even

In fact, it seems weird that you do try to work out what 'even' means, but you don't do this for 'prime'.

So, I would say: either just stick with the $P$ and $E$ predicates, or work them both out.

If you do decide to work them both out, then it does make sense to use some $D(x,y)$ predicate that means $x$ is divisible by $y$. Because with that, you can define (as you did), $Even(x)$ as $D(x,2)$, and $Prime(x)$ as $x \neq 1 \land \forall y (D(x,y) \to (y = 1 \lor y = x))$, and thus you would get:

$$\forall x, x = 2 \Leftrightarrow (x \neq 1 \land \forall y (D(x,y) \to (y = 1 \lor y = x)) \land D(x,2))$$