# The Stacks Project

## Tag 0D65

### 20.39. Glueing complexes

We can glue complexes! More precisely, in certain circumstances we can glue locally given objects of the derived category to a global object. We first prove some easy cases and then we'll prove the very general [BBD, Theorem 3.2.4] in the setting of topological spaces and open coverings.

Lemma 20.39.1. Let $(X, \mathcal{O}_X)$ be a ringed space. Let $X = U \cup V$ be the union of two open subspaces of $X$. Suppose given

1. an object $A$ of $D(\mathcal{O}_U)$,
2. an object $B$ of $D(\mathcal{O}_V)$, and
3. an isomorphism $c : A|_{U \cap V} \to B|_{U \cap V}$.

Then there exists an object $F$ of $D(\mathcal{O}_X)$ and isomorphisms $f : F|_U \to A$, $g : F|_V \to B$ such that $c = g|_{U \cap V} \circ f^{-1}|_{U \cap V}$. Moreover, given

1. an object $E$ of $D(\mathcal{O}_X)$,
2. a morphism $a : A \to E|_U$ of $D(\mathcal{O}_U)$,
3. a morphism $b : B \to E|_V$ of $D(\mathcal{O}_V)$,

such that $$a|_{U \cap V} = b|_{U \cap V} \circ c.$$ Then there exists a morphism $F \to E$ in $D(\mathcal{O}_X)$ whose restriction to $U$ is $a \circ f$ and whose restriction to $V$ is $b \circ g$.

Proof. Denote $j_U$, $j_V$, $j_{U \cap V}$ the corresponding open immersions. Choose a distinguished triangle $$F \to Rj_{U, *}A \oplus Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V}) \to F[1]$$ where the map $Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V})$ is the obvious one and where $Rj_{U, *}A \to Rj_{U \cap V, *}(B|_{U \cap V})$ is the composition of $Rj_{U, *}A \to Rj_{U \cap V, *}(A|_{U \cap V})$ with $Rj_{U \cap V, *}c$. Restricting to $U$ we obtain $$F|_U \to A \oplus (Rj_{V, *}B)|_U \to (Rj_{U \cap V, *}(B|_{U \cap V}))|_U \to F|_U[1]$$ Denote $j : U \cap V \to U$. Compatibility of restriction to opens and cohomology shows that both $(Rj_{V, *}B)|_U$ and $(Rj_{U \cap V, *}(B|_{U \cap V}))|_U$ are canonically isomorphic to $Rj_*(B|_{U \cap V})$. Hence the second arrow of the last displayed diagram has a section, and we conclude that the morphism $F|_U \to A$ is an isomorphism. Similarly, the morphism $F|_V \to B$ is an isomorphism. The existence of the morphism $F \to E$ follows from the Mayer-Vietoris sequence for $\mathop{\mathrm{Hom}}\nolimits$, see Lemma 20.31.3. $\square$

Lemma 20.39.2. Let $f : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$ be a morphism of ringed spaces. Let $\mathcal{B}$ be a basis for the topology on $Y$.

1. Assume $K$ is in $D(\mathcal{O}_X)$ such that for $V \in \mathcal{B}$ we have $H^i(f^{-1}(V), K) = 0$ for $i < 0$. Then $Rf_*K$ has vanishing cohomology sheaves in negative degrees, $H^i(f^{-1}(V), K) = 0$ for $i < 0$ for all opens $V \subset Y$, and the rule $V \mapsto H^0(f^{-1}V, K)$ is a sheaf on $Y$.
2. Assume $K, L$ are in $D(\mathcal{O}_X)$ such that for $V \in \mathcal{B}$ we have $\mathop{\mathrm{Ext}}\nolimits^i(K|_{f^{-1}V}, L|_{f^{-1}V}) = 0$ for $i < 0$. Then $\mathop{\mathrm{Ext}}\nolimits^i(K|_{f^{-1}V}, L|_{f^{-1}V}) = 0$ for $i < 0$ for all opens $V \subset Y$ and the rule $V \mapsto \mathop{\mathrm{Hom}}\nolimits(K|_{f^{-1}V}, L|_{f^{-1}V})$ is a sheaf on $Y$.

Proof. Lemma 20.30.6 tells us $H^i(Rf_*K)$ is the sheaf associated to the presheaf $V \mapsto H^i(f^{-1}(V), K) = H^i(V, Rf_*K)$. The assumptions in (1) imply that $Rf_*K$ has vanishing cohomology sheaves in degrees $< 0$. We conclude that for any open $V \subset Y$ the cohomology group $H^i(V, Rf_*K)$ is zero for $i < 0$ and is equal to $H^0(V, H^0(Rf_*K))$ for $i = 0$. This proves (1).

To prove (2) apply (1) to the complex $R\mathop{\mathcal{H}\!\mathit{om}}\nolimits(K, L)$ using Lemma 20.36.1 to do the translation. $\square$

Situation 20.39.3. Let $(X, \mathcal{O}_X)$ be a ringed space. We are given

1. a collection of opens $\mathcal{B}$ of $X$,
2. for $U \in \mathcal{B}$ an object $K_U$ in $D(\mathcal{O}_U)$,
3. for $V \subset U$ with $V, U \in \mathcal{B}$ an isomorphism $\rho^U_V : K_U|_V \to K_V$ in $D(\mathcal{O}_V)$,

such that whenever we have $W \subset V \subset U$ with $U, V, W$ in $\mathcal{B}$, then $\rho^U_W = \rho^V_W \circ \rho ^U_V|_W$.

We won't be able to prove anything about this without making more assumptions. An interesting case is where $\mathcal{B}$ is a basis for the topology on $X$. Another is the case where we have a morphism $f : X \to Y$ of topological spaces and the elements of $\mathcal{B}$ are the inverse images of the elements of a basis for the topology of $Y$.

In Situation 20.39.3 a solution will be a pair $(K, \rho_U)$ where $K$ is an object of $D(\mathcal{O}_X)$ and $\rho_U : K|_U \to K_U$, $U \in \mathcal{B}$ are isomorphisms such that we have $\rho^U_V \circ \rho_U|_V = \rho_V$ for all $V \subset U$, $U, V \in \mathcal{B}$. In certain cases solutions are unique.

Lemma 20.39.4. In Situation 20.39.3 assume

1. $X = \bigcup_{U \in \mathcal{B}} U$ and for $U, V \in \mathcal{B}$ we have $U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
2. for any $U \in \mathcal{B}$ we have $\mathop{\mathrm{Ext}}\nolimits^i(K_U, K_U) = 0$ for $i < 0$.

If a solution $(K, \rho_U)$ exists, then it is unique up to unique isomorphism and moreover $\mathop{\mathrm{Ext}}\nolimits^i(K, K) = 0$ for $i < 0$.

