Alternate definition of prime number I know the definition of prime number when dealing with integers, but I can't understand why the following definition also works:

A prime is a quantity $p$ such that whenever $p$ is a factor of some product $a\cdot b$, then either $p$ is a factor of $a$ or $p$ is a factor of $b$.

For example, take $4$ (which clearly is not a prime): it is a factor of $16=8\cdot 2$, so I should check that either $4\mid 8$ or $4\mid 2$. But $4\mid 8$ is true. So $4$ is a prime, which is absurd.
Please note that English is not my first language, so I may have easily misunderstood the above definition.
Edit: Let me try formalize the definition as I understood it: $p$ is prime if and only if $\exists a\exists b(p\mid a\cdot b)\rightarrow p\mid a\lor p\mid b$.

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).
