If $A,B,C$ are f.g. $\mathbf{Z}/p^n\mathbf{Z}$-modules and $A\oplus C\cong B\oplus C$, show $A\cong B$. 
Let $A,B,C$ be finitely generated $\mathbf{Z}/p^n\mathbf{Z}$-modules, where $p$ is prime and $n\geq 1$, and suppose $A\oplus C\cong B\oplus C$. Prove that $A\cong B$.

This problem has frustrated me since I can't seem to figure out how $\mathbf{Z}/p^n\mathbf{Z}$ and the finitely generated hypothesis play a role. I would like to do something like the following, but I am skeptical of the middle isomorphism (hence the question mark), though I'm fairly certain the others are okay: 
 $$
 A\cong \frac{A\oplus C}{0\oplus C}\overset{\text{?}}{\cong}\frac{B\oplus C}{0\oplus C}\cong B
 $$
Can anyone give me some hints? I was trying to construct the middle isomorphism explicitly by looking at the homomorphism $A\oplus C\rightarrow \frac{B\oplus C}{0\oplus C}$ induced by the isomorphism $A\oplus C\rightarrow B\oplus C$, but I couldn't seem to figure out how to use the hypotheses, or why things might fail without them... 
 A: Hint: Since $A$, $B$ and $C$ are finitely generated modules over a finite ring, they are finite and have finite length.  Thus, we may apply the Krull-Schmidt theorem.  In particular, the uniqueness of a decomposition into indecomposable modules will imply the result you wish to prove.  
A: There's a more elementary version, without using the Krull-Schmidt theorem: as $A,B,C$ are finitely generated over a finite ring, they are finite. But there's a general argument proving that finite structures are always simplifiable. 
First of all, notice that the hypothesis yields $|A|=|B|$, so it suffices to prove that there is an injective morphism $A\to B$ to conclude. 
Now note that for any finite module $D$, $hom(D,A\times C)\simeq hom(D,A)\times hom(D,C)$ and $hom(D,A\times C)\simeq hom(D,B\times C)\simeq hom(D,B)\times hom(D,C)$, now taking cardinals (which are all finite and nonzero) and simplifying by $|hom(D,C)|$ we get that for any finite module $D$, we have $|hom(D,A)|=|hom(D,B)|$. 
Denote by $i(D,A)$ the number of injective morphisms $D\to A$, and similarly for $i(D,B)$. We prove by induction on $|D|$ that for all $D$, $i(D,A)=i(D,B)$. 
Indeed by the factorization theorem, $|hom(D,A)| = \displaystyle\sum_{N\leq D} i(D/N,A)$, and so by applying the induction hypothesis, we get $|hom(D,B)|=|hom(D,A)| = \displaystyle\sum_{N\leq D, N\neq 0} i(D/N,A) + i(D,A)  = \displaystyle\sum_{N\leq D, N\neq 0} i(D/N,B)+ i(D,A) = |hom(D,B)|-i(D,B) + i(D,A)$ and so $i(D,A)=i(D,B)$.
Apply this to $D=A$, since $i(A,A)\geq 1$ we get that $i(A,B)\geq 1$, and we may conclude. 
This is more elementary than Krull-Schmidt and generalizes to many situations (the same argument applies, almost verbatim, to all finite algebraic structures, which are therefore all simplifable)
