Basis of Free Module is No Greater than Generator

Theorem
Let $R$ be a ring with unity.

Let $M$ be a free $R$-module with basis $B$.

Let $S$ be a generating set for $M$.

Then:
 * $\left\lvert{B}\right\rvert \le \left\lvert{S}\right\rvert$.

That is, there exists an injection from $B$ to $S$.

Outline of Proof
Because $S$ is a spanning set, we can construct a surjective homomorphism $R^{(S)} \to R^{(B)}$.

Using Krull's Theorem we divide through by a maximal ideal of $R$ to reduce it to the case where $R$ is a division ring, that is, the case of vector spaces.

We then conclude by comparing cardinalities and using Basis of Vector Space Injects into Generator.

Proof
Because $S$ is a generating set, the homomorphism given by Universal Property of Free Module on Set:
 * $\phi : R^{(S)} \to M$

is surjective.

Because $B$ is a basis, the homomorphism given by Universal Property of Free Module on Set:
 * $\psi : R^{(B)} \to M$

is an isomorphism.

Thus $f = \psi^{-1} \circ \phi: R^{(S)} \to R^{(B)}$ is a surjective module homomorphism.

By Krull's Theorem, there exists a maximal ideal $\mathfrak m \subset R$.

By Maximal Ideal iff Quotient Ring is Division Ring, $R / \mathfrak m$ is a division ring.

Let $k=R/\mathfrak m$.

Let $\pi: R \to k$ denote the quotient mapping.

By some universal properties, there exists a module homomorphism $\bar f: k^{(S)} \to k^{(B)}$ such that:
 * $\pi^B \circ f = \bar f \circ \pi^S$

Where $\pi^B$ denotes direct sum of module homomorphisms.

Because $\pi^B \circ f$ is surjective, so is $\bar f$.

By Dimension of Free Vector Space on Set:
 * $\dim_k k^{(S)} = |S|$
 * $\dim_k k^{(B)} = |B|$

and and because $\bar f$ is surjective:
 * $\left\lvert{B}\right\rvert \le \left\lvert{S}\right\rvert$