Let U be a topological space, O a sheaf of commutative rings, and A the abelian category of (sheaves of) O-modules. The standard theory of the derived tensor product, via resolutions by complexes of flat modules, applies to complexes in D^{−}(A).

A complex P ∈ K(A) is q-flat if for every quasi-isomorphism Q_{1} → Q_{2} in K(A), the resulting map P ⊗ Q_{1} → P ⊗ Q_{2} is also a quasi-isomorphism; or equivalently, if for every exact complex Q ∈ K(A), the complex P ⊗ Q is also exact.

P ∈ K(A) is q-flat iff for each point x ∈ U, the stalk P_{x} is q-flat in K(A_{x}), where A_{x} is the category of modules over the ring O_{x}. (In verifying this statement, note that an exact O_{x}-complex Q_{x} is the stalk at x of the exact O-complex Q which associates Q_{x} to those open subsets of U which contain x, and 0 to those which don’t.)

For instance, a complex P which vanishes in all degrees but one (say n) is q-flat iff tensoring with the degree n component P^{n} is an exact functor in the category of O-modules, i.e., P^{n} is a flat O-module, i.e., for each x ∈ U, P^{x}_{n} is a flat O_{x}-module.

A q-flat resolution of an A-complex C is a quasi-isomorphism P → C where P is q-flat. The totality of such resolutions (with variable P and C) is the class of objects of a category, whose morphisms are the obvious ones.

Every A-complex C is the target of a quasi-isomorphism ψ_{C} from a q-flat complex P_{C}, which can be constructed to depend functorially on C, and so that P_{C[1]} = P_{C}[1] and ψ_{C[1]} = ψ_{C}[1].

Every O-module is a quotient of a flat one; in fact there exists a functor P_{0} from A to its full subcategory of flat O-modules, together with a functorial epimorphism P_{0}(F) ։ F (F ∈ A). Indeed, for any open V ⊂ U let O_{V} be the extension of O|V by zero, (i.e., the sheaf associated to the presheaf taking an open W to O(W) if W ⊂ V and to 0 otherwise), so that O_{V} is flat,its stalk at x ∈ U being O_{x} if x ∈ V and 0 otherwise. There is a canonical isomorphism

ψ : F (V) → Hom (O_{V}, F) (F ∈ A)

such that ψ(λ) takes 1 ∈ O_{V}(V) to λ. With O_{λ} := O_{V} for each λ ∈ F(V),

the maps ψ(λ) define an epimorphism, with flat source,

P_{0}(F) := (⊕_{V open} ⊕_{λ∈F(V)} O_{λ}) → F,

and this epimorphism depends functorially on F.

We deduce then, for each F, a functorial flat resolution ··· → P_{2}(F) → P_{1}(F) → P_{0}(F) → F

with P_{1}(F) := P_{0} (ker(P_{0}(F) → F), etc. Set P_{n}(F) = 0 if n < 0. Then to a complex C we associate the flat complex P = P_{C} such that P^{r} := ⊕_{m−n=r} P_{n}(C^{m}) and the restriction of the differential P^{r} → P^{r+1} to P_{n}(C^{m}) is P_{n}(C^{m} → C^{m+1}) ⊕ (−1)^{m} P_{n}(C^{m}) → P_{n−1}(C^{m}), together with the natural map of complexes P → C induced by the epimorphisms P_{0}(C^{m}) → C^{m} (m ∈ Z). Elementary arguments, with or without spectral sequences, show that for the truncations τ_{≤m}C, the maps P_{τ≤m C} → τ_{≤m} C are quasi-isomorphisms. Since homology commutes with direct limits, the resulting map

ψ_{C} : P_{C} = lim_{→m} P_{τ≤m C} → lim_{→τ≤m} C = C

is a quasi-isomorphism….