**Proof.**
Recall that a local complete intersection morphism is perfect, see More on Morphisms, Lemma 37.62.4. By Lemma 48.17.9 it suffices to show that $f^!\mathcal{O}_ Y$ is an invertible object in $D(\mathcal{O}_ X)$. This question is local on $X$ and $Y$. Hence we may assume that $X \to Y$ factors as $X \to \mathbf{A}^ n_ Y \to Y$ where the first arrow is a Koszul regular immersion. See More on Morphisms, Section 37.62. The result holds for $\mathbf{A}^ n_ Y \to Y$ by Lemma 48.17.3. Thus it suffices to prove the lemma when $f$ is a Koszul regular immersion. Working locally once again we reduce to the case $X = \mathop{\mathrm{Spec}}(A)$ and $Y = \mathop{\mathrm{Spec}}(B)$, where $A = B/(f_1, \ldots , f_ r)$ for some regular sequence $f_1, \ldots , f_ r \in B$ (use that for Noetherian local rings the notion of Koszul regular and regular are the same, see More on Algebra, Lemma 15.30.7). Thus $X \to Y$ is a composition

\[ X = X_ r \to X_{r - 1} \to \ldots \to X_1 \to X_0 = Y \]

where each arrow is the inclusion of an effective Cartier divisor. In this way we reduce to the case of an inclusion of an effective Cartier divisor $i : D \to X$. In this case $i^!\mathcal{O}_ X = \mathcal{N}[1]$ by Lemma 48.14.1 and the proof is complete.
$\square$

## Comments (0)