\documentclass{lecture}

\begin{document}

\chapter{Affine varieties}

\section{Spaces with functions}

\begin{definition}[]
    Let $k$ be a field. A \emph{space with functions over $k$} is a pair
    $(X, \mathcal{O}_x)$ where $X$ is a topological space and
    $\mathcal{O}_X$ is a subsheaf of the sheaf of $k$-valued functions, seen as 
    a sheef of $k$-algebras, and satisfying the following condition:

    If $U \subseteq X$ is an open set and $f \in \mathcal{O}_X(U)$, then
    the set
    \[
    D_U(f) \coloneqq \{ x \in U \mid f(x) \neq 0\}
    \] is open in $U$ and the function $\frac{1}{f}\colon D_U(f) \to k$, 
    $x \mapsto \frac{1}{f(x)}$ belongs to $\mathcal{O}_X(D_U(f))$.
\end{definition}

\begin{bem}[]
    Concretely, it means that there is for each open set $U \subseteq X$ a
    $k$-Algebra $\mathcal{O}_X(U)$ of ,,regular`` functions such that
    \begin{enumerate}[(i)]
        \item the restriction of a regular function $f\colon  U \to k$ to
            a sub-open $U' \subseteq U$ is regular on $U'$.
        \item if $f\colon U \to k$ is a function and $(U_{\alpha})_{\alpha \in A}$ is
            an open cover of $U$ such that $f|_{U_{\alpha}}$ is regular on
            $U_{\alpha}$, then $f$ is regular on $U$.
        \item if $f$ is regular on $U$, the set $\{f \neq 0\} $ is open in $U$ and
            $\frac{1}{f}$ is regular wherever it is defined.
    \end{enumerate}
\end{bem}

\begin{bem}[]
    If $\{0\} $ is closed in $k$ and $f\colon U \to k$ is continuous, then
    $D_U(f)$ is open in $U$. So, this conditions is often automatically met in practice.
\end{bem}

\begin{bsp}

\begin{enumerate}[(i)]
    \item $(X, \mathcal{C}_X)$ a topological space endowed with its sheaf of $\R$-valued
        (or $\mathbb{C}$-valued) continuous functions, the fields $\R$ and $\mathbb{C}$
        being endowed here with their classical topology.
    \item $(V, \mathcal{O}_V)$ where
        $V = \mathcal{V}(P_1, \ldots, P_m)$ is an algebraic subset of $k^{n}$
        (endowed with the Zariski topology) and, for all $U \subseteq V$ open,
        \[
        \mathcal{O}_V(U) \coloneqq
        \left\{ f \colon U \to k\ \middle \vert
            \begin{array}{l}
            \forall x \in U \exists x \in U_x \text{ open},
        P, Q \in k[x_1, \ldots, x_n] \text{ such that }\\ \text{for } z \in U \cap U_x,
        Q(z) \neq 0 \text{ and } f(z) = \frac{P(z)}{Q(z)}
            \end{array}
        \right\}
        .\] 
    \item $(M, \mathcal{C}^{\infty}_M)$ where
        $M = \varphi^{-1}(0)$ is a non-singular level set of a $\mathcal{C}^{\infty}$
        map $\varphi\colon \Omega \to \R^{m}$ where
        $\Omega \subseteq \R^{p+m}$ is an open set
        (in the usual topology of $\R^{p+m}$)
        and, for all $U \subseteq M$ open,
        $\mathcal{C}^{\infty}_M(U)$ locally smooth maps.
        %\[
        %\mathcal{C}^{\infty}_M(U)
        %\coloneqq \{ f \colon U \to \R\} 
        %.\] 
\end{enumerate}

\end{bsp}

\begin{aufgabe}[]
    Let $(X, \mathcal{O}_X)$ be a space with functions and let $U \subseteq X$ be
    an open subset. Define, for all $U' \subseteq U$ open,
    \[
    \mathcal{O}_X|_{U}(U') \coloneqq \mathcal{O}_X(U')
    .\] Then $(U, \mathcal{O}_X|_U)$ is a space with functions.