Proof. Let $(K, \rho_U)$ and $(K', \rho'_U)$ be a pair of solutions. Let $f : X \to Y$ be the continuous map constructed in Topology, Lemma 5.5.6. Set $\mathcal{O}_Y = f_*\mathcal{O}_X$. Then $K, K'$ and $\mathcal{B}$ are as in Lemma 20.39.2 part (2). Hence we obtain the vanishing of negative exts for $K$ and we see that the rule $$V \longmapsto \mathop{\mathrm{Hom}}\nolimits(K|_{f^{-1}V}, K'|_{f^{-1}V})$$ is a sheaf on $Y$. As both $(K, \rho_U)$ and $(K', \rho'_U)$ are solutions the maps $$(\rho'_U)^{-1} \circ \rho_U : K|_U \longrightarrow K'|_U$$ over $U = f^{-1}(f(U))$ agree on overlaps. Hence we get a unique global section of the sheaf above which defines the desired isomorphism $K \to K'$ compatible with all structure available. $\square$

Remark 20.39.5. With notation and assumptions as in Lemma 20.39.4. Suppose that $U, V \in \mathcal{B}$. Let $\mathcal{B}'$ be the set of elements of $\mathcal{B}$ contained in $U \cap V$. Then $$(\{K_{U'}\}_{U' \in \mathcal{B}'}, \{\rho_{V'}^{U'}\}_{V' \subset U'\text{ with }U', V' \in \mathcal{B}'})$$ is a system on the ringed space $U \cap V$ satisfying the assumptions of Lemma 20.39.4. Moreover, both $(K_U|_{U \cap V}, \rho^U_{U'})$ and $(K_V|_{U \cap V}, \rho^V_{U'})$ are solutions to this system. By the lemma we find a unique isomorphism $$\rho_{U, V} : K_U|_{U \cap V} \longrightarrow K_V|_{U \cap V}$$ such that for every $U' \subset U \cap V$, $U' \in \mathcal{B}$ the diagram $$\xymatrix{ K_U|_{U'} \ar[rr]_{\rho_{U, V}|_{U'}} \ar[rd]_{\rho^U_{U'}} & & K_V|_{U'} \ar[ld]^{\rho^V_{U'}} \\ & K_{U'} }$$ commutes. Pick a third element $W \in \mathcal{B}$. We obtain isomorphisms $\rho_{U, W} : K_U|_{U \cap W} \to K_W|_{U \cap W}$ and $\rho_{V, W} : K_U|_{V \cap W} \to K_W|_{V \cap W}$ satisfying similar properties to those of $\rho_{U, V}$. Finally, we have $$\rho_{U, W}|_{U \cap V \cap W} = \rho_{V, W}|_{U \cap V \cap W} \circ \rho_{U, V}|_{U \cap V \cap W}$$ This is true by the uniqueness in the lemma because both sides of the equality are the unique isomorphism compatible with the maps $\rho^U_{U''}$ and $\rho^W_{U''}$ for $U'' \subset U \cap V \cap W$, $U'' \in \mathcal{B}$. Some minor details omitted. The collection $(K_U, \rho_{U, V})$ is a descent datum in the derived category for the open covering $\mathcal{U} : X = \bigcup_{U \in \mathcal{B}} U$ of $X$. In this language we are looking for ''effectiveness of the descent datum'' when we look for the existence of a solution.

Lemma 20.39.6. In Situation 20.39.3 assume

1. $X = U_1 \cup \ldots \cup U_n$ with $U_i \in \mathcal{B}$,
2. for $U, V \in \mathcal{B}$ we have $U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
3. for any $U \in \mathcal{B}$ we have $\mathop{\mathrm{Ext}}\nolimits^i(K_U, K_U) = 0$ for $i < 0$.

Then a solution exists and is unique up to unique isomorphism.

Proof. Uniqueness was seen in Lemma 20.39.4. We may prove the lemma by induction on $n$. The case $n = 1$ is immediate.

The case $n = 2$. Consider the isomorphism $\rho_{U_1, U_2} : K_{U_1}|_{U_1 \cap U_2} \to K_{U_2}|_{U_1 \cap U_2}$ constructed in Remark 20.39.5. By Lemma 20.39.1 we obtain an object $K$ in $D(\mathcal{O}_X)$ and isomorphisms $\rho_{U_1} : K|_{U_1} \to K_{U_1}$ and $\rho_{U_2} : K|_{U_2} \to K_{U_2}$ compatible with $\rho_{U_1, U_2}$. Take $U \in \mathcal{B}$. We will construct an isomorphism $\rho_U : K|_U \to K_U$ and we will leave it to the reader to verify that $(K, \rho_U)$ is a solution. Consider the set $\mathcal{B}'$ of elements of $\mathcal{B}$ contained in either $U \cap U_1$ or contained in $U \cap U_2$. Then $(K_U, \rho^U_{U'})$ is a solution for the system $(\{K_{U'}\}_{U' \in \mathcal{B}'}, \{\rho_{V'}^{U'}\}_{V' \subset U'\text{ with }U', V' \in \mathcal{B}'})$ on the ringed space $U$. We claim that $(K|_U, \tau_{U'})$ is another solution where $\tau_{U'}$ for $U' \in \mathcal{B}'$ is chosen as follows: if $U' \subset U_1$ then we take the composition $$K|_{U'} \xrightarrow{\rho_{U_1}|_{U'}} K_{U_1}|_{U'} \xrightarrow{\rho^{U_1}_{U'}} K_{U'}$$ and if $U' \subset U_2$ then we take the composition $$K|_{U'} \xrightarrow{\rho_{U_2}|_{U'}} K_{U_2}|_{U'} \xrightarrow{\rho^{U_2}_{U'}} K_{U'}.$$ To verify this is a solution use the property of the map $\rho_{U_1, U_2}$ described in Remark 20.39.5 and the compatibility of $\rho_{U_1}$ and $\rho_{U_2}$ with $\rho_{U_1, U_2}$. Having said this we apply Lemma 20.39.4 to see that we obtain a unique isomorphism $K|_{U'} \to K_{U'}$ compatible with the maps $\tau_{U'}$ and $\rho^U_{U'}$ for $U' \in \mathcal{B}'$.

The case $n > 2$. Consider the open subspace $X' = U_1 \cup \ldots \cup U_{n - 1}$ and let $\mathcal{B}'$ be the set of elements of $\mathcal{B}$ contained in $X'$. Then we find a system $(\{K_U\}_{U \in \mathcal{B}'}, \{\rho_V^U\}_{U, V \in \mathcal{B}'})$ on the ringed space $X'$ to which we may apply our induction hypothesis. We find a solution $(K_{X'}, \rho^{X'}_U)$. Then we can consider the collection $\mathcal{B}^* = \mathcal{B} \cup \{X'\}$ of opens of $X$ and we see that we obtain a system $(\{K_U\}_{U \in \mathcal{B}^*}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}^*})$. Note that this new system also satisfies condition (3) by Lemma 20.39.4 applied to the solution $K_{X'}$. For this system we have $X = X' \cup U_n$. This reduces us to the case $n = 2$ we worked out above. $\square$

Lemma 20.39.7. Let $X$ be a ringed space. Let $E$ be a well ordered set and let $$X = \bigcup\nolimits_{\alpha \in E} W_\alpha$$ be an open covering with $W_\alpha \subset W_{\alpha + 1}$ and $W_\alpha = \bigcup_{\beta < \alpha} W_\beta$ if $\alpha$ is not a successor. Let $K_\alpha$ be an object of $D(\mathcal{O}_{W_\alpha})$ with $\mathop{\mathrm{Ext}}\nolimits^i(K_\alpha, K_\alpha) = 0$ for $i < 0$. Assume given isomorphisms $\rho_\beta^\alpha : K_\alpha|_{W_\beta} \to K_\beta$ in $D(\mathcal{O}_{W_\beta})$ for all $\beta < \alpha$ with $\rho_\gamma^\alpha = \rho_\gamma^\beta \circ \rho^\alpha_\beta|_{W_\gamma}$ for $\gamma < \beta < \alpha$. Then there exists an object $K$ in $D(\mathcal{O}_X)$ and isomorphisms $K|_{W_\alpha} \to K_\alpha$ for $\alpha \in E$ compatible with the isomorphisms $\rho_\beta^\alpha$.

Proof. In this proof $\alpha, \beta, \gamma, \ldots$ represent elements of $E$. Choose a K-injective complex $I_\alpha^\bullet$ on $W_\alpha$ representing $K_\alpha$. For $\beta < \alpha$ denote $j_{\beta, \alpha} : W_\beta \to W_\alpha$ the inclusion morphism. By transfinite induction, we will construct for all $\beta < \alpha$ a map of complexes $$\tau_{\beta, \alpha} : (j_{\beta, \alpha})_!I_\beta^\bullet \longrightarrow I_\alpha^\bullet$$ representing the adjoint to the inverse of the isomorphism $\rho^\alpha_\beta : K_\alpha|_{W_\beta} \to K_\beta$. Moreover, we will do this in such that for $\gamma < \beta < \alpha$ we have $$\tau_{\gamma, \alpha} = \tau_{\beta, \alpha} \circ (j_{\beta, \alpha})_!\tau_{\gamma, \beta}$$ as maps of complexes. Namely, suppose already given $\tau_{\gamma, \beta}$ composing correctly for all $\gamma < \beta < \alpha$. If $\alpha = \alpha' + 1$ is a successor, then we choose any map of complexes $$(j_{\alpha', \alpha})_!I_{\alpha'}^\bullet \to I_\alpha^\bullet$$ which is adjoint to the inverse of the isomorphism $\rho^\alpha_{\alpha'} : K_\alpha|_{W_{\alpha'}} \to K_{\alpha'}$ (possible because $I_\alpha^\bullet$ is K-injective) and for any $\beta < \alpha'$ we set $$\tau_{\beta, \alpha} = \tau_{\alpha', \alpha} \circ (j_{\alpha', \alpha})_!\tau_{\beta, \alpha'}$$ If $\alpha$ is not a successor, then we can consider the complex on $W_\alpha$ given by $$C^\bullet = \mathop{\mathrm{colim}}\nolimits_{\beta < \alpha} (j_{\beta, \alpha})_!I_\beta^\bullet$$ (termwise colimit) where the transition maps of the sequence are given by the maps $\tau_{\beta', \beta}$ for $\beta' < \beta < \alpha$. We claim that $C^\bullet$ represents $K_\alpha$. Namely, for $\beta < \alpha$ the restriction of the coprojection $(j_{\beta, \alpha})_!I_\beta^\bullet \to C^\bullet$ gives a map $$\sigma_\beta : I_\beta^\bullet \longrightarrow C^\bullet|_{W_\beta}$$ which is a quasi-isomorphism: if $x \in W_\beta$ then looking at stalks we get $$(C^\bullet)_x = \mathop{\mathrm{colim}}\nolimits_{\beta' < \alpha} \left((j_{\beta', \alpha})_!I_{\beta'}^\bullet\right)_x = \mathop{\mathrm{colim}}\nolimits_{\beta \leq \beta' < \alpha} (I_{\beta'}^\bullet)_x \longleftarrow (I_\beta^\bullet)_x$$ which is a quasi-isomorphism. Here we used that taking stalks commutes with colimits, that filtered colimits are exact, and that the maps $(I_\beta^\bullet)_x \to (I_{\beta'}^\bullet)_x$ are quasi-isomorphisms for $\beta \leq \beta' < \alpha$. Hence $(C^\bullet, \sigma_\beta^{-1})$ is a solution to the system $(\{K_\beta\}_{\beta < \alpha}, \{\rho^\beta_{\beta'}\}_{\beta' < \beta < \alpha})$. Since $(K_\alpha, \rho^\alpha_\beta)$ is another solution we obtain a unique isomorphism $\sigma : K_\alpha \to C^\bullet$ in $D(\mathcal{O}_{W_\alpha})$ compatible with all our maps, see Lemma 20.39.6 (this is where we use the vanishing of negative ext groups). Choose a morphism $\tau : C^\bullet \to I_\alpha^\bullet$ of complexes representing $\sigma$. Then we set $$\tau_{\beta, \alpha} = \tau|_{W_\beta} \circ \sigma_\beta$$ to get the desired maps. Finally, we take $K$ to be the object of the derived category represented by the complex $$K^\bullet = \mathop{\mathrm{colim}}\nolimits_{\alpha \in E} (W_\alpha \to X)_!I_\alpha^\bullet$$ where the transition maps are given by our carefully constructed maps $\tau_{\beta, \alpha}$ for $\beta < \alpha$. Arguing exactly as above we see that for all $\alpha$ the restriction of the coprojection determines an isomorphism $$K|_{W_\alpha} \longrightarrow K_\alpha$$ compatible with the given maps $\rho^\alpha_\beta$. $\square$

Using transfinite induction we can prove the result in the general case.

Theorem 20.39.8 (BBD gluing lemma). In Situation 20.39.3 assume

1. $X = \bigcup_{U \in \mathcal{B}} U$,
2. for $U, V \in \mathcal{B}$ we have $U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
3. for any $U \in \mathcal{B}$ we have $\mathop{\mathrm{Ext}}\nolimits^i(K_U, K_U) = 0$ for $i < 0$.

Then there exists an object $K$ of $D(\mathcal{O}_X)$ and isomorphisms $\rho_U : K|_U \to K_U$ in $D(\mathcal{O}_U)$ for $U \in \mathcal{B}$ such that $\rho^U_V \circ \rho_U|_V = \rho_V$ for all $V \subset U$ with $U, V \in \mathcal{B}$. The pair $(K, \rho_U)$ is unique up to unique isomorphism.

Proof. A pair $(K, \rho_U)$ is called a solution in the text above. The uniqueness follows from Lemma 20.39.4. If $X$ has a finite covering by elements of $\mathcal{B}$ (for example if $X$ is quasi-compact), then the theorem is a consequence of Lemma 20.39.6. In the general case we argue in exactly the same manner, using transfinite induction and Lemma 20.39.7.

First we use transfinite induction to choose opens $W_\alpha \subset X$ for any ordinal $\alpha$. Namely, we set $W_0 = \emptyset$. If $\alpha = \beta + 1$ is a sucessor, then either $W_\beta = X$ and we set $W_\alpha = X$ or $W_\beta \not = X$ and we set $W_\alpha = W_\beta \cup U_\alpha$ where $U_\alpha \in \mathcal{B}$ is not contained in $W_\beta$. If $\alpha$ is a limit ordinal we set $W_\alpha = \bigcup_{\beta < \alpha} W_\beta$. Then for large enough $\alpha$ we have $W_\alpha = X$. Observe that for every $\alpha$ the open $W_\alpha$ is a union of elements of $\mathcal{B}$. Hence if $\mathcal{B}_\alpha = \{U \in \mathcal{B}, U \subset W_\alpha\}$, then $$S_\alpha = (\{K_U\}_{U \in \mathcal{B}_\alpha}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}_\alpha})$$ is a system as in Lemma 20.39.4 on the ringed space $W_\alpha$.

