Subgroups of $\mathbb{Z^3}$ Give a minimal set of generators of subgroups $\mathbb{Z^3} \supset A = \{(a, b, c) \in \mathbb{Z^3} : a + b + c = 0\}$ and $\mathbb{Z^3} \supset B = \{(a, b, c) \in \mathbb{Z^3} : a + 2b + 3c = 0 \text{ mod }  6\}$.
Do the same for $A \cap B$.
Can someone give me a general approach to tackle these types of questions?
All help is appreciated.
 A: In these easy cases, one can just guess the generators and then show that one was lucky.
It is very easy to show that $A$ is generated by $(-1,1,0)$ and $(-1,0,1)$ and it is trivial that this generating set is minimal.
Doing the same for $B$, we should start with $(-2,1,0)$ and $(-3,0,1)$. We have not addressed that the relation has only to hold modulo $6$, so we are missing something. If you try to prove that these two guys generate $B$ in the same manner as you did for $A$ above, you will of course fail. But you will realize that it is enough to add $(6,0,0)$ to get a generating set.
Combining both equations, one can check that $A \cap B$ is generated by $(1,-2,1)$ and $(-6,6,0)$.

As a sanity check for those types of computations, you can check that if you compute the $\mathbb Q$-vector space generated by those elements, you actually get the subspace of $\mathbb Q^3$ defined by exactly the same relations, but throwing away all relations, which only have to hold modulo some number.
If you want to know why: This is because those "modulo-relations" are trivially satisfied after tensoring with $\mathbb Q$.
