I am solving an exercise from Dummit, Foote. Let $R$ be a ring with $1$. Then the following are equivalent:
Every $R$-module is projective.
Every $R$-module is injective.
Proof:
(1) implies that for any R-mod $A$ we have $Ext^i(-,A)$ is a zero functor. But this means that for any R-mod $Ext^i(L,A) = 0$ for all $A$ so $L$ is injective. I show $(2) \Rightarrow (1)$ exactly the same way.
It is quite easy so I am afraid I missed something. Is my proof correct?
It is correct. Another way to prove is through short exact sequences:
A $R$-module $P$ is projective if and only if every short exact sequence of $R$-modules $$0 \longrightarrow M \longrightarrow N \longrightarrow P \longrightarrow 0$$ splits and a $R$-module $I$ is injective if and only if every short exact sequence of $R$-modules $$0 \longrightarrow I \longrightarrow M \longrightarrow N \longrightarrow 0$$ splits.
Therefore, using these equivalences we have: every $R$-module is projective $\Leftrightarrow$ every short exact sequence of $R$-modules splits $\Leftrightarrow$ every $R$-module is injective.