Solution (source code)

= Solution

Suppose for a contradiction that $m>n$. Compose the given <R-module homomorphism>[injective module homomorphism] with the standard injection $B^n\hookrightarrow B^m$ that appends $m-n$ zero coordinates. This gives an injective <endomorphism> $T$ of the <finite free module> $B^m$ whose matrix has a zero final row.

Its <characteristic polynomial> has zero constant term, so the <Cayley-Hamilton theorem> gives
$$
T^m+c_{m-1}T^{m-1}+\cdots+c_1T=0.
$$
Injectivity lets us cancel $T$. Repeating this argument eventually gives the identity endomorphism equal to zero. That would imply $B^m=0$, contrary to $B\ne0$. Hence $m\leq n$. This proves the <rank inequality for an injection of finite free modules>.