# The rank of finitely generated modules over a PID

Let $A$ be a PID and let $M$ be an $A$-module.

Suppose that there is an isomorphism of $A$-modules

$$\theta: M \;\to\; A^n \oplus T$$

where $n$ is a non-negative integer and $T$ is a torsion module.

I am asked to show that $A^n\cong M/M_{tor}\,$ where $M_{tor}$ is the torsion submodule of $M.$

Here is my attempt:

Let $p:A^n\oplus T \to A^n$ be projection onto the first component.

I am going to prove that $p\circ \theta : M\to A^n$ is a surjective $A$-linear map with kernel $M_{tor}.$

Surjectivity and $A$-linearity are obvious so it remains to prove the claim about the kernel.

If $t \in M_{tor},$ then

1. there exists non-zero $a \in A$ such that $at=0,$

2. we can write $\theta(t)=\phi+\tau$ for some unique $\phi \in A^n$ and $\tau \in T.$

Therefore we have $$0=\theta(at)=a\theta(t)=a\phi+a\tau$$ and so $a\phi=0.$ We must therefore have $\phi=0$ (because free modules over an integral domain are torsion-free) and so $\theta(t) \in T.$

If $t \in \ker(p\circ\theta),$ then $\theta(t) \in T$ and so there exists non-zero $a \in A$ such that $a\theta(t)=0.$

Hence $\theta(at)=0$ and since, $\theta$ is an isomorphism, we have $at =0\;$ i.e. $t \in M_{tor}.$

My questions are:

1. Is my proof right?

2. Is the purpose of this to show that the rank of a finitely generated module over a PID is well-defined?

Thank you very much!