We will show by transfinite induction that for every $\alpha$ the system $S_\alpha$ has a solution. This will prove the theorem as this system is the system given in the theorem for large $\alpha$.

The case where $\alpha = \beta + 1$ is a successor ordinal. (This case was already treated in the proof of the lemma above but for clarity we repeat the argument.) Recall that $W_\alpha = W_\beta \cup U_\alpha$ for some $U_\alpha \in \mathcal{B}$ in this case. By induction hypothesis we have a solution $(K_{W_\beta}, \{\rho^{W_\beta}_U\}_{U \in \mathcal{B}_\beta})$ for the system $S_\beta$. Then we can consider the collection $\mathcal{B}_\alpha^* = \mathcal{B}_\alpha \cup \{W_\beta\}$ of opens of $W_\alpha$ and we see that we obtain a system $(\{K_U\}_{U \in \mathcal{B}_\alpha^*}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}_\alpha^*})$. Note that this new system also satisfies condition (3) by Lemma 20.39.4 applied to the solution $K_{W_\beta}$. For this system we have $W_\alpha = W_\beta \cup U_\alpha$. This reduces us to the case handled in Lemma 20.39.6.

The case where $\alpha$ is a limit ordinal. Recall that $W_\alpha = \bigcup_{\beta < \alpha} W_\beta$ in this case. For $\beta < \alpha$ let $(K_{W_\beta}, \{\rho^{W_\beta}_U\}_{U \in \mathcal{B}_\beta})$ be the solution for $S_\beta$. For $\gamma < \beta < \alpha$ the restriction $K_{W_\beta}|_{W_\gamma}$ endowed with the maps $\rho^{W_\beta}_U$, $U \in \mathcal{B}_\gamma$ is a solution for $S_\gamma$. By uniqueness we get unique isomorphisms $\rho_{W_\gamma}^{W_\beta} : K_{W_\beta}|_{W_\gamma} \to K_{W_\gamma}$ compatible with the maps $\rho^{W_\beta}_U$ and $\rho^{W_\gamma}_U$ for $U \in \mathcal{B}_\gamma$. These maps compose in the correct manner, i.e., $\rho_{W_\delta}^{W_\gamma} \circ \rho_{W_\gamma}^{W_\beta}|_{W_\delta} = \rho^{W_\delta}_{W_\beta}$ for $\delta < \gamma < \beta < \alpha$. Thus we may apply Lemma 20.39.7 (note that the vanishing of negative exts is true for $K_{W_\beta}$ by Lemma 20.39.4 applied to the solution $K_{W_\beta}$) to obtain $K_{W_\alpha}$ and isomorphisms $$\rho_{W_\beta}^{W_\alpha} : K_{W_\alpha}|_{W_\beta} \longrightarrow K_{W_\beta}$$ compatible with the maps $\rho_{W_\gamma}^{W_\beta}$ for $\gamma < \beta < \alpha$.

