**Proof plan.** We prove two things: (1) every non-unit factors into irreducibles (using the ascending chain condition, which holds since PIDs are Noetherian), and (2) factorization is unique (using that irreducibles are prime in a PID, via [In PIDs Irreducible Elements Are Prime](/theorems/856)).
**Step 1: PIDs satisfy the ascending chain condition.**
[claim: ACC in PIDs]
In a PID $R$, every ascending chain $I_1 \subseteq I_2 \subseteq \cdots$ of ideals eventually stabilises.
[/claim]
[proof]
The union $I = \bigcup_{n \geq 1} I_n$ is an ideal (one checks this directly). Since $R$ is a PID, $I = (a)$ for some $a \in R$. Then $a \in I_N$ for some $N$, so $(a) \subseteq I_N$. But $I_N \subseteq I = (a)$, giving $I_N = (a) = I$. For all $n \geq N$, $I_N \subseteq I_n \subseteq I = I_N$, so $I_n = I_N$.
[/proof]
**Step 2: Every non-unit has a factorization into irreducibles.**
[claim: Factorization Exists]
Every non-zero non-unit $r \in R$ is a finite product of irreducibles.
[/claim]
[proof]
Suppose $r$ cannot be factored into irreducibles. Then $r$ is not itself irreducible, so $r = r_1 s_1$ with both non-units. At least one of $r_1, s_1$ — say $r_1$ — cannot be factored into irreducibles. Write $r_1 = r_2 s_2$ with both non-units, choosing $r_2$ again unfactorable. This yields a strictly ascending chain
\begin{align*}
(r) \subsetneq (r_1) \subsetneq (r_2) \subsetneq \cdots
\end{align*}
(strictly ascending because $r_n = r_{n+1} s_{n+1}$ with $s_{n+1}$ a non-unit, so $r_{n+1} \notin (r_n)$ would otherwise make $s_{n+1}$ a unit), contradicting Step 1.
[/proof]
**Step 3: Factorization is unique.**
[claim: Uniqueness]
If $p_1 p_2 \cdots p_m = q_1 q_2 \cdots q_k$ with all $p_i, q_j$ irreducible, then $m = k$ and after reordering, $p_i$ and $q_i$ are associates.
[/claim]
[proof]
By [In PIDs Irreducible Elements Are Prime](/theorems/856), each $p_i$ is prime. So $p_1 \mid q_1 q_2 \cdots q_k$, forcing $p_1 \mid q_j$ for some $j$. Reorder so $p_1 \mid q_1$. Write $q_1 = p_1 u$; since $q_1$ is irreducible and $p_1$ is not a unit, $u$ must be a unit, so $p_1$ and $q_1$ are associates. Cancel $p_1$ from both sides (using the [integral](/page/Integral) domain property): $p_2 \cdots p_m = (u q_2) \cdots q_k$. Relabel $uq_2$ as $q_2$ (adjusting by a unit). Induction on $m$ completes the argument; if we reach $1 = q_{m+1} \cdots q_k$ with all $q_j$ non-units, that is a contradiction, so $m = k$.
[/proof]
Since every non-unit has a factorization into irreducibles (Step 2) and this factorization is unique up to reordering and associates (Step 3), $R$ is a UFD. $\square$