As said in the question, I'm trying to prove that if $R$ is a commutative ring (with unity) and $F$ is a free $R$-module, then every base of $F$ have the same cardinality.
I know some algebraic proofs of this fact but I saw the following exercise in a category theory book:
Let $R$ be a ring (with unity) and $I$ a bilateral ideal of the ring.
$a)$ Prove that there exists a functor $F : R\textsf{-Mod} \to R/I\textsf{-Mod}$ such that $F(M) = M/IM$ and is naturally isomorphic to the functor $R/I \otimes_R \_ : R\textsf{-Mod} \to R/I\textsf{-Mod}$ defined by the bimodule ${}_{R/I}(R/I)_{R}$.
$b)$ Use $a)$ to prove that if $R$ is commutative then every base of the free $R$-module $F$ have the same cardinality.
I've managed to prove $a)$ and to give all the information in that part of the exercise these are the functors and the natural isomorphisms between them:
Given two $R$-modules $M$ and $N$, $f:M \to N$ a morphism between them, and $m \in M$, the functors are defined as $$\begin{align} F(M)=M/IM && F(f)(m +IM)=f(m)+IN \\[1mm] R/I \otimes_R \_(M)=R/I \otimes_R M && R/I \otimes_R \_(f)=1 \otimes_R f \end{align}$$
where $1 \otimes_R f: R/I \otimes_R M \longrightarrow R/I \otimes_R N$ is the unique group homomorphism such that $$(1 \otimes_R f)((r+I) \otimes_R m)=(r+I) \otimes_R f(m).$$
Furthermore, if for every $R$-module $M$ we define $\tau_M: M/IM \longrightarrow R/I \otimes_R M$ as $$\tau_M(m+IM)=(1_R +I) \otimes_R m$$ then $\tau=(\tau_M)_{M\in R\textsf{-Mod}}$ is a natural isomorphism between the functors with inverse given in every tensor by $$\sigma_M((r+I) \otimes_R m)=rm+IM.$$
Now, my problem is that I don't know how to apply this to prove $b)$ without giving a proof essentialy equal to the ones here.
Any ideas?