To show that $K_{W_\alpha}$ is a solution we still need to construct the isomorphisms $\rho_U^{W_\alpha} : K_{W_\alpha}|_U \to K_U$ for $U \in \mathcal{B}_\alpha$ satisfying certain compatibilities. We choose $\rho_U^{W_\alpha}$ to be the unique map such that for any $\beta < \alpha$ and any $V \in \mathcal{B}_\beta$ with $V \subset U$ the diagram $$\xymatrix{ K_{W_\alpha}|_V \ar[r]_{\rho_U^{W_\alpha}|_V} \ar[d]_{\rho_{W_\beta}^{W_\alpha}|_V} & K_U|_V \ar[d]^{\rho_U^V} \\ K_{W_\beta} \ar[r]^{\rho_V^{W_\beta}} & K_V }$$ commutes. This makes sense because $$(\{K_V\}_{V \subset U, V \in \mathcal{B}_\beta\text{ for some }\beta < \alpha}, \{\rho_V^{V'}\}_{V \subset V'\text{ with }V, V' \subset U \text{ and }V, V' \in \mathcal{B}_\beta\text{ for some }\beta < \alpha})$$ is a system as in Lemma 20.39.4 on the ringed space $U$ and because $(K_U, \rho^U_V)$ and $(K_{W_\alpha}|_U, \rho_V^{W_\beta}\circ \rho_{W_\beta}^{W_\alpha}|_V)$ are both solutions for this system. This gives existence and uniqueness. We omit the proof that these maps satisfy the desired compatibilities (it is just bookkeeping). $\square$

The code snippet corresponding to this tag is a part of the file cohomology.tex and is located in lines 8359–8891 (see updates for more information).

\section{Glueing complexes}
\label{section-glueing-complexes}

\noindent
We can glue complexes! More precisely, in certain circumstances we can
glue locally given objects of the derived category to a global object.
We first prove some easy cases and then we'll prove the very general
\cite[Theorem 3.2.4]{BBD}
in the setting of topological spaces and open coverings.

\begin{lemma}
\label{lemma-glue}
Let $(X, \mathcal{O}_X)$ be a ringed space. Let $X = U \cup V$ be
the union of two open subspaces of $X$. Suppose given
\begin{enumerate}
\item an object $A$ of $D(\mathcal{O}_U)$,
\item an object $B$ of $D(\mathcal{O}_V)$, and
\item an isomorphism $c : A|_{U \cap V} \to B|_{U \cap V}$.
\end{enumerate}
Then there exists an object $F$ of $D(\mathcal{O}_X)$
and isomorphisms $f : F|_U \to A$, $g : F|_V \to B$ such
that $c = g|_{U \cap V} \circ f^{-1}|_{U \cap V}$.
Moreover, given
\begin{enumerate}
\item an object $E$ of $D(\mathcal{O}_X)$,
\item a morphism $a : A \to E|_U$ of $D(\mathcal{O}_U)$,
\item a morphism $b : B \to E|_V$ of $D(\mathcal{O}_V)$,
\end{enumerate}
such that
$$a|_{U \cap V} = b|_{U \cap V} \circ c.$$
Then there exists a morphism $F \to E$ in $D(\mathcal{O}_X)$
whose restriction to $U$ is $a \circ f$
and whose restriction to $V$ is $b \circ g$.
\end{lemma}

\begin{proof}
Denote $j_U$, $j_V$, $j_{U \cap V}$ the corresponding open immersions.
Choose a distinguished triangle
$$F \to Rj_{U, *}A \oplus Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V}) \to F[1]$$
where the map $Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V})$ is the
obvious one and where
$Rj_{U, *}A \to Rj_{U \cap V, *}(B|_{U \cap V})$
is the composition of
$Rj_{U, *}A \to Rj_{U \cap V, *}(A|_{U \cap V})$
with $Rj_{U \cap V, *}c$. Restricting to $U$ we obtain
$$F|_U \to A \oplus (Rj_{V, *}B)|_U \to (Rj_{U \cap V, *}(B|_{U \cap V}))|_U \to F|_U[1]$$
Denote $j : U \cap V \to U$. Compatibility of restriction to opens and
cohomology shows that both
$(Rj_{V, *}B)|_U$ and $(Rj_{U \cap V, *}(B|_{U \cap V}))|_U$
are canonically isomorphic to $Rj_*(B|_{U \cap V})$.
Hence the second arrow of the last displayed diagram has
a section, and we conclude that the morphism $F|_U \to A$ is
an isomorphism. Similarly, the morphism $F|_V \to B$ is an
isomorphism. The existence of the morphism $F \to E$ follows
from the Mayer-Vietoris sequence for $\Hom$, see
Lemma \ref{lemma-mayer-vietoris-hom}.
\end{proof}

