# The Construction of Closed Subscheme

The construction of closed subscheme through which a morphism of schemes factor

Let $(\varphi,\varphi^{\sharp}):(X,\mathcal{O}_X)\to (Y,\mathcal{O}_Y)$ be a morphism of schemes.
Suppose $Y$ is covered by a family of affine open subschemes $\{U_i\}$ with $U_i=\mathrm{Spec} A_i$.

Consider $\varphi^{\sharp}(Y):\mathcal{O}_Y(Y)\to \mathcal{O}_X(X)$ and $\rho_{YU_i}:\mathcal O_Y(Y)\to A_i$. Let $S$
be a nonempty subset of $\ker(\varphi^{\sharp}(Y))$ and $p_i$ be an ideal of $A_i$ generated by $\rho_{YU_i}(S)$.

Given $f\in A_i,g\in A_j$, let $q_f$ be an ideal of $(A_i)_f$ generated by $\rho_{YD(f)}(S)$, and $p_j$ be an ideal of
$A_j$ generated by $\rho_{YU_j}(S)$, and $q_g$ be an ideal of $(A_j)_g$ generated by $\rho_{YD(g)}(S)$. Then we
have the following two commutative diagrames:

$$\begin{array}[c]{ccc} A_i&{\rightarrow}&A_i/p_i\\ \downarrow&&\downarrow\\ (A_i)_f&{\rightarrow}&(A_i)_f/q_f \end{array}$$

$$\begin{array}[c]{ccc} A_j&{\rightarrow}&A_j/p_j\\ \downarrow&&\downarrow\\ (A_j)_g&{\rightarrow}&(A_j)_g/q_g \end{array}$$

We get two closed immersions $\psi_i:\mathrm{Spec}(A_i/p_i)\to \mathrm{Spec}A_i$ and $\psi_j:\mathrm{Spec}(A_j/p_j)\to \mathrm{Spec}A_j$.

Define $\lambda_i:(A_i/p_i)_{f+p_i}\to (A_i)_f/q_f$ as follows：

$\frac{a+p_i}{f^n+p_i}\mapsto \frac{a}{f^n}+q_f.$

If $\frac{a+p_i}{f^n+p_i}=\frac{b+p_i}{f^m+p_i},$

then there exists some $k\in N$ such that $f^k(af^m-bf^n)\in p_i$,

we get $\frac{a}{f^n}+q_f=\frac{b}{f^m}+q_f$, so $\lambda_i$ is defined well.

Obviously $\lambda_i$ is surjective.

If $\frac{a}{f^n}+q_f=0$,then $\frac{a}{f^n}\in q_f, \frac{a}{1}\in q_f$,

we have
$\frac{a}{1}=\frac{x_1}{f^{n_1}}\frac{r_1}{1}+\frac{x_2}{f^{n_2}}\frac{r_2}{1}+\cdots+\frac{x_k}{f^{n_k}}\frac{r_k}{1}$
where $x_t\in A_i,r_t\in \rho_{YU_i}(S),1\le t\le k$.

Multiply both sides by $\frac{f^{n_1+n_2+\cdots+n_k}}{1}$, there exists some $h\in N$ such that $af^h\in p_i$, so
$\frac{a+p_i}{f^n+p_i}=0$, and $\lambda_i$ is injective, therefore it is an isomorphism. In the same way we get that
$\lambda_j:(A_j/p_j)_{g+p_j}\to (A_j)_g/q_g$ is also an isomorphism.

We know that $U_i\cap U_j$ can be covered by a family of affine open subschemes $\{ W_{\alpha} \}$ of $Y$ such that
$W_{\alpha}=D(f_{\alpha})=D(g_{\alpha})$, where $f_{\alpha}\in A_i,g_{\alpha}\in A_j$.

Denote $Z_i=\mathrm{Spec}(A_i/p_i),Z_j=\mathrm{Spec}(A_j/p_j)$.
$\forall c\in W_{\alpha}$, if $\psi_i^{-1}(c)\neq \emptyset$, then $c\in \psi_i(Z_i)$, because $\lambda_i,\lambda_j$
are isomorpisms, we also have $c \in\psi_j(Z_j)$. We get $\chi_i:\psi_i^{-1}(U_i\cap U_j)\simeq \psi_i(Z_i)\cap \psi_j(Z_j),\chi_j: \psi_j^{-1}(U_i\cap U_j)\simeq \psi_i(Z_i)\cap \psi_j(Z_j)$ as homeomorphisms of topological
spaces. Denote $Z_{ij}=\psi_i^{-1}(U_i\cap U_j), Z_{ji}=\psi_j^{-1}(U_i\cap U_j)$, $\xi_{ij}=\chi_j^{-1}\chi_i, \xi_{ji}=\chi_i^{-1}\chi_j$. Because $\lambda_i,\lambda_j$ are isomorpisms, $\xi_{ij}$ and $\xi_{ji}$ are isomorphisms
of schemes，and $\xi_{ij}=\xi_{ji}^{-1}$.

Can we apply the Glueing Lemma to get a closed subscheme $Z$ and a closed immersion $(\mu,\mu^{\sharp}):(Z,\mathcal O_Z)\to (Y,\mathcal O_Y)$? Does there exist a morphism of schemes $(\nu,\nu^{\sharp}):(X,\mathcal O_X)\to (Z,\mathcal O_Z)$ such that $(\varphi,\varphi^{\sharp})=(\mu,\mu^{\sharp})(\nu,\nu^{\sharp})$?