[proofplan]
The proof separates existence from uniqueness. Projective resolutions are built by repeatedly presenting the current kernel as a quotient of a free module, so no extra hypothesis beyond the usual unital module category is needed for that part. Injective resolutions are built by repeatedly embedding the current cokernel into an injective module, using the hypothesis that $R\operatorname{-Mod}$ has enough injectives. Homotopy uniqueness follows by applying the projective and injective comparison theorems to the identity map of $M$, and then applying the corresponding homotopy uniqueness statements to the resulting composites.
[/proofplan]
custom_env
admin
[step:Construct a projective resolution by iterating free covers]
For every left $R$-module $N$, choose a set $S_N$ and a surjective $R$-[linear map](/page/Linear%20Map)
\begin{align*}
\pi_N: F_N \longrightarrow N
\end{align*}
where $F_N := \bigoplus_{s \in S_N} R$ is a free left $R$-module. The module $F_N$ is projective: given a surjection $a: A \to B$ of left $R$-modules and an $R$-linear map $b: F_N \to B$, choose for each basis element $e_s \in F_N$ an element $x_s \in A$ with $a(x_s) = b(e_s)$, and extend $e_s \mapsto x_s$ uniquely to an $R$-linear map $\widetilde b: F_N \to A$. Then $a \circ \widetilde b = b$ on the basis, hence on all of $F_N$.
Apply this to $N=M$. Set $P_0 := F_M$ and $\varepsilon := \pi_M: P_0 \to M$. Define $K_0 := \ker \varepsilon$, a left $R$-submodule of $P_0$. Apply the same construction to $N=K_0$, set $P_1 := F_{K_0}$, and let
\begin{align*}
d_1: P_1 \longrightarrow P_0
\end{align*}
be the composition of the surjection $P_1 \to K_0$ with the inclusion $K_0 \hookrightarrow P_0$.
Inductively, suppose $P_n$ and $d_n: P_n \to P_{n-1}$ have been constructed for $n \geq 1$. Define $K_n := \ker d_n$. Choose a surjection $P_{n+1} := F_{K_n} \to K_n$ from a free module, and define
\begin{align*}
d_{n+1}: P_{n+1} \longrightarrow P_n
\end{align*}
as the composition $P_{n+1} \to K_n \hookrightarrow P_n$.
For each $n \geq 1$, the image of $d_{n+1}$ is exactly $K_n = \ker d_n$, and the image of $d_1$ is $K_0 = \ker \varepsilon$. Also $\varepsilon$ is surjective. Therefore
\begin{align*}
\cdots \longrightarrow P_2 \xrightarrow{d_2} P_1 \xrightarrow{d_1} P_0 \xrightarrow{\varepsilon} M \longrightarrow 0
\end{align*}
is exact, and each $P_n$ is projective because it is free. This is a projective resolution of $M$.
[/step]
custom_env
admin
[step:Construct an injective resolution by iterating injective envelopes]
Since $R\operatorname{-Mod}$ has enough injectives, for every left $R$-module $N$ there exists an injective left $R$-module $E_N$ and a monomorphism
\begin{align*}
\iota_N: N \longrightarrow E_N .
\end{align*}
Apply this to $N=M$. Set $I_0 := E_M$ and $\eta := \iota_M: M \to I_0$. Define $C_0 := \operatorname{coker}\eta$. Apply enough injectives to $C_0$, choose a monomorphism $C_0 \to I_1$ with $I_1$ injective, and define
\begin{align*}
\delta_0: I_0 \longrightarrow I_1
\end{align*}
as the composition $I_0 \to C_0 \to I_1$, where $I_0 \to C_0$ is the quotient map.
Inductively, suppose $I_n$ and $\delta_{n-1}: I_{n-1} \to I_n$ have been constructed for $n \geq 1$. Define $C_n := \operatorname{coker}\delta_{n-1}$. Choose a monomorphism $C_n \to I_{n+1}$ with $I_{n+1}$ injective, and define
\begin{align*}
\delta_n: I_n \longrightarrow I_{n+1}
\end{align*}
as the composition $I_n \to C_n \to I_{n+1}$.
For $n=0$, the kernel of $\delta_0$ is the kernel of the quotient map $I_0 \to C_0$, hence equals $\operatorname{im}\eta$. For $n \geq 1$, the kernel of $\delta_n$ is the kernel of $I_n \to C_n$, hence equals $\operatorname{im}\delta_{n-1}$. Since $\eta$ is injective, the sequence
\begin{align*}
0 \longrightarrow M \xrightarrow{\eta} I_0 \xrightarrow{\delta_0} I_1 \xrightarrow{\delta_1} I_2 \longrightarrow \cdots
\end{align*}
is exact, and each $I_n$ is injective. This is an injective resolution of $M$.
[/step]
custom_env
admin
[step:Compare two projective resolutions over the identity map of $M$]Let $P_\bullet \xrightarrow{\varepsilon_P} M$ and $Q_\bullet \xrightarrow{\varepsilon_Q} M$ be projective resolutions of $M$. Apply the [projective resolution comparison theorem](/theorems/4558) to the identity map
\begin{align*}
\operatorname{id}_M: M \longrightarrow M
\end{align*}
with source resolution $P_\bullet \to M$ and target resolution $Q_\bullet \to M$; this theorem is a course prerequisite (citing a result not yet in the wiki: Projective Resolution Comparison Theorem). It gives a chain map
\begin{align*}
f_\bullet: P_\bullet \longrightarrow Q_\bullet
\end{align*}
such that $\varepsilon_Q \circ f_0 = \varepsilon_P$.
Applying the same comparison theorem with the roles of $P_\bullet$ and $Q_\bullet$ interchanged gives a chain map
\begin{align*}
g_\bullet: Q_\bullet \longrightarrow P_\bullet
\end{align*}
such that $\varepsilon_P \circ g_0 = \varepsilon_Q$.
The composite $g_\bullet \circ f_\bullet: P_\bullet \to P_\bullet$ is a chain map lifting $\operatorname{id}_M$, and the identity chain map $\operatorname{id}_{P_\bullet}: P_\bullet \to P_\bullet$ also lifts $\operatorname{id}_M$. By homotopy uniqueness in the projective comparison theorem, another course prerequisite (citing a result not yet in the wiki: Homotopy Uniqueness for Projective Resolution Comparisons), these two lifts are chain homotopic as augmented maps over $M$. Hence
\begin{align*}
g_\bullet \circ f_\bullet \simeq \operatorname{id}_{P_\bullet}.
\end{align*}
The same argument applied to $f_\bullet \circ g_\bullet$ and $\operatorname{id}_{Q_\bullet}$ gives
\begin{align*}
f_\bullet \circ g_\bullet \simeq \operatorname{id}_{Q_\bullet}.
\end{align*}
Therefore $P_\bullet \to M$ and $Q_\bullet \to M$ are homotopy equivalent as augmented chain complexes over $M$.[/step]
custom_env
admin
[guided]We now prove that the projective resolution constructed above is unique up to homotopy, not as a literal complex but as an augmented complex resolving $M$. Let
\begin{align*}
P_\bullet \xrightarrow{\varepsilon_P} M
\qquad\text{and}\qquad
Q_\bullet \xrightarrow{\varepsilon_Q} M
\end{align*}
be projective resolutions of $M$. The natural map to compare them over is the identity map
\begin{align*}
\operatorname{id}_M: M \longrightarrow M.
\end{align*}
The projective resolution comparison theorem says that a module map between the resolved modules lifts to a chain map between projective resolutions, provided the source complex is projective and the target augmented complex is exact. Those hypotheses hold here: each $P_n$ is projective, and $Q_\bullet \to M$ is exact by the definition of projective resolution. Applying that theorem to $\operatorname{id}_M$ gives a chain map
\begin{align*}
f_\bullet: P_\bullet \longrightarrow Q_\bullet
\end{align*}
satisfying $\varepsilon_Q \circ f_0 = \varepsilon_P$; this is exactly the assertion that $f_\bullet$ is a map of augmented complexes over $M$. The cited comparison theorem is a course prerequisite (citing a result not yet in the wiki: Projective Resolution Comparison Theorem).
To get a candidate inverse, apply the same theorem again with the roles reversed. Since each $Q_n$ is projective and $P_\bullet \to M$ is exact, the theorem gives a chain map
\begin{align*}
g_\bullet: Q_\bullet \longrightarrow P_\bullet
\end{align*}
satisfying $\varepsilon_P \circ g_0 = \varepsilon_Q$.
It remains to prove that these maps are inverse up to homotopy. The composite
\begin{align*}
g_\bullet \circ f_\bullet: P_\bullet \longrightarrow P_\bullet
\end{align*}
is a chain map over $M$, because
\begin{align*}
\varepsilon_P \circ g_0 \circ f_0
= \varepsilon_Q \circ f_0
= \varepsilon_P .
\end{align*}
The identity map $\operatorname{id}_{P_\bullet}$ is also a chain map over $M$. Thus both $g_\bullet \circ f_\bullet$ and $\operatorname{id}_{P_\bullet}$ are lifts of the same map $\operatorname{id}_M$. The homotopy uniqueness part of the projective comparison theorem, another course prerequisite (citing a result not yet in the wiki: Homotopy Uniqueness for Projective Resolution Comparisons), gives
\begin{align*}
g_\bullet \circ f_\bullet \simeq \operatorname{id}_{P_\bullet}.
\end{align*}
The same verification for the other composite gives
\begin{align*}
\varepsilon_Q \circ f_0 \circ g_0
= \varepsilon_P \circ g_0
= \varepsilon_Q,
\end{align*}
so $f_\bullet \circ g_\bullet$ and $\operatorname{id}_{Q_\bullet}$ are two lifts of $\operatorname{id}_M$ to $Q_\bullet$. Homotopy uniqueness gives
\begin{align*}
f_\bullet \circ g_\bullet \simeq \operatorname{id}_{Q_\bullet}.
\end{align*}
Therefore $f_\bullet$ and $g_\bullet$ exhibit $P_\bullet \to M$ and $Q_\bullet \to M$ as homotopy equivalent augmented chain complexes over $M$.[/guided]
custom_env
admin
[step:Compare two injective resolutions under the identity map of $M$]Let $M \xrightarrow{\eta_I} I_\bullet$ and $M \xrightarrow{\eta_J} J_\bullet$ be injective resolutions of $M$. Apply the [injective resolution comparison theorem](/theorems/4561) to the identity map
\begin{align*}
\operatorname{id}_M: M \longrightarrow M
\end{align*}
with source resolution $M \to I_\bullet$ and target resolution $M \to J_\bullet$; this theorem is a course prerequisite (citing a result not yet in the wiki: Injective Resolution Comparison Theorem). It gives a map of augmented complexes
\begin{align*}
u_\bullet: I_\bullet \longrightarrow J_\bullet
\end{align*}
such that $u_0 \circ \eta_I = \eta_J$.
Applying the same comparison theorem with the roles of $I_\bullet$ and $J_\bullet$ interchanged gives a map of augmented complexes
\begin{align*}
v_\bullet: J_\bullet \longrightarrow I_\bullet
\end{align*}
such that $v_0 \circ \eta_J = \eta_I$.
The composite $v_\bullet \circ u_\bullet: I_\bullet \to I_\bullet$ is a map of augmented complexes extending $\operatorname{id}_M$, and $\operatorname{id}_{I_\bullet}: I_\bullet \to I_\bullet$ is another such extension. By homotopy uniqueness in the injective comparison theorem, another course prerequisite (citing a result not yet in the wiki: Homotopy Uniqueness for Injective Resolution Comparisons),
\begin{align*}
v_\bullet \circ u_\bullet \simeq \operatorname{id}_{I_\bullet}.
\end{align*}
Likewise,
\begin{align*}
u_\bullet \circ v_\bullet \simeq \operatorname{id}_{J_\bullet}.
\end{align*}
Thus $M \to I_\bullet$ and $M \to J_\bullet$ are homotopy equivalent as augmented complexes under $M$. Combining this with the projective case proves that the homotopy type of either kind of resolution is determined by $M$.[/step]
custom_env
admin
[guided]We now prove the injective analogue of the projective comparison argument. Let
\begin{align*}
M \xrightarrow{\eta_I} I_\bullet
\qquad\text{and}\qquad
M \xrightarrow{\eta_J} J_\bullet
\end{align*}
be injective resolutions of $M$. The map between the resolved modules is again the identity map
\begin{align*}
\operatorname{id}_M: M \longrightarrow M.
\end{align*}
The injective resolution comparison theorem says that a module map between the resolved modules extends to a map between injective resolutions, provided the target complex is injective and the source augmented complex is exact. Those hypotheses hold here: each $J_n$ is injective, and $M \to I_\bullet$ is exact by the definition of injective resolution. Applying the theorem to $\operatorname{id}_M$ gives a map of augmented complexes
\begin{align*}
u_\bullet: I_\bullet \longrightarrow J_\bullet
\end{align*}
satisfying $u_0 \circ \eta_I = \eta_J$. This equality is precisely the condition that $u_\bullet$ extends the identity map on $M$. The cited comparison theorem is a course prerequisite (citing a result not yet in the wiki: Injective Resolution Comparison Theorem).
To construct a candidate inverse, apply the same theorem with the two injective resolutions interchanged. Since each $I_n$ is injective and $M \to J_\bullet$ is exact, the theorem gives a map of augmented complexes
\begin{align*}
v_\bullet: J_\bullet \longrightarrow I_\bullet
\end{align*}
satisfying $v_0 \circ \eta_J = \eta_I$.
It remains to show that the two composites are homotopic to the corresponding identity maps. The composite
\begin{align*}
v_\bullet \circ u_\bullet: I_\bullet \longrightarrow I_\bullet
\end{align*}
extends $\operatorname{id}_M$, because
\begin{align*}
v_0 \circ u_0 \circ \eta_I
= v_0 \circ \eta_J
= \eta_I.
\end{align*}
The identity map $\operatorname{id}_{I_\bullet}$ also extends $\operatorname{id}_M$. Therefore the homotopy uniqueness part of the injective comparison theorem, another course prerequisite (citing a result not yet in the wiki: Homotopy Uniqueness for Injective Resolution Comparisons), gives
\begin{align*}
v_\bullet \circ u_\bullet \simeq \operatorname{id}_{I_\bullet}.
\end{align*}
The other composite is handled by the same theorem after checking the extension condition. We have
\begin{align*}
u_0 \circ v_0 \circ \eta_J
= u_0 \circ \eta_I
= \eta_J,
\end{align*}
so $u_\bullet \circ v_\bullet$ and $\operatorname{id}_{J_\bullet}$ are two extensions of $\operatorname{id}_M$ to $J_\bullet$. Homotopy uniqueness gives
\begin{align*}
u_\bullet \circ v_\bullet \simeq \operatorname{id}_{J_\bullet}.
\end{align*}
Thus $u_\bullet$ and $v_\bullet$ exhibit $M \to I_\bullet$ and $M \to J_\bullet$ as homotopy equivalent augmented complexes under $M$.[/guided]