\begin{lemma}
\label{lemma-vanishing-and-glueing}
Let $f : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$ be a morphism
of ringed spaces. Let $\mathcal{B}$ be a basis for the topology on $Y$.
\begin{enumerate}
\item Assume $K$ is in $D(\mathcal{O}_X)$ such that
for $V \in \mathcal{B}$ we have $H^i(f^{-1}(V), K) = 0$ for $i < 0$.
Then $Rf_*K$ has vanishing cohomology sheaves in negative degrees,
$H^i(f^{-1}(V), K) = 0$ for $i < 0$ for all opens $V \subset Y$, and
the rule $V \mapsto H^0(f^{-1}V, K)$ is a sheaf on $Y$.
\item Assume $K, L$ are in $D(\mathcal{O}_X)$ such that
for $V \in \mathcal{B}$ we have
$\Ext^i(K|_{f^{-1}V}, L|_{f^{-1}V}) = 0$ for $i < 0$.
Then $\Ext^i(K|_{f^{-1}V}, L|_{f^{-1}V}) = 0$ for $i < 0$
for all opens $V \subset Y$ and
the rule $V \mapsto \Hom(K|_{f^{-1}V}, L|_{f^{-1}V})$ is a sheaf on $Y$.
\end{enumerate}
\end{lemma}

\begin{proof}
Lemma \ref{lemma-unbounded-describe-higher-direct-images} tells us
$H^i(Rf_*K)$ is the sheaf associated to the presheaf
$V \mapsto H^i(f^{-1}(V), K) = H^i(V, Rf_*K)$.
The assumptions in (1) imply that $Rf_*K$ has vanishing cohomology
sheaves in degrees $< 0$. We conclude that for any open $V \subset Y$
the cohomology group $H^i(V, Rf_*K)$ is zero for $i < 0$ and is equal to
$H^0(V, H^0(Rf_*K))$ for $i = 0$. This proves (1).

\medskip\noindent
To prove (2) apply (1) to the complex $R\SheafHom(K, L)$ using
Lemma \ref{lemma-section-RHom-over-U} to do the translation.
\end{proof}

\begin{situation}
\label{situation-locally-given}
Let $(X, \mathcal{O}_X)$ be a ringed space. We are given
\begin{enumerate}
\item a collection of opens $\mathcal{B}$ of $X$,
\item for $U \in \mathcal{B}$ an object $K_U$ in $D(\mathcal{O}_U)$,
\item for $V \subset U$ with $V, U \in \mathcal{B}$ an isomorphism
$\rho^U_V : K_U|_V \to K_V$ in $D(\mathcal{O}_V)$,
\end{enumerate}
such that whenever we have $W \subset V \subset U$ with $U, V, W$ in
$\mathcal{B}$, then $\rho^U_W = \rho^V_W \circ \rho ^U_V|_W$.
\end{situation}

\noindent
assumptions. An interesting case is where $\mathcal{B}$ is a basis
for the topology on $X$. Another is the case where we have a morphism
$f : X \to Y$ of topological spaces and the elements of $\mathcal{B}$
are the inverse images of the elements of a basis for the topology of $Y$.

\medskip\noindent
In Situation \ref{situation-locally-given} a {\it solution}
will be a pair $(K, \rho_U)$ where $K$ is an object of $D(\mathcal{O}_X)$
and $\rho_U : K|_U \to K_U$, $U \in \mathcal{B}$
are isomorphisms such that
we have $\rho^U_V \circ \rho_U|_V = \rho_V$ for all $V \subset U$,
$U, V \in \mathcal{B}$. In certain cases solutions are unique.

\begin{lemma}
\label{lemma-uniqueness}
In Situation \ref{situation-locally-given} assume
\begin{enumerate}
\item $X = \bigcup_{U \in \mathcal{B}} U$ and
for $U, V \in \mathcal{B}$ we have
$U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
\item for any $U \in \mathcal{B}$ we have $\Ext^i(K_U, K_U) = 0$
for $i < 0$.
\end{enumerate}
If a solution $(K, \rho_U)$ exists, then it is unique up to unique isomorphism
and moreover $\Ext^i(K, K) = 0$ for $i < 0$.
\end{lemma}

