hcju/stacksqa huggingface dataset:
Let $F'$ be the Fourier-Mukai functor which is a sibling of $F$ as in Lemma \ref{lemma-fully-faithful}. By Proposition \ref{proposition-siblings-isomorphic} we have $F \cong F'$ provided we can show that $\textit{Coh}(\mathcal{O}_X)$ has enough negative objects. However, if $X = \Spec(k)$ for example, then this isn't true. Thus we first decompose $X = \coprod X_i$ into its connected (and irreducible) components and we argue that it suffices to prove the result for each of the (fully faithful) composition functors $$ F_i : D_{perf}(\mathcal{O}_{X_i}) \to D_{perf}(\mathcal{O}_X) \to D_{perf}(\mathcal{O}_Y) $$ Details omitted. Thus we may assume $X$ is irreducible. \medskip\noindent The case $\dim(X) = 0$. Here $X$ is the spectrum of a finite (separable) extension $k'/k$ and hence $D_{perf}(\mathcal{O}_X)$ is equivalent to the category of graded $k'$-vector spaces such that $\mathcal{O}_X$ corresponds to the trivial $1$-dimensional vector space in degree $0$. It is straightforward to see that any two siblings $F, F' : D_{perf}(\mathcal{O}_X) \to D_{perf}(\mathcal{O}_Y)$ are isomorphic. Namely, we are given an isomorphism $F(\mathcal{O}_X) \cong F'(\mathcal{O}_X)$ compatible the action of the $k$-algebra $k' = \text{End}_{D_{perf}(\mathcal{O}_X)}(\mathcal{O}_X)$ which extends canonically to an isomorphism on any graded $k'$-vector space. \medskip\noindent The case $\dim(X) > 0$. Here $X$ is a projective smooth variety of dimension $> 1$. Let $\mathcal{F}$ be a coherent $\mathcal{O}_X$-module. We have to show there exists a coherent module $\mathcal{N}$ such that \begin{enumerate} \item there is a surjection $\mathcal{N} \to \mathcal{F}$, \item $\Ext^q(\mathcal{N}, \mathcal{F}) = 0$ for $q > 0$, \item $\Hom(\mathcal{F}, \mathcal{N}) = 0$. \end{enumerate} Choose an ample invertible $\mathcal{O}_X$-module $\mathcal{L}$. We claim that $\mathcal{N} = (\mathcal{L}^{\otimes n})^{\oplus r}$ will work for $n \ll 0$ and $r$ large enough. Condition (1) follows from Properties, Proposition \ref{properties-proposition-characterize-ample}. Condition (2) follows from $\Ext^q(\mathcal{L}^{\otimes n}, \mathcal{F}) = H^q(X, \mathcal{F} \otimes \mathcal{L}^{\otimes -n})$ and Cohomology of Schemes, Lemma \ref{coherent-lemma-vanshing-gives-ample}. Finally, we have $$ \Hom(\mathcal{F}, \mathcal{L}^{\otimes n}) = H^0(X, \SheafHom(\mathcal{F}, \mathcal{L}^{\otimes n})) = H^0(X, \SheafHom(\mathcal{F}, \mathcal{O}_X) \otimes \mathcal{L}^{\otimes n}) $$ Since the dual $\SheafHom(\mathcal{F}, \mathcal{O}_X)$ is torsion free, this this vanishes for $n \ll 0$ by Varieties, Lemma  \ref{varieties-lemma-vanishin-h0-negative}. This finishes the proof.
Choose a countable set $I$ and for $i \in I$ systems $(S_i/K, X_i \to S_i, Y_i \to S_i, M_i)$ satisfying properties (1), (2), (3), and (4) of Lemma \ref{lemma-countable-equivs}. Pick $i \in I$ and set $S = S_i$, $X = X_i$, $Y = Y_i$, and $M = M_i$. Clearly it suffice to show that the set of isomorphism classes of fibres $Y_s$ for $s \in S(K)$ such that $X_s \cong \mathbf{X}$ is countable. This we prove in the next paragraph. \medskip\noindent Let $S$ be a finite type scheme over $K$, let $X \to S$ and $Y \to S$ be proper smooth morphisms, and let $M \in D_{perf}(\mathcal{O}_{X \times_S Y})$ be the Fourier-Mukai kernel of a relative equivalence from $X$ to $Y$ over $S$. We will show the set of isomorphism classes of fibres $Y_s$ for $s \in S(K)$ such that $X_s \cong \mathbf{X}$ is countable. By Lemma \ref{lemma-countable-isos} applied to the families $\mathbf{X} \times S \to S$ and $X \to S$ there exists a countable set $I$ and for $i \in I$ a pair $(S_i \to S, h_i)$ with the following properties \begin{enumerate} \item $S_i \to S$ is a morphism of finite type, set $X_i = X \times_S S_i$, \item $h_i : \mathbf{X} \times S_i \to X_i$ is an isomorphism over $S_i$, and \item for any closed point $s \in S(K)$ if $\mathbf{X} \cong X_s$ over $K = \kappa(s)$ then $s$ is in the image of $S_i \to S$ for some $i$. \end{enumerate} Set $Y_i = Y \times_S S_i$. Denote $M_i \in D_{perf}(\mathcal{O}_{X_i \times_{S_i} Y_i})$ the pullback of $M$. By Lemma \ref{lemma-base-change-rek} $M_i$ is the Fourier-Mukai kernel of a relative equivalence from $X_i$ to $Y_i$ over $S_i$. Since $I$ is countable, by property (3) it suffices to prove that the set of isomorphism classes of fibres $Y_{i, s}$ for $s \in S_i(K)$ is countable. In fact, this number is finite by Lemma \ref{lemma-no-deformations-better} and the proof is complete.
Condition (1) implies (2) since given $(S, c)$ and $X \in \Ob(\mathcal{T})$ the object $S(X)$ represents the functor $Y \mapsto \Hom_\mathcal{T}(X, Y)^\vee$ and the object $S^{-1}(X)$ corepresents the functor $Y \mapsto \Hom_\mathcal{T}(Y, X)^\vee$. \medskip\noindent Assume (2). We will repeatedly use the Yoneda lemma, see Categories, Lemma \ref{categories-lemma-yoneda}. For every $X$ denote $S(X)$ the object representing the functor $Y \mapsto \Hom_\mathcal{T}(X, Y)^\vee$. Given $\varphi : X \to X'$, we obtain a unique arrow $S(\varphi) : S(X) \to S(X')$ determined by the corresponding transformation of functors $\Hom_\mathcal{T}(X, -)^\vee \to \Hom_\mathcal{T}(X', -)^\vee$. Thus $S$ is a functor and we obtain the isomorphisms $c_{X, Y}$ by construction. It remains to show that $S$ is an equivalence. For every $X$ denote $S'(X)$ the object corepresenting the functor $Y \mapsto \Hom_\mathcal{T}(Y, X)^\vee$. Arguing as above we find that $S'$ is a functor. We claim that $S'$ is quasi-inverse to $S$. To see this observe that $$ \Hom_\mathcal{T}(X, Y) = \Hom_\mathcal{T}(Y, S(X))^\vee = \Hom_\mathcal{T}(S'(S(X)), Y) $$ bifunctorially, i.e., we find $S' \circ S \cong \text{id}_\mathcal{T}$. Similarly, we have $$ \Hom_\mathcal{T}(Y, X) = \Hom_\mathcal{T}(S'(X), Y)^\vee = \Hom_\mathcal{T}(Y, S(S'(X))) $$ and we find $S \circ S' \cong \text{id}_\mathcal{T}$.
The statement make sense because $\dim \Hom_X(K, L) < \infty$ for $K, L \in D_{perf}(\mathcal{O}_X)$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-ext-finite}. Since $X$ is Gorenstein the dualizing complex $\omega_X^\bullet$ is an invertible object of $D(\mathcal{O}_X)$, see Duality for Schemes, Lemma \ref{duality-lemma-gorenstein}. In particular, locally on $X$ the complex $\omega_X^\bullet$ has one nonzero cohomology sheaf which is an invertible module, see Cohomology, Lemma \ref{cohomology-lemma-invertible-derived}. Thus $S(K)$ lies in $D_{perf}(\mathcal{O}_X)$. On the other hand, the invertibility of $\omega_X^\bullet$ clearly implies that $S$ is a self-equivalence of $D_{perf}(\mathcal{O}_X)$. Finally, we have to find an isomorphism $$ c_{K, L} : \Hom_X(K, L) \longrightarrow \Hom_X(L, \omega_X^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} K)^\vee $$ bifunctorially in $K, L$. To do this we use the canonical isomorphisms $$ \Hom_X(K, L) = H^0(X, L \otimes_{\mathcal{O}_X}^\mathbf{L} K^\vee) $$ and $$ \Hom_X(L, \omega_X^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} K) = H^0(X,  \omega_X^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} K \otimes_{\mathcal{O}_X}^\mathbf{L} L^\vee) $$ given in Cohomology, Lemma \ref{cohomology-lemma-dual-perfect-complex}. Since $(L \otimes_{\mathcal{O}_X}^\mathbf{L} K^\vee)^\vee = (K^\vee)^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L^\vee$ and since there is a canonical isomorphism $K \to (K^\vee)^\vee$ we find these $k$-vector spaces are canonically dual by Duality for Schemes, Lemma \ref{duality-lemma-duality-proper-over-field-perfect}. This produces the isomorphisms $c_{K, L}$. We omit the proof that these isomorphisms are functorial.
If $K$ is a compact object, then $K$ can be represented by a complex $M^\bullet$ which is finite projective as a graded $R$-module, see Differential Graded Algebra, Lemma \ref{dga-lemma-compact}. Since $\dim_k R < \infty$ we conclude $\sum \dim_k M^i < \infty$ and a fortiori $\sum \dim_k H^i(M^\bullet) < \infty$. (One can also easily deduce this implication from the easier Differential Graded Algebra, Proposition \ref{dga-proposition-compact}.) \medskip\noindent Assume $K$ satisfies (1). Consider the distinguished triangle of trunctions $\tau_{\leq m}K \to K \to \tau_{\geq m + 1}K$, see Derived Categories, Remark \ref{derived-remark-truncation-distinguished-triangle}. It is clear that both $\tau_{\leq m}K$ and $\tau_{\geq m + 1} K$ satisfy (1). If we can show both are compact, then so is $K$, see Derived Categories, Lemma \ref{derived-lemma-compact-objects-subcategory}. Hence, arguing on the number of nonzero cohomology modules of $K$ we may assume $H^i(K)$ is nonzero only for one $i$. Shifting, we may assume $K$ is given by the complex consisting of a single finite dimensional $R$-module $M$ sitting in degree $0$. \medskip\noindent Since $\dim_k(M) < \infty$ we see that $M$ is Artinian as an $R$-module. Thus it suffices to show that every simple $R$-module represents a compact object of $D(R)$. Observe that $$ I = \left( \begin{matrix} 0 & S_1 & S_2 & \ldots & \ldots \\ 0 & 0 & S_1 & \ldots & \ldots\\ 0 & 0 & 0 & \ldots & \ldots \\ \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & \ldots & \ldots & \ldots & 0 \end{matrix} \right) $$ is a nilpotent two sided ideal of $R$ and that $R/I$ is a commutative $k$-algebra isomorphic to a product of $n + 1$ copies of $k$ (placed along the diagonal in the matrix, i.e., $R/I$ can be lifted to a $k$-subalgebra of $R$). It follows that $R$ has exactly $n + 1$ isomorphism classes of simple modules $M_0, \ldots, M_n$ (sitting along the diagonal). Consider the right $R$-module $P_i$ of row vectors $$ P_i = \left( \begin{matrix} 0 & \ldots & 0 & S_0 & \ldots & S_{i - 1} & S_i \end{matrix} \right) $$ with obvious multiplication $P_i \times R \to P_i$. Then we see that $R \cong P_0 \oplus \ldots \oplus P_n$ as a right $R$-module. Since clearly $R$ is a compact object of $D(R)$, we conclude each $P_i$ is a compact object of $D(R)$. (We of course also conclude each $P_i$ is projective as an $R$-module, but this isn't what we have to show in this proof.) Clearly, $P_0 = M_0$ is the first of our simple $R$-modules. For $P_1$ we have a short exact sequence $$ 0 \to P_0^{\oplus n + 1} \to P_1 \to M_1 \to 0 $$ which proves that $M_1$ fits into a distinguished triangle whose other members are compact objects and hence $M_1$ is a compact object of $D(R)$. More generally, there exists a short exact sequence $$ 0 \to C_i \to P_i \to M_i \to 0 $$ where $C_i$ is a finite dimensional $R$-module whose simple constituents are isomorphic to $M_j$ for $j < i$. By induction, we first conclude that $C_i$ determines a compact object of $D(R)$ whereupon we conclude that $M_i$ does too as desired.
Parts (2) and (3) are equivalent by Cohomology, Lemma \ref{cohomology-lemma-dual-perfect-complex}. If (1) is true, then for $E$ perfect the derived tensor product $E \otimes^\mathbf{L} K$ is in $D^b_{\textit{Coh}}(\mathcal{O}_{\mathbf{P}^n_k})$ and we see that (2) holds by  Derived Categories of Schemes, Lemma \ref{perfect-lemma-direct-image-coherent}. It is clear that (2) implies (4) as $\mathcal{O}_{\mathbf{P}^n_k}(d)$ can be viewed as a perfect object of the derived category of $\mathbf{P}^n_k$. Thus it suffices to prove that (4) implies (1). \medskip\noindent Assume (4). Let $R$ be as in Lemma \ref{lemma-perfect-for-R}. Let $P = \bigoplus_{d = 0, \ldots, n} \mathcal{O}_{\mathbf{P}^n_k}(-d)$. Recall that $R = \text{End}_{\mathbf{P}^n_k}(P)$ whereas all other self-Exts of $P$ are zero and that $P$ determines an equivalence $- \otimes^\mathbf{L} P : D(R) \to D_\QCoh(\mathcal{O}_{\mathbf{P}^n_k})$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-Pn-module-category}. Say $K$ corresponds to $L$ in $D(R)$. Then \begin{align*} H^i(L) & = \Ext^i_{D(R)}(R, L) \\ & = \Ext^i_{\mathbf{P}^n_k}(P, K) \\ & = H^i(\mathbf{P}^n_k, K \otimes P^\vee) \\ & = \bigoplus\nolimits_{d = 0, \ldots, n} H^i(\mathbf{P}^n_k, K \otimes \mathcal{O}(d)) \end{align*} by Differential Graded Algebra, Lemma \ref{dga-lemma-upgrade-tensor-with-complex-derived} (and the fact that $- \otimes^\mathbf{L} P$ is an equivalence) and Cohomology, Lemma \ref{cohomology-lemma-dual-perfect-complex}. Thus our assumption (4) implies that $L$ satisfies condition (2) of Lemma \ref{lemma-perfect-for-R} and hence is a compact object of $D(R)$. Therefore $K$ is a compact object of $D_\QCoh(\mathcal{O}_{\mathbf{P}^n_k})$. Thus $K$ is perfect by Derived Categories of Schemes, Proposition \ref{perfect-proposition-compact-is-perfect}. Since $D_{perf}(\mathcal{O}_{\mathbf{P}^n_k}) = D^b_{\textit{Coh}}(\mathcal{O}_{\mathbf{P}^n_k})$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-perfect-on-regular} we conclude (1) holds.
The implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-finiteness}. \medskip\noindent Assume (2). Choose a closed immersion $i : X \to \mathbf{P}^n_k$. It suffices to show that $Ri_*K$ is in $D^b_{\textit{Coh}}(\mathbf{P}^n_k)$ since a quasi-coherent module $\mathcal{F}$ on $X$ is coherent, resp.\ zero if and only if $i_*\mathcal{F}$ is coherent, resp.\ zero. For a perfect object $E$ of $D(\mathcal{O}_{\mathbf{P}^n_k})$, $Li^*E$ is a perfect object of $D(\mathcal{O}_X)$ and $$ \Ext^q_{\mathbf{P}^n_k}(E, Ri_*K) = \Ext^q_X(Li^*E, K) $$ Hence by our assumption we see that $\sum_{q \in \mathbf{Z}} \dim_k \Ext^q_{\mathbf{P}^n_k}(E, Ri_*K) < \infty$. We conclude by Lemma \ref{lemma-coherent-on-projective-space}.
We check the conditions of Categories, Definition \ref{categories-definition-directed}. The category is nonempty because it contains $0 \to X$. If $E_i \to X$, $i = 1, 2$ are objects, then $E_1 \oplus E_2 \to X$ is an object and there are morphisms $(E_i \to X) \to (E_1 \oplus E_2 \to X)$. Finally, suppose that $a, b : (E \to X) \to (E' \to X)$ are morphisms. Choose a distinguished triangle $E \xrightarrow{a - b} E' \to E''$ in $\mathcal{D}'$. By Axiom TR3 we obtain a morphism of triangles $$ \xymatrix{ E \ar[r]_{a - b} \ar[d] & E' \ar[d] \ar[r] & E'' \ar[d] \\ 0 \ar[r] & X \ar[r] & X } $$ and we find that the resulting arrow $(E' \to X) \to (E'' \to X)$ equalizes $a$ and $b$.
We will use Derived Categories, Lemma \ref{derived-lemma-compact-objects-subcategory} without further mention. Denote $G : \mathcal{D}_c \to \text{Vect}_k$ the $k$-linear homological functor which sends $X$ to $H(X)^\vee$. For any object $Y$ of $\mathcal{D}$ we set $$ G'(Y) = \colim_{X \to Y, X \in \Ob(\mathcal{D}_c)} G(X) $$ The colimit is filtered by Lemma \ref{lemma-maps-from-compact-filtered}. We claim that $G'$ is a $k$-linear homological functor, the restriction of $G'$ to $\mathcal{D}_c$ is $G$, and $G'$ sends direct sums to direct sums. \medskip\noindent Namely, suppose that $Y_1 \to Y_2 \to Y_3$ is a distinguished triangle. Let $\xi \in G'(Y_2)$ map to zero in $G'(Y_3)$. Since the colimit is filtered $\xi$ is represented by some $X \to Y_2$ with $X \in \Ob(\mathcal{D}_c)$ and $g \in G(X)$. The fact that $\xi$ maps to zero in $G'(Y_3)$ means the composition $X \to Y_2 \to Y_3$ factors as $X \to X' \to Y_3$ with $X' \in \mathcal{D}_c$ and $g$ mapping to zero in $G(X')$. Choose a distinguished triangle $X'' \to X \to X'$. Then $X'' \in \Ob(\mathcal{D}_c)$. Since $G$ is homological we find that $g$ is the image of some $g'' \in G'(X'')$. By Axiom TR3 the maps $X \to Y_2$ and $X' \to Y_3$ fit into a morphism of distinguished triangles $(X'' \to X \to X') \to (Y_1 \to Y_2 \to Y_3)$ and we find that indeed $\xi$ is the image of the element of $G'(Y_1)$ represented by $X'' \to Y_1$ and $g'' \in G(X'')$. \medskip\noindent If $Y \in \Ob(\mathcal{D}_c)$, then $\text{id} : Y \to Y$ is the final object in the category of arrows $X \to Y$ with $X \in \Ob(\mathcal{D}_c)$. Hence we see that $G'(Y) = G(Y)$ in this case and the statement on restriction holds. Let $Y = \bigoplus_{i \in I} Y_i$ be a direct sum. Let $a : X \to Y$ with $X \in \Ob(\mathcal{D}_c)$ and $g \in G(X)$ represent an element $\xi$ of $G'(Y)$. The morphism $a : X \to Y$ can be uniquely written as a sum of morphisms $a_i : X \to Y_i$ almost all zero as $X$ is a compact object of $\mathcal{D}$. Let $I' = \{i \in I \mid a_i \not = 0\}$. Then we can factor $a$ as the composition $$ X \xrightarrow{(1, \ldots, 1)} \bigoplus\nolimits_{i \in I'} X \xrightarrow{\bigoplus_{i \in I'} a_i} \bigoplus\nolimits_{i \in I} Y_i = Y $$ We conclude that $\xi = \sum_{i \in I'} \xi_i$ is the sum of the images of the elements $\xi_i \in G'(Y_i)$ corresponding to $a_i : X \to Y_i$ and $g \in G(X)$. Hence $\bigoplus G'(Y_i) \to G'(Y)$ is surjective. We omit the (trivial) verification that it is injective. \medskip\noindent It follows that the functor $Y \mapsto G'(Y)^\vee$ is cohomological and sends direct sums to direct products. Hence by Brown representability, see Derived Categories, Proposition \ref{derived-proposition-brown} we conclude that there exists a $Y \in \Ob(\mathcal{D})$ and an isomorphism $G'(Z)^\vee = \Hom(Z, Y)$ functorially in $Z$. For $X \in \Ob(\mathcal{D}_c)$ we have $G'(X)^\vee = G(X)^\vee = (H(X)^\vee)^\vee = H(X)$ because $\dim_k H(X) < \infty$ and the proof is complete.
Set $E = Rf_*\mathcal{O}_{X'}$ in $D(\mathcal{O}_X)$. Observe that $E$ is in $D^b_{\textit{Coh}}(\mathcal{O}_X)$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-direct-image-coherent}. By  Derived Categories of Schemes, Lemma \ref{perfect-lemma-perfect-on-regular} we find that $E$ is a perfect object of $D(\mathcal{O}_X)$. Since $\mathcal{O}_{X'}$ is a sheaf of algebras, we have the relative cup product $\mu : E \otimes_{\mathcal{O}_X}^\mathbf{L} E \to E$ by Cohomology, Remark \ref{cohomology-remark-cup-product}. Let $\sigma : E \otimes E^\vee \to E^\vee \otimes E$ be the commutativity constraint on the symmetric monoidal category $D(\mathcal{O}_X)$ (Cohomology, Lemma \ref{cohomology-lemma-symmetric-monoidal-derived}). Denote $\eta : \mathcal{O}_X \to E \otimes E^\vee$ and $\epsilon : E^\vee \otimes E \to \mathcal{O}_X$ the maps constructed in Cohomology, Example \ref{cohomology-example-dual-derived}. Then we can consider the map $$ E \xrightarrow{\eta \otimes 1} E \otimes E^\vee \otimes E \xrightarrow{\sigma \otimes 1} E^\vee \otimes E \otimes E \xrightarrow{1 \otimes \mu} E^\vee \otimes E \xrightarrow{\epsilon} \mathcal{O}_X $$ We claim that this map is a one sided inverse to the map in the statement of the lemma. To see this it suffices to show that the composition $\mathcal{O}_X \to \mathcal{O}_X$ is the identity map. This we may do in the generic point of $X$ (or on an open subscheme of $X$ over which $f$ is an isomorphism). In this case $E = \mathcal{O}_X$ and $\mu$ is the usual multiplication map and the result is clear.
The equality in (1) holds by Derived Categories of Schemes, Lemma \ref{perfect-lemma-perfect-on-regular}. The implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-finiteness}. The implication (2) $\Rightarrow$ (1) follows from More on Morphisms, Lemma \ref{more-morphisms-lemma-characterize-relatively-perfect}.
Proof of (1). The derived category $D_\QCoh(\mathcal{O}_X)$ has direct sums, is compactly generated, and $D_{perf}(\mathcal{O}_X)$ is the full subcategory of compact objects, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-quasi-coherence-direct-sums}, Theorem \ref{perfect-theorem-bondal-van-den-Bergh}, and Proposition \ref{perfect-proposition-compact-is-perfect}. By Lemma \ref{lemma-van-den-bergh} we may assume $F(E) = \Hom_X(E, K)$ for some $K \in \Ob(D_\QCoh(\mathcal{O}_X))$. Then it follows that $K$ is in $D^b_{\textit{Coh}}(\mathcal{O}_X)$ by Lemma \ref{lemma-characterize-dbcoh-proper-regular}. \medskip\noindent Proof of (2). Consider the contravariant functor $E \mapsto E^\vee$ on $D_{perf}(\mathcal{O}_X)$, see Cohomology, Lemma \ref{cohomology-lemma-dual-perfect-complex}. This functor is an exact anti-self-equivalence of $D_{perf}(\mathcal{O}_X)$. Hence we may apply part (1) to the functor $F(E) = G(E^\vee)$ to find $K \in D_{perf}(\mathcal{O}_X)$ such that $G(E^\vee) = \Hom_X(E, K)$. It follows that $G(E) = \Hom_X(E^\vee, K) = \Hom_X(K^\vee, E)$ and we conclude that taking $K^\vee$ works.
If an adjoint exists it is an exact functor by the very general Derived Categories, Lemma \ref{derived-lemma-adjoint-is-exact}. \medskip\noindent Let us prove the existence of a right adjoint. To see existence, it suffices to show that for $M \in D_{perf}(\mathcal{O}_Y)$ the contravariant functor $K \mapsto \Hom_Y(F(K), M)$ is representable. This functor is contravariant, $k$-linear, and cohomological. Hence by Lemma \ref{lemma-bondal-van-den-bergh} part (1) it suffices to show that $$ \sum\nolimits_{i \in \mathbf{Z}} \dim_k \Ext^i_Y(F(K), M) < \infty $$ This follows from Lemma \ref{lemma-finiteness}. \medskip\noindent For the existence of the left adjoint we argue in the same manner using part (2) of Lemma \ref{lemma-bondal-van-den-bergh}.
This follows from the fact that derived pullback preserves $D_\QCoh$ (Derived Categories of Schemes, Lemma \ref{perfect-lemma-quasi-coherence-pullback}), derived tensor products preserve $D_\QCoh$ (Derived Categories of Schemes, Lemma \ref{perfect-lemma-quasi-coherence-tensor-product}), the projection $\text{pr}_2 : X \times_S Y \to Y$ is quasi-compact and quasi-separated (Schemes, Lemmas \ref{schemes-lemma-quasi-compact-preserved-base-change} and \ref{schemes-lemma-separated-permanence}), and total direct image along a quasi-separated and quasi-compact morphism preserves $D_\QCoh$ (Derived Categories of Schemes, Lemma \ref{perfect-lemma-quasi-coherence-direct-image}).
The statement makes sense by Lemma \ref{lemma-fourier-Mukai-QCoh}. We are going to use Derived Categories of Schemes, Lemmas \ref{perfect-lemma-quasi-coherence-pullback}, \ref{perfect-lemma-quasi-coherence-tensor-product}, and \ref{perfect-lemma-quasi-coherence-direct-image} and Schemes, Lemmas \ref{schemes-lemma-quasi-compact-preserved-base-change} and \ref{schemes-lemma-separated-permanence} without further mention. By Derived Categories of Schemes, Lemma \ref{perfect-lemma-flat-base-change-tor-independent} we see that $X \times_S Y$ and $Y \times_S Z$ are tor independent over $Y$. This means that we have base change for the cartesian diagram $$ \xymatrix{ X \times_S Y \times_S Z \ar[d] \ar[r] & Y \times_S Z \ar[d]^{p^{YZ}_Y} \\ X \times_S Y \ar[r]^{p^{XY}_Y} & Y } $$ for complexes with quasi-coherent cohomology sheaves, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-compare-base-change}. Abbreviating $p^* = Lp^*$, $p_* = Rp_*$ and $\otimes = \otimes^\mathbf{L}$ we have for $M \in D_\QCoh(\mathcal{O}_X)$ the sequence of equalities \begin{align*} \Phi_{K'}(\Phi_K(M)) & = p^{YZ}_{Z, *}(p^{YZ, *}_Y p^{XY}_{Y, *}(p^{XY, *}_X M \otimes K) \otimes K') \\ & = p^{YZ}_{Z, *}(\text{pr}_{23, *} \text{pr}_{12}^*(p^{XY, *}_X M \otimes K) \otimes K') \\ & = p^{YZ}_{Z, *}(\text{pr}_{23, *}(\text{pr}_1^*M \otimes \text{pr}_{12}^*K) \otimes K') \\ & = p^{YZ}_{Z, *}(\text{pr}_{23, *}(\text{pr}_1^*M \otimes \text{pr}_{12}^*K \otimes \text{pr}_{23}^*K')) \\ & = \text{pr}_{3, *}(\text{pr}_1^*M \otimes \text{pr}_{12}^*K \otimes \text{pr}_{23}^*K') \\ & = p^{XZ}_{Z, *}\text{pr}_{13, *}(\text{pr}_1^*M \otimes \text{pr}_{12}^*K \otimes \text{pr}_{23}^*K') \\ & = p^{XZ}_{Z, *} (p^{XZ, *}_X M \otimes \text{pr}_{13, *}(\text{pr}_{12}^*K \otimes \text{pr}_{23}^*K')) \end{align*} as desired. Here we have used the remark on base change in the second equality and we have use Derived Categories of Schemes, Lemma \ref{perfect-lemma-cohomology-base-change} in the $4$th and last equality.