# Computing quotient groups arising from Baer sum

My question is a general one about computing quotient groups of (a subgroup of) a direct sum of $$\mathbb{Z}$$'s and $$\mathbb{Z}/n\mathbb{Z}$$'s, but it arises from computing the Baer sum of two extensions. To find all 6 inequivalent short exact sequences $$0 \rightarrow \mathbb{Z} \rightarrow E \rightarrow \mathbb{Z}/6\mathbb{Z} \rightarrow 0,$$ I start with the sequence

$$0 \rightarrow \mathbb{Z} \xrightarrow{\cdot 6} \mathbb{Z} \rightarrow \mathbb{Z}/6\mathbb{Z} \rightarrow 0 \tag{1}$$ and compute successive Baer sums of $$(1)$$ with itself.

The way that I learnt of computing Baer sum is as follows:

The Baer sum of two extensions (of $$R$$-modules) $$0 \rightarrow A \xrightarrow{f} B \xrightarrow{g} C \rightarrow 0$$ and $$0 \rightarrow A \xrightarrow{f'} B' \xrightarrow{g'} C \rightarrow 0$$ is the extension $$0 \rightarrow A \rightarrow X \rightarrow C \rightarrow 0$$, where $$X$$ is the homology group of the complex $$A \xrightarrow{(f, -f')} B \oplus B' \xrightarrow{g-g'} C,$$ the map $$A \rightarrow X$$ is obtained from $$(f, 0)$$, and the map $$X \rightarrow C$$ is obtained from $$g$$.

Using this, the middle term in the Baer sum $$(1)+(1)$$ is $$X = \frac{\{(m,n) \in \mathbb{Z} \oplus \mathbb{Z}: 6|(m-n)\}} {\langle(6, -6)\rangle},$$

which turns out to be isomorphic to $$\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}$$.

Similarly, the middle term in the Baer sum $$(1)+(1)+(1)$$ is $$Y = \frac{\{(m,n, [0]) \in \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}: 6|(m-n)\} \cup \{(m,n, [1]) \in \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}: 6|(m-n+3)\} } {\{(6n, -3n, [n])\in \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}: n \in \mathbb{Z}\}},$$

which turns out to be isomorphic to $$\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z}$$.

I have tried plotting some points on the integer lattice plane and do see a pattern, but how can I find an explicit isomorphism between $$X$$ and $$\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}$$, and between $$Y$$ and $$\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z}$$? I'd prefer a general method over an ad hoc method. Thank you!