Prove that no $\mathbb{Z}$-module is both projective and injective Prove that no nontrivial unitary $\mathbb{Z}$-module(or equivalently, abelian group) is both projective and injective.
My attempt: Since $\mathbb{Z}$ is a PID, injective modules are the same as divisible modules. Therefore, it suffices to show that a divisible module is never projective. Let $D$ be any divisible $\mathbb{Z}$-module. Then we have to find two abelian groups $M$ and $N$ such that for some homomorphism $\phi:M\to N$, a homomorphism $f:D\to N$ does not lift to a homomorphism $\bar{f}:D\to M$. Here is where I'm stuck. How should I proceed further? I tried to find a counterexample, but I failed. Does anyone have ideas?
 A: It is clear that $\mathbb{Z}$ does not have any nonzero divisible submodule. Now prove that any free $\mathbb{Z}$-module, or any direct sum of copies of $\mathbb{Z}$, does not have any nonzero divisible submodule.
If $L\subset \oplus_\alpha \mathbb{Z}_\alpha$ were a nonzero divisible submodule, then there exists $\alpha$ such that $\pi_\alpha (L)\neq 0$, where $\pi_\alpha$ is the projection onto $\alpha$-coordinate. Then for any nonzero $n\in\mathbb{Z}$, $nL=L$, so $n\pi_\alpha(L)=\pi_\alpha(nL)=\pi_\alpha(L)$, so $\pi_\alpha(L)$ is a nonzero divisible submodule of $\mathbb{Z}$, which is a contradiction.
Now suppose $M$ is a projective $\mathbb{Z}$-module. Then $M$ is a submodule of a free $\mathbb{Z}$-module, so it cannot be divisible.
A: A projective $\Bbb Z$-module is a free module $F$. If it has free basis
$(e_i)_{i\in I}$ then for each $i$, there is no $x$ with $2x=e_i$.
As long as $I\ne\emptyset$, then $F$ is not divisible.
A: Suppose a divisible module $D$ is projective. Then $D$ embeds in a direct sum of copies of $\mathbb{Z}$. Does such a module have nonzero divisible submodules?

Hint: if $A$ and $B$ are reduced $\mathbb{Z}$-modules (that is, they have no nonzero divisible submodule), then $A\oplus B$ is reduced as well. Generalize to arbitrary direct sums.

Actually you don't need to use the fact that injective modules are the same as the divisible modules: every injective module over a domain is divisibile (the converse might not hold).
You also don't need to know that a projective $\mathbb{Z}$-module is free.

