Lemma 20.34.5. Let $(X, \mathcal{O}_ X)$ be a ringed space. Let $i : Z \to X$ be the inclusion of a closed subset. Let $U = X \setminus Z$. There is a distinguished triangle

$R\Gamma _ Z(X, K) \to R\Gamma (X, K) \to R\Gamma (U, K) \to R\Gamma _ Z(X, K)[1]$

in $D(\mathcal{O}_ X(X))$ functorial for $K$ in $D(\mathcal{O}_ X)$.

Proof. Choose a K-injective complex $\mathcal{I}^\bullet$ all of whose terms are injective $\mathcal{O}_ X$-modules representing $K$. See Section 20.28. Recall that $\mathcal{I}^\bullet |_ U$ is a K-injective complex of $\mathcal{O}_ U$-modules, see Lemma 20.32.1. Hence each of the derived functors in the distinguished triangle is gotten by applying the underlying functor to $\mathcal{I}^\bullet$. Hence we find that it suffices to prove that for an injective $\mathcal{O}_ X$-module $\mathcal{I}$ we have a short exact sequence

$0 \to \Gamma _ Z(X, \mathcal{I}) \to \Gamma (X, \mathcal{I}) \to \Gamma (U, \mathcal{I}) \to 0$

This follows from Lemma 20.8.1 and the definitions. $\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).