[Math] Proof – Uniqueness part of unique factorization theorem

discrete mathematicsnumber theory

The uniqueness part of the unique factorization theorem for integers says that given any integer $n$, if $n=p_1p_2 \ldots p_r=q_1q_2 \ldots q_s$ for some positive integers $r$ and $s$ and prime numbers $p_1 \leq p_2 \leq \cdots \leq p_r$ and $q_1 \leq q_2 \leq \cdots \leq q_s$, then $r=s$ and $p_i=q_i$ for all integers $i$ with $1 \leq i \leq r$.

Fill in the details of the following sketch of a proof: Suppose that $n$ is an integer with two different prime factorizations: $n=p_1p_2 \ldots p_t =q_1q_2 \ldots q_u$. All the prime factors that appear on both sides can be cancelled (as many times as they appear on both sides) to arrive at the situation where $p_1p_2 \ldots p_r=q_1q_2 \ldots q_s$, $p_1 \leq p_2 \leq \cdots \leq p_r$, $q_1 \leq q_2 \leq \cdots \leq q_s$ , and $p_i \neq q_j$ for any integers $i$ and $j$. Then deduce a contradiction, and so the prime factorization of $n$ is unique except, possibly, for the order in which the prime factors are written.

Please provide as much detail as possible. I'm very confused about this. I know I'll need Euclid's Lemma at some point in the contradiction, but I have no idea how to arrive there.

Best Answer

Without Euclid's Lemma or Bezout's Identity & all that.

Preface. We consider "$1$" to be the unique prime factorization of $1$, so as to not need to discuss some special cases separately.

By contradiction, suppose $\emptyset \ne E= \{A\in \Bbb N : A \text { has more than one prime factorization }\}.$ Let $P =\min E.$ Then for some unequal increasing finite sequences $(p_1,...,p_m)$ and $(q_1,...,q_n)$ of primes we have $$(1)...\quad P=\prod_{i=1}^mp_i=\prod_{j=1}^nq_j.$$

We have $m\ge 2$ and $n\ge 2,$ otherwise the prime $p_1=P$ is divisible by some prime $q_j\ne p_1,$ or the prime $q_1=P$ is divisible by some prime $p_i\ne q_1.$

Now if any $p_i=q_j=r$ for any $i,j$ then we could divide $(1)$ by $r$ and get $\min E=P>P/r\in E,$ which is absurd. So no $p_i$ equals any $q_j.$

Let $\prod_{i=2}^mp_i=X$ and $\prod_{j=2}^n q_j=Y.$ So we can write $$P=p_1X=q_1Y. $$ WLOG (without loss of generality) let $q_1<p_1.$ There exists a (unique) $k\in \Bbb N$ such that $kq_1\le p_1<(k+1)q_1.$ Let $s=p_1-kq_1. $ We have $s\ne 0$ otherwise the prime $p_1$ would be divisible by the smaller prime $q_1$.

So $1\le s=p_1-kq_1<(k+1)q_1-kq_1=q_1<p_1.$

We have $$0<X\le sX=(p_1-kq_1)X=p_1X-kq_1X=$$ $$=P-kq_1X=$$ $$=q_1Y-kq_1X=q_1(Y-kX).$$ $(2).$ So we have $0<sX=q_1(Y-k X).$ This also implies $Y-kX\ge 1.$

Now $X$ has a prime factorization that does not include $q_1$ and no prime factorization of $s$ can include $q_1$ because $s<q_1.$

$(3).$ So $sX$ has a prime factorization that $does$ $not$ include $q_1.$

$(4).$ And $q_1$ times any prime factorization of $(Y-kX)$ is a prime factorization of $q_1(Y -kX)$ that $does$ include $q_1.$

But $(2).sX=q_1(Y-kX).$ So by $(3)$ and $(4)$ we have $sX\in E.$ This is absurd because $sX<p_1X=P=\min E.$

Related Question