# Predicate logic: Definition of prime numbers

I have come up with this definition: n is prime iff

$$(n>1)\ \wedge \ \left[ \forall x.\ \ (\exists k. n=kx) \implies (x=1 \vee x=n) \right]$$

Is this definition correct?

• Yes .. assuming your domain is the natural numbers – Bram28 May 28 at 17:06
• Yes it is. I should put it in there – FizzleDizzle May 28 at 17:06
• Fun historical fact: The old definition of prime was just the right conjunct. That is, 1 used to be a prime. Put differently: under the old definition, a prime number was one with at most two divisors. Now, it is a number with exactly two divisors. Which itself you can formalize as: $\forall n (Prime(n) \leftrightarrow \exists x \exists y (x \not = y \land \forall z (\exists k \ n = kz \leftrightarrow (z = x \lor z = y))))$ – Bram28 May 28 at 17:09