Solution (source code)

= Solution

The map $\varphi:M\to N$, $x\mapsto rx$, is a <module homomorphism>, and it is injective because $r\ne0$ and $M$ is a <torsion-free module>. The <linear independence in a module> of $T$ makes the map $R^{|T|}\to N$ sending the standard basis to $T$ an isomorphism. Thus $N$ is a <finite free module>, and \b[$M\cong\varphi(M)\subseteq N\cong R^{|T|}$]. This proves <embedding a finitely generated torsion-free module in a finite free module>. No claim that the submodule itself is free over an arbitrary <integral domain> is needed.