Created 27 Jul 2023. Last updated 19 Dec 2024
The Fundamental Theorem of Arithmetic: Our Journey's End
tl;dr: A journey from the ground up in which we use axioms to build a proof that every positive integer can be uniquely prime factored.
This is part 5, where we stand on what we've built from axioms so far, and finally prove the fundamental theorem of arithmetic (technically, the generalized version). In general, the level of rigor will decrease as the parts go on, so that the reader doesn't get bored to death. But it should be obvious how to fill out everything with complete rigor. Here is a glossary of math symbols.
Existence of a prime factorization
¶Armed with everything we've done so far, we're ready to prove that every integer greater than 1 can be uniquely written as a product of positive primes.
Intitively, we want to be able to use induction: if is prime we're done, and if it's not then with - but by inductive hypothesis, and can both be written as a product of primes, thus is a product of primes.
We can flip this to use the well-ordering principle, because I think it's nicer (and we haven't actually proved that induction works).
Lemma.Every integer greater than 1 is a prime or a product of positive primes.
Proof.Suppose not, we will show a contradiction.
Then the set and is not prime or a product of positive primes is nonempty. But this set is also a subset of , by definition. Hence by the well-ordering principle, it has a least element, say . Then and is not prime of a product of positive primes.
Since is not prime, there exist integers such that and .1
Now, because is minimal, and must both be positive primes or a product of positive primes (else they would be in the set). Hence we can write and where these are all positive primes.
But, then , thus is a product of positive primes, contradiction.
Uniqueness
¶So, we've shown that every integer greater than 1 can be factored into positive primes.
But can we show that it can be factored in only one way (up to permutation) ? This is where we need to use what we've built up (i.e. Euclid's Lemma).
Let's try using minimality again.
If there's an integer that has two distinct factorizations, then take the minimal example, use Euclid's Lemma to cancel a common prime factor from both factorizations to obtain a smaller example, and we have a contradiction.
Theorem. (Fundamental Theorem of Arithmetic)Every integer greater than 1 can be factored into positive primes in exactly one way, up to permutations.
Proof.First, note that we showed every integer greater than 1 can be factored into positive primes.
Suppose there is an integer greater than 1 with two distinct factorizations. Then the set of natural numbers greater than 1 with two distinct factorizations is nonempty, so by the well-ordering principle, the set has a least element, say .
Write as two distinct factorizations of (up to permutation).
Note that , else and (since a prime cannot have two prime factors) so and the factorizations would be the same. Similarly .
Then, divides , so by Euclid's Lemma, divides some 2, say . Without loss of generality (because of permutation), let . Since is prime, we have that .
Thus, we may cancel3 this common prime factor from both factorizations to obtain
which are two distinct factorizations of an integer that is strictly smaller than .
Also recall that and , thus this new integer is bigger than 1. This contradicts the minimality of , and we are done.
Woop woop, we've finally proved the fundamental theorem of arithmetic! To recap, our path to the proof was:
Division algorithm => Bezout's lemma => Euclid's lemma => FTA
Do you think you can remember it all?
Proof: not prime and means there is a factorization with neither being . ↩
We could do this more rigorously, but essentially or , and so on. Have a go at proving this rigorously with the well-ordering principle (with fixed) if you want. ↩
Why can we cancel? We need to prove the lemma that if , then (true for all ). But this is doable, because if , then , so or , so . ↩