Today in algebra class my professor proved, among other things, that a factorization domain is a unique factorization domain if and only if every irreducible element is prime. I had a hard time following his proof, because he was explicitly juggling with units and their inverses all over the place. After class, I came up with a completely unit-free proof, given below. My question is: Are there any advantages to explicitly manipulating units, compared to my treatment?
Preliminaries: Let $D$ be a domain. Let $\sim$ be the association relation, i.e., the largest equivalence relation that implies divisibility.
Definition: A factorization for $n \in D$ is a finite multiset $S$ of irreducible elements such that $n \sim \prod S$.
Definition: Two factorizations $S$ and $T$ for $n \in D$ are equivalent if there exists a bijection $f : S \to T$ such that $p \sim f(p)$ for every $p \in S$.
Definition: A factorization domain is a domain such that every nonzero element admits a factorization.
Definition: A unique factorization domain is a domain such that every nonzero element admits a unique factorization up to equivalence.
Theorem: A factorization domain $D$ is a unique factorization domain if and only if every irreducible element is prime.
Proof: Assume $D$ is a unique factorization domain. Take nonzero elements $p,a,b \in D$ such that $p$ is irreducible and $p \mid ab$. There exists a nonzero element $h \in D$ such that $hp = ab$. Let $H,A,B$ be factorizations for $h,a,b$, respectively. Hence $\prod H \cdot p \sim \prod A \cdot \prod B$. By the unique factorization property there exists a bijection $f : H \sqcup \{p\} \to A \sqcup B$ such that $q \sim f(q)$ are associates for every $q \in H \sqcup \{p\}$. In particular, either $f(p) \in A$ or $f(p) \in B$. In the former case, $p \sim f(p) \mid \prod A \sim a$. In the latter case, $p \sim f(p) \mid \prod B \sim b$. Hence $p$ is prime.
Conversely, assume every irreducible element of $D$ is prime. Let $S$ and $T$ be factorizations of a common element. By induction on the cardinality of $S$, we have two cases:
If $S = \emptyset$, then $\prod S = 1$, hence $\prod T \in D^*$, hence $T = \emptyset$.
If $p \in S$, then $p \mid \prod T$. Since $p$ is prime, there exists $q \in T$ such that $p \mid q$. Since $q$ is irreducible, $p \sim q$. Let $S' = S \setminus \{p\}$ and $T' = T \setminus \{q\}$. Then $p \cdot \prod S' \sim q \cdot \prod T'$. By the inductive hypothesis, $S'$ and $T'$ are equivalent, hence so are $S$ and $T$.