Alternate definition of prime number

Note that this is whenever.

$4|4 = 2\cdot 2$ however $4\not{|}2$.

To the edited question:

No! The word "whenever" comes to say that $p$ is prime if $\forall a \forall b (p | a\cdot b \Rightarrow (p | a \vee p | b))$


If you're willing to accept the fundamental theorem of arithmetic (which can be proved by elementary -i.e., "ideal free"- methods, see the link) that states that any integer different from $\pm 1$ can be written as a unique product (up to ordering of the factors) of prime numbers, then the equivalence of both definitions of prime numbers

$$ (\ m \vert p \ \Longrightarrow \ m = \pm 1 \ \text{or} \ \pm p \ ) \qquad \Longleftrightarrow \qquad (\ p \vert ab \ \Longrightarrow \ p \vert a \ \text{or} \ p \vert b \ ) $$

is clear:

[Warning. If you feel more comfortable working only with positive integer numbers, then just drop those $\pm$ all over this answer.]

$(\Longrightarrow)$ If $p\vert ab$, then $ab = pq$ for some integer $q$. Since both $ab$ and $pq$ can be uniquely written as a product of prime numbers, $p$ must be a prime factor of $ab$. But prime factors of $ab$ are necessarily prime factors of $a$ or $b$, again by the uniqueness of the fundamental theorem of arithmetic. So, $p$ is necessarily a prime factor of $a$ or $b$; that is, $p\vert a$ or $p\vert b$.

$(\Longleftarrow)$ Again, if $m\vert p$, all prime factors of $m$ must be prime factors of $p$. But the only prime factors of $p$ are $\pm p$. So, either $m = \pm p$, or $m=\pm 1$.

Of course, there is little (big?) circular argument here, because one already uses implication $(\Longrightarrow)$ in the proof of the fundamental theorem of arithmetic. This implication is called Euclid's lemma. But it can be proved by elementary methods too, that rely on Bézout's identity (whith elementary proof too: see the last link).

So, as you can see, everything is elementary, but, perhaps, too long for a single answer and to remember in one go. While reasoning using the fundamental theorem of arithmetic may be seen as little short cut easier to remember the next time you have any doubt about the equivalence of both definitions of prime number.

(In fact, a number satisfying the left hand side condition is called "irreducible", while $p$ on the right hand side is called "prime". So "prime = irreducible", at least for integer numbers.)


As far as I know, your definition

A prime is an element p such that whenever p divides ab, then either p divides a or p divides b,

is the true definition of "prime". The usual one,

... an element p which cannot be expressed as a product of non-unit elements,

is the definition of an irreducible element. Now, in every ring all primes are also irreducible, but the converse is in general not true. In other words, there are rings where the two definitions are not equivalent. One case in which they are indeed equivalent is when the ring is a unique factorization domain (the statement of the so-called "fundamental theorem of arithmetic" is that the integers form one such ring).