hcju/stacksqa huggingface dataset:
It suffices to prove the following: For any field $k$ and object $y$ of $\mathcal{Y}$ over $\Spec(k)$ there exists an integer $d \geq 1$ and an object $(U, Z, y, x, \alpha)$ of $\mathcal{H}_{d, lci}(\mathcal{X}/\mathcal{Y})$ with $U = \Spec(k)$. Namely, in this case we see that $p$ is surjective on objects in the strong sense that an extension of the field is not needed. \medskip\noindent Denote $X_y$ the algebraic space over $U = \Spec(k)$ representing the $2$-fibre product $(\Sch/U')_{fppf} \times_{y', \mathcal{Y}, F} \mathcal{X}$. By assumption the morphism $X_y \to \Spec(k)$ is surjective and locally of finite presentation (and flat). In particular $X_y$ is nonempty. Choose a nonempty affine scheme $V$ and an \'etale morphism $V \to X_y$. Note that $V \to \Spec(k)$ is (flat), surjective, and locally of finite presentation (by Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-locally-finite-presentation}). Pick a closed point $v \in V$ where $V \to \Spec(k)$ is Cohen-Macaulay (i.e., $V$ is Cohen-Macaulay at $v$), see More on Morphisms, Lemma \ref{more-morphisms-lemma-flat-finite-presentation-CM-open}. Applying More on Morphisms, Lemma \ref{more-morphisms-lemma-slice-CM} we find a regular immersion $Z \to V$ with $Z = \{v\}$. This implies $Z \to V$ is a closed immersion. Moreover, it follows that $Z \to \Spec(k)$ is finite (for example by Algebra, Lemma \ref{algebra-lemma-isolated-point}). Hence $Z \to \Spec(k)$ is finite locally free of some degree $d$. Now $Z \to X_y$ is unramified as the composition of a closed immersion followed by an \'etale morphism (see Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-composition-unramified}, \ref{spaces-morphisms-lemma-etale-unramified}, and \ref{spaces-morphisms-lemma-immersion-unramified}). Finally, $Z \to X_y$ is a local complete intersection morphism as a composition of a regular immersion of schemes and an \'etale morphism of algebraic spaces (see More on Morphisms, Lemma \ref{more-morphisms-lemma-regular-immersion-lci} and Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-etale-smooth} and \ref{spaces-morphisms-lemma-smooth-syntomic} and More on Morphisms of Spaces, Lemmas \ref{spaces-more-morphisms-lemma-flat-lci} and \ref{spaces-more-morphisms-lemma-composition-lci}). The morphism $Z \to X_y$ corresponds to an object $x$ of $\mathcal{X}$ over $Z$ together with an isomorphism $\alpha : y|_Z \to F(x)$. We obtain an object $(U, Z, y, x, \alpha)$ of $\mathcal{H}_d(\mathcal{X}/\mathcal{Y})$. By what was said above about the morphism $Z \to X_y$ we see that it actually is an object of the subcategory $\mathcal{H}_{d, lci}(\mathcal{X}/\mathcal{Y})$ and we win.
Let $T$ be a scheme and let $x : (\Sch/T)_{fppf} \to [U/R]$ be a $1$-morphism. We have to show that the projection $$ \mathcal{S}_U \times_{[U/R]} (\Sch/T)_{fppf} \longrightarrow (\Sch/T)_{fppf} $$ is surjective and smooth. We already know that the left hand side is representable by an algebraic space $F$, see Algebraic Stacks, Lemmas \ref{algebraic-lemma-diagonal-quotient-stack} and \ref{algebraic-lemma-representable-diagonal}. Hence we have to show the corresponding morphism $F \to T$ of algebraic spaces is surjective, locally of finite presentation, and flat. Since we are working with properties of morphisms of algebraic spaces which are local on the target in the fppf topology we may check this fppf locally on $T$. By construction, there exists an fppf covering $\{T_i \to T\}$ of $T$ such that $x|_{(\Sch/T_i)_{fppf}}$ comes from a morphism $x_i : T_i \to U$. (Note that $F \times_T T_i$ represents the $2$-fibre product $\mathcal{S}_U \times_{[U/R]} (\Sch/T_i)_{fppf}$ so everything is compatible with the base change via $T_i \to T$.) Hence we may assume that $x$ comes from $x : T \to U$. In this case we see that $$ \mathcal{S}_U \times_{[U/R]} (\Sch/T)_{fppf} = (\mathcal{S}_U \times_{[U/R]} \mathcal{S}_U) \times_{\mathcal{S}_U} (\Sch/T)_{fppf} = \mathcal{S}_R \times_{\mathcal{S}_U} (\Sch/T)_{fppf} $$ The first equality by Categories, Lemma \ref{categories-lemma-2-fibre-product-erase-factor} and the second equality by Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-2-cartesian}. Clearly the last $2$-fibre product is represented by the algebraic space $F = R \times_{s, U, x} T$ and the projection $R \times_{s, U, x} T \to T$ is flat and locally of finite presentation as the base change of the flat locally finitely presented morphism of algebraic spaces $s : R \to U$. It is also surjective as $s$ has a section (namely the identity $e : U \to R$ of the groupoid). This proves the lemma.
First, assume that $g : U' \to U$ satisfies (1) and (2). Property (1) implies that $[U'/R'] \to [U/R]$ is an equivalence, see Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-restrict-equivalence}. By Theorem \ref{theorem-flat-groupoid-gives-algebraic-stack} the quotient stack $[U'/R']$ is an algebraic stack. Hence $[U/R]$ is an algebraic stack too, see Algebraic Stacks, Lemma \ref{algebraic-lemma-equivalent}. \medskip\noindent Conversely, assume that $[U/R]$ is an algebraic stack. We may choose a scheme $W$ and a surjective smooth $1$-morphism $$ f : (\Sch/W)_{fppf} \longrightarrow [U/R]. $$ By the $2$-Yoneda lemma (Algebraic Stacks, Section \ref{algebraic-section-2-yoneda}) this corresponds to an object $\xi$ of $[U/R]$ over $W$. By the description of $[U/R]$ in Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-objects} we can find a surjective, flat, locally finitely presented morphism $b : U' \to W$ of schemes such that $\xi' = b^*\xi$ corresponds to a morphism $g : U' \to U$. Note that the $1$-morphism $$ f' : (\Sch/U')_{fppf} \longrightarrow [U/R]. $$ corresponding to $\xi'$ is surjective, flat, and locally of finite presentation, see Algebraic Stacks, Lemma \ref{algebraic-lemma-composition-representable-transformations-property}. Hence $(\Sch/U')_{fppf} \times_{[U/R]} (\Sch/U')_{fppf}$ which is represented by the algebraic space $$ \mathit{Isom}_{[U/R]}(\text{pr}_0^*\xi', \text{pr}_1^*\xi') = (U' \times_S U') \times_{(g \circ \text{pr}_0, g \circ \text{pr}_1), U \times_S U} R = R' $$ (see Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-morphisms} for the first equality; the second is the definition of restriction) is flat and locally of finite presentation over $U'$ via both $s'$ and $t'$ (by base change, see Algebraic Stacks, Lemma \ref{algebraic-lemma-base-change-representable-transformations-property}). By this description of $R'$ and by Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack} we obtain a canonical fully faithful $1$-morphism $[U'/R'] \to [U/R]$. This $1$-morphism is essentially surjective because $f'$ is flat, locally of finite presentation, and surjective (see Stacks, Lemma \ref{stacks-lemma-characterize-essentially-surjective-when-ff}); another way to prove this is to use Algebraic Stacks, Remark \ref{algebraic-remark-flat-fp-presentation}. Finally, we can use Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-quotient-stack-restrict-equivalence} to conclude that the composition $U' \times_{g, U, t} R \to R \xrightarrow{s} U$ is a surjection of sheaves.
This lemma is a special case of Lemma \ref{lemma-quotient-algebraic}. Namely, the quotient stack $[X/G]$ is by Groupoids in Spaces, Definition \ref{spaces-groupoids-definition-quotient-stack} equal to the quotient stack $[X/G \times_B X]$ of the groupoid in algebraic spaces $(X, G \times_B X, s, t, c)$ associated to the group action in Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-groupoid-from-action}. There is one small observation that is needed to get condition (1). Namely, the morphism $s : G \times_B X \to X$ is the second projection and the morphism $t :  G \times_B X \to X$ is the action morphism $a$. Hence the morphism $h : U' \times_{g, U, t} R \to R \xrightarrow{s} U$ from Lemma \ref{lemma-quotient-algebraic} corresponds to the morphism $$ X' \times_{\varphi, X, a} (G \times_B X) \xrightarrow{\text{pr}_1} X $$ in the current setting. However, because of the symmetry given by the inverse of $G$ this morphism is isomorphic to the morphism $$ (G \times_B X) \times_{\text{pr}_1, X, \varphi} X' \xrightarrow{a} X $$ of the statement of the lemma. Details omitted.
If $G$ is flat and locally of finite presentation over $B$, then $[B/G]$ is an algebraic stack by Theorem \ref{theorem-flat-groupoid-gives-algebraic-stack}. \medskip\noindent Conversely, assume that $[B/G]$ is an algebraic stack. By Lemma \ref{lemma-group-quotient-algebraic} and because the action is trivial, we see there exists an algebraic space $B'$ and a morphism $B' \to B$ such that (1) $B' \to B$ is a surjection of sheaves and (2) the projections $$ B' \times_B G \times_B B' \to B' $$ are flat and locally of finite presentation. Note that the base change $B' \times_B G \times_B B' \to G \times_B B'$ of $B' \to B$ is a surjection of sheaves also. Thus it follows from Descent on Spaces, Lemma \ref{spaces-descent-lemma-curiosity} that the projection $G \times_B B' \to B'$ is flat and locally of finite presentation. By (1) we can find an fppf covering $\{B_i \to B\}$ such that $B_i \to B$ factors through $B' \to B$. Hence $G \times_B B_i \to B_i$ is flat and locally of finite presentation by base change. By Descent on Spaces, Lemmas \ref{spaces-descent-lemma-descending-property-flat} and \ref{spaces-descent-lemma-descending-property-locally-finite-presentation} we conclude that $G \to B$ is flat and locally of finite presentation.
Note that properties (2) and (3) of the lemma and the corresponding properties (2) and (3) of Algebraic Stacks, Definition \ref{algebraic-definition-algebraic-stack} are independent of the topology. This is true because these properties involve only the notion of a $2$-fibre product of categories fibred in groupoids, $1$- and $2$-morphisms of categories fibred in groupoids, the notion of a $1$-morphism of categories fibred in groupoids representable by algebraic spaces, and what it means for such a $1$-morphism to be surjective and smooth. Thus all we have to prove is that an \'etale stack in groupoids $\mathcal{X}$ with properties (2) and (3) is also an fppf stack in groupoids. \medskip\noindent Using (2) let $R$ be an algebraic space representing $$ (\Sch_\alpha/U) \times_\mathcal{X} (\Sch_\alpha/U) $$ By (3) the projections $s, t : R \to U$ are smooth. Exactly as in the proof of Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack} there exists a groupoid in spaces $(U, R, s, t, c)$ and a canonical fully faithful $1$-morphism $[U/R]_\etale \to \mathcal{X}$ where $[U/R]_\etale$ is the \'etale stackification of presheaf in groupoids $$ T \longmapsto (U(T), R(T), s(T), t(T), c(T)) $$ Claim: If $V \to T$ is a surjective smooth morphism from an algebraic space $V$ to a scheme $T$, then there exists an \'etale covering $\{T_i \to T\}$ refining the covering $\{V \to T\}$. This follows from More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-dominates-smooth} or the more general Sheaves on Stacks, Lemma \ref{stacks-sheaves-lemma-surjective-flat-locally-finite-presentation}. Using the claim and arguing exactly as in Algebraic Stacks, Lemma \ref{algebraic-lemma-stack-presentation} it follows that $[U/R]_\etale \to \mathcal{X}$ is an equivalence. \medskip\noindent Next, let $[U/R]$ denote the quotient stack in the fppf topology which is an algebraic stack by Algebraic Stacks, Theorem \ref{algebraic-theorem-smooth-groupoid-gives-algebraic-stack}. Thus we have $1$-morphisms $$ U \to [U/R]_\etale \to [U/R]. $$ Both $U \to [U/R]_\etale \cong \mathcal{X}$ and $U \to [U/R]$ are surjective and smooth (the first by assumption and the second by the theorem) and in both cases the fibre product $U \times_\mathcal{X} U$ and $U \times_{[U/R]} U$ is representable by $R$. Hence the $1$-morphism $[U/R]_\etale \to [U/R]$ is fully faithful (since morphisms in the quotient stacks are given by morphisms into $R$, see Groupoids in Spaces, Section \ref{spaces-groupoids-section-explicit-quotient-stacks}). \medskip\noindent Finally, for any scheme $T$ and morphism $t : T \to [U/R]$ the fibre product $V = T \times_{U/R} U$ is an algebraic space surjective and smooth over $T$. By the claim above there exists an \'etale covering $\{T_i \to T\}_{i \in I}$ and morphisms $T_i \to V$ over $T$. This proves that the object $t$ of $[U/R]$ over $T$ comes \'etale locally from $U$. We conclude that $[U/R]_\etale \to [U/R]$ is an equivalence of stacks in groupoids over $(\Sch/S)_\etale$ by Stacks, Lemma \ref{stacks-lemma-characterize-essentially-surjective-when-ff}. This concludes the proof.
Choose a scheme $B' = \coprod B'_i$ which is a disjoint union of affine schemes $B'_i$ and an \'etale surjective morphism $B' \to B$. We may also assume that $B'_i \times_B Z$ is the spectrum of a ring which is finite free as a $\Gamma(B'_i, \mathcal{O}_{B'_i})$-module. By Lemma \ref{lemma-base-change-hom-functor} and Spaces, Lemma \ref{spaces-lemma-base-change-representable-transformations-property} the morphism $\mathit{Mor}_{B'}(Z', X') \to \mathit{Mor}_B(Z, X)$ is surjective \'etale. Hence by Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap} it suffices to prove the proposition when $B = B'$ is a disjoint union of affine schemes $B'_i$ so that each $B'_i \times_B Z$ is finite free over $B'_i$. Then it actually suffices to prove the result for the restriction to each $B'_i$. Thus we may assume that $B$ is affine and that $\Gamma(Z, \mathcal{O}_Z)$ is a finite free $\Gamma(B, \mathcal{O}_B)$-module. \medskip\noindent Choose a scheme $X'$ which is a disjoint union of affine schemes and a surjective \'etale morphism $X' \to X$. By Lemma \ref{lemma-etale-covering-hom-functor} the morphism $\mathit{Mor}_B(Z, X') \to \mathit{Mor}_B(Z, X)$ is representable by algebraic spaces, \'etale, and surjective. Hence by Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap} it suffices to prove the proposition when $X$ is a disjoint union of affine schemes. This reduces us to the case discussed in the next paragraph. \medskip\noindent Assume $X = \coprod_{i \in I} X_i$ is a disjoint union of affine schemes, $B$ is affine, and that $\Gamma(Z, \mathcal{O}_Z)$ is a finite free $\Gamma(B, \mathcal{O}_B)$-module. For any finite subset $E \subset I$ set $$ F_E = \mathit{Mor}_B(Z, \coprod\nolimits_{i \in E} X_i). $$ By More on Morphisms, Lemma \ref{more-morphisms-lemma-hom-from-finite-free-into-affine} we see that $F_E$ is an algebraic space. Consider the morphism $$ \coprod\nolimits_{E \subset I\text{ finite}} F_E \longrightarrow \mathit{Mor}_B(Z, X) $$ Each of the morphisms $F_E \to \mathit{Mor}_B(Z, X)$ is an open immersion, because it is simply the locus parametrizing pairs $(a, b)$ where $b$ maps into the open subscheme $\coprod\nolimits_{i \in E} X_i$ of $X$. Moreover, if $T$ is quasi-compact, then for any pair $(a, b)$ the image of $b$ is contained in $\coprod\nolimits_{i \in E} X_i$ for some $E \subset I$ finite. Hence the displayed arrow is in fact an open covering and we win\footnote{Modulo some set theoretic arguments. Namely, we have to show that $\coprod F_E$ is an algebraic space. This follows because $|I| \leq \text{size}(X)$ and $\text{size}(F_E) \leq \text{size}(X)$ as follows from the explicit description of $F_E$ in the proof of More on Morphisms, Lemma \ref{more-morphisms-lemma-hom-from-finite-free-into-affine}. Some details omitted.} by Spaces, Lemma \ref{spaces-lemma-glueing-algebraic-spaces}.
By Proposition \ref{proposition-hom-functor-algebraic-space} the functors $\mathit{Mor}_B(Z, X)$ and $\mathit{Mor}_B(Z, Z)$ are algebraic spaces. Hence this follows from the cartesian diagram of Lemma \ref{lemma-fibre-diagram} and the fact that fibre products of algebraic spaces exist and are given by the fibre product in the underlying category of sheaves of sets (see Spaces, Lemma \ref{spaces-lemma-fibre-product-spaces-over-sheaf-with-representable-diagonal}).
The absolute case follows from Artin's Axioms, Lemma \ref{artin-lemma-diagonal-representable} and Lemmas \ref{lemma-polarized-diagonal}, \ref{lemma-polarized-RS-star}, \ref{lemma-polarized-limits}, \ref{lemma-polarized-existence}, and \ref{lemma-polarized-defo-thy}. The case over $B$ follows from this, the description of $B\textit{-Polarized}$ as a $2$-fibre product in Remark \ref{remark-polarized-base-change}, and the fact that algebraic stacks have $2$-fibre products, see Algebraic Stacks, Lemma \ref{algebraic-lemma-2-fibre-product}.
The absolute case follows from Artin's Axioms, Lemma \ref{artin-lemma-diagonal-representable} and Lemmas \ref{lemma-curves-diagonal}, \ref{lemma-curves-RS-star}, \ref{lemma-curves-limits}, \ref{lemma-curves-existence}, and \ref{lemma-curves-defo-thy}. The case over $B$ follows from this, the description of $B\text{-}\Curvesstack$ as a $2$-fibre product in Remark \ref{remark-curves-base-change}, and the fact that algebraic stacks have $2$-fibre products, see Algebraic Stacks, Lemma \ref{algebraic-lemma-2-fibre-product}.
Let $\{T_i \to T\}_{i \in I}$ be an fpqc covering of schemes over $B$. Set $X_i = X_{T_i} = X \times_S T_i$ and $\mathcal{F}_i = u_{T_i}$ and $\mathcal{G}_i = \mathcal{G}_{T_i}$. Note that $\{X_i \to X_T\}_{i \in I}$ is an fpqc covering of $X_T$, see Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-fpqc}. Thus a family of maps $u_i : \mathcal{F}_i \to \mathcal{G}_i$ such that $u_i$ and $u_j$ restrict to the same map on $X_{T_i \times_T T_j}$ comes from a unique map $u : \mathcal{F}_T \to \mathcal{G}_T$ by descent (Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent}).
Choose a scheme $U$ and a surjective \'etale morphism $p : U \to T$. Let $R = U \times_T U$ with projections $t, s : R \to U$. \medskip\noindent Let $v : T \to \mathit{Hom}(\mathcal{F}, \mathcal{G})$ be a natural transformation. Then $v(p)$ corresponds to a pair $(h_U, u_U)$ over $U$. As $v$ is a transformation of functors we see that the pullbacks of $(h_U, u_U)$ by $s$ and $t$ agree. Since $T = U/R$ (Spaces, Lemma \ref{spaces-lemma-space-presentation}), we obtain a morphism $h : T \to B$ such that $h_U = h \circ p$. Then $\mathcal{F}_U$ is the pullback of $\mathcal{F}_T$ to $X_U$ and similarly for $\mathcal{G}_U$. Hence $u_U$ descends to a $\mathcal{O}_{X_T}$-module map $u : \mathcal{F}_T \to \mathcal{G}_T$ by Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent}. \medskip\noindent Conversely, let $(h, u)$ be a pair over $T$. Then we get a natural transformation $v : T \to \mathit{Hom}(\mathcal{F}, \mathcal{G})$ by sending a morphism $a : T' \to T$ where $T'$ is a scheme to $(h \circ a, a^*u)$. We omit the verification that the construction of this and the previous paragraph are mutually inverse.
Let $u_i : \mathcal{F}_{i, T} \to \mathcal{G}_{i, T}$ be an element in the equalizer of $\text{pr}_0^*$ and $\text{pr}_1^*$. Since the base change of an fppf covering is an fppf covering (Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-fppf}) we see that $\{X_{i, T} \to X_T\}_{i \in I}$ and $\{X_{ijk, T} \to X_{i, T} \times_{X_T} X_{j, T}\}$ are fppf coverings. Applying Descent on Spaces, Proposition \ref{spaces-descent-proposition-fpqc-descent-quasi-coherent} we first conclude that $u_i$ and $u_j$ restrict to the same morphism over $X_{i, T} \times_{X_T} X_{j, T}$, whereupon a second application shows that there is a unique morphism $u : \mathcal{F}_T \to \mathcal{G}_T$ restricting to $u_i$ for each $i$. This finishes the proof.
Let $T = \lim_{i \in I} T_i$ be a directed limit of affine $B$-schemes. We have to show that $$ \mathit{Hom}(\mathcal{F}, \mathcal{G})(T) = \colim \mathit{Hom}(\mathcal{F}, \mathcal{G})(T_i) $$ Pick $0 \in I$. We may replace $B$ by $T_0$, $X$ by $X_{T_0}$, $\mathcal{F}$ by $\mathcal{F}_{T_0}$, $\mathcal{G}$ by $\mathcal{G}_{T_0}$, and $I$ by $\{i \in I \mid i \geq 0\}$. See Remark \ref{remark-hom-base-change}. Thus we may assume $B = \Spec(R)$ is affine. \medskip\noindent When $B$ is affine, then $X$ is quasi-compact and quasi-separated. Choose a surjective \'etale morphism $U \to X$ where $U$ is an affine scheme (Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}). Since $X$ is quasi-separated, the scheme $U \times_X U$ is quasi-compact and we may choose a surjective \'etale morphism $V \to U \times_X U$ where $V$ is an affine scheme. Applying Lemma \ref{lemma-hom-sheaf-in-X} we see that $\mathit{Hom}(\mathcal{F}, \mathcal{G})$ is the equalizer of two maps between $$ \mathit{Hom}(\mathcal{F}|_U, \mathcal{G}|_U) \quad\text{and}\quad \mathit{Hom}(\mathcal{F}|_V, \mathcal{G}|_V) $$ This reduces us to the case that $X$ is affine. \medskip\noindent In the affine case the statement of the lemma reduces to the following problem: Given a ring map $R \to A$, two $A$-modules $M$, $N$ and a directed system of $R$-algebras $C = \colim C_i$. When is it true that the map $$ \colim \Hom_{A \otimes_R C_i}(M \otimes_R C_i, N \otimes_R C_i) \longrightarrow \Hom_{A \otimes_R C}(M \otimes_R C, N \otimes_R C) $$ is bijective? By Algebra, Lemma \ref{algebra-lemma-module-map-property-in-colimit} this holds if $M \otimes_R C$ is of finite presentation over $A \otimes_R C$, i.e., when $M$ is of finite presentation over $A$.
Let $g : T \to B$ be a morphism where $T$ is a scheme. Denote $i_T : X'_T \to X_T$ the base change of $i$. Denote $h : X_T \to X$ and $h' : X'_T \to X'$ the projections. Observe that $(h')^*i^*\mathcal{F} = i_T^*h^*\mathcal{F}$. As a closed immersion is affine (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-affine}) we have $h^*i_*\mathcal{G} = i_{T, *}(h')^*\mathcal{G}$ by Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-affine-base-change}. Thus we have \begin{align*} \mathit{Hom}(\mathcal{F}, i_*\mathcal{G}')(T) & = \Hom_{\mathcal{O}_{X_T}}(h^*\mathcal{F}, h^*i_*\mathcal{G}') \\ & = \Hom_{\mathcal{O}_{X_T}}(h^*\mathcal{F}, i_{T, *}(h')^*\mathcal{G}) \\ & = \Hom_{\mathcal{O}_{X'_T}}(i_T^*h^*\mathcal{F}, (h')^*\mathcal{G}) \\ & = \Hom_{\mathcal{O}_{X'_T}}((h')^*i^*\mathcal{F}, (h')^*\mathcal{G}) \\ & = \mathit{Hom}(i^*\mathcal{F}, \mathcal{G}')(T) \end{align*} as desired. The middle equality follows from the adjointness of the functors $i_{T, *}$ and $i_T^*$.