Let R be a principal ideal domain, $a \in R$ and $M=R/(a)$. Let $p$ be a prime of $R$ dividing $a$ and $n$ be the highest power of $p$ dividing $a$. Prove that if $k \le n$ then $p^{k−1}M/p^kM \cong R/(p)$, and if $k>n$ then it's 0.
This is an exercise from Dummit and Foote and I couldn't really figure out how to start...
Let $k\leq n$.
For $x\in p^{k-1}M$, write $x=\underline{p^{k-1}r_x}$ for $r_x\in R$, where the underline means 'class modulo $a$'.
Then if $x,y\in p^{k-1}M$ and $x-y\in p^k M$, you have $\underline{p^{k-1}(r_x-r_y-ps_m)}=0$. It follows that $a\,|p^{k-1}(r_x-r_y-ps_m)$, in particuliar, $p^{k}$ divides the thing on the right, and because $R$ is factorial and $k\leq n$, $p|r_x-r_y-ps_m$, so that $p|r_x-r_y$, which implies that $r_x\equiv r_y$ mod $(p)$.
So, there is a well defined map of sets $p^{k-1}M/p^kM\to R/(p)$, which is actually a $R$-module map (just write it down).
Of course, given $r+(p)\in R/(p)$, the class (mod $p^kM$) of $p^{k-1}\underline r\in p^{k-1}M$ is a reverse image of $r+(p)$, by definition.
Also, if the class (mod $p^kM$) of $p^{k-1}\underline r$ is sent on $0\in R/(p)$, then, $p|r$, so actually our element factors by $p^k$, and thus is $0$ mod $p^kM$.
So there is an isomorphism.
If $k\geq n$, we want to show that $p^kM=p^{k+1}M$. It suffices to show that for $m\in M$, $p^nm\in p^{n+1}M$. Let $b\in R$ such that $p^nb=a$. By Bezout theorem for principal rings we have $u,v\in R$ such that $up^n+vb=1$. Take $r\in R$, then, modulo $a$, we have $$p^nr\equiv 1\cdot p^nr\equiv up^{2n}r+vbp^nr\equiv up^{2n}r\in p^{n+1}M$$ because $n\geq 1$.