$p$ prime, $P = \left\{ \frac{m}{p^e} \middle| m, e\in \mathbb{Z} \right\}$. Prove that $\mbox{Ext}(P; \mathbb{Z}) \cong \mathbb{Z}^{(p)}/\mathbb{Z}$ I don't know why the book Homology by Saunders Mac Lane is wwaaayyy tttoooo hard to digest. :(((
This is like the third time I read this book, but still not clear is everything, and to tell the truth, I cannot even see (or see little) connections between the exercises and the information provided in each lesson.
It's exercise 7, on page 76 of the book. The current lesson is about The obstructions to the extension of homomorphisms. Ok, here's what it says:
Problem

Let $p$ be any prime, and define the set $P$ as follow: $P = \left\{ \frac{m}{p^e} \middle| m, e\in \mathbb{Z} \right\}$, clearly it's a subgroup of the additive Abelian group $\mathbb{Q}$. Let $\mathbb{Z}^{(p)}$ be the additive group of $p-$adic integers. Prove that:
$$\mbox{Ext}(P; \mathbb{Z}) \cong \mathbb{Z}^{(p)}/\mathbb{Z}$$

Ok, I know some strategies when doing problems on Ext is to find a ses with projective, or injective modules, then just kind of applying $\mbox{Ext}(-; A)$, and $\mbox{Ext}(A; -)$ to arrive at the les, and work from there.
Here's what I have tried, not much though. :(


*

*I've found the ses for $\mathbb{Z}^{(p)}$, i.e:
$$0 \to \mathbb{Z} \to \mathbb{Z}^{(p)} \to \mathbb{Z}^{(p)} / \mathbb{Z} \to 0$$
The problem is, if I work with that ses, then I have to apply $\mbox{Ext}(P; -)$ to the sequence. But there is no injective $\mathbb{Z}-$module there, so there's nothing that can make $\mbox{Ext}(P; \mbox{something injective}) = 0$.

*I also try to find a ses for $P$, but its definition confuses me. I know that every module $M$ can be embedded in $0 \to S \to F \to M \to 0$ for some projective $F$, but how should I use the definition of $P$ to find a 'good' ses like that?


I think I'm not seeing something here, or maybe I'm going on the wrong track. So any hints would be great. :*
Thank you very much,
And have a good day,
 A: $\require{AMScd}$
