\documentclass{lecture}

\begin{document}

\begin{lemma}
    The category of affine varieties admits products.
    \label{lemma:aff-var-prod}
\end{lemma}

\begin{proof}
    Let $(X, \mathcal{O}_X)$, $(Y, \mathcal{O}_Y)$ be affine varieties. Choose embeddings
    $X \subseteq k^{n}$ and $Y \subseteq k^{p}$ for some $n$ and $p$. Then
    $X \times Y \subseteq k^{n+p}$ is an affine variety, endowed with two morphisms
    of affine varieties $\text{pr}_1\colon X \times Y \to X$ and
    $\text{pr}_2\colon X \times Y \to Y$. We will prove that
    the triple $(X \times Y, \text{pr}_1, \text{pr}_2)$ satisfies the universal property of
    the product of $X$ and $Y$.

    Let $f_X\colon Z \to X$ and $f_Y\colon Z \to Y$ be morphisms of affine varieties.
    Then define $f = (f_x, f_y)\colon Z \to X \times Y$. This satisfies
    $\text{pr}_1 \circ f = f_X$ and $\text{pr}_2 \circ f = f_Y$.
    If we embed $Z$ into some $k^{m}$,
    the components of $f_X$ and $f_Y$ are regular functions from
    $k^{m}$ to $k^{n}$ and $k^{p}$. Thus the components of
    $f = (f_X, f_Y)$ are regular functions $k^{m} \to k^{n+p}$, i.e. $f$ is a morphism.
\end{proof}

\begin{theorem}
    The category of algebraic pre-varieties admits products.
\end{theorem}

\begin{proof}
    Let $(X, \mathcal{O}_X), (Y, \mathcal{O}_Y)$ algebraic pre-varieties. Let
    \[
    X = \bigcup_{i=1} ^{r} X_i \text{ and } Y = \bigcup_{j=1}^{s} Y_j
    \] be affine open covers. Then, as a set,
    \[
    X \times Y = \bigcup_{i,j} X_i \times Y_j
    .\]
    By \ref{lemma:aff-var-prod}, each
    $X_i \times Y_j$ has a well-defined structure of affine variety. Moreover,
    if $X_i' \subseteq X_i$ and $Y_j' \subseteq Y_j$ are open sets, then
    $X_i' \times Y_j'$ is open in $X_i \times Y_j$.

    So we can use the identity morphism to glue $X_{i_1} \times Y_{j_1}$
    to $X_{i_2} \times Y_{j_2}$ along the common open subset
    $(X_{i_1} \cap X_{i_2}) \times (Y_{j_1} \cap Y_{j_2})$. This defines
    an algebraic prevariety $P$ whose underlying set is $X \times Y$. Also,
    the canonical projections
    $X_i \times Y_j \to X_i$ and $X_i \times X_j \to X_j$
    glue together to give morphisms
    $p_X \colon X \times Y \to X$ and $p_Y \colon X \times Y \to Y$, which
    coincide with $\text{pr}_1$ and $\text{pr}_2$.

    There only remains to prove the universal property. Let $f_x\colon Z \to X$ and
    $f_Y\colon Z \to Y$ be morphisms of algebraic prevarieties and set
    $f = (f_x, f_y)\colon Z \to X \times Y$. In particular,
    $\text{pr}_1 \circ f = f_X$ and $\text{pr}_2 \circ f = f_Y$ as maps between sets.
    To prove that $f$ is a morphisms of algebraic prevarieties, it suffices to show
    that this is locally the case. $Z$ is covered by the open subsets
    $f_X^{-1}(X_i) \cap f_Y^{-1}(Y_j)$, each of which can be covered by affine open subsets
    $(W_{l}^{ij})_{1 \le l \le q(i, j)}$. By construction,
    $f(W_{l}^{ij}) \subseteq X_i \times Y_j$. So, by the universal property of the affine
    variety $X_i \times Y_j$, the map $f|_{W_l^{ij}}$ is a morphism of affine varieties.
\end{proof}

\begin{definition}[algebraic variety]
    Let $(X, \mathcal{O}_X)$ be an algebraic pre-variety and
    $X \times X$ the product in the category of algebraic pre-varieties. If the subset
    \[
    \Delta_X \coloneqq \{ (x, y) \in X \times X  \mid x = y\}
    \]
    is closed in $X \times X$, then $(X, \mathcal{O}_X)$ is said to be an
    \emph{algebraic variety}. A morphism of algebraic varieties $f\colon X \to Y$
    is a morphism of the underlying pre-varieties.
