I'm working through Lang's Algebra, and I'm stuck on this exercise (Section III, exercise 7(b), p. 167). Lang gives a hint to the solution, which I can follow until the end, when he says that the $w_j$ he constructs form a basis for $M$: I can't see why they span all of $M$. Could someone please explain why that's true? The exercise is as follows:
Let $M$ be a finitely generated abelian group (with a seminorm $| \cdot|$ that has kernel $M_0$). Assume that $M$ has rank $r$. Let $v_1, \dots, v_r \in M$ be linearly independent over $\mathbf Z$ mod $M_0$. Prove that there exists a basis $\{w_1, \dots, w_r\}$ of $M / M_0$ such that $$ |w_i| \leq \sum_{j = 1}^i |v_j|.$$
[Hint: An explicit version of the proof of Theorem 7.8 (this is the elementary divisor theorem) gives the result. Without loss of generality, we can assume $M_0 = \{0\}$. Let $M_1 = \langle v_1, \dots, v_r \rangle$. Let $d$ be the exponent of $M / M_1$. Then $dM$ has a finite index in $M_1$. Let $n_{j, j}$ be the smallest positive integer such that there exist integers $n_{j, 1}, \dots, n_{j, j - 1}$ satisfying $$n_{j, 1}v_1 + \dots + n_{j, j}v_j = dw_j \text{ for some } w_j \in M.$$ Without loss of generality we may assume $0 \leq n_{j, k} \leq d - 1$. Then the elements $w_1,\dots, w_r$ form the desired basis.]