Quotient of a free $\mathbb{Z}$-module I'm trying to find the quotient of a free $\mathbb{Z}$-module, but somehow I don't really find the right procedure on how to get the right quotient (nor have I found any sources). I've read What does it mean here to describe the structure of this quotient module? already, but I didn't manage to reproduce the second matrix from that specific post.
In my specific example I have $\mathbb{Z}^3$ as a left-$\mathbb{Z}$ module. Lets call the generators $e_1, e_2, e_3$. My submodule is given by
$$K:=\operatorname{span}_{\mathbb{Z}}\left<i_1:=\left(\matrix{0\\-2\\1}\right), i_2:=\left(\matrix{-2\\0\\1}\right)\right>$$
My idea to get the quotient module $\mathbb{Z}^3/K$ thus far was to use the equalities
$$i_1 = -2e_2+e_3\\
i_2 = -2e_1+e_3
$$
Which yields (for $z_1,z_2,z_3,l_1,l_2\in\mathbb{Z}$):
$$ z_1e_1+z_2e_2+z_3e_3 \equiv z_1e_1+z_2e_2+z_3e_3+l_1i_1+l_2i_2\\
 = z_1e_1+z_2e_2+z_3e_3+l_1(-2e_2+e_3)+l_2(-2e_1+e_3)\\
 = (z_1-2l_1)e_1 + (z_2-2l_2)e_2 + (z_3+l_1+l_2)e_3$$
So for $z_1$ even, the first summand should be identical to zero. For $z_1$ uneven it should be identical to one. Same goes for $z_2$ and the second summand, whereas the third summand should be identical to zero in any case (though i'm not really sure about how to deal with that one, since I've already fixed $l_1$ and $l_2$). Hence I'd say my quotient should be $\mathbb{Z}_2^2$. However, letting sage do the calculations, it claims that the result should be $\mathbb{Z}\oplus\mathbb{Z}_2$
So my question is: Is my result wrong? If so: Where's my mistake and is there a better way to do it?
 A: I would tackle the problem in two steps. In the first one we try to find the answer heuristically and in the second step we prove our claim rigorously. So take any class in $\mathbb Z^3/K$ represented by $(x,y,z)$, the first relation now tells you that
$$e_3=2e_2,$$
so we may write our element as $(x,y+2z,0)$. In fact $y+2z$ can be any integer so we may assume by substitution that our class is represented by $(x,y',0)$. Now a combination of the two relation tells us $$2e_1=2e_2,$$ so we may write our class as $(x+2\lfloor\frac{y'}{2}\rfloor,y' \mod 2,0)$, again the first entry can be any integer. Thus any class in $\mathbb Z^3/K$ may be represented uniquely by a pair $(x',y'')\in \mathbb Z\times \mathbb Z/2$.
Now for the rigorous proof, we have to find a surjection $\mathbb Z^3\to \mathbb Z\times \mathbb Z/2$ with kernel $K$. Then by a isomorphism theorem this map factors over the desired isomorphism. Such a map is given by
$$(x,y,z)\mapsto (x+2z+2\lfloor\frac{y}{2}\rfloor,\bar y).$$
Obviously you have to check that this is a modul hom and that the kernel is indeed $K$.
A: The computational way to calculate this kind of quotient uses the Smith normal form. However, for small modules we can easily figure out a change of basis that immediately reveals the quotient structure. Let $a,b,c$ denote the standard basis of $\mathbb Z^3$, we know that we can add/substract basis elements to/from other basis elements and obtain another basis. So $a, b-a, c-2b$ is another basis of $\mathbb Z^3$. Since your submodule is
$$
\langle c-2b, c-2a \rangle = \langle c-2b, 2(b-a)\rangle,
$$
the quotient is
$$
\frac{\langle a,b,c\rangle}{\langle c-2b, c-2a\rangle} = \frac{\langle a, b-a, c-2b\rangle}{\langle c-2b, 2(b-a)\rangle} \cong \mathbb Z \oplus \mathbb Z_2.
$$