\begin{proof}
Let $(K, \rho_U)$ and $(K', \rho'_U)$ be a pair of solutions.
Let $f : X \to Y$ be the continuous map constructed
in Topology, Lemma \ref{topology-lemma-create-map-from-subcollection}.
Set $\mathcal{O}_Y = f_*\mathcal{O}_X$.
Then $K, K'$ and $\mathcal{B}$ are as in
Lemma \ref{lemma-vanishing-and-glueing} part (2).
Hence we obtain the vanishing of negative exts for $K$ and we see that
the rule
$$V \longmapsto \Hom(K|_{f^{-1}V}, K'|_{f^{-1}V})$$
is a sheaf on $Y$. As both $(K, \rho_U)$ and $(K', \rho'_U)$ are solutions
the maps
$$(\rho'_U)^{-1} \circ \rho_U : K|_U \longrightarrow K'|_U$$
over $U = f^{-1}(f(U))$ agree on overlaps. Hence we get a unique global
section of the sheaf above which defines the desired isomorphism
$K \to K'$ compatible with all structure available.
\end{proof}

\begin{remark}
\label{remark-uniqueness}
With notation and assumptions as in Lemma \ref{lemma-uniqueness}.
Suppose that $U, V \in \mathcal{B}$. Let $\mathcal{B}'$ be the set of
elements of $\mathcal{B}$ contained in $U \cap V$. Then
$$(\{K_{U'}\}_{U' \in \mathcal{B}'}, \{\rho_{V'}^{U'}\}_{V' \subset U'\text{ with }U', V' \in \mathcal{B}'})$$
is a system on the ringed space $U \cap V$
satisfying the assumptions of Lemma \ref{lemma-uniqueness}.
Moreover, both $(K_U|_{U \cap V}, \rho^U_{U'})$ and
$(K_V|_{U \cap V}, \rho^V_{U'})$ are solutions to this system.
By the lemma we find a unique isomorphism
$$\rho_{U, V} : K_U|_{U \cap V} \longrightarrow K_V|_{U \cap V}$$
such that for every $U' \subset U \cap V$, $U' \in \mathcal{B}$ the
diagram
$$\xymatrix{ K_U|_{U'} \ar[rr]_{\rho_{U, V}|_{U'}} \ar[rd]_{\rho^U_{U'}} & & K_V|_{U'} \ar[ld]^{\rho^V_{U'}} \\ & K_{U'} }$$
commutes. Pick a third element $W \in \mathcal{B}$. We obtain isomorphisms
$\rho_{U, W} : K_U|_{U \cap W} \to K_W|_{U \cap W}$ and
$\rho_{V, W} : K_U|_{V \cap W} \to K_W|_{V \cap W}$ satisfying
similar properties to those of $\rho_{U, V}$. Finally,
we have
$$\rho_{U, W}|_{U \cap V \cap W} = \rho_{V, W}|_{U \cap V \cap W} \circ \rho_{U, V}|_{U \cap V \cap W}$$
This is true by the uniqueness in the lemma
because both sides of the equality are the unique isomorphism
compatible with the maps $\rho^U_{U''}$ and $\rho^W_{U''}$
for $U'' \subset U \cap V \cap W$, $U'' \in \mathcal{B}$.
Some minor details omitted.
The collection $(K_U, \rho_{U, V})$ is a descent datum
in the derived category for the open covering
$\mathcal{U} : X = \bigcup_{U \in \mathcal{B}} U$ of $X$.
In this language we are looking for effectiveness of the descent datum''
when we look for the existence of a solution.
\end{remark}

\begin{lemma}
\label{lemma-solution-in-finite-case}
In Situation \ref{situation-locally-given} assume
\begin{enumerate}
\item $X = U_1 \cup \ldots \cup U_n$ with $U_i \in \mathcal{B}$,
\item for $U, V \in \mathcal{B}$ we have
$U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
\item for any $U \in \mathcal{B}$ we have $\Ext^i(K_U, K_U) = 0$
for $i < 0$.
\end{enumerate}
Then a solution exists and is unique up to unique isomorphism.
\end{lemma}

\begin{proof}
Uniqueness was seen in Lemma \ref{lemma-uniqueness}. We may prove the lemma
by induction on $n$. The case $n = 1$ is immediate.

\medskip\noindent
The case $n = 2$.
Consider the isomorphism
$\rho_{U_1, U_2} : K_{U_1}|_{U_1 \cap U_2} \to K_{U_2}|_{U_1 \cap U_2}$
constructed in Remark \ref{remark-uniqueness}.
By Lemma \ref{lemma-glue} we obtain an object $K$ in $D(\mathcal{O}_X)$
and isomorphisms $\rho_{U_1} : K|_{U_1} \to K_{U_1}$ and
$\rho_{U_2} : K|_{U_2} \to K_{U_2}$ compatible with $\rho_{U_1, U_2}$.
Take $U \in \mathcal{B}$. We will construct an isomorphism
$\rho_U : K|_U \to K_U$ and we will leave it to the reader to verify
that $(K, \rho_U)$ is a solution. Consider the set $\mathcal{B}'$
of elements of $\mathcal{B}$ contained in either $U \cap U_1$ or contained in
$U \cap U_2$. Then $(K_U, \rho^U_{U'})$ is a solution for the system
$(\{K_{U'}\}_{U' \in \mathcal{B}'}, \{\rho_{V'}^{U'}\}_{V' \subset U'\text{ with }U', V' \in \mathcal{B}'})$
on the ringed space $U$.
We claim that $(K|_U, \tau_{U'})$ is another solution where
$\tau_{U'}$ for $U' \in \mathcal{B}'$ is chosen as follows:
if $U' \subset U_1$ then we take the composition
$$K|_{U'} \xrightarrow{\rho_{U_1}|_{U'}} K_{U_1}|_{U'} \xrightarrow{\rho^{U_1}_{U'}} K_{U'}$$
and if $U' \subset U_2$ then we take the composition
$$K|_{U'} \xrightarrow{\rho_{U_2}|_{U'}} K_{U_2}|_{U'} \xrightarrow{\rho^{U_2}_{U'}} K_{U'}.$$
To verify this is a solution use the property of the map $\rho_{U_1, U_2}$
described in Remark \ref{remark-uniqueness} and the compatibility of
$\rho_{U_1}$ and $\rho_{U_2}$ with $\rho_{U_1, U_2}$. Having said this
we apply Lemma \ref{lemma-uniqueness} to see that we obtain a unique
isomorphism $K|_{U'} \to K_{U'}$ compatible with the maps $\tau_{U'}$ and
$\rho^U_{U'}$ for $U' \in \mathcal{B}'$.

\medskip\noindent
The case $n > 2$. Consider the open subspace
$X' = U_1 \cup \ldots \cup U_{n - 1}$ and let $\mathcal{B}'$ be the set of
elements of $\mathcal{B}$ contained in $X'$. Then we find a system
$(\{K_U\}_{U \in \mathcal{B}'}, \{\rho_V^U\}_{U, V \in \mathcal{B}'})$
on the ringed space $X'$ to which we may apply our induction hypothesis.
We find a solution $(K_{X'}, \rho^{X'}_U)$.
Then we can consider the collection
$\mathcal{B}^* = \mathcal{B} \cup \{X'\}$ of opens of $X$ and we see that
we obtain a system
$(\{K_U\}_{U \in \mathcal{B}^*}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}^*})$.
Note that this new system also satisfies condition (3)
by Lemma \ref{lemma-uniqueness} applied to the solution $K_{X'}$.
For this system we have $X = X' \cup U_n$.
This reduces us to the case $n = 2$ we worked out above.
\end{proof}

\begin{lemma}
\label{lemma-glueing-increasing-union}
Let $X$ be a ringed space. Let $E$ be a well ordered set and let
$$X = \bigcup\nolimits_{\alpha \in E} W_\alpha$$
be an open covering with $W_\alpha \subset W_{\alpha + 1}$
and $W_\alpha = \bigcup_{\beta < \alpha} W_\beta$ if $\alpha$ is not
a successor. Let $K_\alpha$ be an object of $D(\mathcal{O}_{W_\alpha})$
with $\Ext^i(K_\alpha, K_\alpha) = 0$ for $i < 0$.
Assume given isomorphisms
$\rho_\beta^\alpha : K_\alpha|_{W_\beta} \to K_\beta$ in
$D(\mathcal{O}_{W_\beta})$ for all $\beta < \alpha$ with
$\rho_\gamma^\alpha = \rho_\gamma^\beta \circ \rho^\alpha_\beta|_{W_\gamma}$
for $\gamma < \beta < \alpha$.
Then there exists an object
$K$ in $D(\mathcal{O}_X)$ and isomorphisms
$K|_{W_\alpha} \to K_\alpha$ for $\alpha \in E$
compatible with the isomorphisms $\rho_\beta^\alpha$.
\end{lemma}

\begin{proof}
In this proof $\alpha, \beta, \gamma, \ldots$ represent elements of $E$.
Choose a K-injective complex
$I_\alpha^\bullet$ on $W_\alpha$ representing $K_\alpha$.
For $\beta < \alpha$ denote $j_{\beta, \alpha} : W_\beta \to W_\alpha$
the inclusion morphism. By transfinite induction, we will construct for all
$\beta < \alpha$ a map of complexes
$$\tau_{\beta, \alpha} : (j_{\beta, \alpha})_!I_\beta^\bullet \longrightarrow I_\alpha^\bullet$$
representing the adjoint to the inverse of the isomorphism
$\rho^\alpha_\beta : K_\alpha|_{W_\beta} \to K_\beta$.
Moreover, we will do this in such that for
$\gamma < \beta < \alpha$ we have
$$\tau_{\gamma, \alpha} = \tau_{\beta, \alpha} \circ (j_{\beta, \alpha})_!\tau_{\gamma, \beta}$$
as maps of complexes. Namely, suppose already given $\tau_{\gamma, \beta}$
composing correctly for all $\gamma < \beta < \alpha$.
If $\alpha = \alpha' + 1$ is a successor, then we choose any map of complexes
$$(j_{\alpha', \alpha})_!I_{\alpha'}^\bullet \to I_\alpha^\bullet$$
which is adjoint to the inverse of the isomorphism
$\rho^\alpha_{\alpha'} : K_\alpha|_{W_{\alpha'}} \to K_{\alpha'}$
(possible because $I_\alpha^\bullet$ is K-injective)
and for any $\beta < \alpha'$ we set
$$\tau_{\beta, \alpha} = \tau_{\alpha', \alpha} \circ (j_{\alpha', \alpha})_!\tau_{\beta, \alpha'}$$
If $\alpha$ is not a successor, then
we can consider the complex on $W_\alpha$ given by
$$C^\bullet = \colim_{\beta < \alpha} (j_{\beta, \alpha})_!I_\beta^\bullet$$
(termwise colimit) where the transition maps of the sequence
are given by the maps $\tau_{\beta', \beta}$ for
$\beta' < \beta < \alpha$. We claim that $C^\bullet$
represents $K_\alpha$. Namely, for $\beta < \alpha$ the restriction
of the coprojection $(j_{\beta, \alpha})_!I_\beta^\bullet \to C^\bullet$
gives a map
$$\sigma_\beta : I_\beta^\bullet \longrightarrow C^\bullet|_{W_\beta}$$
which is a quasi-isomorphism: if $x \in W_\beta$ then looking
at stalks we get
$$(C^\bullet)_x = \colim_{\beta' < \alpha} \left((j_{\beta', \alpha})_!I_{\beta'}^\bullet\right)_x = \colim_{\beta \leq \beta' < \alpha} (I_{\beta'}^\bullet)_x \longleftarrow (I_\beta^\bullet)_x$$
which is a quasi-isomorphism. Here we used that taking stalks
commutes with colimits, that filtered colimits are exact, and
that the maps $(I_\beta^\bullet)_x \to (I_{\beta'}^\bullet)_x$
are quasi-isomorphisms for $\beta \leq \beta' < \alpha$.
Hence $(C^\bullet, \sigma_\beta^{-1})$ is a solution to the
system $(\{K_\beta\}_{\beta < \alpha}, \{\rho^\beta_{\beta'}\}_{\beta' < \beta < \alpha})$.
Since $(K_\alpha, \rho^\alpha_\beta)$ is another solution
we obtain a unique isomorphism $\sigma : K_\alpha \to C^\bullet$
in $D(\mathcal{O}_{W_\alpha})$ compatible with all our maps, see
Lemma \ref{lemma-solution-in-finite-case}
(this is where we use the vanishing of negative ext groups).
Choose a morphism $\tau : C^\bullet \to I_\alpha^\bullet$
of complexes representing $\sigma$. Then we set
$$\tau_{\beta, \alpha} = \tau|_{W_\beta} \circ \sigma_\beta$$
to get the desired maps. Finally, we take $K$ to be the object of the derived
category represented by the complex
$$K^\bullet = \colim_{\alpha \in E} (W_\alpha \to X)_!I_\alpha^\bullet$$
where the transition maps are given by our carefully constructed
maps $\tau_{\beta, \alpha}$ for $\beta < \alpha$.
Arguing exactly as above we see that for all $\alpha$
the restriction of the coprojection determines an isomorphism
$$K|_{W_\alpha} \longrightarrow K_\alpha$$
compatible with the given maps $\rho^\alpha_\beta$.
\end{proof}

\noindent
Using transfinite induction we can prove the result in the general case.

\begin{theorem}[BBD gluing lemma]
\label{theorem-glueing-bbd-general}
\begin{reference}
Special case of \cite[Theorem 3.2.4]{BBD}
without boundedness assumption.
\end{reference}
In Situation \ref{situation-locally-given} assume
\begin{enumerate}
\item $X = \bigcup_{U \in \mathcal{B}} U$,
\item for $U, V \in \mathcal{B}$ we have
$U \cap V = \bigcup_{W \in \mathcal{B}, W \subset U \cap V} W$,
\item for any $U \in \mathcal{B}$ we have $\Ext^i(K_U, K_U) = 0$
for $i < 0$.
\end{enumerate}
Then there exists an object $K$ of $D(\mathcal{O}_X)$
and isomorphisms $\rho_U : K|_U \to K_U$ in $D(\mathcal{O}_U)$ for
$U \in \mathcal{B}$ such that $\rho^U_V \circ \rho_U|_V = \rho_V$
for all $V \subset U$ with $U, V \in \mathcal{B}$.
The pair $(K, \rho_U)$ is unique up to unique isomorphism.
\end{theorem}

\begin{proof}
A pair $(K, \rho_U)$ is called a solution in the text above.
The uniqueness follows from Lemma \ref{lemma-uniqueness}.
If $X$ has a finite covering by elements of $\mathcal{B}$
(for example if $X$ is quasi-compact), then the theorem
is a consequence of Lemma \ref{lemma-solution-in-finite-case}.
In the general case we argue in exactly the same manner,
using transfinite induction and
Lemma \ref{lemma-glueing-increasing-union}.

\medskip\noindent
First we use transfinite induction to choose opens $W_\alpha \subset X$
for any ordinal $\alpha$. Namely, we set $W_0 = \emptyset$.
If $\alpha = \beta + 1$ is a sucessor, then either $W_\beta = X$
and we set $W_\alpha = X$ or $W_\beta \not = X$ and we set
$W_\alpha = W_\beta \cup U_\alpha$ where
$U_\alpha \in \mathcal{B}$ is not contained in $W_\beta$.
If $\alpha$ is a limit ordinal we set
$W_\alpha = \bigcup_{\beta < \alpha} W_\beta$.
Then for large enough $\alpha$ we have $W_\alpha = X$.
Observe that for every $\alpha$ the open $W_\alpha$ is
a union of elements of $\mathcal{B}$. Hence if
$\mathcal{B}_\alpha = \{U \in \mathcal{B}, U \subset W_\alpha\}$, then
$$S_\alpha = (\{K_U\}_{U \in \mathcal{B}_\alpha}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}_\alpha})$$
is a system as in Lemma \ref{lemma-uniqueness} on the ringed space $W_\alpha$.

\medskip\noindent
We will show by transfinite induction that for every $\alpha$
the system $S_\alpha$ has a solution. This will prove the theorem
as this system is the system given in the theorem for large $\alpha$.

\medskip\noindent
The case where $\alpha = \beta + 1$ is a successor ordinal.
(This case was already treated in the proof of the lemma above
but for clarity we repeat the argument.)
Recall that $W_\alpha = W_\beta \cup U_\alpha$ for some
$U_\alpha \in \mathcal{B}$ in this case.
By induction hypothesis we have a solution
$(K_{W_\beta}, \{\rho^{W_\beta}_U\}_{U \in \mathcal{B}_\beta})$
for the system $S_\beta$.
Then we can consider the collection
$\mathcal{B}_\alpha^* = \mathcal{B}_\alpha \cup \{W_\beta\}$
of opens of $W_\alpha$ and we see that we obtain a system
$(\{K_U\}_{U \in \mathcal{B}_\alpha^*}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}_\alpha^*})$.
Note that this new system also satisfies condition (3)
by Lemma \ref{lemma-uniqueness} applied to the solution $K_{W_\beta}$.
For this system we have $W_\alpha = W_\beta \cup U_\alpha$.
This reduces us to the case handled in
Lemma \ref{lemma-solution-in-finite-case}.

\medskip\noindent
The case where $\alpha$ is a limit ordinal. Recall that
$W_\alpha = \bigcup_{\beta < \alpha} W_\beta$ in this case.
For $\beta < \alpha$ let
$(K_{W_\beta}, \{\rho^{W_\beta}_U\}_{U \in \mathcal{B}_\beta})$
be the solution for $S_\beta$.
For $\gamma < \beta < \alpha$ the restriction
$K_{W_\beta}|_{W_\gamma}$ endowed with the maps
$\rho^{W_\beta}_U$, $U \in \mathcal{B}_\gamma$
is a solution for $S_\gamma$. By uniqueness we get unique isomorphisms
$\rho_{W_\gamma}^{W_\beta} : K_{W_\beta}|_{W_\gamma} \to K_{W_\gamma}$
compatible with the maps $\rho^{W_\beta}_U$ and $\rho^{W_\gamma}_U$
for $U \in \mathcal{B}_\gamma$. These maps compose in the correct manner,
i.e., $\rho_{W_\delta}^{W_\gamma} \circ \rho_{W_\gamma}^{W_\beta}|_{W_\delta} = \rho^{W_\delta}_{W_\beta}$ for $\delta < \gamma < \beta < \alpha$.
Thus we may apply Lemma \ref{lemma-glueing-increasing-union}
(note that the vanishing of negative exts is true for
$K_{W_\beta}$ by Lemma \ref{lemma-uniqueness} applied
to the solution $K_{W_\beta}$)
to obtain $K_{W_\alpha}$ and isomorphisms
$$\rho_{W_\beta}^{W_\alpha} : K_{W_\alpha}|_{W_\beta} \longrightarrow K_{W_\beta}$$
compatible with the maps $\rho_{W_\gamma}^{W_\beta}$ for
$\gamma < \beta < \alpha$.

\medskip\noindent
To show that $K_{W_\alpha}$ is a solution we still need to construct the
isomorphisms $\rho_U^{W_\alpha} : K_{W_\alpha}|_U \to K_U$ for
$U \in \mathcal{B}_\alpha$ satisfying certain compatibilities.
We choose $\rho_U^{W_\alpha}$ to be the unique map such that
for any $\beta < \alpha$ and any $V \in \mathcal{B}_\beta$
with $V \subset U$ the diagram
$$\xymatrix{ K_{W_\alpha}|_V \ar[r]_{\rho_U^{W_\alpha}|_V} \ar[d]_{\rho_{W_\beta}^{W_\alpha}|_V} & K_U|_V \ar[d]^{\rho_U^V} \\ K_{W_\beta} \ar[r]^{\rho_V^{W_\beta}} & K_V }$$
commutes. This makes sense because
$$(\{K_V\}_{V \subset U, V \in \mathcal{B}_\beta\text{ for some }\beta < \alpha}, \{\rho_V^{V'}\}_{V \subset V'\text{ with }V, V' \subset U \text{ and }V, V' \in \mathcal{B}_\beta\text{ for some }\beta < \alpha})$$
is a system as in Lemma \ref{lemma-uniqueness} on the ringed space $U$
and because $(K_U, \rho^U_V)$ and
$(K_{W_\alpha}|_U, \rho_V^{W_\beta}\circ \rho_{W_\beta}^{W_\alpha}|_V)$
are both solutions for this system. This gives existence and uniqueness.
We omit the proof that these
maps satisfy the desired compatibilities (it is just bookkeeping).
\end{proof}

Comment #2796 by Tanya Kaushal Srivastava on September 4, 2017 a 1:25 pm UTC

Minor typo: In the second last paragraph of the proof of BBD gluing lemma, I guess we would like the diagram to commute. (Word "commute" is missing).

Comment #2899 by Johan (site) on October 7, 2017 a 3:23 pm UTC

THanks, fixed here.

## Add a comment on tag 0D65

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 lower-right corner).