**Proof.**
Part (2) follows from (1) as $\mathop{\mathrm{Ext}}\nolimits ^ n_{D(\mathcal{O}_ X)}(K, L) = \mathop{\mathrm{Hom}}\nolimits _{D(\mathcal{O}_ X)}(K, L[n])$. We prove (1). Since $K$ is perfect we have

\[ \mathop{\mathrm{Hom}}\nolimits _{D(\mathcal{O}_ X)}(K, L) = H^0(X, K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L) \]

where $K^\vee $ is the “dual” perfect complex to $K$, see Cohomology, Lemma 20.50.5. Note that $K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L$ is in $D_\mathit{QCoh}(X)$ by Lemmas 36.3.9 and 36.10.1 (to see that a perfect complex has quasi-coherent cohomology sheaves). Say $K^\vee $ has tor amplitude in $[a, b]$. Then the spectral sequence

\[ E_1^{p, q} = H^ p(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} H^ q(L)) \Rightarrow H^{p + q}(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L) \]

shows that $H^ j(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L)$ is zero if $H^ q(L) = 0$ for $q \in [j - b, j - a]$. Let $N$ be the integer $d$ of Cohomology of Schemes, Lemma 30.4.4. Then $H^0(X, K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L)$ vanishes if the cohomology sheaves

\[ H^{-N}(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L), \ H^{-N + 1}(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L), \ \ldots , \ H^0(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L) \]

are zero. Namely, by the lemma cited and Lemma 36.3.4, we have

\[ H^0(X, K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L) = H^0(X, \tau _{\geq -N}(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L)) \]

and by the vanishing of cohomology sheaves, this is equal to $H^0(X, \tau _{\geq 1}(K^\vee \otimes _{\mathcal{O}_ X}^\mathbf {L} L))$ which is zero by Derived Categories, Lemma 13.16.1. It follows that $\mathop{\mathrm{Hom}}\nolimits _{D(\mathcal{O}_ X)}(K, L)$ is zero if $H^ i(L) = 0$ for $i \in [-b - N, -a]$.
$\square$

## Comments (2)

Comment #8598 by Sasha on

Comment #9166 by Stacks project on