So I am reading a proof that implies that if a finitely generated group has two bases then they have the same number of elements.
The theorem says
Let $P \in \mathbb{Z}^{m\times n} $. The. The following are equivalent:
(a) The columns of $P$ form a basis of $\mathbb{Z} ^{m\times 1} $.
(b) $m=n $ and $P^{-1} \in \mathbb{Z}^{n\times n} $.
(c) $m=n$ and $P$ is unimodular.
Then it says that this implies that any two bases of a free abelian group have the same size.
My question is how does the theorem imply this?
If it were possible for a $Z$-module to have bases of cardinality $m$ and $n$, then it would mean that $Z^m$ has a basis of cardinality $n$. Let $P$ be the $m \times n$ matrix whose columns are the basis elements. Then by the theorem, you must have $m = n$.