Lemma 37.65.1. Let $Z \to S$ and $X \to S$ be morphisms of affine schemes. Assume $\Gamma (Z, \mathcal{O}_ Z)$ is a finite free $\Gamma (S, \mathcal{O}_ S)$-module. Then $\mathit{Mor}_ S(Z, X)$ is representable by an affine scheme over $S$.

Proof. Write $S = \mathop{\mathrm{Spec}}(R)$. Choose a basis $\{ e_1, \ldots , e_ m\}$ for $\Gamma (Z, \mathcal{O}_ Z)$ over $R$. Choose a presentation

$\Gamma (X, \mathcal{O}_ X) = R[\{ x_ i\} _{i \in I}]/(\{ f_ k\} _{k \in K}).$

We will denote $\overline{x}_ i$ the image of $x_ i$ in this quotient. Write

$P = R[\{ a_{ij}\} _{i \in I, 1 \leq j \leq m}].$

Consider the $R$-algebra map

$\Psi : R[\{ x_ i\} _{i \in I}] \longrightarrow P \otimes _ R \Gamma (Z, \mathcal{O}_ Z), \quad x_ i \longmapsto \sum \nolimits _ j a_{ij} \otimes e_ j.$

Write $\Psi (f_ k) = \sum c_{kj} \otimes e_ j$ with $c_{kj} \in P$. Finally, denote $J \subset P$ the ideal generated by the elements $c_{kj}$, $k \in K$, $1 \leq j \leq m$. We claim that $W = \mathop{\mathrm{Spec}}(P/J)$ represents the functor $\mathit{Mor}_ S(Z, X)$.

First, note that by construction $P/J$ is an $R$-algebra, hence a morphism $W \to S$. Second, by construction the map $\Psi$ factors through $\Gamma (X, \mathcal{O}_ X)$, hence we obtain an $P/J$-algebra homomorphism

$P/J \otimes _ R \Gamma (X, \mathcal{O}_ X) \longrightarrow P/J \otimes _ R \Gamma (Z, \mathcal{O}_ Z)$

which determines a morphism $b_{univ} : W \times _ S Z \to W \times _ S X$. By the Yoneda lemma $b_{univ}$ determines a transformation of functors $W \to \mathit{Mor}_ S(Z, X)$ which we claim is an isomorphism. To show that it is an isomorphism it suffices to show that it induces a bijection of sets $W(T) \to \mathit{Mor}_ S(Z, X)(T)$ over any affine scheme $T$.

Suppose $T = \mathop{\mathrm{Spec}}(R')$ is an affine scheme over $S$ and $b \in \mathit{Mor}_ S(Z, X)(T)$. The structure morphism $T \to S$ defines an $R$-algebra structure on $R'$ and $b$ defines an $R'$-algebra map

$b^\sharp : R' \otimes _ R \Gamma (X, \mathcal{O}_ X) \longrightarrow R' \otimes _ R \Gamma (Z, \mathcal{O}_ Z).$

In particular we can write $b^\sharp (1 \otimes \overline{x}_ i) = \sum \alpha _{ij} \otimes e_ j$ for some $\alpha _{ij} \in R'$. This corresponds to an $R$-algebra map $P \to R'$ determined by the rule $a_{ij} \mapsto \alpha _{ij}$. This map factors through the quotient $P/J$ by the construction of the ideal $J$ to give a map $P/J \to R'$. This in turn corresponds to a morphism $T \to W$ such that $b$ is the pullback of $b_{univ}$. Some details omitted. $\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).