\end{definition}

\begin{bsp}[of a non-seperated algebraic prevariety]
    We glue two copies $X_1, X_2$ of $k$ along the open subsets $k \setminus \{0\} $ using
    the isomorphism of spaces with functions $t \mapsto t$. The resulting
    algebraic prevariety is a ,,line with two origins'', denoted by $0_1$ and $0_2$. For
    this prevariety $X$, the diagonal $\Delta_X$ is not closed in $X \times X$.

    Indeed, if $\Delta_X$ were closed in $X \times X$, then its pre-image in $X_1 \times X_2$
    under the morphism $f\colon X_1 \times X_2 \to X\times X$ defined by
    \[
    \begin{tikzcd}
        X_1 \times X_2 \arrow[dashed]{dr} \arrow[bend right=20, swap]{ddr}{i_2 \circ \text{pr}_2}
        \arrow[bend left=20]{drr}{i_1 \circ \text{pr}_1} & & \\
                                  & X \times X \arrow{r} \arrow{d} & X \\
                                  & X & \\
    \end{tikzcd}
    \] where $i_j\colon X_j \xhookrightarrow{} X$ is the canonical inclusion of $X_j$
    into $X = \left( X_1 \sqcup X_2 \right) / \sim $,
    would be closed in $X_1 \times X_2$. But
    \begin{salign*}
        f^{-1}(\Delta_X) &= \{ (x_1, x_2) \in X_1 \times X_2  \mid i_1(x_1) = i_2(x_2) \} \\
                         &= \{ (x_1, x_2) \in X_1 \times X_2  \mid x_j \neq 0 \text{ and } x_1 = x_2 \text{ in } k\} \\
                         &= \{ (x, x) \in k \times k  \mid x \neq 0\}
                         \subseteq k \times k = X_1 \times X_2
    \end{salign*}
    which is not closed in $X_1 \times X_2$. In fact,
    $f^{-1}(\Delta_X) = \Delta_k \setminus \{ (0, 0) \} \subseteq k \times k$.
\end{bsp}

\begin{korollar}
    Let $(X, \mathcal{O}_X)$, $(Y, \mathcal{O}_Y)$ be algebraic varieties, then
    the product in the category of algebraic pre-varieties is an algebraic variety. In particular
    the category of algebraic varieties admits products.
\end{korollar}

\begin{proof}
    $\Delta_{X \times Y} \simeq \Delta_X \times \Delta_Y \subseteq (X \times X) \times (Y \times Y)$.
\end{proof}

\begin{satz}
    Affine varieties are algebraic varieties.
\end{satz}

\begin{proof}
    Let $X$ be an affine variety. We choose an embedding $X \subseteq k^{n}$. Then
    $\Delta_X = \Delta_{k^{n}} \cap (X \times X)$. But
    \[
    \Delta_{k^{n}} = \{ (x_i, y_i)_{1 \le i \le n} \in k^{2n}  \mid x_i - y_i = 0\}
    \] is closed in $k^{2n}$. Therefore,
    $\Delta_X$ is closed in $X \times X$ (note that the prevariety topology of $X \times X$
    coincides with its induced topology as a subset of $k^{2n}$ by construction
    of the product prevariety $X \times X$).
\end{proof}

\begin{aufgabe}
    \label{exc:closed-subs-of-vars}
    Let $(X, \mathcal{O}_X)$ be an algebraic pre-variety and let $Y \subseteq X$ be
    a closed subset. For all open subsets $U \subseteq Y$, we set
    \[
    \mathcal{O}_Y(U) \coloneqq \left\{ h \colon U \to k  \mid \forall x \in U \exists x \in \hat{U} \subseteq X \text{ open, } g \in \mathcal{O}_X(\hat{U}) \text{ such that } g|_{\hat{U} \cap U} = h|_{\hat{U} \cap U} \right\} 
    .\]
    \begin{enumerate}[(a)]
        \item Show that this defines a sheaf of regular functions on $Y$ and that
            $(Y, \mathcal{O}_Y)$ is an algebraic prevariety.
        \item Show that the canonical inclusion
            $i_Y\colon Y \xhookrightarrow{} X$
            is a morphism of algebraic prevarieties and that if $f\colon Z \to X$ is
            a morphism of algebraic prevarieties such that
            $f(Z) \subseteq Y$, then $f$ induces a morphism $\tilde{f}\colon Y \to Z$ such that
            $i_{Y} \circ \tilde{f} = f$.
        \item Show that, if $X$ is an algebraic variety, then $Y$ is also an algebraic variety.
    \end{enumerate}
