Lemma 47.24.9. Let $R$ be a Noetherian ring and let $f \in R$. If $\varphi$ denotes the map $R \to R_ f$, then $\varphi ^!$ is isomorphic to $- \otimes _ R^\mathbf {L} R_ f$. More generally, if $\varphi : R \to R'$ is a map such that $\mathop{\mathrm{Spec}}(R') \to \mathop{\mathrm{Spec}}(R)$ is an open immersion, then $\varphi ^!$ is isomorphic to $- \otimes _ R^\mathbf {L} R'$.

Proof. Choose the presentation $R \to R[x] \to R[x]/(fx - 1) = R_ f$ and observe that $fx - 1$ is a nonzerodivisor in $R[x]$. Thus we can apply using Lemma 47.13.10 to compute the functor $\varphi ^!$. Details omitted; note that the shift in the definition of $\varphi ^!$ and in the lemma add up to zero.

In the general case note that $R' \otimes _ R R' = R'$. Hence the result follows from the base change results above. Either Lemma 47.24.4 or Lemma 47.24.5 will do. $\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).