\end{aufgabe}

\begin{bsp}[]

\begin{enumerate}[(i)]
    \item $(V, \mathcal{O}_V)$ an algebraic subset of $k^{n}$,
        $f\colon V \to k$ a polynomial function,
        $U \coloneqq D_V(f)$ is open in $V$ and the sheaf
        of regular functions that we defined on the locally closed subset
        $D_V(f) = D_{k^{n}}(f) \cap V$ coincides with
        the restriction to $D_V(f)$ of the sheaf of regular functions on $V$.
    \item $B \subseteq \R^{n}$ or $\mathbb{C}^{n}$ an open ball
        (with respect to the usual topology), equipped with the sheaf of
        $\mathcal{C}^{\infty}$ or holomorphic functions.
\end{enumerate}
    
\end{bsp}

\section{Morphisms}

\begin{bem}[]
    Note that if $f\colon X \to Y$ is a map and
    $h\colon U \to k$ is a function defined on a subset $U \subseteq Y$, there
    is a pullback map $f_U^{*}$ taking
    $h\colon U \to k$ to the function
    $f_U^{*} \coloneqq h \circ f \colon f^{-1}(U) \to k$. This map is a homomorphism of $k$-algebras.
    Moreover given a map $g\colon Y \to Z$ and a subset $V \subseteq Z$ such that
    $g^{-1}(V) \subseteq U$, we have, for all $h\colon V \to k$,
    \[
    f_U^{*}(g_V^{*}(h)) = f_U^{*}(h \circ g) = (h \circ g) \circ f = h \circ (g \circ f)
    = (g \circ f)_V^{*}(h)
    .\]
\end{bem}

\begin{definition}[]
    Let $(X, \mathcal{O}_X)$ and $(Y, \mathcal{O}_Y)$ be two spaces with functions over a field
    $k$. A \emph{morphism of spaces with functions} between $(X, \mathcal{O}_X)$
    and $(Y, \mathcal{O}_Y)$ is a
    continuous map $f\colon X \to Y$ such that, for all open set $U \subseteq Y$, the
    pullback map $f_U^{*}$ takes a regular function on the open set $U \subseteq Y$ to
    a regular function on the open set $f^{-1}(U) \subseteq X$.
\end{definition}

\begin{bem}[]
    Then, given open sets $U' \subseteq U$ in $Y$, we have compatible homomorphisms of $k$-algebras:

    In other words, we have a morphism of sheaves on $Y$
    $f^{*}\colon \mathcal{O}_Y \to f_{*} \mathcal{O}_X$, where
    by definition $(f_{*}\mathcal{O}_X)(U) = \mathcal{O}_X(f^{-1}(U))$.
\end{bem}

\begin{aufgabe}[]
    Given $g\colon Y \to Z$, show that $(g \circ f)_{*}\mathcal{O}_X
    = g_{*}(f_{*} \mathcal{O}_X)$ and that
    $g_{*}$ is a functor from sheaves on $Y$ to sheaves on $Z$.
\end{aufgabe}

