Does $A\oplus \mathbb{Z}\cong B\oplus \mathbb{Z}$ imply $A\cong B$?

If $A$ and $B$ are abelian groups, do we have that $A\oplus \mathbb{Z}\cong B\oplus \mathbb{Z}$ implies $A\cong B$?

Motivation: I was just thinking about different ways of deducing equality from expressions by quotienting, then realized I didn't know the answer in this case.


Solution 1:

Yes.

Cohn and Walker showed independently in 1956 that, if $A,B,C$ are abelian groups, $C$ is finitely generated, and $A\oplus C \cong B\oplus C$, then $A\cong B$.

This is sometimes called "Walker's cancellation theorem", though Cohn's proof in particular looks very short. The one-paragraph Section 3 handles the case $C=\mathbb{Z}$ specifically.