The uniqueness of the prime factorization is proved here on Wikipedia. I am wondering whether the initial trick could be extended to a full proof without using contradiction as it's done there. So, let $n$ have two prime factorizations: $$n=p_{1}*p_{2}*\dots*p_{j}=q_{1}*q_{2}*\dots*q_{k}$$ The trick is that $p_{1}$ divides $q_{1}*q_{2}*\dots*q_{k}$, so by Euclid's lemma it must divide some $q_{i}$. Without loss of generality, let $p_{1}$ divide $q_{1}$. Since they are both prime, they must be equal. So we have already shown, that both factorizations must have one common factor. But the proof then is completed through some contradiction argument. Couldn't you instead complete this to establish equality of all factors? So, let $P$ be the set containing $p_{1}, p_{2}, \dots, p_{j}$ and $Q$ the set containing $q_{1}, q_{2}, \dots, q_{k}$. $\forall i, p_{i}$ divides $q_{1}*q_2*\dots *q_k$, so by Euclid's lemma it must divide and therefore be equal to one of the $q_i$s. So $P \subset Q$ and the other way around $Q \subset P$, hence $P=Q$, so uniqueness of prime factors up to ordering. Or am I mistaken?
Asked
Active
Viewed 255 times
1
-
1You need to account for the multiplicity of each prime factor, e..g. using multisets as here or here. – Bill Dubuque Mar 31 '22 at 19:26
-
But it's simpler just to cancel $p$ from both sides then invoke induction (there's no need to use contradiction as in the linked proof). By induction the $p$-cancelled factorizations match up, hence so to do the original factorizations (which simply append $p$ to each). – Bill Dubuque Mar 31 '22 at 19:31
-
1So the answer is yes, it can be done without contradiction (and w/o multisets) see this Theorem in the dupe for the common proof done that way, Alas, many authors use contradiction when there is no need to do so (an infamous case is Euclid's classical proof that there are infinitely many primes - which was not by contradiction) – Bill Dubuque Mar 31 '22 at 19:44
-
Exactly what I asked for, should have written multisets $P$ and $Q$, not sets. – Robin to Roxel Apr 01 '22 at 07:49
1 Answers
1
Your argument using set inclusion almost works - but it does not deal with multiple factors of the same prime.
You can avoid proof-by-contradiction with induction on the number of prime factors. Then Euclid's argument settles both the base case (one prime factor) and the inductive step (cancel one prime factor).
A nice way to combine proof-by-contradiction with induction is to use the well ordering equivalent. The smallest failure of unique factorization can't exist because you can cancel one prime to find a smaller failure.

Ethan Bolker
- 95,224
- 7
- 108
- 199
-
That is a good way of summarizing the proof-by-contradiction argument in this case. – Robin to Roxel Apr 01 '22 at 07:47