Solution (source code)

= Solution

Over a commutative PID, Baer's criterion reduces to maps $(r)\to E$. Such a map extends to $R$ exactly when every equation $re=x$ with $r\ne0$ is solvable. Thus injective modules are exactly the <divisible module>[divisible modules].

Let $Q$ be the fraction field. The indecomposable injectives are
$$
Q
\quad\text{and}\quad
R[p^{-1}]/R
$$
for one representative $p$ of each associate class of irreducibles. The latter is the $p$-primary Prüfer module, the union of the cyclic modules generated by $p^{-n}+R$. The structure theorem for divisible modules decomposes every divisible module into copies of $Q$ and these Prüfer modules, proving that the list is complete.