Why isn't an infinite direct product of copies of $\Bbb Z$ a free module?
Why isn't an infinite direct product of copies of $\Bbb Z$ a free module?
Actually I was asked to show that it's not projective, but as $\Bbb{Z}$ is a PID, so it suffices to show it's not free.
I am stuck here. I saw some questions in SE, but there is no satisfactory answer at all.
This failure of freeness is a non-trivial result. One way to prove it is to begin with a lemma: If $F$ is a free abelian group and $C$ is a countable subgroup, then the quotient $F/C$ is the direct sum of a countable group and a free group. (I'm omitting "abelian" because I'm lazy and all groups here will be abelian.) [Proof of lemma: Fix a basis $B$ for $F$, let $B_0$ be the countable subset consisting of the basis elements that occur when you expand elements of $C$ in terms of your basis $B$. Then $F$ is the direct sum of $F_0$ freely generated by $B_0$ and $F_1$ freely generated by $B-B_0$. As $C\subseteq F_0$, it follows that $F/C$ is the direct sum of the countable group $F_0/C$ and the free group $F_1$.]
As a corollary, under the hypotheses of the lemma, any divisible subgroup of $F/C$ must be included in the countable summand and must therefore be countable.
Now suppose the direct product $P$ of countably infinitely many copies of $\mathbb Z$ were free. The elements of $P$ are the all of the infinite sequences of integers. Let $C$ be the subgroup of $P$ consisting of those sequences that have non-zero entries in only finitely many positions. Then $C$ is countable, so the divisible part of $P/C$ would have to be countable. But this divisible part contains the cosets (in $P/C$) of all the sequences (in $P$) of the form $n\mapsto n!\cdot a_n$ for arbitrary sequences of integers $(a_n)$. So the divisible part of $P/C$ has the cardinality of the continuum. This contradiction shows that $P$ is not free.
If your question was not only about $P$ but also about products of uncountably many copies of $\mathbb Z$, notice that such a product contains a copy of $P$, so you're done if you know that subgroups of free (abelian) groups are free. If you don't know that, just re-run the argument in the preceding paragraph within a copy of $P$ inside your bigger product.
By the way, a theorem of Specker shows that $P$ is not only not free but very far from free. Since $P$ has cardinality $2^{\aleph_0}$, if it were free any basis for it would also have cardinality $2^{\aleph_0}$, so there would be $2^{2^{\aleph_0}}$ homomorphisms from $P$ to $\mathbb Z$ (because you could choose the images of the $2^{\aleph_0}$ basis elements arbitrarily). Specker showed that there are only countably many homomorphisms $P\to\mathbb Z$, namely the $\mathbb Z$-linear combinations of the projections.