Euclidean Domain is UFD

Theorem
Let $\left({D, +, \times}\right)$ be a Euclidean domain.

Then $\left({D, +, \times}\right)$ is a unique factorization domain.

Proof
By the definition of unique factorization domain, we need to show that:

For all $x \in D$ such that $x$ is non-zero and not a unit of $D$:


 * $(1): \quad x$ has a complete factorization in $D$
 * $(2): \quad$ Any two complete factorizations of $x$ in $D$ are equivalent.

Proof of Existence
Proof by complete induction:

Let $\nu$ be the Euclidean valuation function on $D$.

For all $n \in \N^*$, let $P \left({n}\right)$ be the proposition:
 * Any $x \in D$ such that $\nu \left({x}\right) = n$ is either a unit of $D$ or has a complete factorization in $D$.

That is, it can be written as the product of a finite number of irreducible elements.

Basis for the Induction
If $\nu \left({x}\right) = \nu \left({1}\right)$ then $x$ is a unit of $D$.

So $P \left({n}\right)$ is true for $n = \nu \left({1}\right)$.

This is our basis for the induction.

Induction Hypothesis
Now we need to show that, if $P \left({k}\right)$ is true for all values of $k < \nu \left({x}\right)$, then it logically follows that $P \left({n}\right)$ is true.

So this is our induction hypothesis:
 * Any $x \in D$ such that $\nu \left({x}\right) < n$ is either a unit of $D$ or can be written as the product of a finite number of irreducible elements.

Then we need to show:
 * Any $x \in D$ such that $\nu \left({x}\right) = n$ is either a unit of $D$ or can be written as the product of a finite number of irreducible elements.

Induction Step
This is our induction step:

Suppose $x \in D$ such that $\nu \left({x}\right) = n > \nu \left({1}\right)$.

If $x$ is irreducible, then it is the product of a finite number (i.e. $1$) of irreducible elements.

If not, then $x = y z$, where neither $b$ nor $c$ are either unit of $D$ or irreducible.

By Units under Euclidean Valuation: Theorem $(1)$ we have that:
 * $\nu \left({y}\right) < \nu \left({x}\right)$ and $\nu \left({z}\right) < \nu \left({x}\right)$

We assume the truth of $P(n)$ for all values of $n < \nu \left({x}\right)$ (see the induction hypothesis).

So we know that both $y$ and $z$ can be written as the product of a finite number of irreducible elements.

Thus we may deduce the same about $x$.

So $P \left({n}\right)$ is down to be true by the Second Principle of Mathematical Induction.

Proof of Equivalence
Now we need to show that any two complete factorizations of $x$ in $D$ are equivalent.

Suppose $p_1 p_2 \ldots p_r = q_1 q_2 \ldots q_s$ where all the $p$s and $q$s are irreducible elements of $D$.

Then $p_1 \backslash q_1 q_2 \ldots q_s$ and by Euclid's Lemma for Irreducible Elements $p_1 \backslash q_i$ for some $i$.

Since each of these is irreducible, they must by definition either be associates or that $p_1 = q_i$.

Thus we can write $q_i = u_i p_1$ where $u_i$ is a unit of $D$.

Cancelling $p_1$ from both sides, we continue similarly with $p_2$, and so on.

After a finite number of steps we determine that $r = s$ and that $q_1, q_2, \ldots, q_s$ are just associates of $p_1, p_2, \ldots p_r$ perhaps in a different order.

It follows directly, by definition, that $p_1 p_2 \ldots p_r$ and $q_1 q_2 \ldots q_s$ are equivalent factorizations.