Euclid's Lemma for Unique Factorization Domain

Lemma
Let $\left({D, +, \times}\right)$ be a unique factorization domain and let $p$ be an irreducible element of $D$.

Let $a, b \in D$ such that:
 * $p \backslash a \times b$

where $\backslash$ means is a divisor of.

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

Corollary
Let $p$ be an irreducible element of $D$.

Let $n \in D$ such that:
 * $\displaystyle n = \prod_{i=1}^r a_i$

where $a_i \in D$ for all $i: 1 \le i \le r$.

If $p$ divides $n$, then $p$ divides $a_i$ for some $i$.

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

Proof
The elements $a$ and $b$ have factorizations:
 * $a = u \times x_1 \times x_2 \times \cdots \times x_n$

and
 * $b = v \times y_1 \times y_2 \times \cdots \times y_m$

where $u$ and $v$ are units of $D$ and $x_1, x_2, \ldots, x_n$ and $y_1, y_2, \ldots, y_m$ are irreducibles.

Then the unique factorization of $a \times b$ into irreducibles is:
 * $(*) \quad a \times b = (u \times v) \times x_1 \times x_2 \times \cdots \times x_n \times y_1 \times y_2 \times \cdots \times y_m$.

If $p$ is an associate of $x_i$ for some $i$ then we will have $p \backslash a$. Similarly, if $p$ is an associate of $y_i$ for some $i$ then $p \backslash b$.

Suppose that $p$ is not an associate of $x_i$ or $y_i$ for all $i$.

Since $p \backslash a \times b$, there is a $c \in D$ such that $p \times c = a \times b$. This element $c$ has the unique factorization:
 * $c = w \times z_1 \times z_2 \times \cdots \times z_\ell$

where $w$ is a unit of $D$ and $z_1, z_2, \ldots, z_\ell$ are irreducibles.

This gives us another factorization:
 * $a \times b = w \times p \times z_1 \times z_2 \times \cdots \times z_\ell$.

But the factorization $(*)$ contains no irreducible that is an associate of $p$.

This violates unique factorization of $a \times b$.

We conclude that $p$ is an associate of $x_i$ or $y_i$ for some $i$.

Therefore, $p \backslash a$ or $p \backslash b$.

Proof of Corollary
The proof of the corollary is identical to the proof of the Generalized Lemma of Euclid's Lemma for Irreducible Elements.

Also see

 * Euclid's Lemma for Prime Divisors, for the usual statement of this result, which is this lemma as applied specifically to the integers.


 * Euclid's Lemma for Irreducible Elements is the same result when $D$ is a Euclidean Domain.