Cancellation Law for Direct Sums - What is wrong with this argument? Let $G$, $H$, and $K$ be abelian groups. Assume $G \oplus H \cong G \oplus K$. If each are finitely generated, then the structure theorem easily gives us that $H \cong K$. However, there are counterexamples in the general case, namely $H=\mathbb{Z}$, $K=\mathbb{Z} \oplus \mathbb{Z}$, and $G=\bigoplus_{i=1}^\infty\mathbb{Z}$. 
I am wondering what goes wrong with the following argument: 
Form the split short exact sequence
$$0 \to G \xrightarrow{i} G \oplus H \xrightarrow{\pi} H \to 0$$
where $i$ and $\pi$ are the inclusion and projection, respectively. Then don't we immediately get from the first isomorphism theorem that $H \cong (G \oplus H)/G$, which would contradict the counterexample above? 
If we run this for the counterexample given, we get the sequence 
$$0 \to \bigoplus_{i=1}^\infty\mathbb{Z} \to \bigoplus_{i=1}^\infty\mathbb{Z} \to \mathbb{Z} \to 0$$
which seems to still be short exact, even though here $G \cong G \oplus H$. But of course here we can see directly that $(G \oplus H)/G \cong G/G$, which is trivial. So what went wrong? 
It seems to me to be something along these lines: In this case, the kernel of the projection is not the same as the original group, it is just, say, $0 \oplus \mathbb{Z} \oplus \mathbb{Z} \oplus \dots$, i.e. nontrivial from the second coordinate on, which just happens to be isomorphic to the original group. So if we form the other short exact sequence with $K$ in place of $H$, then the difference seems to be that we have two different projection maps with different (but isomorphic) kernels. 
But I'm not really sure how to explain this in the general case, if my reasoning is correct to begin with. 
Thanks in advance for any help! 
 A: 
which just happens to be isomorphic to the original group.

Yes, this is is what happens, and also what underlies your original example. The statement $G \oplus H \cong G \oplus K \implies H \cong K$ can be wrong because the factor $G$ can appear in "different ways" on each side. 
Consider the stronger assumption: not only does $G \oplus H \cong G \oplus K$, but there is an isomorphism $f: G \oplus H \to G \oplus K$ such that for each $g \in G$ we have $f((g,0)) = (g, 0)$. That is, the isomorphism "leaves $G$ intact", so that $G$ "appears the same way on both sides". Then if we compose $f$ with the projection $\pi_K : G \oplus K \to K$, we obtain that the $\ker(\pi_K \circ f) = G \oplus \{0\}$, and so $K \cong (G \oplus H)/(G \oplus \{0\}) \cong H$ by the first isomorphism theorem.
A: All that is going on is that $G\oplus H\cong G\oplus K$ does not imply $(G\oplus H)/G\cong(G\oplus K)/G$.  This should not be surprising, because the quotient $(G\oplus H)/G$ depends not only on the group $G\oplus H$ but also on the choice of a subgroup $G$, and the isomorphism $G\oplus H\cong G\oplus K$ is not assumed to preserve the choice of subgroup.  If $\varphi:G\oplus H\to G\oplus K$ is an isomorphism, it gives an isomorphism $(G\oplus H)/G\cong (G\oplus K)/\varphi(G)$, since cosets of $G$ in $G\oplus H$ map to cosets of $\varphi(G)$ in $G\oplus K$.  But the image $\varphi(G)$ may not be the same as the subgroup $G$ of $G\oplus K$, so this doesn't tell you anything about $(G\oplus K)/G$.
