Euclid's Lemma for Prime Divisors

Lemma
Let $p$ be a prime number.

Let $a$ and $b$ be integers such that:
 * $p \mathop \backslash a b$

where $\backslash$ means is a divisor of.

Then $p \mathop \backslash a$ or $p \mathop \backslash b$.

Some sources use this property to define a prime number.

General Result
Let $p$ be a prime number.

Let $\displaystyle n = \prod_{i \mathop = 1}^r a_i$.

If $p$ divides $n$, then $p$ divides $a_i$ for some $i$ such that $1 \le i \le r$.

That is:
 * $p \mathop \backslash a_1 a_2 \ldots a_n \implies p \mathop \backslash a_1 \lor p \mathop \backslash a_2 \lor \cdots \lor p \mathop \backslash a_n$

Corollary
Let $p, p_1, p_2, \ldots, p_n$ be primes such that:
 * $\displaystyle p \mathop \backslash \prod_{i \mathop = 1}^n p_i$

Then:
 * $\exists i \in \left[{1 \,.\,.\, n}\right]: p = p_i$

Proof 1
We have that the integers form a Euclidean domain.

Then from Irreducible Elements of Ring of Integers we have that the irreducible elements of $\Z$ are the primes and their negatives.

The result then follows directly from Euclid's Lemma for Irreducible Elements.

Proof 2
Let $p \mathop \backslash a b$.

Suppose $p \nmid a$. Then from the definition of prime, $p \perp a$.

Thus from Euclid's Lemma it follows that $p \mathop \backslash b$.

Similarly, if $p \nmid b$ it follows that $p \mathop \backslash a$.

So:
 * $p \mathop \backslash a b \implies p \mathop \backslash a$ or $p \mathop \backslash b$

as we needed to show.

Proof of General Result
As for the main lemma, this can be verified by direct application of generalized version of Euclid's Lemma for irreducible elements.

Alternatively, we can adopt a proof by induction:

For all $r \in \N_{>0}$, let $P \left({r}\right)$ be the proposition:
 * $\displaystyle p \mathop \backslash \prod_{i \mathop = 1}^r a_i \implies \exists i \in \left[{1 \,.\,.\, r}\right]: p \mathop \backslash a_i$.

$P(1)$ is true, as this just says $p \mathop \backslash a_1 \implies p \mathop \backslash a_1$.

Basis for the Induction
$P(2)$ is the case:
 * $p \mathop \backslash a_1 a_2 \implies p \mathop \backslash a_2$ or $p \mathop \backslash a_2$

which is the main lemma as proved above.

This is our basis for the induction.

Induction Hypothesis
Now we need to show that, if $P \left({k}\right)$ is true, where $k \ge 1$, then it logically follows that $P \left({k+1}\right)$ is true.

So this is our induction hypothesis:


 * $\displaystyle p \mathop \backslash \prod_{i \mathop = 1}^k a_i \implies \exists i \in \left[{1 \,.\,.\, k}\right]: p \mathop \backslash a_i$

Then we need to show:


 * $\displaystyle p \mathop \backslash \prod_{i \mathop = 1}^{k+1} a_i \implies \exists i \in \left[{1 \,.\,.\, {k+1}}\right]: p \mathop \backslash a_i$

Induction Step
This is our induction step:

So $P \left({k}\right) \implies P \left({k+1}\right)$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $\displaystyle \forall r \in \N: p \mathop \backslash \prod_{i \mathop = 1}^r a_i \implies \exists i \in \left[{1 \,.\,.\, r}\right]: p \mathop \backslash a_i$

Proof of Corollary
From the main result, $p \mathop \backslash p_i$ for some $i$.

But by definition of prime, the only divisors of $p_i$ are $1$ and $p_i$ itself.

As $1$ is not prime, it follows that $p = p_i$.

Hence the result.