I have the following proposition:
Proposition: If $R$ is a principal ideal domain (PID) and $M$, $N$ two finitely generated (fg) $R-$modules, then $\text{Hom}_R(M,N)$ is finitely generated.
My idea: since $M$, $N$ are fg $R-$modules over a PID, then each one is $R-$isomorphic to a direct sum of cyclic modules:
$$M \cong R^{r} \oplus R/\left<a_1\right> \oplus R/\left<a_2\right> \oplus \cdots \oplus R/\left<a_m\right>$$ $$N \cong R^{s} \oplus R/\left<b_1\right> \oplus R/\left<b_2\right> \oplus \cdots \oplus R/\left<b_n\right>$$
where $a_i,b_j$ are the invarian factors in $R$ and $r,s$ are the rank of $M$ and $N$ respectively. To simplify define $R_{a_0} := R^r$, $R_{a_i} := R/\left<a_i\right>$, $R_{b_0} := R^s$ and $R_{b_j} := R/\left<b_j\right>$. So, $M\cong\sum_{i=0}^m\oplus R_{a_i}$ and $N\cong\sum_{j=0}^{n}\oplus R_{b_j}$. Therefore, we have the following $R-$isomorphism:
$$\text{Hom}_R(M,N) \cong \text{Hom}_R\left(\sum_{i=0}^m\oplus R_{a_i},\sum_{j=0}^n\oplus R_{b_j}\right) \cong \text{Hom}_R\left(\bigoplus_{i=0}^m R_{a_i},\bigoplus_{j=0}^n R_{b_j}\right) \cong \bigoplus_{i,j}\text{Hom}_R(R_{a_i},R_{b_j}) \cong \sum_{i,j}\oplus\text{Hom}_R(R_{a_i},R_{b_j})$$
Here I have to calculate $(r+m)\times(n+s)$ Hom-groups between cosets of $R$ and copies of $R$ to finally get that $\text{Hom}_R(M,N)$ is $R-$isomorphic to a direct sum of cyclic modules and therefore is fg. But, I think there is a more simple way to do this. I'm right? Any hit? Thanks.