Lemma 36.13.5. Let $X$ be an affine scheme. Let $U \subset X$ be a quasi-compact open. For every perfect object $E$ of $D(\mathcal{O}_ U)$ there exists an integer $r$ and a finite locally free sheaf $\mathcal{F}$ on $U$ such that $\mathcal{F}[-r] \oplus E$ is the restriction of a perfect object of $D(\mathcal{O}_ X)$.

Proof. Say $X = \mathop{\mathrm{Spec}}(A)$. Recall that a perfect complex is pseudo-coherent, see Cohomology, Lemma 20.47.5. By Lemma 36.13.3 we can find a bounded above complex $\mathcal{F}^\bullet$ of finite free $A$-modules such that $E$ is isomorphic to $\mathcal{F}^\bullet |_ U$ in $D(\mathcal{O}_ U)$. By Cohomology, Lemma 20.47.5 and since $U$ is quasi-compact, we see that $E$ has finite tor dimension, say $E$ has tor amplitude in $[a, b]$. Pick $r < a$ and set

$\mathcal{F} = \mathop{\mathrm{Ker}}(\mathcal{F}^{r} \to \mathcal{F}^{r + 1}) = \mathop{\mathrm{Im}}(\mathcal{F}^{r - 1} \to \mathcal{F}^ r).$

Since $E$ has tor amplitude in $[a, b]$ we see that $\mathcal{F}|_ U$ is flat (Cohomology, Lemma 20.46.2). Hence $\mathcal{F}|_ U$ is flat and of finite presentation, thus finite locally free (Properties, Lemma 28.20.2). It follows that

$(\mathcal{F} \to \mathcal{F}^ r \to \mathcal{F}^{r + 1} \to \ldots )|_ U$

is a strictly perfect complex on $U$ representing $E$. We obtain a distinguished triangle

$\mathcal{F}|_ U[- r - 1] \to E \to (\mathcal{F}^ r \to \mathcal{F}^{r + 1} \to \ldots )|_ U \to \mathcal{F}|_ U[- r]$

Note that $(\mathcal{F}^ r \to \mathcal{F}^{r + 1} \to \ldots )$ is a perfect complex on $X$. To finish the proof it suffices to pick $r$ such that the map $\mathcal{F}|_ U[- r - 1] \to E$ is zero in $D(\mathcal{O}_ U)$, see Derived Categories, Lemma 13.4.11. By Lemma 36.13.4 this holds if $r \ll 0$. $\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).