Suppose $m,n \in \mathbf{N}, m\le n$. Let $A$ be a matrix with $\mathbf{Q}$ linearly independent $b_{1},...,b_{m}$ in $\mathbf{Z}^{n}$.
a) Show that there are $v_{1},...,v_{m} \in \mathbf{N}$ so that $v_{1}| ... v|v_{m}$ and square matrices P', X with entries in $\mathbf{Z}$ so that A=P'TX , and T has the entries $v_{i}\delta_{ij}; i=1,...,m ; j= 1,...,n$
b) Show that P' and $X$ are invertible and that the entries of P'^{-1} and $X^{-1}$ are also in $\mathbf{Z}$
c) Show that det P' = \pm 1 and $det X = \pm 1$ and that the gcd of all entries of A is equal to $v_{1}$
This is a question from an old mock examination (which consists only of this one problem... huh).
As written in the comments, the construction in wikipedia in the smith normal form article doesn't seem to disclose much information for c) and the entries of the invertible matrices being in $\mathbf{Z}$ in b). Help is greatly appreciated.