Lemma 22.38.1. Let $R$ be a ring. Let $(B, \text{d})$ be a differential graded $R$-algebra. There exists a quasi-isomorphism $(A, \text{d}) \to (B, \text{d})$ of differential graded $R$-algebras with the following properties

1. $A$ is K-flat as a complex of $R$-modules,

2. $A$ is a free graded $R$-algebra.

Proof. First we claim we can find $(A_0, \text{d}) \to (B, \text{d})$ having (1) and (2) inducing a surjection on cohomology. Namely, take a graded set $S$ and for each $s \in S$ a homogeneous element $b_ s \in \mathop{\mathrm{Ker}}(d : B \to B)$ of degree $\deg (s)$ such that the classes $\overline{b}_ s$ in $H^*(B)$ generate $H^*(B)$ as an $R$-module. Then we can set $A_0 = R\langle S \rangle$ with zero differential and $A_0 \to B$ given by mapping $s$ to $b_ s$.

Given $A_0 \to B$ inducing a surjection on cohomology we construct a sequence

$A_0 \to A_1 \to A_2 \to \ldots B$

by induction. Given $A_ n \to B$ we set $S_ n$ be a graded set and for each $s \in S_ n$ we let $a_ s \in \mathop{\mathrm{Ker}}(A_ n \to A_ n)$ be a homogeneous element of degree $\deg (s) + 1$ mapping to a class $\overline{a}_ s$ in $H^*(A_ n)$ which maps to zero in $H^*(B)$. We choose $S_ n$ large enough so that the elements $\overline{a}_ s$ generate $\mathop{\mathrm{Ker}}(H^*(A_ n) \to H^*(B))$ as an $R$-module. Then we set

$A_{n + 1} = A_ n\langle S_ n \rangle$

with differential given by $\text{d}(s) = a_ s$ see discussion above. Then each $(A_ n, \text{d})$ satisfies (1) and (2), we omit the details. The map $H^*(A_ n) \to H^*(B)$ is surjective as this was true for $n = 0$.

It is clear that $A = \mathop{\mathrm{colim}}\nolimits A_ n$ is a free graded $R$-algebra. It is K-flat by More on Algebra, Lemma 15.59.8. The map $H^*(A) \to H^*(B)$ is an isomorphism as it is surjective and injective: every element of $H^*(A)$ comes from an element of $H^*(A_ n)$ for some $n$ and if it dies in $H^*(B)$, then it dies in $H^*(A_{n + 1})$ hence in $H^*(A)$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).