\begin{bem}
    If $f\colon (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
    and $g\colon (Y, \mathcal{O}_Y) \to (Z, \mathcal{O}_Z)$ are morphisms,
    so is the composed map $g \circ f\colon X \to Z$.
\end{bem}

\begin{satz}[]
    Let $(X, \mathcal{O}_X)$ and $(Y, \mathcal{O}_Y)$ be locally closed subsets
    of an affine space $(X \subseteq k^{n}, Y \subseteq K^{m})$ equipped with
    their respective sheaves of regular functions. Then a map $f\colon X \to Y$
    is a morphism of spaces with functions if and only if $f = (f_1, \ldots, f_m)$ with
    each $f_i\colon X \to k$ a regular function on $X$.
\end{satz}

\begin{proof}
    The proof that if each of the $f_i$'s is a regular function, then $f$ is a morphism
    is similar to point (i) of the previous example: it holds because the pullback
    of a regular function (in particular, the pullback of a polynomial) by a regular function
    is a regular function, and because an equation of the form $h(x) = 0$ for $h$ a regular
    function is locally equivalent to a polynomial equation $P(x) = 0$.

    Conversely, if $f\colon X \to Y \subseteq k^{m}$ is a morphism, then the pullback of
    the $i$-th projection $p_i\colon k^{m} \to k$ is a regular function
    on $X$. Since $f^{*}p_i = f_i$, the proposition is proved.
\end{proof}

\begin{bem}[]
    In the proof of the previous proposition, we used that if the
    $(f_i\colon X \to k)_{1 \le i \le m}$ are regular functions on the locally closed
    subset $X \subseteq k^{n}$, then the map
    \begin{salign*}
        f\colon X &\to k^{m} \\
        x &\mapsto (f_1(x), \ldots, f_m(x))
    \end{salign*} is continuous on $X$. This is because
    the pre-image of $f^{-1}(V)$ of an algebraic subset
    $V = V(P_1, \ldots, P_r) \subseteq k^{m}$ is the intersection
    of $X$ with the zero set
    \[
    W = V(P_1 \circ f, \ldots, P_r \circ f) \subseteq k^{n}
    \] which is indeed an algebraic set, because $P_j \circ f$ is a regular function
    so the equation $P_j \circ f = 0$ is equivalent to a polynomial equation.

    Beware, however, that if the $(f_i)_{1 \le i \le m}$ are only continuous maps, then
    $W$ is no longer an algebraic set, so we would need another argument in order to prove
    the continuity of $f$. Typically, in general topology, we
    say that $f\colon X \to k^{m}$ is continuous because its components $(f_1, \ldots, f_m)$ are
    continuous. This argument is valid when the topology used on $k^{m}$ is the
    product topology of the topologies on $k$. However, this does not hold in general
    for the Zariski topology, which is strictly larger than the product topology when $k$ is
    infinite.
\end{bem}

\begin{bsp}

\begin{enumerate}[(i)]
    \item The projection map
        \begin{salign*}
            \mathcal{V}_{k^{2}}(y - x^2) &\to k \\
            (x,y) &\mapsto x
        \end{salign*}
        is a morphism of spaces with functions, because it is a regular function
        on $\mathcal{V}_{k^2}(y - x^2)$. It is actually an isomorphism, whose inverse
        is the morphism
        \begin{salign*}
            k &\to \mathcal{V}(y - x^2) \\
            x &\mapsto (x, x^2)
        .\end{salign*}
        Note that $\mathcal{V}_{k^2}(y-x^2)$ is the graph of the polynomial function
        $x \mapsto x^2$.
    \item Let $k$ be an infinite field. The map
        \begin{salign*}
            k &\to \mathcal{V}_{k^2}(y^2 - x^{3}) \\
            t &\mapsto (t^2, t ^{3})
        \end{salign*}
        is a morphism and a bijection, but it is not an isomorphism, because its inverse
        \begin{salign*}
            \mathcal{V}_{k^2}(y^2 - x^{3}) &\to k \\
            (x, y) &\mapsto \begin{cases}
                \frac{y}{x} & (x,y) \neq (0,0) \\
                0 & (x,y) = (0,0)
            \end{cases}
        \end{salign*}
        is not a regular map (this is where we use that $k$ is infinite).
    \item Consider the groups $G = \mathrm{GL}(n; k)$, $\mathrm{SL}(n; k)$,
        $\mathrm{O}(n ; k)$, $\mathrm{SO}(n;k)$ etc. as locally closed subsets in
        $k^{n^2}$ and equip them with their sheaves of regular functions. Then the multiplication
        $\mu\colon G x G \to G, (g_1, g_2) \mapsto g_1g_2$ and
        and inversion $\iota\colon G \to G, g \mapsto g^{-1}$
        are morphisms (here $G\times G$ is viewed as a locally closed subset of
        $k^{n^2} \times k^{n^2} \simeq k^{2n^2}$, equipped with its Zariski topology), since
        they are given by regular functions in the coefficients of the matrices.

        Such groups will  later be called \emph{affine algebraic groups}.
\end{enumerate}

\end{bsp}

\end{document}
