Let $\mathbb{Z}$ be the ring of integers, $V$ a $\mathbb{Z}$-module, and $A \in M_{m \times n}(\mathbb{Z})$, then we can present $V$ by $\mathbb{Z}^m/A\mathbb{Z}^n$. That is, $V \cong \mathbb{Z}^m/A\mathbb{Z}^n$.
I have a theorem from class that if $A'=AP$ for some matrice $P \in GL_n(\mathbb{Z})$ then $A$ and $A'$ present the same module, $V$.
However, thinking about this I thought of an example that to me, seems like like a counter-example. So, clearly I'm misunderstanding the theorem, or there's some other misunderstanding I'm encountering along the way. Here's the example:
Suppose: $$A=\left( \begin{matrix}3&0\\0&5 \end{matrix} \right)$$ Then the module $$\mathbb{Z}^2/A\mathbb{Z}^2 \cong \mathbb{Z}^2/(3\mathbb{Z} \times 5\mathbb{Z}) \cong \mathbb{Z}/3\mathbb{Z} \times \mathbb{Z} / 5\mathbb{Z} $$ But if we consider $$A'=\left( \begin{matrix}3&0\\0&5 \end{matrix} \right) \left( \begin{matrix} 5&0\\0&3 \end{matrix} \right)=\left( \begin{matrix}15&0\\0&15 \end{matrix} \right) $$ Then the theorem implies that $$\mathbb{Z}^2/A\mathbb{Z}^2 \cong \mathbb{Z}^2/A'\mathbb{Z}^2 \cong \mathbb{Z}^2/(15\mathbb{Z} \times 15\mathbb{Z}) \cong \mathbb{Z}/15\mathbb{Z} \times \mathbb{Z}/15\mathbb{Z}$$ But $\mathbb{Z}/3\mathbb{Z} \times \mathbb{Z}/5\mathbb{Z} \not \cong \mathbb{Z}/15\mathbb{Z} \times \mathbb{Z}/15\mathbb{Z}$. Since $3,5$ are relatively prime, we should get $\mathbb{Z}/3\mathbb{Z} \times \mathbb{Z}/5\mathbb{Z} \cong \mathbb{Z}/15\mathbb{Z}$
Can anyone notice where my misunderstanding is occuring?
This is not a counterexample since $$ \left( \begin{matrix} 5&0 \\ 0&3 \end{matrix} \right) \notin \text{GL}_2(\Bbb Z). $$
The proof of the theorem is easy: If $P \in \text{GL}_n(\Bbb Z)$, then $P\Bbb Z^n = \Bbb Z^n$ and $A’\Bbb Z^n = AP\Bbb Z^n = A\Bbb Z^n$. So $$ \Bbb Z^m/A’\Bbb Z^n = \Bbb Z^m/A\Bbb Z^n. $$