Denote $P$ by $\mathbb{Z}[\frac{1}{p}]$, which is common practice indicating that it is the localization of $\mathbb{Z}$ at powers of $p$. Denote $\mathbb{Z}[\frac{1}{p}]/\mathbb{Z}$ by $\mathbb{Z}/p^{\infty}$. We have an exact sequence $0\rightarrow \mathbb{Z}\rightarrow \mathbb{Z}[\frac{1}{p}]\rightarrow \mathbb{Z}/p^{\infty}\rightarrow 0$. Applying $\mathrm{Ext}(-,\mathbb{Z})$, part of the associated long exact sequence reads $\mathrm{Hom}(\mathbb{Z}[\frac{1}{p}],\mathbb{Z})\rightarrow \mathrm{Hom}(\mathbb{Z},\mathbb{Z})\rightarrow \mathrm{Ext}(\mathbb{Z}/p^{\infty},\mathbb{Z})\rightarrow \mathrm{Ext}(\mathbb{Z}[\frac{1}{p}],\mathbb{Z})\rightarrow \mathrm{Ext}(\mathbb{Z},\mathbb{Z})$, which turns out to be $0\rightarrow \mathbb{Z}\rightarrow \mathrm{Ext}(\mathbb{Z}/p^{\infty},\mathbb{Z})\rightarrow \mathrm{Ext}(\mathbb{Z}[\frac{1}{p}],\mathbb{Z})\rightarrow 0$.
It remains to calculate $\mathrm{Ext}(\mathbb{Z}/p^{\infty},\mathbb{Z})$. Taking the injective presentation of $\mathbb{Z}$: $0\rightarrow \mathbb{Z}\rightarrow \mathbb{Q}\rightarrow \mathbb{Q}/\mathbb{Z}\rightarrow 0$. Taking $\mathrm{Hom}(\mathbb{Z}/p^{\infty},-)$, it becomes $0\rightarrow \mathrm{Hom}(\mathbb{Z}/p^{\infty},\mathbb{Z})\rightarrow \mathrm{Hom}(\mathbb{Z}/p^{\infty},\mathbb{Q})\rightarrow \mathrm{Hom}(\mathbb{Z}/p^{\infty},\mathbb{Q}/\mathbb{Z})$. Note that $\mathrm{Hom}(\mathbb{Z}/p^{\infty},\mathbb{Q})=0$ since every element of $\mathbb{Z}/p^{\infty}$ has torsion. Furthermore, $\mathrm{Hom}(\mathbb{Z}/p^{\infty},\mathbb{Q}/\mathbb{Z})$ is determined the images $e_i$ of $1/p^i$ respectively ($i\ge 0$), satisfying $pe_i=e_{i-1}$ ($i\ge1$). It is not hard to see that they are exactly $\mathbb{Z}_p$ the $p$-adic integers. So $\mathrm{Ext}(\mathbb{Z}/p^{\infty},\mathbb{Z})\cong \mathbb{Z}_p$.
Let's analyze more closely. Take the exact sequence of chain complexes inducing the long exact sequence (some 0 omitted for simplicity):
$$\begin{CD}
0 @>0>> \mathbb{Z} @>\text{id}>>\mathbb{Z} \\
@VVV @VVV @VVV \\
\bigoplus_{i \ge j > 0}\mathbb{Z} @>{e_{ij}\rightarrow (p^j e_i-e_{i-j})}>> \bigoplus_{i \ge 0}\mathbb{Z} @>{e_i \to \frac{1}{p^i}}>> \mathbb{Z} \left[\frac{1}{p} \right] \\
@VVV @VVV @VVV \\
\bigoplus_{i \ge j > 0}\mathbb{Z} @>{e_{ij}\rightarrow (p^j e_i-e_{i-j}), (e_0 = 0)}>> \bigoplus_{i > 0}\mathbb{Z} @>{e_i \to \frac{1}{p^i}}>> \mathbb{Z} /p^\infty
\end{CD}
$$
Dualizing it renders:
$$\begin{CD}
0 @>>> \prod_{i > 0}\mathbb{Z} @>{f(e_{ij})=p^jf(e_i)-f(e_{i-j})}>> \prod_{i\ge j>0} \mathbb{Z}\\
@VVV @VVV @VVV \\
0 @>>> \prod_{i \ge 0}\mathbb{Z} @>{f(e_{ij})=p^jf(e_i)-f(e_{i-j})}>> \prod_{i\ge j>0} \mathbb{Z} \\
@VVV @VVV @VVV \\
\mathbb{Z} @>\text{id}>> \mathbb{Z} @>0>>0
\end{CD}
$$
To know how $\mathrm{Hom}(\mathbb{Z},\mathbb{Z})\rightarrow \mathrm{Ext}(\mathbb{Z}/p^{\infty},\mathbb{Z})$, we take an $a\in\mathbb{Z}$, which can be induced by $(a,0,0,...)$. This is mapped to $f(e_{ii})=a,f(e_{ij})=0,i\ne j$.
If we can prove $1$ in $\mathrm{Hom}(\mathbb{Z},\mathbb{Z})$ and $\mathbb{Z}_p$, mapped into $\mathrm{Ext}(\mathbb{Z}[\frac{1}{p}],\mathbb{Z})$ induce the same extension $0\rightarrow \mathbb{Z}\rightarrow E\rightarrow \mathbb{Z}/p^{\infty}\rightarrow 0$, then we are done.
We directly pull back and push out to see, the former is $(\oplus_{i\ge0}\mathbb{Z})/I$, with $I$ generated by $(1,-p,0,0,...), (1,0,-p^2,0,...),(1,0,0,-p^3,...),...$, isomorphic to $\mathbb{Z}[\frac{1}{p}]$ by sending $e_i$ to $1/p^i$; the latter is $(q,p)$ with $q-p=n\in\mathbb{Z},q\in\mathbb{Q},p\in\mathbb{Z}/p^{\infty}$, isomorphic to $\mathbb{Z}[\frac{1}{p}]$ by sending $(q,p)$ to $q$. It is not hard to verify the morphisms in the both extensions are the obvious ones, making them equivalent.
Taking it back, we have $\mathrm{Ext}(\mathbb{Z}[\frac{1}{p}],\mathbb{Z})\cong\mathbb{Z}_p/\mathbb{Z}$.
A: Just use the definition of $\mathrm{Ext}$! $0 \to \mathbb{Z} \to \mathbb{Q} \to \mathbb{Q}/\mathbb{Z} \to 0$ is an injective resolution. It follows that $\mathrm{Ext}^1(P,\mathbb{Z})$ is the cokernel of $\mathrm{hom}(P,\mathbb{Q}) \to \mathrm{hom}(P,\mathbb{Q}/\mathbb{Z})$. For $\phi \in \mathrm{hom}(P,\mathbb{Q}/\mathbb{Z})$ we have $(\phi - \mathrm{pr} \circ q)(1)=\phi(1) - \mathrm{pr}(q)=0$ for some $q \in \mathbb{Q}$ resp. $q : P \to \mathbb{Q}$. Therefore
$\mathrm{Ext}^1(P,\mathbb{Z}) = \hom(P/\mathbb{Z},\mathbb{Q}/\mathbb{Z})/\mathbb{Z}=\mathrm{End}(\mathbb{Z}/p^{\infty})/\mathbb{Z} = \mathbb{Z}_p/\mathbb{Z}$.
Explicitly, if $\gamma : \mathbb{Z}/p^{\infty} \to \mathbb{Z}/p^{\infty}$ is an endomorphism, the corresponding extension $0 \to \mathbb{Z} \to E \to P \to 0$ is given by $E=\{(a,b) : b \in P, a \in \mathbb{Z}/p^{\infty}, b \bmod \mathbb{Z} = \gamma(a)\}$.
Similarily one proves that $\mathrm{Ext}^1(\mathbb{Q},\mathbb{Z})=\widehat{\mathbb{Z}}/\mathbb{Z}$.