\end{aufgabe}

Recall that $k \mathbb{P}^{n}$ is the projectivisation
of the $k$-vector space $k^{n+1}$:
\begin{salign*}
k \mathbb{P}^{n} = P(k^{n+1}) (k^{n+1} \setminus \{0\} ) / k^{\times }
.\end{salign*}

\begin{satz}[Segre embedding]
    The $k$-bilinear map
    \begin{salign*}
        k^{n+1} \times k^{m+1} &\longrightarrow k^{n+1} \otimes_k k^{m+1} \simeq k^{(n+1)(m+1)} \\
        (x,y) &\longmapsto x \otimes y
    \end{salign*}
    induces an isomorphism of algebraic pre-varieties
    \begin{salign*}
        P(k^{n+1}) \times P(k^{m+1}) &\xlongrightarrow{f}
        \zeta \subseteq P\left(k^{(n+1)(m+1)}\right) = k \mathbb{P}^{nm + n + m}\\
        ([x_0 : \ldots : x_n], [y_0 : \ldots : y_m]) &\longmapsto
        [x_0 y_0 : \ldots x_0 y_m : \ldots : x_n y_0 : \ldots : x_n y_m ]
    \end{salign*}
    where $\zeta$ is a Zariski-closed subset of $k \mathbb{P}^{nm + n + m}$.
    \label{prop:segre-embed}
\end{satz}
\begin{proof}
     It is clear that
$f$ is well-defined. Let us denote by $(z_{ij})_{0 \le i \le n, 0 \le j \le m}$ the
homogeneous coordinates on $k \mathbb{P}^{nm + n + m}$, and call them
\emph{Segre coordinates}. Then $f(k \mathbb{P}^{n} \times k \mathbb{P}^{m})$
is contained in the projective variety
\begin{salign*}
    \zeta &= \mathcal{V}\left( \left\{ z_{ij}z_{kl} - z_{kj}z_{il} \mid 0 \le i, k \le n, 0 \le j, l \le m \right\}  \right)  \\
          &\subseteq P\left( k^{(n+1)(m+1)} \right)
\end{salign*}
as can be seen by writing
\begin{salign*}
    f([x], [y]) = \begin{bmatrix} x_0 y_0 : & \ldots & : x_0y_m \\
        \vdots &  & \vdots \\
        x_n y_0 : & \ldots & : x_n y_m

    \end{bmatrix}
