What's wrong with this proof of the infinity of primes? While reviewing an online textbook in abstract algebra for my website—which I'm hoping will go live by the end of the month—one of the exercises in the book inspired me to produce a simple, set theoretic proof of the infinity of primes. But it looks wrong! I can't say why exactly—but something looks off about it! If anyone can spot what's wrong with it, let me know, I'm too  tired to think of it now. If it's NOT wrong, well, you get to publish that for free, go ahead, I won't fight you for credit. But boy, I'd be shocked if no one ever thought of this and it's correct! 


  There are countably infinite positive integers by definition. Decompose the positive integers into the following partition: the set of all primes and the set of all composite positive integers. Assume there are finitely many primes. Then there must be infinitely many composite positive integers because a union of finitely many finite sets is finite. By the fundamental theorem of arithmetic, each composite must be a unique product of primes. Since there is a finite number of primes, let's say $n$ primes, then there are at most $n!$ products of primes. Therefore, there must be at most n! composite positive integers. But that means the positive integers are a union of 2 finite sets and must be finite and this is a contradiction!


There has to be something wrong with this proof, but for the life of me I can't see what it is right now. I'm probably going to kick myself when someone points it out—it's probably something really trivial. 

Any takers?
There is something wrong with your proof. You claim that since there are only $n$ primes, there are only $n!$ composite numbers, which is not true. Even a single prime, $2$ for example, produces infinitely many composites:

$$2,4,8,16,32,\dots, 2^n, \dots$$
That proof appears almost deliberately confusing.

The logical proof is very simple: There are an infinite number of numbers, therefore there are an infinite number of subsets. Any unbounded subset has an infinite quantity of members.

On the other hand, I can paraphrase an old anti-proof:

There are an infinite number of numbers. But not all numbers are primes, therefore there must be a finite number of primes. Any number divided by infinity is zero, therefore there are no prime numbers.