Statement:
Natural numbers that are exactly divisible by 2 are not prime.
I got this:
∀n ∈ N,¬P(n)∧(n%4)
where P(n) is the predicate "n is a prime number"
and N is the set of natural numbers.
And how would I write this using implication?
Also, what would be the contrapositive and converse?
Thank you!
Best Answer
The $\%$ symbol is a binary operator in programming that outputs an integer value: given integers $a, b$, $a \% b $ returns the remainder of $a/b$, i.e., is the modulus operator returning $a \pmod b$. So that is not appropriate here. We need an Boolean operator here that outputs true or false.
So we can use the $\mid$ symbol: for two integer values $a, b,\;\; a\mid b$ evaluates to true if $b \equiv 0 \pmod a$: if "a exactly divides b", and is false otherwise.
Given this, we can write your expression as $$\forall n \in \mathbb N\,\Big(2\mid n\rightarrow \lnot P(n)\Big)\tag{1}$$ or $$\forall n \Big((n\in \mathbb N \land 2\mid n)\rightarrow \lnot P(n)\Big)$$
Taking the contrapositive of the quantified expression in $(1)$ gives us $$\forall n \in \mathbb N\Big(P(n) \rightarrow (2 \not\mid n)\Big)\tag{contrapositive}$$
which reads "Every natural number that's prime is not exact divisible by 2."
The converse of the original expression is given by: $$\forall n \in \mathbb N\Big(\lnot P(n) \implies 2\mid n\Big)\tag{converse}$$
which reads: "Every natural number that's not prime is exactly divisible by 2."