\end{salign*}
so that
\[
z_{ij} z_{kl} - z_{kj} z_{il} =
\begin{vmatrix}
    x_i y_j & x_i y_l \\
    x_k y_j & x_k y_l
\end{vmatrix}
= 0
.\] 
The map $f$ is injective because, if $z \coloneqq f([x], [y]) = f([x'], [y'])$ then
there exists $(i, j)$ such that $z \in W_{ij} \coloneqq \{ z \in k \mathbb{P}^{nm + n + m}  \mid z_{ij} \neq 0\} $
so $x_i y_j = x_i'y_j' \neq 0$. In particular
$\frac{x_i}{x_i'} = \frac{y_j'}{y_j} = \lambda \neq 0$. Since
\[
[x_0 y_0 : \ldots : x_n y_m ] = [x_0' y_0' : \ldots : x_n' y_m' ]
\] means that there exists $\mu \neq 0$ such that, for all $(k, l)$,
$x_k y_l = \mu x_k'y_l'$. Taking $k = i$ and $l = j$, we get that $\mu = 1$
and hence, for all $k$, $x_k y_j = x_k' y_j'$, so
$x_k = \frac{y_j'}{y_j} x_k' = \lambda x_k'$. Likewise, for all $l$,
$x_i y_l = x_i' y_l'$, so $y_l = \frac{1}{\lambda} y_l'$. As a consequence
$[x_0 : \ldots : x_n ] = [ x_0' : \ldots : x_n' ]$ and
$[y_0 : \ldots : y_m ] = [y_0' : \ldots : y_m' ]$, thus
proving that $f$ is injective. Note that we have proven that
\[
    f^{-1}(W_{ij}) = U_i \times V_j
\]
where $U_i = \{ [x] \in k \mathbb{P}^{n}  \mid x_i \neq 0\} $
and $V_j = \{ [y] \in k\mathbb{P}^{m}  \mid y_j \neq 0\} $.

For simplicity, let us assume that $i = j = 0$. The open sets $U_0, V_0, W_0$ are affine charts,
in which $f$ is equivalent to
\begin{salign*}
    k^{n} \times k^{m} &\longrightarrow k^{nm + n + m} \\
    (u, v) &\longmapsto (v_1, \ldots, v_m, u_1, u_1v_1, \ldots, u_1v_m, \ldots, u_n, u_n v_1, \ldots, v_n v_m)
\end{salign*}
which is clearly regular. In particular $f \mid U_0 \times V_0$ is a morphism of algebraic
pre-varieties.

$\text{im }f = \zeta$: Let $[z] \in \zeta$. Since the $W_{ij}$ cover
$k \mathbb{P}^{nm + n + m}$, we can assume without loss of generality, $z_{00} \neq 0$. Then
by definition of $\zeta$, $z_{kl} = \frac{z_{k_0} z _{0l}}{z_{00}}$ for all $(k, l)$. If we
set
\begin{salign*}
    ([x_0 : \ldots : x_n ] , [y_0 : \ldots : y_m])
    &= \left( \left[ 1 : \frac{z_{10}}{z_{00}} : \ldots : \frac{z_{n_0}}{z_{00}}\right],
    \left[1 : \frac{z_{01}}{z_{00}} : \ldots : \frac{z_{0m}}{z_{00}}\right]\right)
\end{salign*}
we have a well defined point $([x], [y]) \in U_0 \times V_0 \subseteq k\mathbb{P}^{n} \times k \mathbb{P}^{m}$, which satisfies $f([x], [y]) = [z]$.

Thus $f^{-1}\colon \zeta \to k \mathbb{P}^{n} \times k \mathbb{P}^{m}$ is defined and
a morphism of algebraic pre-varieties because, in affine charts
$W_0 \xlongrightarrow{f^{-1}|_{W_0}} U_0 \times V_0$ as above, it is the regular map
$(u_{ij})_{(i,j)} \mapsto \left( (u_{i_0})_i, (u_{0j})_j \right) $.
\end{proof}

\begin{korollar}
    Projective varieties are algebraic varieties.
\end{korollar}

\begin{proof}
    By \ref{exc:closed-subs-of-vars} it suffices to show that
    $k \mathbb{P}^{n}$ is an algebraic variety. Let
    $f\colon k \mathbb{P}^{n} \times k \mathbb{P}^{n} \to k \mathbb{P}^{n^2 + 2n}$
    be the Segre embedding. For $[x] \in k \mathbb{P}^{n}$:
    \begin{salign*}
        f([x], [x]) &=
        \begin{bmatrix} 
            x_0x_0 : & \ldots &  : x_0 x_m \\
            \vdots & & \vdots \\
            x_n x_0 : & \ldots & : x_n x_m
        \end{bmatrix}
    .\end{salign*}
    Thus $f([x], [x])_{ij} = f([x], [x])_{ji}$. Let now
    $[z] \in \zeta \subseteq k \mathbb{P}^{n^2 + 2n}$, where $\zeta$ is defined
    in the proof of \ref{prop:segre-embed}, and
    such that, in Segre coordinates, $z_{ij} = z_{ji}$. Without loss of generality,
    we can assume $z_{00} = 1$. Set $x_j \coloneqq z_{0j}$ for $1 \le j \le n$. Thus
    for all $(i, j)$
    \begin{salign*}
    f([x], [y])_{ij} = x_i x_j = z_{0i} z_{0j} = z_{i0} z_{0j} = z_{ij} z_{00} = z_{ij}
    ,\end{salign*} i.e.
    \[
    \Delta_{k \mathbb{P}^{n}} \simeq
    \{ [z] \in \zeta  \mid z_{ij} = z_{ji}\}
    \] which is a projective and thus closed set of $k \mathbb{P}^{n} \times k \mathbb{P}^{n}$.
\end{proof}

\end{document}
