Solution (source code)

= Solution

An $A$-module $M$ is a <flat module> when the <tensor product of modules>[tensor functor] $-\otimes_AM$ preserves injections, equivalently when it is exact.

Suppose first that $M$ is flat. For any nonzero $a\in A$, tensor the injection $A\xrightarrow{a}A$ with $M$. The resulting map $M\xrightarrow{a}M$ is injective, so $am=0$ implies $m=0$. Thus $M$ is a <torsion-free module>.

Conversely, suppose $M$ is torsion-free over the <principal ideal domain> $A$. Every finitely generated submodule of $M$ is a finitely generated torsion-free module over a PID, hence a <finite free module> and therefore flat. The module $M$ is the <filtered colimit> of these submodules. Tensor products commute with filtered colimits, and filtered colimits of modules preserve exact sequences, so $M$ is flat. This proves that a <torsion-free module over a principal ideal domain is flat>.