Remark 20.28.3. The construction of unbounded derived functor $Lf^*$ and $Rf_*$ allows one to construct the base change map in full generality. Namely, suppose that

$\xymatrix{ X' \ar[r]_{g'} \ar[d]_{f'} & X \ar[d]^ f \\ S' \ar[r]^ g & S }$

is a commutative diagram of ringed spaces. Let $K$ be an object of $D(\mathcal{O}_ X)$. Then there exists a canonical base change map

$Lg^*Rf_*K \longrightarrow R(f')_*L(g')^*K$

in $D(\mathcal{O}_{S'})$. Namely, this map is adjoint to a map $L(f')^*Lg^*Rf_*K \to L(g')^*K$ Since $L(f')^*Lg^* = L(g')^*Lf^*$ we see this is the same as a map $L(g')^*Lf^*Rf_*K \to L(g')^*K$ which we can take to be $L(g')^*$ of the adjunction map $Lf^*Rf_*K \to K$.

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).