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 $\mathcal B$.

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

Then $|\mathcal B|\leq |S|$.

Outline of Proof
Because $S$ is a spanning set, we can construct a surjective homormorphism $R^S \to R^{\mathcal 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.

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 $\mathcal B$ is a basis, the homomorphism given by Universal Property of Free Module on Set:
 * $\psi : R^{\mathcal B} \to M$

is an isomorphism.

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

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

By a noncommutative version of Maximal Ideal iff Quotient Ring is Field, $R/\mathfrak m$ is a division ring.

Let $\pi : R \to R/\mathfrak m$ denote the projection.

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

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

By Cardinality of Basis of Free Vector Space on Set and because $\bar f$ is surjective, $|\mathcal B| \leq |S|$