\documentclass[a4paper]{article}

\def\npart{II}

\def\ntitle{Algebraic Geometry}
\def\nlecturer{I.\ Grojnowski}

\def\nterm{Lent}
\def\nyear{2019}

\input{header}

\renewcommand{\A}{\mathbb{A}}
\DeclareMathOperator{\ev}{ev}
\DeclareMathOperator{\Cl}{Cl}
\renewcommand*{\P}{\mathbb{P}}
\DeclareMathOperator{\Der}{Der} % derivation
\newcommand{\rational}{\dashrightarrow} % rational map
\DeclareMathOperator{\Div}{Div} % divisor

\begin{document}

\input{titlepage}

\tableofcontents

\setcounter{section}{-1}

\section{Introduction}

Algebraic geometry is the study of polynomial equations.

\begin{eg}
  \(E = \{(x, y) \in \C^2: y^2 = x^3 - x\}\). Sketch this.

  Consider \(p: E \to \C, (x, y) \mapsto x\). For each \(x \notin \{0, \pm 1\}\), there are 2 points in \(p^{-1}(x)\). So this is a double cover ramified at \(0, \pm 1\), the precise meaning of these phrases will be defined later. How does this help us sketch? For \(x\) away from the three points, the preimage of a disk under \(p\) are two copies of the disk. If \(x\) is near \(0\), we have \(x^3 - x \approx -x\) so locally it looks like \(y^2 = -x\). If we project \((x, y)\) to \(x\) we get a disk winding around twice. But if we project to \(y\) we get a bijection.

  Still, how do we visualise \(E\)? First let's sketch it over \(\R\). If \((x, y) \in \R^2\) then \(y^2 \geq 0\) so \(x(x^2 - 1) \cdot 0\). Thus \(x \geq 1\) or \(-1 \leq x \leq 0\). Just like in high school, we can differentiate. (graph) The infinite bit should be visualised as a circle minus a point.

  Now let \((x, y) \in \C^2\). Let
  \[
    \Gamma = \{(x, y) \in E: y \in \R, x \in [-1, 0] \cup [1, \infty)\} = p^{-1}\{[-1, 1] \cup [1, \infty)\}.
  \]
  Claim \(E \setminus \Gamma\) is disconnected and it consists of two pieces, each isomorphic via \(p\) to \(\C \subseteq ([-1, 0] \cup [1, \infty))\). This is equivalent to the claim that if \(x \in \C \subseteq ([-1, 0] \cup [1, \infty))\) then can choose a square root of \(x^3 - x\), and then as you wander around, this remains a single-valued functions. The proof is left as an exercise.

  Granting this, we have two copies of \(\C \subseteq ([-1, 0] \cup [1, \infty))\). Turn one of them around and glue (graph).

  More surprisingly, solutions of equaitons have a topology!
\end{eg}

\section{The dictionary between algebra and geometry}

\subsection{Basic notions}

\begin{definition}[\(k\)-algebra]\index{\(k\)-algebra}
  Let \(k\) be a field. A \emph{(commutative) \(k\)-algebra} is a unital commutative ring countaining \(k\) as a subring.
\end{definition}

\begin{eg}
  \(k[x_1, \dots, x_n]\), the polynomial ring in \(n\)-variables.
\end{eg}

\begin{notation}
  If \(k\) is a fields, write \(\A^n = \A^n(k) = k^n\), the \emph{affine \(n\)-space}\index{affine space}.
\end{notation}

Observe that every \(f \in k[x_1, \dots, x_n]\) defines a function
\begin{align*}
  \A^n(k) &\to \A^1(k) \\
  (p_1, \dots, p_n) &\mapsto f(p_1, \dots, p_n) = \ev_p(f)
\end{align*}

This defines a map from \(k[x_1, \dots, x_n]\) to the space of all functions \(\A^n \to \A^1\). If \(k\) is finite then it is surjective but not injective, and if \(k\) is infinite then it is not surjective.

More generally, if \(L \supseteq k\) is an algebraic extension then one can define a function \(\A^n(L) \to \A^1(L)\) by evaluating \(f\) at a point in \(L^n\). Therefore \(f\) defines a function \(\A^n(\cl k) \to \A^1(\cl k)\) where \(\cl k\) is the algebraic closure of \(k\). So now the map \(k[x_1, \dots, x_n] \to \{\A^n(\cl k) \to \A^1(\cl k)\}\) is injective for all \(k\) but never surjective.

The conclusion is that we should think of \(k[x_1, \dots, x_n]\) as very special functions \(\cl k^n \to \cl k\), namely ``polynomial with \(k\)-coefficients''. As a concrete example, let \(k = \F_q\). Then \(x^q - x\) defines a function \(\cl k \to \cl k\) that is \emph{not} zero.

\begin{definition}[algebraic set]
  Let \(S \subseteq k[x_1, \dots, x_n]\). Define
  \[
    Z(S) = \{p \in \A^p: f(p) = 0 \text{ for all } f \in S\} \subseteq \A^n
  \]
  which are the simultaneous zeros of equations in \(S\). Such a subset is known as \emph{algebraic set}, \emph{Zariski closed subset of \(\A^n\)}.
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(\A^n = Z(0)\).
  \item \(Z(x) = \{0\}\). Similarly \(Z(x - 7) = \{7\}\).
  \item If \(f(x) = (x - \lambda_1) \dots (x - \lambda_n)\) then \(Z(f) = \{\lambda_1, \dots, \lambda_n\}\).
  \item if \(k = \cl k\) then algebraic subsets of \(\A^1\) are \(\emptyset, \A^1\) or finite set of points of \(k\).
  \item In \(\A^2\), \(Z(y^2 - x^3 + x) = E\) which we sketched in introduction.
  \item In \(\A^2\), \(Z(x, y) = \{(0, 0)\}\), \(Z(xy)\) is the union of two axes. \(Z(y)\) is the \(x\)-axis and \(Z(y(y - 1), x(y - 1))\) is the union of a point and a line.
  \end{enumerate}
\end{eg}

If \(J\) is the ideal generated by \(S\), i.e.
\[
  J = \left\{\sum a_i f_i: a_i \in k[x_1, \dots, x_n], f_i \in S\right\}
\]
then \(Z(J) = Z(S)\).

Recall from IB Groups, Rings and Modules

\begin{theorem}[Hilbert basis theorem]
  If \(k\) is Noetherian then so is \(k[x]\).
\end{theorem}

So every ideal in \(k[x_1, \dots, x_n]\) is finitely generated. Therefore there exist \(f_1, \dots, f_r \in k[x_1, \dots, x_n]\) such that
\[
  Z(S) = Z(f_1, \dots, f_r).
\]
Thus algebraic sets are solutions of finitely many polynomial equations.

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item If \(I \subseteq J\) then \(Z(J) \subseteq Z(I)\).
  \item \(Z(0) = \A^n\) and \(Z(k[x_1, \dots, x_n]) = \emptyset\).
  \item \(Z(\bigcup J_i) = Z(\sum J_i) = \bigcap Z(J_i)\) for any (possibly infinite) family of ideals \(\{J_i\}\).
  \item \(Z(I \cap J) = Z(I) \cup Z(J)\) for ideals \(I, J\).
  \end{enumerate}
\end{lemma}

\begin{proof}
  1, 2, 3 are clear. For 4, \(\supseteq\) follows from 1. For \(\subseteq\), if \(x \notin Z(I)\) then exists \(f_1 \in I\) with \(f_1(x) \neq 0\) and if \(x \notin Z(J)\) then exists \(f_2 \in J\) with \(f_2(x) \neq 0\). Thus \(f_1f_2(x) = f_1(x)f_2(x) \neq 0\) so \(x \notin Z(f_1f_2)\). But \(f_1f_2 \in I \cap J\) as \(I\) and \(J\) are ideals. Thus \(x \notin Z(I \cap J)\).
\end{proof}

We can define a map goes the other direction. If \(Z \subseteq \A^n(\cl k)\) is a subset, define
\[
  I(Z) = \{f \in k[x_1, \dots, x_n]: f(p) = 0 \text{ for all } p \in Z\}.
\]

If \(f \in I(Z), g \in k[x_1, \dots, x_n]\), \(fg(p) = f(p)g(p) = 0\) if \(p \in Z\) so \(I(Z)\) is an ideal.

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item If \(Z \subseteq Z'\) then \(I(Z') \subseteq I(Z)\).
  \item For any \(Y \subseteq \A^n\), \(Y \subseteq Z(I(Y))\).
  \item If \(V = Z(J)\) is an algebraic subset then \(V = Z(I(V))\).
  \item If \(J \subseteq k[x_1, \dots, x_n]\) is an ideal then \(J \subseteq I(Z(J))\).
  \end{enumerate}
\end{lemma}

\begin{proof}
  1, 2 and 4 are immediate. For 3, \(\supseteq\) follows from \(I(V) = I(Z(J) \supseteq J\) by 4 so \(Z(I(V)) \subseteq Z(J) = V\) by 1. \(\subseteq\) follows from 2.
\end{proof}

The first lemma says that algebraic subsets of \(\A^n\) form the closed sets of a topology on \(\A^n\). This is called the \emph{Zariski topology}\index{Zariski topology}.

\begin{eg}
  If \(X = \A^1(k)\) where \(k = \cl k\), the closed subsets are finite subsets of points of \(\A^1\).

  Note that if \(k = \C\), if \(Z \subseteq \A^n(k)\) is Zariski closed then it is closed in the usual sense.
\end{eg}

The second lemma says that \(Z(I(Y))\) is the smallest algebraic subset of \(\A^n\) containing \(Y\), i.e.\ the closure of \(Y\) in the Zariski topology.

\begin{eg}
  If \(k = \C\) and \(\Z \subseteq \C\) then \(Z(I(\Z)) = \C\) as if a polynomial vanishes at \(\Z\) then it must be zero.
\end{eg}

We have a correspondence
\[
  \begin{tikzcd}
    \{\text{algebraic subsets of } \A^n\} \ar[r, "I", shift left] & \{\text{ideals in } k[x_1, \dots, x_n]\} \ar[l, "Z", shift left]
  \end{tikzcd}
\]
Note that this is not quite a bijection. For example in \(k[x]\),
\[
  Z(x) = Z(x^2) = Z(x^3) = \cdots
\]
and more generally
\[
  Z(f_1^{q_1} \cdots f_r^{g_r}) = Z(f_1 \cdots f_r)
\]
where \(q_i > 0\). We will fix this shortly.

\subsection{Hilbert's Nullstellensatz}

Let \(Y \subseteq \A^n\) be an algebraic subset so \(Y = Z(I(Y))\). Recall that we have a map \(k[x_1, \dots, x_n] \to \{\cl k^n \to \cl k\}\). Hence by restriction we have a map \(k[x_1, \dots, x_n] \to \{Y \to \cl k\}\) as \(Y \subseteq \cl k^n\). By definition \(I(Y) \mapsto 0\). This motivates us to make the following definition:

\begin{definition}
  Let \(Y \subseteq \A^n\) be an algebraic set. Then
  \[
    k[Y] = k[x_1, \dots, x_n]/I(Y).
  \]
\end{definition}

We've just seen \(k[Y] \embed \{Y \to \cl k\}\) so \(k[Y]\) is a special class of functions on \(Y\), namely ``polynomial functions on \(Y\) with \(k\)-coefficients''.

\begin{eg}\leavevmode
  \begin{itemize}
  \item \(k[\A^n] = k[x_1, \dots, x_n]\).
  \item \(k[E] = k[x, y]/(y^2 - x^3 + x)\).
  \end{itemize}
\end{eg}

Clearly \(k[Y]\) is a \(k\)-algebra. Our aim is to recover \(Y\) completely from this \(k\)-algebra.

Observe that if \(p \in Y \subseteq \A^n(k)\) then the map
\begin{align*}
  k[Y] &\to k \\
  f &\mapsto f(p)
\end{align*}
is an algebra homomorphism. It is surjective and its kernel, denoted
\[
  \mathfrak m_p = \{f \in k[Y]: f(p) = 0\},
\]
is a maximal ideal, as \(k[Y]/\mathfrak m_p\) is a field. So
\[
  \{\text{points in } Y\} \embed \{\text{algebra homomorphism } k[Y] \to \cl k\} \embed \{\text{max ideals } \mathfrak m \subseteq k[Y]\}.
\]
It is remarkable that if \(k = \cl k\) then all of these coincides (it is particularly so for the first inclusion, as it gives a translation between geometry and algebra. By contrast, the second inclusion is more or less a corollary of a standard result in algebra).

What are the maximal ideals of \(k[x_1, \dots, x_n]\)? We've observed if \(p \in k^n\) then \(\{f \in k[x_1, \dots, x_n]: f(p) = 0\}\) is a maximal ideal.

Not all maximal ideals are of the form \(\mathfrak m_p\), however. For example if \(k = \R\) then \((x^2 + 1) \subseteq \R[x]\) is a maximal ideal as \(\R[x]/(x^2 + 1) \cong \C\). Nevertheless, notice that \(\R \subseteq \C\) and this is an extension of \(\R\).

\begin{theorem}[Nullstellensatz]\index{Nullstellensatz}\leavevmode
  \label{thm:Nullstellensatz}
  If \(\mathfrak m \subseteq k[x_1, \dots, x_n]\) is a maximal ideal then \(k[x_1, \dots, x_n]/\mathfrak m = L\) is an algebraic field extension of \(k\), and finite-dimensional over \(k\).
\end{theorem}

Note that in this setting \(L\) is finite-dimensional over \(k\) if and only if every \(\alpha \in L\) is algebraic over \(k\). For the nontrivial direction, images of \(x_1, \dots, x_n\) in \(L\) generate \(L\) and each satisfies a polynomial equation of degree \(d_i\) so \(\dim_k L \leq d_1 \cdots d_n\).

\begin{corollary}
  If \(k = \cl k\) then the field embedding \(k \to L\) is an isomorphism, that is every maximal ideal of \(k[x_1, \dots, x_n]\) is of the form
  \[
    \mathfrak m_p = (x_1 - p_1, \dots, x_n - p_n)
  \]
  for \(p \in k^n\).
\end{corollary}

\begin{proof}
  \(L \supseteq k\) is an algebraic extension of fields so \(L = k\) as \(k = \cl k\) and \(p_i\) is the image of \(x_i\) under the map \(k[x_1, \dots, x_n] \to k[x_1, \dots, x_n]/\mathfrak m_p = L\).
\end{proof}

\begin{corollary}
  Suppose \(k = \cl k\). If \(Y \subseteq \A^n\) is an algebraic set then we have bijections
  \[
    \begin{array}{ccccc}
      \{\text{points in } Y\} & \to & \{\text{algebra homomorphisms } k[Y] \to k\} & \to & \{\text{maximal ideals of } k[Y]\} \\
      \\
      p & \mapsto & \ev_p:f \mapsto f(p) \\
                              & & \varphi & \mapsto & \ker \varphi \\
      \\
      \varphi(p) & \mapsfrom & \varphi \\
      & & k[Y] \to k = k[Y]/\mathfrak m & \mapsfrom & \mathfrak m
    \end{array}
  \]
\end{corollary}

\begin{proof}
  When \(Y = \A^n\) this is Nullstellensatz. In general, an algebra homomorphism \(\varphi: k[x_1, \dots, x_n]/I \to k\) is the same thing as an algebra homomorphism \(k[x_1, \dots, x_n] \to k\) with \(I\) in its kernel.
\end{proof}

We will give a better proof later when we are more adept at playing with polynomial equations, but for now we'll prove a special case.

\begin{proof}[Proof of \nameref{thm:Nullstellensatz} when \(k\) is uncountable]
  Suppose \(L\) is not algebraic. Then there exists \(t \in L\) which is not algebraic over \(k\) so \(k(t) \subseteq L\). But observe the following:
  \begin{enumerate}
  \item \(L\) has countable dimension as a vector space over \(k\).
  \item The set
    \[
      \left\{ \frac{1}{t - \lambda}: \lambda \in k\right\} \subseteq L
    \]
    is linearly independent: suppose not then exist \(\lambda_1, \dots, \lambda_r, a_1, \dots, a_r \in k\) with
    \[
      \sum_{i = 1}^r \frac{a_i}{t - \lambda_i} = 0.
    \]
    Clear the denominators, we get an algebraic identity that \(t\) satisfies, contradicting \(t\) transcendental.
  \end{enumerate}
  This implies that \(\{\lambda: \lambda \in k\}\) is countable. Absurd.
\end{proof}

% aside on logic and model theory

\begin{corollary}[Nullstellensatz]
  Let \(k = \cl k\), \(I \subseteq k[x_1, \dots, x_n]\) an ideal. Then \(Z(I) \neq \emptyset\) if \(I \neq k[x_1, \dots, x_n]\).

  More generally, let \(k = \cl k\), \(I \subseteq k[Y]\) has \(Z(I) \neq \emptyset\) if \(I \neq k[Y]\).
\end{corollary}

\begin{proof}
  If \(I \neq k[x_1, \dots, x_n]\) then \(I \subseteq \mathfrak m\) for some maximal ideal \(\mathfrak m\). But Nullstellensatz says that \(Z(\mathfrak m) = \{p\}\) for some \(p \in k^n\) as \(\mathfrak m = \mathfrak m_p\) for some \(p\). Thus
  \[
    Z(I) \supseteq Z(\mathfrak m) = \{p\} \neq 0.
  \]
\end{proof}

This motivates us to give an abstract, algebraic definition of algebraic set.

\begin{definition}[radical]\index{radical}
  Let \(R\) be a ring and \(J \subseteq R\) an ideal. The \emph{radical} of \(J\) is
  \[
    \sqrt J = \{f \in R: f^n \in J \text{ for some } n \geq 1\}.
  \]
\end{definition}

\begin{lemma}
  Given an ideal \(J \subseteq R\), \(\sqrt J\) is an ideal.
\end{lemma}

\begin{proof}
  If \(f, g \in \sqrt J\) then \(f^n \in J, g^m \in J\) for some \(n, m\). Then
  \[
    (f + g)^{n + m} = \sum_{i = 0}^{n + m} \binom{n + m}{c} f^i g^{n + m - i} \in J
  \]
  so \(fg \in \sqrt J\).

  If \(r \in R, f \in \sqrt J\) then \(rf \in \sqrt J\).
\end{proof}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(\sqrt{(x^n)} = (x)\) in \(k[x]\).
  \item If \(J\) is a prime ideal then \(\sqrt J = J\).
  \item If \(f \in k[x_1, \dots, x_n]\) is irreducible then \((f)\) is a prime ideal. As \(k[x_1, \dots, x_n]\) is a UFD, \(\sqrt{(f)} = (f)\).
  \end{enumerate}
\end{eg}

Note that \(Z(J) = Z(\sqrt J)\).

\begin{theorem}[Nullstellensatz]
  If \(k = \cl k\), \(J \subseteq k[x_1, \dots, x_n]\) then \(I(Z(J)) = \sqrt J\).
\end{theorem}

\begin{proof}
  Let \(f \in I(Z(J))\) so \(f(p) = 0\) for all \(p \in Z(J)\). We must show that \(f^n \in J\) for some \(n > 0\). Consider \(k[x_1, \dots, x_n, t]/(tf - 1) = k[x_1, \dots, x_n, \frac{1}{f}]\). Let \(I\) be the ideal in this ring generated by the image of \(J\). Claim that \(Z(I) = \emptyset\): if not, let \(p \in Z(I)\). As \(J \subseteq I\), \(p \in Z(J)\) so \(f(p) = 0\). But \(p = (p_1, \dots, p_n, p_t)\) with \(p_t f(p_1, \dots, p_n) = 1\), i.e.\ \(f(p) \neq 0\). Absurd.

  Then the corollary to the Nullstellensatz implies that \(I = k[x_1, \dots, x_n, \frac{1}{f}]\) (we used the fact \(k = \cl k\)). As \(1 \in I = (J)\),
  \[
    \sum_{i = 1}^N \frac{\gamma_i}{f^i} = 1
  \]
  for some \(\gamma_i \in J\) for some \(N \geq 1\). Multiply by \(f^N\), get
  \[
    f^N = \sum_{i = 1}^N \gamma_i f^{N -i} \in J.
  \]
\end{proof}

\begin{remark}
  Let's try to deconstruct this mysterious proof. What are the points of \(k[x_1, \dots, x_n, t]/(tf - 1) = k[Y]\)? Here
  \[
    Y = \{(p_1, \dots, p_n, p_t) \in \A^{n + 1}: p_t f(p_1, \dots, p_n) = 1\}
  \]
  which is isomorphic as a set to
  \[
    \{(p_1, \dots, p_n) \in \A^n: f(p) \neq 0\} = \A^n \setminus Z(f).
  \]
  So \(Y\) is a Zariski closed subset of \(\A^{n + 1}\) which is isomorphic as a set to \(\A^n \setminus Z(f)\), and our proof was asking in what does
  \[
    Z(f) \cap (\A^n \setminus Z(f)) = \emptyset
  \]
  mean in terms of the ideal \(J\).
\end{remark}

\begin{corollary}
  Suppose \(k = \cl k, I, J \subseteq k[x_1, \dots, x_n]\). Then \(Z(I) = Z(J)\) if and only if \(I(Z(I)) = I(Z(J))\) if and only if \(\sqrt I = \sqrt J\). That is we have a bijection between
  \[
    \begin{tikzcd}
      \{\text{Zariski closed subsets of } \A^n\} \ar[r, "I", shift left] & \{\text{radical ideal } I \subseteq k[x_1, \dots, x_n]\} \ar[l, "Z", shift left] \\
      p & \mathfrak m_p
    \end{tikzcd}
  \]
\end{corollary}

This is a hint that we may have an intrinsic characterisation of rings \(k[Y]\). We'll do this shortly.

\begin{definition}[(ir)reducible, disconnected]\index{reducible}\index{irreducible}\index{disconnected}
  An algebraic subset \(Y\) is \emph{reducible} if there exist algebraic subsets \(Y_1, Y_2 \neq Y\) such that \(Y_1 \cup Y_2\). It is \emph{irreducible} if is not reducible. It is \emph{disconnected if \(Y_1 \cap Y_2 = \emptyset\)}.
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(Z(xy) = Z(x) \cup Z(y)\) is reducible.
  \item \(Z(y(y - 1), x(y - 1)) = Z(x, y) \cup Z(y - 1)\) is reducible and disconnected.
  \end{enumerate}
\end{eg}

In other words, \(Y\) is reducible/disconnected in Zariski topology. In usual topology, such as the usual one \(\R\), almost every set is reducible. However, in Zariski topology there are so few closed sets that this is actually a useful definition. In fact, they have a very nice algebraic characterisation:

\begin{lemma}
  \(Y\) is irreducible if and only if \(I(Y)\) is a prime ideal in \(k[x_1, \dots, x_n]\).
\end{lemma}

\begin{proof}
  If \(Y = Y_1 \cup Y_2\) is reducible then exists \(p \in Y_1 \setminus Y_2\) so exists \(f \in I(Y_2)\) with \(f(p) \neq 0\). Similarly exists \(q \in Y_2 \setminus Y_1\) so exists \(g \in I(Y_1)\) with \(g(q) \neq 0\). So
  \[
    fg \in I(Y_1) \cap I(Y_1) = I(Y).
  \]
  But \(f, g \notin I(Y)\) so \(I(Y)\) is not prime.

  Conversely if \(I(Y)\) is not prime then exists \(f_1, \dots, f_2 \in k[x_1, \dots, x_n]\) with \(f_1, f_2 \notin I(Y)\) but \(f_1f_2 \in I(Y)\). Set \(Y_i = Y \cap Z(f_i)\). Then \(Y_1 \cup Y_2 = Y\) as for \(p \in Y\), \(f_1f_2(p) = 0\) so \(f_1(p) = 0\) or \(f_2(p) = 0\) and \(Y_i \neq Y\) as \(f_2 \notin I(Y)\).
\end{proof}

\begin{eg}
  \(I = (x_1, \dots, x_m) \subseteq k[x_1, \dots, x_m]\) is prime, as
  \[
    k[x_1, \dots, x_n]/(x_1, \dots, x_m) = k[x_{m + 1}, \dots, x_n]
  \]
  is an integral domain.
\end{eg}

\begin{ex}
  Recall that if \(R\) is a UFD, \(f \in R\) nonzero then if \(f\) is irreducible then \((f)\) is a prime ideal. Furthermore as \(k[x_1, \dots, x_n]\) is a UFD, it is an exercise to check that \(Z(y -x^2), Z(y^2 - x^3 + x)\) are irreducible.
\end{ex}

Zariski topology is very different from usual topology: if \(X\) is an irreducible Zariski closed subset and \(U \subseteq X\) is a nonempty Zarisk open subset in \(X\) then \(\cl U = X\), i.e.\ nonempty Zariski open subsets are dense.

\begin{proof}
  Let \(Y = X \setminus U\) which is closed. Then \(\cl U \cup Y = X\) and \(U \neq \emptyset\) so \(Y \neq X\). But \(X\) is irreducible so \(\cl U = X\).
\end{proof}

\begin{application}[Cayley-Hamilton]
  Let \(A \in \text{Mat}_n(k)\), an \(n \times n\) matrix. Define its characteristic polynomial to be
  \[
    \chi_A(x) = \det(xI - A) \in k[x]
  \]
  This defines a map
  \begin{align*}
    \text{Mat}_n(k) &\to \text{Mat}_n(k) \\
    B &\mapsto \chi_A(B)
  \end{align*}
  Then for all \(A\), \(\chi_A(A) = 0\).

\begin{proof}
  Strategy:
  \begin{enumerate}
  \item The set of matrices for which Cayley-Hamilton holds is a Zariski closed subset of \(\A^{n^2}\).
  \item It holds for diagonalisable matrices, which is a Zariski open subset of \(\A^{n^2}\).
  \item Hence as \(\A^{n^2}\) is an irreducible algebraic set, it holds for all matrices.
  \end{enumerate}

  Let \(X = \text{Mat}_n(k) = k^{n^2} = \A^{n^2}\) be the space of matrix coefficients. It is an affine space so irreducible closed. Consider
  \[
    C = \{A \in \text{Mat}_n(k): \chi_A(A) = 0\}.
  \]
  Claim that this is a Zariski closed subset, cut out by \(n^2\) equations of the form \(\chi_A(A)_{ij} = 0\). We must check these equations are polynomial equations in the matrix coefficients of \(A\). Note that
  \[
    \chi_A(x) \in k[X \times \A^1] = k[\A^{n^2 + 1}],
  \]
  i.e.\ \(\det (xI - A)\) is a polynomial equation in \(n^2 + 1\) variables: matrix coefficients of \(A\) and \(x\). Now substitute \(x = A\). Note that matrix coefficients of \(A^r\), \((A^r)_{ij}\), are polynomials in the matrix coefficients of \(A\) (of degree \(r\)). Hence \(\chi_A(A)_{ij}\) are polynomial equations in coefficients of \(A\).

  As \(\text{Mat}_n(k) \subseteq \text{Mat}_n(\cl k)\), suffices to prove the case \(k = \cl k\). Note that
  \begin{align*}
    \chi_A(x) &= \chi_{gAg^{-1}}(x) \\
    \chi_A(gBg^{-1}) &= g \chi_A(B) g^{-1}
  \end{align*}
  for all \(g \in \GL_n(k)\). so \(\chi_A(A) = 0\) if and only if \(\chi_{gAg^{-1}} (gAg^{-1}) = 0\), so \(A\) satisfies its only characteristic polynomial if and only if \(gAg^{-1}\) does for all \(g \in \GL_n(k)\).

  Now let \(U\) be the set of all matrices with distinct eigenvalues. As \(k = \cl k\), \(A \in U\) implies that there exists \(g \in \GL_n(k)\) such that \(gAg^{-1}\) is
  \[
    \begin{pmatrix}
      \lambda_1 \\
      & \lambda_2 \\
      & & \ddots \\
      & & & \lambda_n
    \end{pmatrix}
  \]
  which clearly satisfies its own characteristic polynomial. Moreover \(U \neq \emptyset\) since we can always find distinct elements \(\lambda_1, \dots, \lambda_n\) of \(k\) as \(k = \cl k\).

  Left to show \(U\) is Zariski open. \(A \in U\) if and only \(\chi_A(x) \in k[x]\) has distinct roots. But a polynomial \(f\) has distinct roots if and only if \(f\) and \(f'\) have no common root, if and only if \(\Delta(f) \neq 0\), where the discriminant \(\Delta(f)\) is a polynomial in the coefficients of \(f\). Hence \(A \in U\) if and only if \(\Delta(\chi_A(x)) \neq 0\), so \(U\) is Zariski open.
\end{proof}
\end{application}

Now back to the abstract characterisation of algebraic varieties. We need some preliminary definitions:

\begin{definition}[nilpotent]\index{nilpotent}
  Let \(R\) be a ring. \(y \in R\) is \emph{nilpotent} if exists \(n > 0\) such that \(y^n = 0\).
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item If \(R = k[x]\) then \(0\) is the only nilpotent.
  \item If \(R = k[x]/(x^7)\) then \(x\) is nilpotent as \(x^7 = 0\).
  \end{enumerate}
\end{eg}

\begin{ex}
  Let \(J \subseteq k[x_1, \dots, x_n]\) be an ideal and \(R = k[x_1, \dots, x_n]/J\). Then \(J = \sqrt J\) if and only if \(R\) has no nonzero nilpotents.
\end{ex}

\begin{corollary}
  Let \(k = \cl k\). If \(Y \subseteq \A^n\) is a Zariski closed subset then \(k[Y]\) is a finitely generated \(k\)-algebra with no nonzero nilpotents.
\end{corollary}

Conversely, given a finitely generated reduced \(k\)-algebra \(A\), there exists a surjection \(k[t_1, \dots, t_n] \to A\). As \(A\) is reduced, the kernel is radical. This is precisely the definition of a coordinate ring.

What do we gain from this? We need not choose a generator set of the \(k\)-algebra, which is the same as an embedding \(Y \embed \A^n\). In this abstract formulation, the ``points'' in the affine space corresponds to maximal ideals of the \(k\)-algebra.

\begin{definition}[affine algebraic variety]\index{affine algebraic variety}\index{point}
  An \emph{affine algebraic variety} over \(k\), where \(k\) is a field, is a finitely generated \(k\)-algebra \(R\) with no nonzero nilpotent elements.

  If \(k = \cl k\), define a \emph{point} of \(R\) to be a \(k\)-algebra homomorphism \(R \to k\). More generally if \(L \supseteq k\) is a field extension then an \emph{\(L\)-point of \(R\)} is a \(k\)-algebra homomorphism \(R \to L\).
\end{definition}

\begin{eg}
  Let \(J = \sqrt J \subseteq k[x_1, \dots, x_n]\) be a radical ideal and \(R = k[x_1, \dots, x_n]/J\) be an affine algebraic variety.

  Coversely, if \(R\) is such an algebra, choose generators \(\overline x_1, \dots, \overline x_n\) of \(R\) as a \(k\)-algebra so get a surjective map \(k[x_1, \dots, x_n] \to R\) where \(x_i \mapsto \overline x_i\). Let \(J\) be the kernel and \(J = \sqrt J\) per the exercise above.

  By Nullstellensatz, points of \(R\) is \(Z(J) \subseteq k^n\) given by
  \begin{align*}
    Z(J) &\to \{R \to k\} \\
    p = (p_1, \dots, p_n) &\mapsto (\ev_p: \overline x_i \mapsto p_i)
  \end{align*}
  In general, choice of generators \(\overline x_1, \dots, \overline x_n\) of \(R\) is the \emph{choice} of an embedding of points of \(R\) to \(\A^n\).
\end{eg}

\begin{eg}
  \(\R[x]/(x^2 + 1)\) has no \(\R\)-point, but it has two \(\C\)-points, given by \(x \mapsto \pm i\).
\end{eg}

We indulge in imprecision and often write ``let \(Y\) be an affine algebraic variety and \(R = k[Y]\) be its ring of functions''. What we really mean, when spelt out, is: let \(R\) be an affine algebraic variety with \(\cl k\)-points \(Y\).

\begin{definition}[morphism]\index{morphism}\index{isomorphism}
  A \emph{morphism} \(\gamma: X \to Y\) of affine algebraic varieties is a \(k\)-algebra homomorphism \(\gamma^*: k[Y] \to k[X]\).

  An \emph{isomorphism} \(\alpha: X \to Y\) is a morphism such that there exists an inverse morphism \(\beta: Y \to X\) such that \(\alpha\beta = 1_Y, \beta\alpha = 1_X\).
\end{definition}

Let's unpack the definition. Suppose \(X\) and \(Y\) are the points of \(R\) and \(S\) respectively. If \(\gamma^*: S \to R\) is a \(k\)-algebra homomorphism and \(p \in X\) is a point of \(X\), that is, if \(\ev_p: R \to \cl k\) is a \(k\)-algebra homomorphism, then \(\ev_p \compose \gamma^*: S \to \cl k\) is a \(k\)-algebra homomorphism, so a point in \(Y\). Thus \(\gamma^*\) defines a map \(X \to Y\), which we denote by \(\gamma\).

So this definition is a clever way of saying the map \(\gamma\) is defined by polynomial equations.

\begin{eg}\leavevmode
  \begin{enumerate}
  \item Let \(X = \A^1, Y = \{(x, y) \in \A^2: x^2 = y^3\} = Z(x^2 - y^3)\). Let \(R = k[t]\). Claim \(t \mapsto (t^3, t^2)\) is a morphism \(X \to Y\). Unpack the definition, we have \(k[Y] = k[x, y]/(x^2 - y^3)\) and a \(k\)-algebra homomorphism
    \begin{align*}
      \gamma^*: k[x, y]/(x^2 - y^3) &\to k[t] \\
      x &\mapsto t^3 \\
      y &\mapsto t^2
    \end{align*}
    Check that \(x^2 - y^3 \mapsto 0\) so it is well-defined.
  \end{enumerate}
\end{eg}

Unravel the definition of a morphism in general, let \(k[X] = k[x_1, \dots, x_n]/(s_1, \dots, s_\ell)\), \(k[Y] = k[y_1, \dots, y_m]/(r_1, \dots, r_k)\) (remember choice of generators \(x_1, \dots, x_n\) is choice of embeddings \(X \embed \A^n\)). Let \(\overline y_1, \dots, \overline y_m\) denote the image of \(y_1, \dots, y_m\) in \(k[Y]\). An algebra homomorphism \(\gamma^*: k[Y] \to k[X]\) is uniquely determined by where \(\overline y_1, \dots, \overline y_m\) go, i.e.\ by
\[
  \overline \Phi_i = \gamma^*(\overline y_i) \in k[X].
\]
Choose a polynomial \(\Phi_i \in k[x_1, \dots, x_n]\) whose reduction is \(\overline \Phi_i\). Such a choice determines an algebra homomorphism
\begin{align*}
  k[y_1, \dots, y_m] &\to k[x_1, \dots, x_n] \\
  y_i &\mapsto \Phi_i
\end{align*}
i.e.\ a morphism \(\A^n \to \A^m\), and the conditions on the polynomials \(\Phi_i\) ensure the image is in \(Y\) are the condition that the ideal \((r_1, \dots, r_k)\) is sent to \(0\) in \(k[X]\), i.e.\ \(r_i(\Phi_1, \dots, \Phi_m) \in (s_1, \dots, s_\ell) = 0 \in k[X]\).

\begin{question}
  Is the morphism in the above example an isomorphism?
\end{question}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item A morphsim \(\A^1 \to \A^n\) is a \(k\)-algebra homomorphism \(k[x_1, \dots, x_n] \to k[t]\), which is the same as an \(n\)-tuple of polynomials \((\Phi_1(t), \dots, \Phi_n(t))\).
  \item A morphism \(X \to \A^1\) is an \(k\)-algebra homomorphism \(k[t] \to k[X]\), which is an element of \(k[X]\) (i.e.\ where \(t\) is sent to). This says that \(k[X]\) is precisely the functions \(X \to \A^1\), which is something we knew before!
  \item Suppose \(\ch k \neq 2\). Is there a morphism \(\A^1 \to E = \{(x, y): y^2 = x^3 - x\}\)? Suppose \(k = \C\), this is asking if there is a polynomial map from the punctured sphere to the punctured torus. From analytic point of view this is impossible (there is not even an analytic functions does this). Algebraically, this is asking if there exist polynomials \(a(t), b(t) \in k[t]\) such that \(b^2 = a^3 - a\). See example sheet 1.
  \item Let \(X\) be an affine algebraic variety and let \(f \in k[X]\). Consider
    \[
      k[X] \to k[X][t]/(tf - 1) = k[Y]
    \]
    which defines a morphism \(Y \to X\). What is \(Y\) and what is the morphism? By definition a point of \(Y\) is a \(k\)-algebra homomorphism \(\gamma: k[X][t]/(tf - 1) \to k\). Suppose \(\gamma(t) = a\) then \(\gamma|_{k[X]} = \ev_p\) where \(p \in X\) such that \(a f(p) = 1\), i.e.\ \(f(p) = \frac{1}{a} \neq 0\). Conversely, if \(f(p) \neq 0\), set \(a = \frac{1}{f(p)}\), we get a \(k\)-algebra homomorphism. So
    \[
      Y = \{x \in X: f(x) \neq 0\} = X \setminus Z(f)
    \]
    which is Zariski open, and \(\gamma: Y \embed X\) is the inclusion. In general, Zariski open sets of the form \(X \setminus Z(f)\) are affine varieties in their own right, and the inclusion map is a morphism of affine varieties.
  \end{enumerate}
\end{eg}

By the same argument the complement of the subvariety cut out by a single polynomial is a variety. We call them

\begin{definition}[hypersurface]\index{hypersurface}
  If \(f \in k[x_1, \dots, x_n]\) then \(Z(f) \subseteq \A^n\) is called a \emph{hypersurface}.
\end{definition}

We may ask: is every Zariski open set also an affine variety, i.e.\ the image of an affine variety inside some bigger affine space under an injection?. No! \(\{(x, y) \in \A^2: (x, y) \neq (0, 0)\}\) is not an affine variety.

\section{Smooth points, dimension \& Noether normalisation}

Let \(X \subseteq \A^n\) be an affine variety and \(p \in X\). Let \(X = Z(I)\), \(I = (f_1, \dots, f_r)\). Tentatively we define
\begin{align*}
  T_pX
  &= \{v \in \A^n: \sum v_i \frac{\partial f}{\partial x_i}(p) = 0 \text{ for all } f \in I\} \\
  &= \{v \in \A^n: \sum v_i \frac{\partial f_j}{\partial x_i}(p) = 0, j = 1, \dots, r\}
\end{align*}
Translate \(T_pX\) from the origin to \(p \in \A^n\) so the equations are
\[
  \{v \in \A^n: \sum (v_i - p_i) \frac{\partial f}{\partial x_i}(p) = 0 \text{ for all } f \in I\}.
\]
This is the best linear approximation to \(X\) at the point \(p\), as
\[
  f(x) = f(p) + \sum (x_i - p_i) \frac{\partial f}{\partial x_i}(p) + \dots
\]
If \(X\) is complex analytic then this is indeed the analytic definition of tangent space. However it's not always the case.

\begin{eg}
  If \(I = (x^2 - y^3)\) then
  \[
    T_{(a, b)}(X) = \{(v_1, v_2): v_1(2a) + v_2(-3b^2) = 0\}.
  \]
  If \((a, b) \neq (0, 0)\) this is a line and if \((a, b) = (0, 0)\) then this is \(\A^2\).
\end{eg}

\begin{lemma}
  \(\{p \in X: \dim T_pX \geq t\}\) is a Zariski closed subset of \(X\) for all \(t \geq 0\).
\end{lemma}

\begin{proof}
  Write \(T_p X = \ker (A: k^n \to k^r)\) where \(A\) is the matrix
  \[
    \begin{pmatrix}
      \frac{\partial f_1}{\partial x_1}(p) & \cdots & \frac{\partial f_1}{\partial x_n}(p) \\
      & \ddots \\
      \frac{\partial f_r}{\partial x_1}(p) & \cdots & \frac{\partial f_r}{\partial x_n}(p)
    \end{pmatrix}
  \]
  By rank-nullity, \(\dim \ker A \geq t\) if and only if \(\text{rank} A \leq n - t\). But rank of a matrix \(A\) is greater than or equal to \(s\) if and only if there exists an \(s \times s\) subminor \(B\) with \(\det B \neq 0\), which is a polynomial equation in matrix coefficients. Thus \(\text{rank} A \leq n - t\) if and only if all \((n + 1 - t) \times (n + 1 - t)\) subminors have zero determinant. Hence
  \[
    \{p \in X: \dim T_pX \geq t\} = Z(f_1, \dots, f_r, \text{  determinants of subminors}).
  \]
\end{proof}

\begin{definition}[dimension]\index{dimension}
  Let \(X\) be an irreducible affine variety. Then
  \[
    \dim X = \min \{\dim T_pX: p \in X\}.
  \]
  If \(k \neq \cl k\) then \(p\) is taken to be \(\cl k\)-points.
\end{definition}

In a moment we'll show \(T_pX\) is independent of embedding \(X \embed \A^n\).

We require \(X\) to be irreducible as if not then each component can have different dimensions and \(\dim X\) is not a good notion but we may as well define it anyway: we let
\[
  \dim X = \max \{\dim X_i: X_i \text{ irreducible component of } X\}.
\]

\begin{lemma}
  Suppose \(k = \cl k\). Let \(f \in k[x_1, \dots, x_n]\) be a nonconstant irreducible polynomial. Then \(Z(f)\) has dimension \(n - 1\).
\end{lemma}

\begin{proof}
  \(\dim T_p Z(f)\) is either \(n\) or \(n - 1\) as there is only one equation. If \(\dim T_pZ(f) = n\) then \(\frac{\partial f}{\partial x_i}(p) = 0\) for all \(i\) so if \(\dim Z(f) = n\) then
  \[
    \frac{\partial f}{\partial x_i} \in I(Z(f)) = \sqrt{(f)} = (f)
  \]
  as \((f)\) is prime. Write \(\frac{\partial f}{\partial x_i} = fg\) for some \(g \in k[x_1, \dots, x_n]\). But \(\deg_{x_i} \frac{\partial f}{\partial x_i} < \deg_{x_i} f\) so \(g = 0, \frac{\partial f}{\partial x_i} = 0\). Thus we have shown \(\dim Z(f) = n\) implies that \(\frac{\partial f}{\partial x_i} = 0\) for all \(i\).

  If \(\ch k = 0\) then \(f\) is a constant, \(Z(f) = \emptyset\), contradiction. If \(\ch k = p\) this implies \(f \in k[x_1^p, \dots, x_n^p]\). Claim that there exists \(h \in k[x_1, \dots, x_n]\) such that \(f = h^p\), contradicting \(f\) being prime: write \(f = \sum a_\lambda x^{p \lambda}\) for \(a_\lambda \in k\). As \(k = \cl k\), \(a_\lambda^{1/p}\) exists. Set \(h(x) = \sum a_\lambda^{1/p} x^\lambda\). As \(\ch k = p\), \(h^p = f\).
\end{proof}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(\dim \A^n = n\).
  \item Any plane curve \(f(x, y)\) has dimension \(1\).
  \end{enumerate}
\end{eg}

\begin{definition}[smooth, singular point]\index{smooth}\index{singular}
  Suppose \(k = \cl k\). Let \(X\) be an irreducible algebraic variety and \(p \in X\). \(p\) is \emph{smooth} if \(\dim T_pX = \dim X\). \(p\) is \emph{singular} otherwise.
\end{definition}

Thus the above lemma says that singular points form a Zariski closed subvariety and smooth points form a Zariski open subset, which is non-empty.

\begin{proposition}[nonexaminable]
  If \(k = \C\) and \(\dim X = d\), then \(p \in X\) is smooth if and only if there exists an isomorphism from a small ball around \(0 \in \C^d\) to a small neighbourhood of \(p \in X\) in the usual topology.
\end{proposition}

This is obviously false in Zariski topology.

\begin{proof}
  This is a consequence of implicit function theorem.
\end{proof}

\begin{definition}[derivation]\index{derivation}
  Let \(A\) be a \(k\)-algebra and \(\varphi: A \to k\) a \(k\)-algebra homomorphism. A \emph{derivation centred at \(\varphi\)} is a \(k\)-linear map \(D: A \to k\) such that
  \[
    D(fg) = \varphi(f) D(g) + D(f) \varphi(g)
  \]
  for all \(f, g \in A\). Write \(\Der(A, \varphi)\) for derivations centred at \(\varphi\).
\end{definition}

\begin{eg}
  \(f \mapsto \frac{\partial f}{\partial x}(p)\) is a derivation centred at \(p\).
\end{eg}

\begin{lemma}
  If \(X \subseteq \A^n\) then for all \(p \in X\),
  \[
    T_pX = \Der(k[X], \ev_p).
  \]
\end{lemma}

\begin{proof}
  If \(X = \A^n\), \(k[X] = k[x_1, \dots, x_n]\). Let \(D \in \Der(k[X], \ev_p)\). Let \(v_i = D(x_i)\). This gives a map
  \begin{align*}
    \Der(k[X], \ev_p) &\to \A^n \\
    D &\mapsto (D(x_i) = v_i)
  \end{align*}
  Conversely, given \(v \in \A^n\), define a derivation \(D\) by
  \[
    D(f) = \sum v_i \frac{\partial f}{\partial x_i}(p).
  \]

  In general, \(k[X] = k[x_1, \dots, x_n]/(f_1, \dots, f_r)\). Let \(p \in X = Z(f_1, \dots, f_r)\). Then
  \begin{align*}
    \Der(k[X], \ev_p)
    &= \{D \in \Der(k[x_1, \dots, x_n], \ev_p): D|_{(f_1, \dots, f_n)} = 0\} \\
    &= \{D \in \Der(k[x_1, \dots, x_n], \ev_p): \sum v_j \frac{\partial f_i}{\partial x_j}(p) = 0 \text{ for all } i\}
  \end{align*}
  where \(v_j = D(x_j)\).
\end{proof}

Observe that if \(\alpha: X \to Y\) is a morphism of varieties, i.e.\ \(\alpha^*: k[Y] \to k[X]\) is a \(k\)-algebra homomorphism, \(D \in \Der(k[X], \ev_p)\) then \(D \compose \alpha^* \in \Der(k[Y], \ev_{\alpha(p)})\). Thus we get a linear map \(T_pX \to T_{\alpha(p)}Y\).

\begin{ex}
  Let \(f \in k[X]\). Consider \(k[X] \to k[U] = k[X][t]/(tf - 1)\). We get a morphism \(U = X \setminus Z(f) \to X\). Let \(p \in U\). Show this defines an isomorphism \(T_pU \to T_pX\).
\end{ex}

We have two more definitions of dimension of varieties, which agree with our current definition. To prove so we need some algebraic tools.

\begin{definition}[Krull dimension]\index{Krull dimension}
  Let \(X\) be an irreducible affine variety. The \emph{Krull dimension} of \(X\) is
  \begin{align*}
    \dim_{\text{Kr}} X
    &= \max \{r: Z_0 \subsetneq Z_1 \subsetneq \dots \subsetneq Z_r = X: Z_i \text{ irreducible Zariski closed}\} \\
    &= \max \{r: 0 = I_r \subsetneq I_{r - 1} \subsetneq \dots \subsetneq I_0 = k[x]: I_i \text{ prime}\}
  \end{align*}
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item If \(X = \A^1\) then \(\{\text{point}\} \subsetneq \A^1\) is the only such chain so \(X\) has Krull dimension \(1\).
  \item If \(X\) is a plane curve then it has Krull dimension \(1\), shown in example sheet 1.
  \end{enumerate}
\end{eg}

\begin{definition}[function field]\index{function field}
  Let \(X\) be an irrducible affine variety. Define the \emph{function field} of \(X\) to be
  \[
    k(X)
    = \operatorname{Frac} k[X]
    = \bigcup_{g \in k[X]} k[X][\frac{1}{g}]
    = \bigcup_{g \in k[X]} k[X \setminus Z(g)]
  \]
  which is non-zero as \(k[X]\) is an integral domain.

  We define the \emph{transcendence dimension} of \(X\) to be the transcendence degree of \(k(X)\) over \(k\)
  \[
    \dim_{\text{tr}} X = \operatorname{trdeg}_k k(X).
  \]
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(k(\A^n) = k(x_1, \dots, x_n)\).
  \item \(E = \{(x, y): y^2 = x^3 - x\}\). Then \(k(E) = k(x)[y]/(y^2 - x^3 + x)\) which is an algebraic extension of \(k(x)\), so has transcedence dimension \(1\).
  \end{enumerate}
\end{eg}

\begin{theorem}
  Let \(X\) be an irreducible affine variety. Then
  \[
    \dim X = \dim_{\text{Kr}} X = \dim_{\text{tr}} X.
  \]
\end{theorem}

\begin{proof}
  Strategy of proof: show
  \[
    \dim \A^n = \dim_{\text{Kr}} \A^n = \dim_{\text{tr}} \A^n = n
  \]
  then reduce to this.
\end{proof}

We want to describe very special maps \(X \to Y\) with the property that \(\dim X = \dim Y, \dim_{\text{tr}} X = \dim_{\text{tr}} Y\), and then show these maps exist from \(X \to \A^n\) if \(\dim X = n\).

Suppose we have \(X, Y\) affine varieties such that
\begin{enumerate}
\item \(X\) and \(Y\) are irreducible,
\item there exists \(f \in k[Y][t]\) such that \(k[X] = k[Y][t]/(f(t))\) so
  \[
    f(t) = a_0(y) + a_1(y)t + \dots + a_N(y)t^N = f(y, t),
  \]
  with \(a_i(y) \in k[Y]\), \(a_N \neq 0\). This defines a morphism \(\varphi: X \to Y\).
\item \(f\) is a separable polynomial when regarded as an element of \(k(Y)[t]\), i.e.\ let
\[
  F(t) = \frac{1}{a_N(y)} f(t) = t^N + \frac{a_{N - 1}}{a_N} t^{N - 1} + \dots + \frac{a_0}{a_N},
\]
then \(F(t), F'(t)\) no common roots. In other words, \(k(Y) \subseteq k(X)\) is a separable algebraic extension.
\end{enumerate}

\paragraph{Claim 1}

\(\varphi(X)\) contains an open, hence dense subset of \(Y\).

\begin{proof}
  By definition
  \[
    X = \{(y_0, t_0) \in Y \times \A^1: f(y_0, t_0) = 0\}
  \]
  so if \(y_0 \in Y \setminus Z(a_N)\), that is \(a_N(y_0) \neq 0\), then \(f(y_0, t)\) is a polynomial in \(t\) of degree \(N\), so has exactly \(N\) roots (counting with multiplicity) over \(\cl k\), i.e.\ there exists\footnote{Lecturer suddenly declares \(k = \cl k\).}\((y_0, t_0) \in X\) and \(\varphi(y_0, t_0) = y_0\), in particular non-empty.
\end{proof}

\paragraph{Claim 2}

There exists a non-empty Zariski open subset of \(Y\) such that the natural map \(T_{(y_0, t_0)}X \to T_{y_0}Y\) is an isomorphism.

\begin{remark}
  Consider \(Y = \A^1, X = \{(y, t): y= t^p\}\) with \(\ch k = p\). Then
  \[
    T_{(a, b)}X = \{(v_y, v_t): v_y - (pt^{p - 1}|_{(a, b)}) v_t = 0\}
    = \{(0, v_t): v_t \in \A^1\}
  \]
  as \(p = 0\). So \(T_{(a, b)}X \to T_a Y\) is the zero map. Thus separability assumption is important.
\end{remark}

\begin{proof}
  Choose generators for \(k[Y]\), i.e.\ \(Y \subseteq \A^n\). Then
  \begin{align*}
    T_{y_0}Y &= \{v \in \A^n: \sum v_i \frac{\partial h}{\partial x_i} (y_0) = 0 \text{ for all } h \in I(Y)\} \\
    T_{(y_0, t_0)} X &= \{(v, \gamma) \in \A^n \times \A^1: \sum v_i \frac{\partial h}{\partial x_i}(y_0) = 0 \text{ for all } h \in I(Y), \\
    &\qquad \sum v_i \frac{\partial f}{\partial x_i}(y_0, t_0) + \gamma \frac{\partial f}{\partial t}(y_0, t_0) = 0\}
  \end{align*}
  as \(I(X) = I(Y, f)\). But then
  \[
    T_{(y_0, t_0)} = \{(v, \gamma) \in T_{y_0} Y \times \A^1: \sum v_i \frac{\partial f}{\partial x_i}(y_0, t_0) + \gamma \frac{\partial f}{\partial t}(y_0, t_0) = 0\}
  \]
  Claim this is equivalent to: there exists Zariski open subset of \(Y\) included in the above such that \(\frac{\partial f}{\partial t}(y_0, t_0) \neq 0\) for all \(y_0 \in U\), and this is immediate if \(\frac{\partial f}{\partial t}\) is not the zero polynomial in \(k[Y][t]\), but our assumption about separability implies it is not.
\end{proof}

\[
  \begin{tikzcd}
    \varphi^{-1}(U) \ar[r] \ar[d] & X \ar[d, "\varphi"] \\
    U \ar[r] & Y
  \end{tikzcd}
\]
where \(U\) has finite fibre and \(\varphi\) restricted to \(\varphi^{-1}(U)\) induces isomorphism of tangent space.

\begin{corollary}
  \[
    \dim X = \dim Y, \dim_{\text{tr}} X = \dim_{\text{tr}} Y.
  \]
\end{corollary}

\begin{proof}
  \(\dim_{\text{tr}} X = \dim_{\text{tr}} Y\) is an immediate algebraic fact.

  Let \(Y^{\text{sm}}\) be the smooth points of \(Y\). As \(Y\) is irreducible, this is an open dense set and hence \(U \cap Y^{\text{sm}}\) is non-empty so \(\dim T_y Y = \dim Y\) if \(y \in Y^{\text{sm}} \cap U\) and
  \[
    \dim T_{(y, t)}X = \dim T_yY = \dim Y
  \]
  for all \((y, t) \in \varphi^{-1}(y)\). But \(\varphi^{-1}(U \cap Y^{\text{sm}})\) is an open set and \(X\) is irreducible, so
  \[
    \dim X = \dim T_xX = \dim Y
  \]
  for all \(x \in \varphi^{-1}(U \cap Y^{\text{sm}})\).
\end{proof}

\begin{theorem}[Noether normalisation theorem]\index{Noether normalisation theorem}
  Let \(X\) be an irreducible affine variety over \(k\) with \(\dim X = d\). Then there exists a surjective map \(p: X \to \A^d\) which is a composite of the above form (and in particular, \(\varphi^{-1}(y)\) is a finite set for all \(y \in \A^d\)).
\end{theorem}

\begin{corollary}
  \[
    \dim X = \dim \A^d = d = \dim_{\text{tr}} \A^d = \dim_{\text{tr}} X.
  \]
\end{corollary}

\begin{eg}
  Let \(X = \C^* = \{(x, y) \in \C^2: xy = 1\}\). Then Noether normalisation asserts that there is a surjection \(\C^* \to \C\), i.e.
  \begin{align*}
    \C^* &\to \C \\
    t &\mapsto t + t^{-1} = z
  \end{align*}
  \(k[t, t^{-1}] = k[z][t]/(t^2 - zt + 1)\).
\end{eg}

\begin{ex}
  Find a surjective map \(\A^1 \setminus \{\lambda_1, \dots, \lambda_N\} \to \A^1\).
\end{ex}

It is clear that \(\varphi: X \to Y\) such that \(k[X] = k[Y][t]/(f(t))\) with \(f\) monic is particularly nice. \(\varphi\) is surjective, the fibres are finite. Such a \(\varphi\) is an example of a \emph{finite flat morphism}.

Note that \(k[Y] \subseteq k[X]\) is an \emph{integral extension} of rings.

\begin{definition}
  \(B \subseteq A\) is an integral extension of rings if for all \(a \in A\), there exists a monic polynomial \(f(t) \in B[t]\) such that \(f(a) = 0\).
\end{definition}

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item If \(f\) is a monic polynomial, \(B[t]/(f(t))\) is an integral extension of \(B\).
  \item If \(C \subseteq B, B \subseteq A\) are integral extensions then so is \(C \subseteq A\).
  \end{enumerate}
\end{lemma}

\begin{theorem}[Noether normalisation]
  Let \(A\) be a finitely generated \(k\)-algebra where \(k\) is a field and suppose \(A\) is an integral domain. Then there exists \(z_1, \dots, z_n \in A\) which generate \(A\) as a \(k\)-algebra such that
  \begin{enumerate}
  \item there exists \(d\) such that \(z_1, \dots, z_d\) are algebraically independent over \(k\),
  \item for all \(i > d\), \(z_i\) is algebraic over \(k[z_1, \dots, z_{i - 1}]\) with monic minimal polynomial \(F_i\).
  \end{enumerate}
  In particular, \(A\) is integral over \(k[z_1, \dots, z_d]\).

  Moreover if \(\operatorname{Frac} A\) is a separable field extension of \(k\) then we can also ensure \(F_i\)'s are separable polynomials, and we can always do this if \(k = \cl k\).
\end{theorem}

\begin{corollary}[Nullstellensatz]
  If \(A\) is a finitely generated \(k\)-algebra that is also a field then \(A \supseteq k\) is algebraic.
\end{corollary}

\begin{lemma}
  If \(B \subseteq A\) is an integral ring extension then
  \[
    B^\times = A^\times \cap B.
  \]
\end{lemma}

\begin{proof}
  Let \(b \in A^\times \cap B\). Then exists \(a \in A\) such that \(ab = 1\). As \(A \supseteq B\) is integral, exists \(c_i \in B\) such that
  \[
    a^n + c_{n - 1} a^{n - 1} + \dots + c_0 = 0.
  \]
  Multiply by \(b^{n - 1}\) to get
  \[
    a = -c_{n - 1} - c_{n - 2} b - \dots - c_0b^{n - 1} \in B.
  \]
\end{proof}

\begin{proof}
  Let \(z_1, \dots, z_n\) be as in Noether, so \(A\) is generated by \(z_1, \dots, z_n\) and \(z_1, \dots, z_d\) are transcendental over \(k\) and \(z_i\) is integral over \(k[z_1, \dots, z_d]\) for \(i > d\). Claim that if \(d > 0\) then \(A\) is \emph{not} a field: if \(d > 0\) then the units in \(k[z_1, \dots, z_d]\) are just \(k^\times\). So \(z_1\) is not invertible in \(k[z_1, \dots, z_d]\), so not invertible in \(A\) by the lemma.
\end{proof}

\begin{proof}
  As \(A\) is finitely generated, there exist generators \(z_1, \dots, z_n\). wlog \(z_1, \dots, z_d\) are algebraically independent and \(A\) is algebraic over \(k[z_1, \dots, z_d]\). If \(d = n\) then done. Otherwise assume the theorem holds for all \(k\)-algebras with \(\leq n - 1\) generators. Let \(A' = k[z_1, \dots, z_{n - 1}]\). There exists nonzero \(f \in k[x_1, \dots, x_n]\) such that
  \[
    f(z_1, \dots, z_{n - 1}, z_n) = 0.
  \]
  Write \(f = \sum_{i \leq N} F_i\) where \(F_i \in k[x_1, \dots, x_n]\) has degree \(i\) in \(x_n\).

  Suppose \(k\) is infinite, then there exist \(\lambda_1, \dots, \lambda_n \in k\) such that
  \[
    F_N(\lambda_1, \dots, \lambda_n) \neq 0.
  \]
  Set \(x_i' = x_i - \lambda_i x_n\) for \(i < n\) and \(x_n' = x_n\). Note that
  \begin{align*}
    x_1^{e_1} \cdots x_n^{e_n}
    &= (x_1' + \lambda_1 x_n)^{e_1} \cdots (x_{n - 1}' + \lambda_{n - 1} x_n)^{e_{n - 1}} x_n^{e_n} \\
    &= \lambda_1^{e_1} \cdots \lambda_{n - 1}^{e_{n - 1}} x_n^{e_1 + \dots + e_n} + \text{ terms in \(x_1', \dots, x_n'\) with lower \(x_n'\) degree}
  \end{align*}
  Hence
  \[
    f(x_1', \dots, x_n') = F_N(\lambda_1, \dots, \lambda_n) \cdot x_n^{e_1 + \dots + e_n} + \text{ lower \(x_n\) degree terms}.
  \]
  But this implies that \(z_n' = z_n\) is integral over \(k[z_1', \dots, z_{n - 1}'] = A''\). But \(A''\) is generated by \(n - 1\) elements, so inductive hypothesis gives the result.

  Separability requires further argument.

  If \(k\) is finite then we use an argument of Nagata: let \(x_i = x_i - x_n^{\gamma_i}\) for \(\gamma_i\) sufficiently large.
\end{proof}

\begin{ex}
  Let \(k = \cl k\) and \(X, Y\) irreducible varieties over \(k\) with \(\varphi: X \to Y\) a morphism. Show that
  \begin{enumerate}
  \item \(k[Y] \embed k[X]\) if and only if \(\cl{\varphi(X)} = Y\)
  \item If \(\cl{\varphi(X)} = Y\) then \(\dim X \geq \dim Y\). In fact, for all \(y \in \varphi(X)\),
    \[
      \dim \varphi^{-1}(y) \geq \dim X - \dim Y
    \]
    and equality holds on a dense open subset. (hard! Require Noether normalisation)
  \end{enumerate}
\end{ex}

\section{Projective space}

We will first define projective space as a set. Let \(V\) be a vector space over \(k\) with \(\dim V = n + 1\), \(n \geq 0\). Define
\[
  \P V = \P^n = \{\text{lines through origin in } V\} = V \setminus \{0\}/k^\times.
\]
Suppose \(v \in V, v \neq 0\), \(kv = \{\lambda v: \lambda \in k\}\) is a line. Conversely, \(\ell \in \P V\) is a line if and only if \(\ell = kv\) for any \(v \in \ell \setminus \{0\}\).

Note that it is not clear that \(\P^n\) is a variety (affine or otherwise) as it is the result of two operations, neither of which gives a variety:
  \begin{enumerate}
  \item \(V \setminus \{0\}\) is not an affine algebraic variety if \(\dim V > 1\).
  \item quotienting a vaiety by the action of group like \(k^\times\) is subtle, even if the variety is affine. This is the subject of geometric invariant theory.
  \end{enumerate}

The first we can do to analyse the projective space is to give it homoegeneous coordiantes. Choose a basis \(e_0, \dots, e_n\) of \(V\), i.e.\ an isomorphism \(V \cong k^{n + 1}\), write \([x_0 : \dots : x_n] \in \P^n\) for the line through \(\sum x_i e_i\). Thus
\[
  [x_0: \dots : x_n] = [\lambda x_0 : \cdots : \lambda x_n]
\]
for all \(\lambda \in k^\times\). Claim \(\P^n = \A^n \amalg \P^{n - 1}\):
\begin{proof}
  Consider \(p = [x_0 : \dots : x_n]\). If \(x_n = 0\), \(p = [x_0 : \dots : x_{n - 1} : 0]\) determines a unique point in \(\P^{n - 1}\), and conversely if \(x_n \neq 0\) then
  \[
    [x_0 : \dots : x_n] = [\frac{x_0}{x_n} : \dots \frac{x_{n - 1}}{x_n} : 1].
  \]
  This gives a bijection as required.
\end{proof}

\begin{corollary}
  \[
    \P^n = \A^n \amalg \A^{n - 1} \amalg \dots \amalg \A^0.
  \]
\end{corollary}

This gives a nice set theoretic description of \(\P^n\), although we still cannot quite make it into an algebraic variety by gluing together a closed and an open subset. For example, \(Z(x^2 - y^3) \subseteq \A^2\) can be written as \(k^\times \amalg \{\text{pt}\}\). On the other hand, \(\A^1 = k^\times \amalg \{\text{pt}\}\). More data is needed.

We want to rephrase \(\P^n = \A^n \amalg \P^{n - 1}\). Let \(H \leq V\) be a hyperplane, let \(w_0 \in V \setminus H\) (for example \(H = \{x: x_n = 0\}, w_0 = (0, \dots, 0, 1)\)). Then we have an inclusion of the projectivisation of \(H\)
\begin{align*}
  \P H &\embed \P V \\
  kv &\mapsto kv
\end{align*}
as well as the affine hyperplane
\begin{align*}
  H &\embed \P V \\
  h &\mapsto k(h + w_0)
\end{align*}
It is an exercise to show that
\[
  \P V \setminus \P H \cong H = \A^n,
\]
with the isomorphism depends on the choice of \(w_0\).

Set \(U_i = \{x = [x_0: \dots : x_n] \in \P^n: x_i \neq 0\}, H_i = \{(x_0, \dots, x_n): x_i = 0\} \cong \A^n\) so \(\P V \setminus \P H_i = U_i\). It is clear that
\[
  U_0 \cup U_1 \cup \dots \cup U_n = \P^n
\]
as if \(x = [x_0 : \dots : x_n] \in \P V\), some \(x_i \neq 0\) and then \(x \in U_i\).

\begin{eg}\leavevmode
  \begin{enumerate}
  \item For \(n = 1\), \(U_0 = \{[1: x_1]\}, U_1 = \{[x_0 : 1]\}\). The inclusion is
    \begin{align*}
      U_0 &\to \P^1 \\
      [x_0 : x_1] &\to \frac{x_1}{x_0} \in \A^1 \cup \{\infty\}
    \end{align*}
  \item \(n = 2\): \(\P^2 = U_0 \cup U_1 \cup U_2\). \(\P^2 = U_i \amalg \P^1\).

    (graph) three lines at infinity in \(\P^2\). Exercise: the pattern of \(\P^{n - 1}\)'s at \(\infty\) in \(\P^n\) is given by the boundary of the \(n\)-simplex.
  \end{enumerate}
\end{eg}

Consider such a map \(j: U \embed \P^n\) where \(U = U_i = \A^n\) for some \(i\). This is an open embedding of topological spaces. It is an exercise to check this is an open embedding of topological spaces.

As each \(U_i \cong \A^n\) is an affine variety, and
\begin{align*}
  U_i \cap U_j &\to U_j \\
  k^\times \times \A^{n - 1} &\to \A^n
\end{align*}
is a morphism of affine variety, the \(\P^n\) is a well-defined algebraic variety, and \(U \to \P^n\) is a morphism of algebraic varieties.

Lots of maps \(\A^n \embed \P^n\) (choose a hyperplane and a point off the hyperplane. \((x_0, \dots, x_{n -1}) \mapsto (x_0, \dots, x_{n - 1}, 1)\). Call the map \(i: \A^2 \to \P^2\).

Let \(E^0 = \{(x, y) \in \A^2: y^2 = x^3 - x\}\). What is \(\cl{i(E^0)}\) in \(\P^2\)? Let's work it out. As \([x: y: 1] = [X: Y: Z]\) for \(z \neq 0\), have \(x = \frac{X}{Z}, y = \frac{Y}{Z}\) so \(y^2 = x^3 - x\) gives
\[
  Y^2Z = X^3 - XZ^2
\]
so
\[
  i(E^0) = \{[X: Y: Z] \in \P^2: Y^2Z = X^3 - XZ^2, Z \neq 0\}.
\]
From now on write \(E^0\) for \(i(E^0)\). Then the closure will be the same equation but allow \(Z = 0\). This can be done as follow. There are three charts: \(X \neq 0, Y \neq 0, Z \neq 0\). In chart \(Z \neq 0\), \(y^2 = x^3 - x\). In chart \(Y \neq 0\), put \(z = \frac{Z}{Y}, x = \frac{X}{Y}\) so the equation for \(E^0\) is \(z = x^3 - xz^2\) and \(z \neq 0\). On chart \(X \neq 0\), put \(y = \frac{Y}{X}, z = \frac{Z}{X}\), equation is \(y^2 = 1 - z^2\) and \(z = 1\). Now taking closure of \(E^0\) in each chart gives closure of \(E^0\) in \(\P^2\).

If \([X: Y: Z]\) is in the chart \(Y \neq 0\) but not in chart \(Z \neq 0\), must have \(z = 0\). The equation says \(x^3 = 0\), which has a unique solution \(x = 0\), so we get an extra point \([0: 1: 0]\).

If \([X: Y: Z]\) is  in the chart \(X \neq 0\) and not in the chart \(Z \neq 0\) then \(z = 0\) and have \(0 = 1\) which has no solution, so no extra point.

Thus the projective curve \(E\), defined as the closure of \(E^0\) in \(\P^2\), is \(E^0 \cup \{[0: 1: 0]\}\), which is what we wanted in the first lecture.

In general, given \(X = Z(I) \subseteq \A^n\) where \(I \subseteq k[x_1, \dots, x_n]\), we may ask what is the closure of \(X\) in \(\P^n\) under the embedding \((x_1, \dots, x_n) \mapsto [1: x_1: \cdots : x_n]\). To do so we would like to talk about varieties in projective spaces just as in affine spaces. However, note that the zero of a general polynomial in \(\P^n\) is not well-defined as it is not invariant under the action of \(k^\times\).

\begin{definition}[homogeneous polynomial]\index{homogeneous polynomial}
  Given \(f \in k[x_1, \dots, x_n]\), \(f\) is \emph{homogeneous} of degree \(d\) if
  \[
    f = \sum_{c_1 + \dots + c_n = d} a_{i_1 \cdots i_n} x_1^{i_1} \cdots x_n^{i_n}.
  \]
  If \(k\) is infinite then this holds if and only if
  \[
    f(\lambda x_1, \dots, \lambda x_n) = \lambda^d f(x_1, \dots, x_n)
  \]
  for all \(\lambda \in k^\times\).
\end{definition}

Any \(f \in k[x_1, \dots, x_n]\) can be written as \(f = \sum_{r = 0}^n f_{(r)}\) where \(f_{(r)}\) is homogeneous of degree \(r\).

\begin{definition}[homogeneous ideal]
  An ideal \(I \subseteq k[x_1, \dots, x_n]\) is \index{homogeneous} if for all \(f \in I\), \(f = \sum_r f_{(r)}\) then \(f_{(r)} \in I\) for all \(I\).
\end{definition}

\begin{eg}
  \((xy + y^2, y^3, x^2)\) is homogeneous but \((xy + y^3)\) is not.
\end{eg}

Given \(f \in k[x_1, \dots, x_n]\), we homogenise it by defining
\[
  \tilde f(X_0, \dots, X_n) = X_0^d f(\frac{X_1}{X_0}, \dots, \frac{X_n}{X_0})
\]
where \(d = \deg f\). \(f\) can be recovered by
\[
  \tilde f(1, x_1, \dots, x_n) = f(x_1, \dots, x_n).
\]

\begin{eg}
  If \(f = y^2 - x^3 + x\) then
  \[
    \tilde f = Z^3((Y/Z)^2 - (X/Z)^3 + (X/Z)) = ZY^2 - X^3 + XZ^2.
  \]
\end{eg}

For an ideal \(I \subseteq k[x_1, \dots, x_n]\), define
\[
  \tilde I = (\tilde f: f \in I),
\]

\begin{ex}
  \(\tilde I\) is an ideal and is homogeneous. \(\tilde I|_{X_0 = 1} = I\).
\end{ex}

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item \(I \subseteq k[x_1, \dots, x_n]\) is homogeneous if and only if \(I\) is generated by a finite set of homogeneous polynomials.
  \item Suppose \(k\) is infinite. \(\tilde I \subseteq k[x_0, \dots, x_n]\) is a homogeneous ideal if and only if \(\tilde X = Z(\tilde I) \subseteq \A^{n + 1}\) is invariant under the \(k^\times\)-action \((p_0,, \dots, p_n) \mapsto (\lambda p_0, \dots \lambda p_n)\).
  \end{enumerate}
\end{lemma}

\begin{proof}
  Exercise.
\end{proof}

This shows that Zariski closed subsets of \(\P^n\), defined to be zeros cut out by homogeneous ideals in \(k[x_0, \dots, x_n]\), are well-defined. They correspond to \(k^\times\)-invariant closed subsets of \(\A^{n + 1}\).

\begin{note}
  If \(I = (f_1, \dots, f_r) \subseteq k[x_1, \dots, x_n]\), it need \emph{not} be the case that \(\tilde I = (\tilde f_1, \dots, \tilde f_r)\). For example given \(I = (x - y^2, y) = (x, y) = I(\{0\})\),
  \[
    (xz - y^2, y) = (xz, y) \neq (x, y) = \tilde I.
  \]
\end{note}

\begin{ex}
  Find an ideal such that \(\tilde I \neq (\tilde f_1, \dots, \tilde f_r)\) for any minimal generator \(f_1, \dots, f_r\) of \(I\).
\end{ex}

\begin{definition}[quasi-projective/affine variety]\index{quasi-projective variety}\index{quasi-affine variety}
  A \emph{quasi-projective variety} is an open subvariety of a projective variety.

  A \emph{quasi-affine variety} is an open subvariety of an affine variety.
\end{definition}

\begin{eg}
  \(\C^2 \setminus \{(0, 0)\} \subseteq \C^2\) is a quasi-affine variety.
\end{eg}

\begin{remark}
  If \(X\) is an affine variety, \(f \in k[X]\) and \(X\) is irreducible, \(k[X \setminus Z(f)] = k[X][\frac{1}{f}]\) so
  \[
    k(X \setminus Z(f)) = \operatorname{Frac} k[X \setminus Z(f)] = \operatorname{Frac} k[X] = k(X).
  \]
  Hence if \(X\) is an affine algebraic variety, we can define \(k(X)\) to be \(k(U)\) for \(U\) any open affine subvariety of \(X\), for example for \(U\) an open set in a chart defining \(X\).

  For example in \(\P^n\),
  \[
    k(U_0)
    = k(\frac{x_1}{x_0}, \dots, \frac{x_n}{x_0})
    = k(U_n)
    = k(\frac{x_0}{x_n}, \dots, \frac{x_{n - 1}}{x_n}).
  \]
\end{remark}

We end this chapter with a brief discussion of compactness of projective spaces. Let \(k = \C\). Claim
\[
  \P^n = (\C^{n + 1} \setminus \{0\}) / \C^\times = S^{2n + 1}/S^1.
\]

\begin{proof}
  Define
  \[
    S^{2n + 1} = \{x \in \C^{n + 1}: \norm x = 1\}
  \]
  where \(\norm x = (\sum |x_i|^2)^{1/2}\). Consider the map
  \begin{align*}
    \C^{n + 1} \setminus \{0\} &\to S^{2n + 1} \\
    x = (x_0, \dots, x_n) &\mapsto \frac{1}{\norm x} (x_0, \dots, x_n)
  \end{align*}
  \(|\lambda| = 1\), i.e.\ \(\lambda \in \C^*\) if and only if \(\norm{\lambda x} = \norm x\) so this descends to a map
  \[
    (\C^{n + 1} \setminus 0)/ \C^\times \to S^{2n + 1}/S^1.
  \]
\end{proof}
\(S^{2n + 1}\) is compact in the usual topology and so is its quotient. Thus \(\P^n\) is compact in the usual topology. Surprisingly, this has an algebraic version in the Zariski topology.

\begin{definition}[proper]\index{proper}
  \(X\) is \emph{proper} if for every continuous map \(\varphi: X \to Y\), the image of a closed subset under \(\varphi\) is closed.
\end{definition}

\begin{theorem}[fundamental theorem of elimination theory]
  For any field \(k\), \(\P^n\) is proper.
\end{theorem}

\begin{corollary}
  If \(X \subseteq \A^n\) is an affine variety and \(X\) is proper then \(X\) is a finite set of points.
\end{corollary}

\begin{proof}
  Suppose \(X\) is not a finite set of points. Then as \(X\) is affine there exists a non-constant element \(\varphi \in k[X]\), that is a morphism \(\varphi: X \to \A^1\) which is not constant. But \(X\) is proper so \(\im \varphi\) is closed and by assumption, \(\varphi(X)\) is not a finite set of points. Hence \(\varphi(X) = \A^1\). Define \(\tilde \varphi: X \to \P^1\) to be the obvious composition. The image of \(\tilde \varphi\) is \(\A^1\) which is not closed in \(\P^1\) so \(X\) is not proper. Contradiction.
\end{proof}

\section{Curves}

From now on suppose \(k = \cl k\).

\begin{definition}[curve]\index{curve}
  A \emph{curve} is a quasi-projective algebraic variety \(X\) such that \(\dim X = 1\).
\end{definition}

\begin{eg}
  If \(F \in k[X_0, X_1, X_2]\) is an irreducible homogeneous polynomial then \(Z(F) \subseteq \P^2\) is an irreducible plane projective curve.
\end{eg}

Warning: not all curves can be embedded in \(\P^2\).

\begin{ex}
  \(\dim X = 1\) means that for all \(p \in X \setminus \{\text{finite set}\}\), \(\dim T_pX = 1\), if and only if \(\dim_{\text{tr}} k(X) = 1\), if and only if any Zariski closed subvariety of \(X\) is \(X\) or a finite set of points.
\end{ex}

\begin{definition}
  Let \(X\) be an irreducible algebraic variety and \(p \in X\). Define the \emph{local ring} at \(p\) to be
  \[
    \mathcal O_{X, p} = \{\frac{f}{g} \in k(X): g(p) \neq 0\},
  \]
  rational functions defined on some neighbourhood of \(p\). Define
  \[
    \mathfrak m_{X, p} = \{\gamma \in \mathcal O_{X, p}: \gamma(p) = 0\},
  \]
  the maximal ideal of \(\mathcal O_{X, p}\).
\end{definition}

\begin{ex}\leavevmode
  \begin{enumerate}
  \item If \(\gamma \in \mathcal O_{X, p} \setminus \mathfrak m_{X, p}\) then \(\gamma^{-1} \in \mathcal O_{X, p}\).
  \item Show \(\mathfrak m_{X, p}\) is the unique maximal ideal of \(\mathcal O_{X, p}\).
  \end{enumerate}
\end{ex}

Suppose \(k = \C\). Let \(X\) be a curve, \(p \in X\) a smooth curve. Then a small open neighbourhood of \(p\) in the usual topology is diffeomorphic to a small open neighbourhood of \(0\) in \(\C\) by implicit function theorem. The corresponding notion is convergent power series on some neighbourhood of \(p\). It is completely analogous that here is an algebraic replacement for it.

\begin{theorem}
  Let \(X\) be a curve, \(p \in X\) a smooth point. Write \(\mathfrak m = \mathfrak m_{X, p}\).
  \begin{enumerate}
  \item \(\mathfrak m\) is a principal ideal in \(\mathcal O_{X, p}\).
  \item \(\bigcap_{n \geq 1} \mathfrak m^n = \{0\}\).
  \end{enumerate}
\end{theorem}

\begin{eg}
  Intuition: Consider \(\{x^2 + y^2 = 1\} \subseteq \A^1\). If \(p \neq (0, \pm 1)\) then \(y - y_0\) is a ``local coordinate'' at \(p\). If \(k = \C\), \(p \neq (0, \pm 1)\), then we can write \(x\) in terms of \(y\) as a convergence power series for \(|y - y_0| < \varepsilon\). For example at \((1, 0)\),
  \[
    x
    = (1 - y^2)^{1/2}
    = \sum_{n \geq 0} \binom{1/2}{n} (-1)^n y^{2n}
  \]
  so
  \[
    x - 1 = -\frac{1}{2}y^2 + \text{ high order terms}
  \]
  so \(x - 1\) vanishes to order \(2\) at the point. In the theorem,
  \[
    \mathfrak m_{X, p} = (y - y_0)
  \]
  if \(\frac{\partial f}{\partial x}(p) \neq 0\). Alternatively,
  \[
    x - 1
    = \frac{x^2 - 1}{x + 1}
    = -\frac{y^2}{x + 1}
  \]
  and \(\frac{1}{x + 1} \in \mathcal O_{X, p} \setminus \mathfrak m_{X, p}\).
\end{eg}

\begin{proof}
  By definition of \(X\) there exists an affine open neighbourhood \(X_0\) of \(p\), i.e.\ an open subset \(X_0 \subseteq X\) which is an affine variety. Write \(k[X_0] = k[x_1, \dots, x_n]/I\). wlog \(p \in X_0\) corresponds to the point \((0, \dots, 0)\). Let us write \(\overline x_i\) for the image of \(x_i\) in \(k[X_0]\). Then
  \begin{align*}
    \mathcal O_{X, p} &= \{\frac{f}{g}: f, g \in k[X_0], g \notin (\overline x_1, \dots, \overline x_n)\} \\
    \mathfrak m_{X, p} &= \{\frac{f}{g}: f \in (\overline x_1, \dots, \overline x_n), g \notin (\overline x_1, \dots, \overline x_n)\}
  \end{align*}
  \(X\) is a curve smooth at \(p\) so \(\dim T_pX_0 = 1\). Thus \(T_pX_0 \subseteq \A^n\) is a line, and by changing coordinates we can assume it is the line \(x_2 = x_3 = \dots = x_n = 0\). In other words, if \(\tilde f_2, \tilde f_3, \dots\) generate the ideal \(I\) then write
  \[
    \tilde f_i = \sum a_{ij} x_j + \text{ quadratic and higher term}.
  \]
  Note that the higher terms do not contribute to the tangent space at \(0\). Thus \(\dim T_0 X = 1\) implies that \(\dim \ker (a_{ij}) = 1\), so by row reduction can assume that
  \[
    \tilde f_i = \lambda_i x_i + \text{ high order terms}
  \]
  for \(i = 2, \dots, n\) and
  \[
    \tilde f_i =  \text{ quadratic and higher terms}
  \]
  for \(i > n\). So there exist \(\tilde f_2, \dots, \tilde f_n \in I\), \(\tilde f_i = x_i + h_i\) where \(h_i\) is at least quadratic.

  Thus in \(k[X_0]\), \(\overline x_j = -h_j\) and
  \[
    \overline x_j \in (\overline x_1^2, \overline x_1 \overline x_2, \dots) = \mathfrak m^2
  \]
  for \(j \geq 2\). Thus
  \[
    \mathfrak m
    = (\overline x_1, \dots, \overline x_n)
    = \overline x_1 \mathcal O_{X, p} + \dots + \overline x_n \mathcal O_{X, p}
    = \overline x_1 \mathcal O_{X, p} + \mathfrak m^2
  \]
  We want to conclude that \(\mathfrak m = (\overline x_1)\). Invoke Nakayama's lemma

  \begin{proposition}
    Let \(R\) be a ring, \(M\) a finitely generated \(R\)-module, \(J \subseteq R\) an ideal. Then
    \begin{enumerate}
    \item if \(JM = M\) then exists \(r \in J\) such that \((1 + r) M = 0\).
    \item if \(N \subseteq M\) is a submodule such that \(JM + N = M\) then there exists \(r \in J\) such that \((1 + r) M = N\).
    \end{enumerate}
  \end{proposition}

  Apply Nakayama to \(R = \mathcal O_{X, p}, J = \mathfrak m_{X, p}\) and note that \(1 + r \in \mathcal O_{X, p}^*\) if \(r \in \mathfrak m_{X, p}\), so
  \[
    (1 + r) M = M.
  \]
  We would like to apply Nakayama to \(M = \mathfrak m_{X, p}, N = (x_1)\), so need to show \(M\) is finitely generated. But every ideal \(J \subseteq \mathcal O_{X, p}\) is finitely generated,
  \[
    J = \{\frac{f}{g}: f \in J \cap k[X_0], g \in k[X_0], g(p) \neq 0\}
  \]
  so \(g \cdot \frac{f}{g} = f \in J \subseteq k[X_0]\), but \(J \cap k[X_0]\) is an ideal in \(k[X_0]\), hence finitely generated by Hilbert basis theorem. As
  \[
    \mathfrak m = (x_1) + \mathfrak m^2,
  \]
  Nakayama 2 says that \(\mathfrak m \subseteq (x_1)\). But \((x_1) \subseteq \mathfrak m\) so equality. In particular \(\mathfrak m\) is the principal ideal generated by \(x_1\).

  Now let \(M = \bigcap_{n \geq 1} \mathfrak m^n\), \(J = \mathfrak m \subseteq \mathcal O_{X, p}\) so a finitely generated ideal. But \(\mathfrak m M = M\) so by Nakayama 1 \(M = 0\).
\end{proof}

\begin{ex}
  Apply this to the circle.
\end{ex}

Let \(X = Z(f) \subseteq \A^2\) be a plane curve, \(p = (x_0, y_0) \in X\) a smooth point. Then \(x- x_0\) generate \(\mathfrak m_{X, p}\) if and only if \(\frac{\partial f}{\partial y}(x_0, y_0) \neq 0\), and a similar statement holds for \(y\). Thus if
\[
  \frac{\partial f}{\partial x}(p) = \frac{\partial f}{\partial y}(p) = 0
\]
then \(p\) is not a smooth point. Thus we can either write \(y\) in terms of \(x\) locally or vice versa near a smooth point.

Exercise: check this is immediate from the theorem and its proof.

\begin{definition}
  A function \(t \in \mathfrak m_{X, p}\) such that \(\mathfrak m_{X, p} = (t)\) is called a \emph{local parameter} or \emph{local coordinate} at \(p\).
\end{definition}

Such is not unique but if \(t\) is a local parameter so is \(ut\) if \(u \in \mathcal O_{X, p}^*\) and all other local parameters are of this form.

\begin{corollary}[order of vanishing/pole]\index{order of vanishing/pole}
  Every \(f \in k(X)^*\) can be written uniquely as
  \[
    f = t^n \cdot u
  \]
  where \(n \in \Z, u \in \mathcal O_{X, p}^*\). We call \(n = \nu_p(f)\) the \emph{order of vanishing/pole} of \(f\) at \(p\).

  \begin{align*}
    \mathcal O_{X, p} &= \{f \in k(X): \nu_p(f) \geq 0\} \cup \{0\} \\
    \mathfrak m_{X, p} &= \{f \in k(X): \nu_p(f) \geq 1\} \cup \{0\}
  \end{align*}
\end{corollary}
This is independent of the choice of \(t\).

\begin{proof}
  Given \(f \in \mathcal O_{X, p}\), as \(\bigcap_{n \geq 0} \mathfrak m^n = 0\), there exists a unique \(n \geq 0\) such that \(f \in \mathfrak m^n \setminus \mathfrak m^{n + 1}\). Define \(\nu_p(f) = n\). As \(\mathfrak m^n = (t^n)\), \(f = t^n u\) with \(u \in \mathcal O_{X, p} \setminus \mathfrak m_{X, p} = \mathcal O_{X, p}^*\). Note if \(t^n u' = t^m u\) where \(n \geq m\) then \(t^{n - m} = u' u^{-1} \in \mathcal O_{X, p}^*\) so \(n = m\).

  If \(f \in k(X)^*\), \(f \notin \mathcal O_{X, p}\) then \(f^{-1}\) is. Apply the above and define \(\nu_p(f) = - \nu_p(f^{-1})\).
\end{proof}

\begin{eg}
  \(X = \P^1\) so \(k(X) = k(x)\). Let \(f \in k(x), f \neq 0\). Then \(f = \prod (x - a_i)^{n_i}\), where \(a_i\)'s are distinct. Consider \(\nu_p(f)\).
  \begin{enumerate}
  \item If \(p = a \in \A^1\), i.e.\ \(p \neq \infty\), then a local coordinate \(t\) is \(x - a\) so
    \[
      \nu_a(f) =
      \begin{cases}
        0 & a \notin \{a_1, \dots, a_m\} \\
        n_i & a = a_i
      \end{cases}
    \]
  \item If \(p = \infty\) then \(\frac{1}{x}\) is a coordinate.
    \[
      f(x) = (\frac{1}{x})^{- \sum n_i} \underbrace{\prod (1 - \frac{a_i}{x})^{n_i}}_{\text{regular at } \infty}
    \]
    so \(\nu_\infty(f) = - \sum n_i\).
  \end{enumerate}
\end{eg}

\begin{proof}[Proof of Nakayama]
  Let \(M\) be generated by \(m_1, \dots, m_n\) as an \(R\)-module. As \(JM = M\), there exists \(x_{ij} \in J\) such that \(m_i = \sum x_{ij} m_j\), i.e.
  \[
    \sum_j \underbrace{(\delta_{ij} - x_{ij})} m_j = 0
  \]
  for all \(i\). Recall that
  \[
    X \cdot \adj X = \det X \cdot I,
  \]
  so multiply the above by \(\adj (I - X)\) to get \(d m_i = 0\) for all \(i\), where
  \[
    d = \det (I - X) = 1 + r
  \]
  for some \(r \in J\). expanding out the det, i.e.\ \((1 + r)M = 0\) as required.

  The second part is immediate by applying Nakayama's lemma to \(M/N\).
\end{proof}

\begin{ex}
  Show
  \[
    \mathcal O_{X, p} / \mathfrak m^n = \mathcal O_{X, p}/(t^n) = k[t]/(t^n).
  \]
  (inverse limit)
\end{ex}

Discussion on projective space having no holes:
\begin{proposition}
  Let \(X\) be a curve, \(U = X \setminus \{\text{finite set of points}\}\) and \(\alpha: U \to Y\) a morphism with \(Y\) a projective variety. Let \(p \in X\) be smooth. Then \(\alpha\) extends to a morphism \(U \cup \{p\} \to Y\).
\end{proposition}

\begin{proof}
  wlog \(Y = \P^m\) (by continuity). In some neighbourhood of \(p\), \(\alpha = [f_0: \cdots: f_m]\) where \(f_i \in k(X)\). Let \(t\) be a local coordinate at \(p\). Let \(n_i = \nu_p(f_i)\) so either \(f_i(p) = 0\) or \(f_i = t^{n_i} u_i\) where \(u_i \in \mathcal O_{X, p}^*\). Let \(N = \min \{n_1, \dots, n_m\}\), say it is attained at \(n_j\), that is \(N = n_j\) for some \(j\). Then
  \[
    \alpha = [t^{-N} f_0: \cdots :t^{-N} f_m]
  \]
  but \(f_i t^{-N} \in \mathcal O_{X, p}\) has no pole at \(p\) and \(f_j t^{-N} = u_j\) which does not vanish at \(p\).
\end{proof}

\begin{definition}[rational map]\index{rational map}
  Let \(X, Y\) be arbitrary algebraic varieties. A \emph{rational map} \(\varphi: X \rational Y\) is a pair of a Zariski open \(U \subseteq X\) and a morphism \(\varphi: U \to Y\) (i.e.\ it is a partially defined map).
\end{definition}

Using this terminology, the proposition is saying that a rational map to a projective variety extends to a smooth point.

\begin{eg}
  If \(F_0, \dots, F_m\) are homogeneous polynomials of degree \(d\) in \(X_0, \dots, X_n\) then
  \[
    [X_0: \cdots : X_n] \mapsto [F_0(X): \cdots : F_m(X)]
  \]
  is a rational map \(\P^n \rational \P^m\) defined on the open set where some \(F_i\) is nonzero, i.e.\ on the complement of \(Z(F_0, \dots, F_n)\).
\end{eg}

\begin{definition}
  Two rational maps \(\varphi_1, \varphi_2: X \rational Y\) defined on \(U_1, U_2\) are \emph{equal} if there exists a Zariski open \(V \subseteq U_1 \cap U_2\) with \(\varphi_1|_V = \varphi_2|_V\). That is, the rational map defined by \(\varphi\) doesn't depend on \(U\) --- we can shrink and think of them as the same rational map.
\end{definition}

\begin{definition}
  \(X, Y\) are \emph{birational} if there exist rational maps \(\varphi: X \rational Y, \psi: Y \rational X\) such that
  \begin{align*}
    \psi \varphi &= \id_X \\
    \varphi \psi &= \id_Y
  \end{align*}
  as rational maps.
\end{definition}

\begin{remark}
  The proposition is false if \(\dim X > 1\) or \(p \in X\) is not smooth. For example
  \begin{align*}
    \A^2 &\rational \P^1 \\
    (x, y) &\mapsto \frac{x - y}{x + y}
  \end{align*}
  cannot be extended to \((0, 0)\). More interestingly, consider
  \[
    [X: Y: Z] \mapsto [YZ: XZ: XY] ``='' [\frac{1}{X} : \frac{1}{Y}: \frac{1}{Z}]
  \]
  which cannot be extended to three points. This is the beginning of high dimensional algebraic geometry.
\end{remark}

\begin{proposition}
  Let \(\alpha: X \to Y\) be a nonconstant morphism of irreducible curves.
  \begin{enumerate}
  \item For all \(q \in Y\), \(\alpha^{-1}(q)\) is a finite set.
  \item \(\alpha\) induces an embedding of fields \(k(Y) \embed k(X)\) such that \([k(X): k(Y)]\) is finite.
  \end{enumerate}
\end{proposition}

\begin{definition}[degree]\index{degree}
  The degree of the extension is called the \emph{degree} of \(\alpha\).
\end{definition}

\begin{proof}\leavevmode
  \begin{enumerate}
  \item \(\alpha^{-1}(q)\) is a closed subset of \(X\). But the only closed subsets are fintie set of points and \(X\). As \(\alpha\) is nonconstant the result follows.
  \item If \(f \in k(Y)\) then exists \(U \subseteq Y\) affine such that \(f \in k[U]\). Then \(f \compose \alpha: \alpha^{-1}(U) \to k\) is well-defined in \(k[\alpha^{-1}(U)] \subseteq k(X)\) so we have a map of fields \(k(Y) \to k(X)\). Have \(k \subseteq k(Y) \subseteq k(X)\) where \(k(X)\) and \(k(Y)\) are both algebraic over \(k\). Thus \(k(X)/k(Y)\) is algebraic.
  \end{enumerate}
\end{proof}

\begin{eg}
  Consider the morphism
  \begin{align*}
    \alpha: \A^1 &\to \A^1 \\
    z &\mapsto z^r
  \end{align*}
  which induces a filed extension \(k(Y) = k(y) \subseteq k(X) = k(x), y \mapsto x^r\) so \(k(x^r) \subseteq k(x)\). The degree of \(\alpha\) is \(r\).
\end{eg}

Let \(\alpha: X \to Y\) be a nonconstant morphism of smooth irreducible projective curves. Then \(\alpha\) is surjective (as \(\alpha(X) \subseteq Y\) is a closed subvariety (?) and not a finite set of points). Let \(y \in Y, t \in \mathcal O_{Y, y}\) a local coordinate. If \(x \in X, \alpha(x) = y\). Then \(t \compose \alpha \in \mathcal O_{X, x}\), i.e.\ \(t \compose \alpha\) is a function defined in some neighbourhood of \(x \in X\). So we can ask what is the order of vanishing of \(t \compose \alpha\) at \(x\), i.e.\ \(\nu_x(t\alpha)\). Call this the \emph{multiplicity} or \emph{ramification index} of \(\alpha\) at \(x\), denote it \(e_\alpha(x)\). How to calculate this? Choose a local parameter \(s\) at \(x\) then \(t\alpha = s^n \cdot u\) for some \(n \geq 0, u \in \mathcal O_{X, x}^*\). Then \(n = \nu_x(t\alpha) = e_\alpha(x)\).

\begin{eg}
  Assume \(\ch k \ndivides r\) and consider
  \begin{align*}
    \alpha: \A^1 &\to \A^1 \\
    z &\mapsto z^r
  \end{align*}
  Let's compute \(e_\alpha(x)\). Suppose \(a \in \A^1\). A local parameter at \(\alpha(a) = a^r\) is \(t = x - a^r\). Now
  \[
    t \compose \alpha(x) = x^r - a ^r = \prod_{i = 0}^{r - 1} (x - \zeta^ia)
  \]
  where \(\zeta\) is a primitive \(r\)th root of unity (here we used the assumption \(\ch k \ndivides r\)). Hence
  \[
    \nu_a (x^r - a^r) =
    \begin{cases}
      1 & a \neq 0 \\
      r & a = 0
    \end{cases}
  \]
  as \(x - a\) is a local parameter at \(a\).

  Notice that \(\# \alpha^{-1}(a) = r\) for all \(a \in \A^1\) if we count the points with multiplicity. This is a general phenomenon.
\end{eg}

\begin{theorem}[finiteness theorem]
  Let \(\alpha: X \to Y\) be a morphism of smooth projective irreducible curves. Then
  \begin{enumerate}
  \item for all \(y \in Y\),
    \[
      \sum_{x \in \alpha^{-1}(y)} e_\alpha(x) = \deg \alpha.
    \]
  \item if \(k(X)/k(Y)\) is separable then \(e_\alpha(x) = 1\) for all but finitely many \(x \in X\).
  \end{enumerate}
\end{theorem}

\begin{ex}
  Check the separability assumption in 2 is necessary.
\end{ex}

\begin{proof}
  Omitted.
\end{proof}

\begin{corollary}
  Let nonzero \(f \in k(X)\) where \(X\) is a smooth projective curve. Then the number of zeros of \(f\) equals to the number of poles of \(f\). More precisely, there are only finitely many zeros and poles, \(\{p \in X: \nu_p(f) \neq 0\}\) is finite and
  \[
    \sum_{p \in X} \nu_p(f) = 0.
  \]
\end{corollary}
Cauchy's theorem implies this if \(k = \C\).

\begin{proof}
  \(f \in k(X)\) is a rational map \(X \rational \P^1\). As \(X\) is smooth this extends to a well-defined morphism of algebraic varieties \(X \to \P^1\). Now \(x \in k(\P^1)\) is a local coordinate around \(0 \in \P^1\), so if \(f(p) = 0\) then \(e_f(p) = \nu_p(f)\). \(\frac{1}{x}\) is a local coordinate around \(\infty \in \P^1\) so if \(f(p) = \infty\) then \(e_f(p) = - \nu_p(f)\). If \(f(p) \neq 0\) or \(\infty\) then \(\nu_p(f) = 0\). Thus finiteness theorem says that
  \[
    \deg f = \sum_{p: f(p) = 0} \nu_p(f) = \sum_{p: f(p) = \infty} - \nu_p(f)
  \]
  and hence the result.
\end{proof}

The rest of this course aims to answer the question, given a curve and points on the curve, can we find a function with prescribed order of vanishing at these points?

\begin{definition}[divisor]\index{divisor}
  A \emph{divisor} \(D\) on a curve \(X\) is a formal sum \(D = \sum n_i P_i\) where \(n_i \in \Z, P_i \in X\) and only finitely many nonzero terms. \(\Div (X)\) is the abelian group of all divisors on \(X\), i.e.\ the free abelian group generated by points of \(X\).
\end{definition}

There is a homomorphism
\begin{align*}
  \deg: \Div(X) &\to \Z \\
  \sum n_i P_i &\mapsto \sum n_i
\end{align*}

If \(f \in k(X)\), define
\[
  \div(f) =  \sum_{p \in X} \nu_p(f) p.
\]
We just saw that
\[
  \deg \div (f) = 0.
\]
Define \(\Div^n(X) = \{D \in \Div(X): \deg D = n\}\). Divisors of the form \(\div (f)\) are called \emph{principal divisors}, denoted \(\div k(X)^*\). We will study
\[
  \Cl (X) = \operatorname{Pic} (X) = \Div(X) / \div k(X)^*,
\]
the class group, Picard group or group of line bundles on \(X\). Note that we have an induced homomorphism \(\deg: \Cl (X) \to \Z\).

\begin{proposition}
  If \(X = \P^1\) then \(\Cl (X) = \Z\).
\end{proposition}

\begin{remark}
  We will show this characterises \(\P^1\).
\end{remark}

\begin{proof}
  For any curve \(X\), \(\deg: \Cl(X) \to \Z\) is surjective so we must show \(\ker (\deg: \Cl(X) \to \Z) = 0\), i.e.\ any degree \(0\) divisor is of the form \(\div(f)\).

  Let
  \[
    D = \sum_{a \in \A^1} n_a (a) + n_\infty (\infty)
  \]
  so \(0 = \deg D = \sum n_a +n_\infty\) implies that \(n_\infty = -\sum n_a\). Consider \(f(x) = \prod_{a \in \A^1} (x - a)^{n_a}\). It is clear that \(\div (f) = D\).
\end{proof}

Write \([D]\) for the class of \(D \in \Div(X)\) in \(\Cl X\) and \(D \sim D'\) if \([D] = [D']\), i.e.\ if \(D = D' + \div (f)\) for some \(f \in k(X)^*\).

If \(D = \sum n_i P_i\), say \(D\) is \emph{effective} if \(n_i \geq 0\) for all \(i\). Write \(D \geq 0\).

\begin{eg}
  Let \(\alpha: X \to Y\) be a morphism. Then \(\sum_{x \in \alpha^{-1}(y)} e_\alpha(x) (x)\) is an effective divisor of degree \(\deg \alpha\).
\end{eg}

Suppose \(k = \cl k\) and let \(X\) be a smooth irreducible projective curve. Let \(D = \sum_{i = 1}^n n_i P_i\) be a divisor. Let
\begin{align*}
  L(D)
  &= \{f \in k(X)^*: D + \div (f) \geq 0\} \cup \{0\} \\
  &= \{f \in k(X)^*: \nu_{p_i}(f) \geq -n_i, \nu_p(f) \geq 0 \text{ for } p \notin \{p_1, \dots, p_r\}\} \cup \{0\}
\end{align*}
As \(\nu_p(f + g) \geq \min\{\nu_p(f), \nu_p(g)\}\), \(L(D)\) is a vector space (usual notation: \(\Gamma(X, \mathcal O(D))\)).

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(L(n P) = \{f \in k(X) \text{ with a pole of order \(\leq n\) at \(p\) and no other poles}\}\)
  \item If \(X = \P^1\), \(L(n(\infty))\) is the set of polynomials of degree \(\leq n\). \(L(n(\infty) - (a))\) where \(a \in \A^1\) equals to \((x - a) \cdot \{\text{polynomials of deg } \leq n - 1\}\).
  \end{enumerate}
\end{eg}

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item If \(\deg D < 0\) then \(L(D) = 0\).
  \item \(L(0) = k\).
  \item If \(D \sim D'\), i.e.\ \(D = D' + \div(g)\) where \(g \in k(X)^*\) then
    \begin{align*}
      L(D) &\to L(D') \\
      f &\mapsto fg
    \end{align*}
    is an isomorphism.
  \item If \(L(D) \neq 0\) then there exists \(D' \geq 0\) with \(D' \sim D\).
  \item \(\dim L(D) \leq \deg D + 1\) if \(\deg D \geq 0\). Indeed,
    \[
      \dim L(D) \leq \dim (L(D - p)) + 1
    \]
    for all \(p \in X\).
  \end{enumerate}
\end{lemma}

\begin{proof}\leavevmode
  \begin{enumerate}
  \item If \(f \in L(D)\) then \(\deg f \leq \deg D\) from the definition. But \(\deg f \geq 0\).
  \item Exercise.
  \item As \(\div (fg) = \div(f) + \div(g)\) since \(\nu_p(fg) = \nu_p(f) + \nu_p(g)\).
  \item Obvious from definition.
  \item Induct on \(\deg D\). If \(\deg D < 0\) then \(L(D) = 0\) by 1. Pick \(p \notin \{p_1, \dots, p_r\}\). Consider the map \(\lambda: L(D) \to k, f \mapsto f(p)\). This is well-defined as \(f\) has no pole at \(p\). Then \(f \in \ker \lambda\) if and only if \(f \in L(D)\) and \(\nu_p(f) \geq 1\), if and only if \(f \in L(D - p)\). Note that \(\lambda\) need not be surjective. As \(\ker \lambda = L(D - p)\), induction gives
    \[
      \dim L(D) \leq 1 + \dim L(D - p) \leq 1 + (\deg D - 1) + 1
    \]
    by induction. More generally, if \(D = n_p \cdot p + \sum_{q \neq p} n_q \cdot q\) then define
    \begin{align*}
      \lambda: L(D) &\to k \\
      f &\mapsto (t^{n_p} f)(p)
    \end{align*}
    if \(t\) is a local coordinate at \(p\).
  \end{enumerate}
\end{proof}

\begin{definition}
  \[
    \ell(D) = \dim L(D).
  \]
\end{definition}

\begin{eg}
  If \(X = \P^1\) and \(\deg D = n \geq 0\) then \(\ell(D) = \deg D + 1\).

  \begin{proof}
    By 3, this only depends on \([D] \in \Cl (\P^1) \cong \Z\), so may as well take \(D = n (\infty)\) and we have \(\ell(n (\infty)) = n + 1\).
  \end{proof}
\end{eg}

\begin{eg}
  Let \(E^0 = \{(x, y) \in \A^2: y^2 = (x - \lambda_1) (x - \lambda_2) (x - \lambda_3)\}\) where \(\lambda_i\)'s are distinct and \(\lambda_1 \lambda_2 \lambda_3 \neq 0\). Let \(E\) be the plane curve contained in \(\P^2\) defined by this, i.e.\ the closure of \(E^0\) in \(\P^2\). (Recall that \(E\) is the projective variety given by
  \[
    ZY^2 = (X - \lambda_1Z)(X - \lambda_2Z)(X - \lambda_3Z).
  \]
  It has an extra point when \(Z = 0\), which implies \(X = 0, Y \neq 0\), so a unique point at \(\infty\), \(P_\infty = [0:1:0]\))

  We will compute \(L(nP_\infty)\) for \(n\) small. Start by computing \(\div (x), \div (y)\). \(x = 0\) when \(y = \pm \sqrt{\lambda_1\lambda_2\lambda_3} = \pm c\). \(x = \infty\) at \(P_\infty\). Note that at \((x, y) = (0, \pm c)\), \(\frac{\partial f}{\partial y} \neq 0\) so \(x\) is a local parameter at these points and so
  \[
    \div (x) = a P_\infty + \underbrace{[0:c:1] + [0:-c:1]}_{\text{vanishes of order \(1\) at these points}}
  \]
  To find \(a\) we can either take a local coordinate, or use the fact that \(\deg (\div(x)) = 0\) so \(a = -2\). Similarly
  \[
    \div (y) = -3 P_\infty + \sum_{i = 1}^3 [\lambda_i:0:1]
  \]
  as \(\frac{\partial f}{\partial x} \neq 0\) at \([\lambda_i:0:1]\) so \(y\) is a local parameter there. Thus \(x \in L(2P_\infty), y \in L(3P_\infty)\). This is similar to computation of Weierstrass \(\wp\)-function.

  Claim that \(L(P_\infty) = k\). Granting the claim, lemma 5 implies that \(\dim L(nP_\infty) \leq n\), but
  \begin{align*}
    1, x &\in L(2 P_\infty) \\
    1, x, y &\in L(3 P_\infty) \\
    1, x, y, x^2 &\in L(4 P_\infty) \\
    1, x, y, x^2, xy &\in L(5 P_\infty)
  \end{align*}
  Note that all these are linearly independent. But
  \[
    1, x, y, x^2, xy, x^3, y^2 \in L(6 P_\infty),
  \]
  which are \emph{not} linearly indepedent as
  \[
    y^2 = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3).
  \]

  \begin{ex}
    \(\{x^i, x^iy: i \geq 0\}\) are linearly independent in \(k(X)\) and hence \(\dim L(n P_\infty) = n\) for all \(n \geq 1\).
  \end{ex}

  Compare this with \(X = \P^1\), \(\dim L(n \infty) = n + 1\) when \(n \geq 0\).

  Note that \(\lambda_i\)'s being distinct is essential as it ensures the curve is smooth. On the other hand, \(\lambda_1\lambda_2\lambda_3 \neq 0\) is just a convenience (without which \(x\) vanishes at \([0:c:1]\) with order \(2\)).

  \begin{proof}[Proof of claim]
    If \(L(P_\infty) \neq k\) then \(L(P_\infty) = k + kt\) for some function \(t \in k(E)\). Then \(t^n \in L(n P_\infty) \setminus L((n - 1) P_\infty)\) so \(1, t, \dots, t^n\) are a basis of \(L(n P_\infty)\). But \(x \in L(2 P_\infty), y \in L(3P_\infty)\) so exist \(g_2(t), g_3(t)\) polynomials of degree \(2\) and \(3\) such that \(x = g_2(t), y = g_3(t)\), so \(x = (a t + b)^2 + d\), \(a \neq 0, b, d \in k\). By a change of variable (replacing \(t\) by \(a t + b\)), the defining equation
    \[
      y^2 = \prod (x - \lambda_i)
    \]
    becomes
    \[
      g_3(t)^2 = \prod (t^2 - (\lambda_i - d)).
    \]
    But \(\lambda_i\)'s distinct implies that \(\lambda_i - d\) distinct so RHS is not a square in \(k(t)\), contradiction.
  \end{proof}
\end{eg}

Suppose \(X\) is a smooth projective curve, \(D \in \Div (X)\) with \(\ell(D) \geq 1\). Set \(m = \ell(D) - 1\). Choose a basis \(f_0, \dots, f_m\) of \(L(D)\). We get a rational map
\begin{align*}
  X &\rational \P^m = \P(L(D)^*) \\
  p &\mapsto [f_0(p): \cdots : f_m(p)]
\end{align*}
which, as \(X\) is smooth, extends to a morphism \(\alpha_D: X \to \P^m\).

Moreover if \(D \sim D'\), i.e.\ \(D' = D + \div (g)\) then \(f_0g, \dots, f_mg\) is a basis of \(L(D')\) by part 3 of the lemma and
\[
  [(gf_0)(p) : \cdots : (gf_n)(p)] = [f_0(p): \cdots: f_m(p)]
\]
so we get the same map to projective space. Thus the map \(\alpha_D: X \to \P^m\) depends only on \([D] \in \Cl(X)\).

\begin{eg}
  \(X = \P^1, D = n \infty, \ell(D) = n + 1\). Choose basis \(1, t, \dots, t^n\) of \(L(D)\). Have
  \[
    \alpha_D(t) = [1: t: \cdots :t^n]: \P^1 \to \P^n
  \]
  Write \(t = \frac{x_1}{x_0}\),
  \[
    \alpha_D[x_0: x_1] = [1: \frac{x_1}{x_0}: \cdots : \left( \frac{x_1}{x_0} \right)^n] = [x_0^n:x_0^{n - 1} x_1: \cdots : x_1^n]
  \]
\end{eg}

\begin{definition}[embedding]\index{embedding}
  \(\alpha: X \to Y\) is an \emph{embedding} of \(X\) if it is a morphism which induces an isomorphism between \(\alpha(X)\) and \(X\).
\end{definition}

\begin{ex}\leavevmode
  \begin{enumerate}
  \item Show \(\alpha_{n \infty}: \P^1 \to \P^n\) is an embedding if \(n \geq 1\).
  \item Show that the map
    \begin{align*}
      \alpha: \P^1 &\to \P^2 \\
      t &\mapsto [1: t^2 : t^3]
    \end{align*}
    is \emph{not} an embedding.
  \end{enumerate}
\end{ex}

\begin{ex}
  Let
  \[
    X = E = \Cl \{(x, y): y^2 = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3)\} \subseteq \P^2.
  \]
  Show
  \begin{align*}
    \alpha_{P_\infty}: E &\to \P^0 = \text{pt} \\
    \alpha_{2 P_\infty}: E &\to \P^1 = \P(\langle 1, x \rangle^*) \\
    (x, y) &\mapsto x \\
    \alpha_{3 P_\infty}: E &\to \P^2 = \P(\langle 1, x, y \rangle^*) \\
    (x, y) &\mapsto (x, y)
  \end{align*}
\end{ex}

\begin{theorem}[embedding criterion]
  Let \(X\) be a smooth projective curve and \(D \in \Div(X)\). Then \(\alpha_D: X \to \P^m\) is an embedding if and only if for all \(p, q \in X\),
  \[
    \ell(D - p - q) = \ell(D) - 2.
  \]
\end{theorem}
Intuition: if \(p \neq q\) then this ensures this is an injection. If \(p \neq q\) then this gives a criterion for singular point.

\begin{proof}
  Omitted for now. Instead, we will define the degree of a curve in \(\P^m\).
\end{proof}

When this happens, \(X\) is a curve in \(\P^m\) of \emph{degree} \(\deg D\).

\(X \subseteq \P^m = \P V\) where \(\dim V = m + 1\), \(X\) a smooth curve. Let \(H \subseteq \P^m\) be a hyperplane such that \(X \nsubseteq H\) (otherwise take \(m - 1)\)). Define
\[
  [H \cap X] \in \Cl(X)
\]
as \(H \cap X\) ``counted with multiplicity''. (picture) There exists a linear function \(x_0 \in V^*\) such that \(H = \{p: x_0(p) = 0\}\). Write this as \(x_0 = 0\). \(x_0\) is not a well-defined function in \(k(X)\). To get a rational function on \(X\), pick \(x_1 \in V^*\) such that \(x_1(p) \neq 0\). Now \(\frac{x_0}{x_1} \in k(X)\) and \(\nu_p(\frac{x_0}{x_1})\) is defined and we set it to be \(n_p\). If \(x_1'\) is another line with \(x_1'(p) \neq 0\) then
\[
  \nu_p(\frac{x_0}{x_1'}) = \nu_p(\frac{x_0}{x_1}) + \underbrace{\nu_p(\frac{x_1}{x_1'})}_{= 0}
\]
so \(n_p\) is independent of the choice of \(x_1\). We thus define
\[
  [H \cap X] = \sum_{p \in H \cap X} n_p p \in \Div(X).
\]
Notice that \(n_p \geq 0\) for all \(p\), i.e.\ \([H \cap X] \geq 0\). Moreover, if we picked another hyperplane \(H' = \{x_0' = 0\}\) with \(X \nsubseteq H'\) then
\[
  \nu_p(\frac{x_0}{x_1}) = \nu_p(\frac{x_0'}{x_0}) + \nu_p(\frac{x_0}{x_0'})
\]
hence
\[
  [H \cap X] = [H' \cap X] + \div (\frac{x_0}{x_0'}),
\]
so image in the class group is independent of the choice of \(H\). Thus we define
\begin{definition}
  \[
    \deg X = \deg [H \cap X]
  \]
  for any hyperplane \(H\) not containing \(X\).
\end{definition}

\begin{theorem}
  Let \(F(X_0, X_1, X_2)\) be a homogeneous polynomial of degree \(d\) and suppose \(Z(F) \subseteq \P^2\) is smooth irreducible. Then
  \[
    \deg Z(F) = d.
  \]
\end{theorem}

\begin{proof}
  Linearly change coordinates if necessary so \([0: 1 : 0] \notin Z(F)\). Then
  \[
    F = \sum_{i + j + k = d} a_{ijk} X_0^i X_1^j X_2^k
  \]
  and \(F[0: 1: 0] \neq 0\) implies that \(a_{0, d, 0} \neq 0\). Thus set \(x = \frac{X_0}{X_1}, z = \frac{X_2}{X_1}\) and
  \[
    f(x, z) = \frac{1}{a_{0, d, 0}} F(x, 1, z)
    = x^d + a_{d - 1} x^{d - 1} + \cdots + a_0
  \]
  where \(a_i = a_i(z)\) is a polynomial in \(z\) of degree \(\leq d - i\). \(f(x, z)\) is a polynomial of degree \(d\) in variable \(x\). In picture \(z = 0\) is the hyperplane \(H\) (yellow line) and we are computing \(H \cap X\) using chart \(X_1 \neq 0\) (complement of green line).

  We will now compute \(\nu_p(z)\) for all \(p \in \mathcal X_0\) where \(\mathcal X_0 = Z(F) \cap \{X_1 \neq 0 \} = \{(x, z): f(x, z) = 0\}\). Note the last expression is affine. But
  \[
    k[\mathcal X_0]/(z)
    = k[x, z]/(z, f(x, z))
    = k[x]/(f(x, 0)).
  \]
  Now write
  \[
    f(x, 0) = (x - \alpha_1)^{n_1} \cdots (x - \alpha_r)^{n_r}
  \]
  with \(\alpha_i\)'s distinct and \(\sum n_i = d\) and notice that points \((\alpha_i, 0)\) are exactly the intersections \(\mathcal X_0 \cap \{z = 0\}\). But Chinese remainder theorem says
  \[
    k[x]/(x - \alpha_1)^{n_1} \cdots (x - \alpha_r)^{n_r} \cong \bigoplus k[x]/(x - \alpha_i)^{n_i}.
  \]

   Let \(\mathcal X = Z(F)\). Claim
  \[
    \nu_p(z) = \dim \mathcal O_{\mathcal X, p}/(z) = \dim \mathcal O_{\mathcal X_0, p} /(z)
  \]
  by definition: as if \(t\) is a local parameter at \(p\), \(z = t^n \cdot u\) where \(n = \nu_p(z)\), and we've seen
  \[
    \mathcal O_{\mathcal X_0, p}/(z) = k[t]/(t^n)
  \]
  which has dimension \(n\). So
  \[
    k[\mathcal X_0]/(z) \cong \bigoplus_{p \in \mathcal X \cap H} \mathcal O_{\mathcal X, p}/(z) \cong \bigoplus_{i = 1}^r \mathcal O_{\mathcal X_0, (\alpha_i, 0)} /(z).
  \]
  Have
  \[
    \dim k[\mathcal X_0]/(z) = \sum n_i = \sum \nu_{p_i}(z) = d.
  \]
\end{proof}

\begin{remark}[quadrics]
  \(x^2 + y^2 = 1\), \(xy = 1\) and \(y = x^2\) are three type of curves over \(\R\), and two types over \(\C\). But they all correspond to curves in \(\P^2\): \(XY = Z^2\) has two points \([1:0:0]\) and \([0:1:0]\) at infinity while for \(YZ = X^2\), there is one point (with multiplicity 2) at infinity. There is only one family of quadric (degree \(2\) curve) in \(\P^2\), isomorphic to \(\P^1\).
\end{remark}

\begin{corollary}[Bezout's theorem]\index{Bezout's theorem}
  If \(X = Z(F), W = Z(G)\) with \(\deg F = d, \deg G = d'\) are two curves in \(\P^2\) such that \(X \nsubseteq W, W \nsubseteq X\) then they intersect in \(\leq dd'\) points.
\end{corollary}

\begin{proof}
  Given a curve \(\mathcal X\) in \(\P^m\) and \(G \in k[X_0, \dots, X_n]\) homogeneous of degree \(d'\) such that \(X \nsubseteq W = Z(G)\). Define
  \[
    [\mathcal X \cap W] = \sum_{p \in \mathcal X \cap W} m_p p
  \]
  where \(m_p = \nu_p(G/X_1^{d'})\) for any linear function \(X_1\) such that \(X_1(p) \neq 0\). As
  \[
    \frac{G}{X_1^{d'}} = \left( \frac{X_0}{X_1} \right)^{d'} \cdot \left( \frac{G}{X_0^{d'}} \right)
  \]
  but \(\nu_p(X_0/X_1)\) is the order of vanishing of \(\mathcal X\) along \(X_0\) so
  \[
    [\mathcal X \cap W] = d'[\mathcal X \cap H] + \div \frac{G}{X_0^{d'}}
  \]
  hence
  \[
    [\mathcal X \cap W] = d' [\mathcal X \cap H] \in \Cl(\mathcal X)
  \]
  with \(\deg [\mathcal X \cap W] = d' \deg [\mathcal X \cap H]\). So if \(m = 2\) and \(W, \mathcal X \subseteq \P^2\), \(\deg[\mathcal X \cap H] = d\), by the theorem. Hence \(\# (\mathcal X \cap W) \leq dd'\).
\end{proof}

\section{Differentials}

Let \(B\) be a ring, \(A \subseteq B\) a subring.

\begin{definition}[Kähler differential]\index{Kähler differential}\index{cotangent bundle}
  The \emph{Kähler differential}, \emph{\(1\)-form} or \emph{relative cotangent bundle} \(\Omega^1_{B/A}\) is the free \(B\)-module generated by \(B\), which we denote by \(\d b\) for \(b \in B\), quotiented by the submodule generated by
  \begin{align*}
    &\d(fg) - f \d g - g \d f \\
    &\d(b + b') - \d b - \d b' \\
    &\d a
  \end{align*}
  where \(b, b', f, g \in B, a \in A\).
\end{definition}

\begin{ex}\leavevmode
  \begin{enumerate}
  \item Let \(X\) be an affine algebraic variety over \(k\), \(x \in X\) and \(\ev_x: k[X] \to k\) the corresponding \(k\)-algebra homomorphism. Show that
    \[
      \Hom_{k[X]} (\Omega^1_{k[X]/k}, k) \cong \Der(k[X], \ev_x)
    \]
    where on LHS \(k\) is regarded as a \(k[X]\)-module via \(\ev_x\).
  \item More generally, for any \(B\)-module \(M\),
    \[
      \Hom_B(\Omega^1_{B/A}, M) \cong \{A\text{-linear derivations } B \to M\}.
    \]
    Hence \(\Omega^1_{k[X]/k}\) is dual to the tangent bundle, hence called the \emph{cotangent bundle}.
  \end{enumerate}
\end{ex}

\begin{definition}[rational differential]\index{rational differential}
  The \emph{rational differentials} on \(X\) is defined to be \(\Omega^1_{k(X)/k}\).
\end{definition}
If you prefer the language of complex geometry, this is the space of meromorphic differential forms.

Usual rules of calculus apply so for example
\[
  0 = \d (1) = \d (\frac{g}{g}) = \frac{1}{g} \d g + g \d \frac{1}{g}
\]
by Leibniz so
\[
  \d \frac{1}{g} = -\frac{1}{g^2} \d g.
\]
Similarly
\[
  \d(fg) = \frac{g \d f - f \d g}{g^2}.
\]

\begin{corollary}\leavevmode
  \begin{enumerate}
  \item \(\Omega^1_{k(x)/k} = \Omega^1_{k(\P^1)/k} = k(x) \d x\) where \(x\) is transcendental over \(k\).
  \item If \(L \supseteq k\) is a separable algebraic extension then \(\Omega^1_{L/k} = 0\).
  \end{enumerate}
\end{corollary}

\begin{proof}
  If \(\alpha \in L\) then by definition there exists a monic \(f(z) \in k[z]\) such that \(f(\alpha) = 0\) and \(f'(\alpha) \neq 0\). Differentiate the relation \(f(\alpha) = 0\) to get \((\d f)(\alpha) = 0\). But \(\d f(\alpha) = f'(\alpha) \d \alpha\) and \(f'(\alpha) \neq 0\) so \(\d \alpha = 0\).
\end{proof}

Combining these, get

\begin{lemma}
  If \(X\) is a curve, \(p \in X\) smooth and \(t\) a local parameter at \(p\) then
  \[
    \Omega^1_{k(X)/k} = k(X) \d t.
  \]
\end{lemma}

\begin{proof}
  If \(t\) is a local parameter then the extension \(k(X)/k(t)\) is algebraic and separable (the first one is obvious by transcendence degree and the second requires proof, but we omit it). Thus if \(\alpha \in k(X)\) there exists \(f \in k(t)[z]\) such that \(f(\alpha) = 0, \frac{\partial f}{\partial z}(\alpha) \neq 0\). Write \(f(z) = \sum f_i(t) z^i\) where \(f_i(t) \in k(t)\). Differentiate,
  \[
    0 = \d 0 = \d f(\alpha) = \d (\sum f_i(t) \alpha^i)
    = \sum (f_i'(t) \alpha^i) \d t + \underbrace{\sum i f_i(t) \alpha^{i - 1}}_{= \frac{\partial f}{\partial z}(\alpha)} \d \alpha
  \]
  by linearity and Leibniz rule. We get
  \[
    \d \alpha = \frac{- \sum f_i'(t) \alpha^i}{(\p f/\p z)(\alpha)} \d t \in k(X) \d t.
  \]
\end{proof}

\begin{definition}[regular]\index{differential form!regular}
  If \(\omega \in \Omega^1_{k(X)/k}\), \(p \in X\) smooth and \(t\) a local parameter at \(p\) so \(\omega = f \d t\) for some \(f \in k(X)\). Define the order of vanishing of \(\omega\) at \(p\) to be
  \[
    \nu_p(\omega) = \nu_p(f)
  \]
  and the divisor of \(\omega\) to be
  \[
    \div(\omega) = \sum_p \nu_p(\omega) p.
  \]
  Say \(\omega\) is \emph{regular} at \(p\) if \(\nu_p(\omega) \geq 0\).
\end{definition}
Need to show that \(\nu_p(\omega)\) is independent of choice of local parameter \(t\).

\begin{lemma}\leavevmode
  \begin{enumerate}
  \item If \(f \in \mathcal O_{X, p}\) then \(\nu_p(\d f) \geq 0\).
  \item If \(t_1\) is any local coordinate at \(p\) then \(\nu_p(\d t_1) = 0\). In particular, \(\nu_p(\omega)\) is well-defined and
    \[
      \nu_p(f \d t_1) = \nu_p(f) + \nu_p(\d t_1).
    \]
  \item If \(f \in k(X)\) has \(\nu_p(f) = n < 0\) then \(\nu_p(\d f) = \nu_p(f) - 1\) if \(\ch k \ndivides n\).
  \end{enumerate}
\end{lemma}

\begin{proof}\leavevmode
  \begin{enumerate}
  \item Choose an affine open neighbourhood \(X_0\) of \(X\) so \(p \in X_0 \subseteq \A^N\). Then \(f \in \mathcal O_{X, p}\) means that \(f = \frac{g}{h}\) where \(g, h \in k[x_1, \dots, x_N]\), \(h(p) \neq 0\). So
    \[
      \d f = \frac{h \d g - g \d h}{h^2} = \sum_{i = 1}^N \gamma_i \d x_i
    \]
    for some \(\gamma_i \in \mathcal O_{X, p}\), that is \(\nu_p(\gamma_i) \geq 0\). Hence
    \[
      \nu_p(\d f) \geq \min \{\nu_p(\d x_i): i = 1, \dots, N\}.
    \]
    Hence \(\{\nu_p(\d f): f \in \mathcal O_{X, p}\}\) is bounded below. Choose \(f \in \mathcal O_{X, p}\) with \(\nu_p(\d f)\) minimal. Write \(f - f(p) = t f_1\), \(f_1 \in \mathcal O_{X, p}\). Hence
    \begin{equation*}
      \label{eqn:differential}
      \d f = \d(f - f(p)) = f_1 \d t + t \d f_1.
      \tag{\ast}
    \end{equation*}
    If \(\nu_p(f) < 0\) then as \(\nu_p(f_1 \d t) = \nu_p(f_1) \geq 0\) by definition, then \eqref{eqn:differential} implies that
    \[
      \nu_p(\d f_1) = \nu_p(\d f) - 1,
    \]
    contradicting minimality of \(\nu_p(\d f)\).
  \item \(t_1 = u t\) for some \(u \in \mathcal O_{X, p}^*\) and hence
    \[
      \d t_1 = u \d t + t \d u.
    \]
    By 1, \(\d u = g \d t\) with \(\nu_p(g) \geq 0\). So \(\d t_1 = (u + tg) \d t\) and \(\nu_p(u + tg) = \nu_p(u) = 0\).
  \item \(f = t^n u\) then \(\d f = n t^{n - 1} u \d t + t^n \d u\) and 2 implies the result.
  \end{enumerate}
\end{proof}

\begin{proposition}
  Let \(\omega \in \Omega^1_{k(X)/k}\). Then \(\nu_p(\omega) = 0\) for all but finitely many \(p \in X\).
\end{proposition}

\begin{proof}
  Choose \(t \in k(X)\) such that \(k(X)/k(t)\) is separable algebraic (for example \(t\) is a local parameter at some point \(p\), or \(t\) is obtained from Noether normalisation). Then \(t\) defines a rational map \(\alpha = [1: t]: X \rational \P^1\), hence extends to a map \(\alpha: X \to \P^1\) as \(X\) is smooth projective. Finiteness theorem says that only finitely many points \(p\) with \(\alpha(p) = \infty\), or with \(e_\alpha(p) > 1\). For any other \(p \in X\), \(t - t(p)\) is a local coordinate at \(p\), and so \(\nu_p(\d t) = 0\) for all but finitely many \(p\). Thus the proposition holds if \(\omega = \d t\).

  For any arbitrary \(\omega \in \Omega^1_{k(X)/k}\), \(\omega = f \d t\) and
  \[
    \nu_p(f \d t) = \nu_p(f) + \nu_p(\d t)
  \]
  and \(\nu_p(f) = 0\) for all but finitely many \(p\), proving the result.
\end{proof}

\begin{definition}
  The divisor of a Kähler form is defined to be
  \[
    \div \omega = \sum_{p \in X} \nu_p(\omega) p \in \Div(X).
  \]
\end{definition}
We have just shown that this is a finite sum and indeed well-defined.

As \(\div (f\omega) = \div f + \div \omega\), the class of \(\div(\omega)\) in \(\Cl(X)\) is \emph{independent} of \(\omega\). This is called the \emph{canonical class}\index{canonical class} \(\mathcal K_X = [\div \omega]\) for any \(0 \neq \omega \in \Omega^1_{k(X)/k}\).

Pick \(0 \neq \omega_0 \in \Omega^1_{k(X)/k}\). Recall that
\begin{align*}
  L(\mathcal K_X)
  &= L(\div(\omega_0)) \\
  &= \{f \in k(X): \div(\omega_0) + \div (f) \geq 0\} \\
  &= \{f \in k(x): \div (f \omega_0) \geq 0\} \\
  &= \{\omega \in \Omega^1_{k(X)/k}: \div \omega \geq 0\}
\end{align*}

\begin{definition}[genus]\index{genus}
  We define the \emph{genus} of \(X\) to be
  \[
    \ell(\mathcal K_X) = \dim L(\mathcal K_X).
  \]
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item Let \(X = \P^1\). Let \(x\) be a coordinate on \(\P^1\) and choose \(\omega = \d x\). Must compute \(\nu_p(\d x)\) for \(p \in \P^1\). If \(p \in \A^1\) then \(x - p\) is a local coordinate and \(\d (x - p) = \d x\) has \(\nu_p(\d x) = 0\).

    If \(p = \infty\) then \(t = \frac{1}{x}\) is a local coordinate and
    \[
      \d x = \d \left( \frac{1}{t} \right) = -\frac{1}{t^2} \d t
    \]
    so \(\nu_\infty(\d x) = -2\) so \(\div(\d x) = -2 \infty = \mathcal K_X\). Thus \(\deg \mathcal K_X = -2\). Then by a lemma \(\ell(\mathcal K_X) = 0\) so \(\P^1\) has genus \(0\).
  \item \(y^2 = f(x) = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3)\) where \(\lambda_i\)'s distinct. This gives \(X = E \subseteq \P^2\) with a unique point at \(\infty\), \(P_\infty = [0:1:0]\). Take derivative, \(2 y \d y = f'(x) \d x\). Let's consider the 1-form
    \[
      \omega = \frac{\d x}{y} = \frac{2 \d y}{f'(x)} \in \Omega^1_{k(E)/k}.
    \]
    Need to compute \(\div \omega\). Given \(p = (x_0, y_0) \in \A^2\), if \(f'(x_0) \neq 0\) then \(y - y_0\) is a local coordinate so
    \[
      \omega = \frac{2}{f'(x_0)} \d y = \frac{2}{f'(x_0)} \d (y - y_0)
    \]
    and thus \(\nu_p(\omega) = 0\).

    If \(y_0 = \frac{1}{2} \frac{\partial  }{\partial y}(y^2 - f(x))|_p \neq 0\) then \(x - x_0\) is a local parameter so
    \[
      \omega = \frac{1}{y} \d (x - x_0)
    \]
    has \(\nu_p(\omega) = 0\). Since \(\lambda_i\)'s are distinct and the curve is smooth at \(p\), at least one of these happens.

    At \(p = P_\infty\), have
    \[
      Y^2Z = (X - \lambda_1Z)(X - \lambda_2Z)(X - \lambda_3Z).
    \]
    Consider the chart \(Y \neq 0\). Write
    \begin{align*}
      u &= \frac{x}{y} = \frac{X}{Y} \\
      v &= \frac{1}{y} = \frac{Z}{Y}
    \end{align*}
    In this chart, \(E\) becomes \(\{(u, v): g(u, v) = 0\}\) where
    \[
      g(u, v) = v - (u - \lambda_1v)(u - \lambda_2v)(u - \lambda_3v).
    \]
    In this chart \(P_\infty\) corresponds to \((u, v) = (0, 0)\). As
    \[
      \frac{\partial g}{\partial v}\Big|_{(0, 0)} = 1 \neq 0
    \]
    \(u\) is a local parameter at \((0, 0)\). Thus \(\nu_{P_\infty}(u) = 1\) and \(\nu_{P_\infty}(v) \geq 1\). Here is an ad hoc way of computing it:
    \[
      \nu_{P_\infty}(u - \lambda_i v) \geq 1
    \]
    so \(\nu_{P_\infty}(v) \geq 3\). Thus \(\nu_{P_\infty}(u - \lambda_i v) = 1\) and \(\nu_{P_\infty}(v) = 3\). But then \(y = \frac{1}{v}\) so \(\nu_{P_\infty}(y) = -3\). So
    \[
      \nu_{P_\infty}(x) = \nu_{P_\infty}(ux) = 1 - 3 = -2.
    \]
    So
    \[
      \nu_{P_\infty}(\d x) = -2 - 1 = -3
    \]
    if \(\ch k \neq 2\) by lemma 3. Thus
    \[
      \nu_{P_\infty} \left(\frac{\d x}{y}\right) = -3 - (-3) = 0
    \]
    so \(\div \omega = 0\), i.e.\ \(\mathcal K_X = 0\). Thus \(g = \ell(0) = 1\). \(E\) has genus \(1\).
  \end{enumerate}
\end{eg}

\begin{definition}[elliptic curve]\index{elliptic curve}
  A curve of genus \(1\) is called an \emph{elliptic curve}.
\end{definition}
We showed \(y^2 = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3)\) has genus \(1\).

\begin{proposition}
  Let \(\mathcal X = Z(F) \subseteq \P^2\) be an irreducible smooth projective curve, \(F = F(X, Y, Z)\) homogeneous of degree \(d\). Then
  \[
    \mathcal K_X = (d - 3) [\mathcal X \cap H]
  \]
  where \(\mathcal X \cap H\) is the divisor of the intersection of any line \(H\) (i.e.\ hyperplane) with \(\mathcal X\). In particular
  \[
    \deg \mathcal K_X = d(d - 3).
  \]
\end{proposition}

\begin{proof}
  Let \(x = \frac{X}{Z}, y = \frac{Y}{Z}\) and \(f(x, y) = F(x, y, 1)\) be the equation of \(\mathcal X\) on \(\A^2\) which is the chart \(Z \neq 0\) in \(\P^2\). Differentiate,
  \[
    \d f = \frac{\partial f}{\partial x} \d x + \frac{\partial f}{\partial y} \d y = 0 \in \Omega_{k(X)/k}^1
  \]
  as \(f = 0 \in k(X)\). Take
  \[
    \omega = \frac{\d x}{\partial f/\partial y} = - \frac{\d y}{\partial f/\partial x}
  \]
  and need to compute \(\nu_p(\omega)\) for all \(p \in \mathcal X\).

  Let \(p = (x_0, y_0) \in \A^2 \cap \mathcal X\). If \(\frac{\partial f}{\partial y}(p) \neq 0\) then \(x - x_0\) is a local coordinate at \(p\) so \(\omega = \frac{\d(x - x_0)}{\p f/\p y}\) has \(\nu_p(\omega) = 0\). If \(\frac{\partial f}{\partial x}(p) \neq 0\) then \(y - y_0\) is a local coordinate so \(\nu_p(\omega) = 0\). As \(\mathcal X\) is smooth by hypothesis, at least one of this is nonzero, so \(\nu_p(\omega) = 0\) for all \(p \in \A^2 \cap \mathcal X\), i.e.\ with the choice of \(\omega\), all contributions occur at the line at \(\infty\), which is \(z = 0\).

  If necessary, change coordinates on the \(z = 0\) line so \([1:0:0] \notin \mathcal X\). Then \(\mathcal X \cap \{z = 0\}\) is contained in the chart \(Y \neq 0\). (the only case in which we can't do this operation is \(\{z = 0\} \subseteq \mathcal X\), but in this case \(X\) is just \(\P^1\)). Let
  \begin{align*}
    u &= \frac{Z}{Y} = \frac{1}{y} \\
    v &= \frac{X}{Y} = \frac{x}{y}
  \end{align*}
  so \(u, v\) are coordinates on \(Y \neq 0\) chart. Now the equation of \(\mathcal X\) is given by
  \[
    g(u, v) = F(v, 1, u) = F(\frac{x}{y}, 1, \frac{1}{y}) = y^{-d} F(x, y, 1) = y^{-d} f(x, y),
  \]
  that is
  \[
    f(x, y) = y^d g(u, v).
  \]
  Now differentiate and use chain rule,
  \[
    \frac{\partial f}{\partial x}
    = y^d \left( \frac{\partial g}{\partial v} \frac{\partial v}{\partial x} + \frac{\partial g}{\partial u} \underbrace{\frac{\partial u}{\partial x}}_{= 0} \right)
    = y^{d - 1} \frac{\partial g}{\partial v}
  \]
  Also \(\d y = - \frac{1}{u^2} \d u\) so
  \[
    \omega = - \frac{\d y}{\p f/\p x} = u^{d - 3} \frac{\d u}{\p g/\p v} = u^{d - 3} \eta
  \]
  where
  \[
    \eta = \frac{\d u}{\p g/\p v} = - \frac{\d v}{\p g/\p u}
  \]
  For exactly the same reason as before, \(\nu_p(\eta) = 0\) for all \(p \in \A^2_{(u, v)} \cap \mathcal X\). Thus
  \[
    \nu_p(\omega) = (d - 3) \nu_p(u) + \nu_p(\eta) = (d - 3) \nu_p(u).
  \]
  Finally observe that
  \[
    \nu_p(u) = \nu_p(\frac{Z}{Y})
  \]
  is just the contact order of the line \(Z = 0\) with \(\mathcal X\), i.e.\ \([\mathcal X \cap \{Z = 0\}] = \sum_{p \in \mathcal X \subseteq \{Z = 0\}} \nu_p(\omega) p\), by definition.
\end{proof}

\section{Riemann-Roch theorem}

\begin{theorem}[classical Riemann-Roch]\index{Riemann-Roch theorem}
  Let \(X\) be a smooth projective curve with genus \(g = g(X) = \ell(\mathcal K_X)\). Let \(D = \sum n_i P_i \in \Div(X)\). Then
  \[
    \ell(D) - \ell(\mathcal K_X - D) = 1 - g + \deg D.
  \]
\end{theorem}
We will not prove this theorem but will spend the rest of the course understanding the statement and its consequences. Immediate consequences are:
\begin{enumerate}
\item take \(D = 0\). As \(\ell(0) = 1\), this says that \(\ell(\mathcal K_X) = g\), which is the definition of genus.
\item take \(D = \mathcal K_X\), we get \(\deg \mathcal K_X = 2g - 2\).
\item If \(\deg D > 2g - 2\) then \(\deg (\mathcal K_X - D) < 0\) so \(\ell(\mathcal K_X - D) = 0\) so by Riemann-Roch,
  \[
    \ell(D) = 1 - g + \deg D.
  \]
  Warning: if \(0 < \deg D \leq 2g - 2\), the behaviour of \(\ell(D)\) is complicated as you vary \(D\) in \(\Cl^a(X)\), \(a = \deg D\) fixed, \(\ell\) can jump. In fact \(\Cl^a(X)\) is an algebraic variety and it stratifies into subvarieties according to \(\ell(D)\). This is \emph{Brill-Noether loci}.
\item If \(\deg D > 2g\) then for all \(p, q \in X\),
  \[
    \ell(D - p - q) = \ell(D) - 2 = 1- g - 2 + \deg D.
  \]
  Hence by embedding criterion
  \[
    \alpha_D: X \to \P(L(D)^*) \cong \P^n
  \]
  is an embedding, with image a curve of degree \(\deg D\).
\end{enumerate}

\begin{corollary}
  If \(\mathcal X\) is a smooth plane curve of degree \(d\), then as \(\deg \mathcal K_X = d(d - 3)\), have
  \[
    g = \frac{1}{2}(d - 1)(d - 2).
  \]
\end{corollary}

For example if \(d = 1\) or \(2\), correponding to line and conics respectively, we have \(g = 0\). If \(d = 3\) then \(g\) = 1. In general we have a progression
\[
  0, 0, 1, 3, 6, 10, \cdots
\]
which does not have every natural number in there. Thus smooth projective curves of genus \(2, 4, 5, 7, \cdots\) cannot occur inside \(\P^2\).

Let's study curves of small genus using Riemann-Roch.

\begin{proposition}
  \(X\) has genus \(0\) if and only if \(X = \P^1\).
\end{proposition}

\begin{proof}\leavevmode
  \begin{itemize}
  \item \(\impliedby\): done earlier.
  \item \(\implies\): suppose \(X\) has genus \(0\). Let \(p \in X\). The divisor \((p)\) has degree \(1\). As \(1 > -2 = 2g - 2\), by Riemann-Roch \(\ell((p)) = 2\). But \(k = L(0) \subseteq L((p))\) so exists \(f \in L((p)) \setminus k\). Have \(\div(f) + (p) \geq 0\), i.e.\ \(f\) has a pole at \(p\) and no other pole. But \(\div(f)\) has degree \(0\), so \(\deg (\div(f) + (p)) = 1\), which is saying \(\div(f) = -(p) + (q)\) for some \(q \in X\). In addition \(p \neq q\) as \(f\) is not constant. As \(p \neq q\), \(f\) is not constant so \(\alpha = [1:f]: X \rational \P^1\) is a nonconstant rational map, hence a morphism (as \(X\) is smooth) of degree \(1\). Thus by an exercise on example sheet 3 \(\alpha\) is an isomorphism.
  \end{itemize}
\end{proof}
Note that there are two parts of the proof: we showed that if \(\ell((p)) = 2\) for some \(p \in X\) then \(X \cong \P^1\), and we used Riemann-Roch to show such \(p\) exists.

\subsection{Curves of genus 1}

Let \(X\) be a smooth projective curve with genus \(g = 1\). Then by Riemann-Roch, if \(\deg D > 0\) then \(\ell(D) = \deg D\).

Fix a point \(p_\infty \in X\). Have
\[
  \underbrace{L(0)}_k \subseteq \underbrace{L(p_\infty)}_k \subsetneq \underbrace{L(2p_\infty)}_{k\langle 1, x \rangle} \subsetneq \underbrace{L(3p_\infty)}_{k \langle 1, x, y\rangle} \subsetneq \cdots
\]
where we choose \(x \in L(2p_\infty) \setminus k, y \in L(3p_\infty) \setminus L(2p_\infty)\). As before, \(L(6p_\infty)\) contains \(1, x, y, x^2, xy, x^3, y^2\). But \(\dim L(6p_\infty) = 6\) so there exist a linear relation between these monomials, with \(x^3, y^2\) appearing with non-zero coefficients (as \(1, x, y, x^2, xy \in L(5 p_\infty)\) are linearly independent, and we cannot have only one of \(x^3, y^2\) with nonzero coefficient by considering the degree of pole at \(\infty\)). Rescale \(x \mapsto \lambda x, y \mapsto \mu y\), we get a relation in \(k(X)\)
\[
  y^2 + a_1xy + a_3y = x^3 + a_2x^2 + a_4x + a_6
\]
for some \(a_i \in k\). This equation defines a curve \(C_0\) in \(\A^2\) (exericse: this is irreducible) with a unique point at \(\infty\), call it \(p_\infty\), so \(C = C^0 \cup \{p_\infty\} \subseteq \P^2\), and
\[
  \alpha_{3p_\infty} = [1:x:y]: X \to \P^2
\]
maps \(X\) into \(C\). As \(\alpha_{3p_\infty}\) is not constant and \(C\) is irreducible, this map is surjective. The embedding criterion tells us \(\alpha_{3p_\infty}\) is an isomorphism \(X \cong C\).

We can do better: if \(\ch k \neq 3\), we can complete the cube by \(x \mapsto x - \frac{a_2}{3}\) so the equation becomes (by renaming the coefficients)
\[
  y^2 + a_1xy + a_3y = x^3 + a_4x + a_6.
\]
If \(\ch k \neq 2\), we can complete the square by \(y \mapsto y - \frac{a_1x + a_3}{2}\) to get
\[
  y^2 = x^3 + q_2x^2 + a_4x + a_6.
\]
Combining these two, if \(\ch k \neq 2, 3\), do them in this order to get
\[
  y^2 = x^3 + a_4x + a_6 = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3)
\]
for \(\lambda_i\)'s distinct (by smoothness).

\begin{theorem}
  Every curve of genus \(1\) is isomorphic to a smooth plane curve of the form
  \[
    y^2 + a_1xy + a_3y = x^3 + a_2x^2 + a_4x + a_6.
  \]
\end{theorem}

Amazingly, every curve of genus \(1\) is a group by the following:
\begin{proposition}
  Let \(E\) be a curve of genus \(1\), \(p_\infty \in E\). Then the map
  \begin{align*}
    E &\to \Cl^0(E) \\
    p &\mapsto [p - p_\infty]
  \end{align*}
  is a bijection.
\end{proposition}

\begin{proof}
  For injectivity, if \(p - p_\infty = q - p_\infty\) in \(\Cl(E)\) the \(p - q = \div (f)\) for some \(f \in k(E)\). But then \([1:f]: E \to \P^1\) is an isomorphism, contradicting \(E\) having genus \(1\).

  For surjectivity, if \(D \in \Div(E)\) and \(\deg D = 0\), then
  \[
    \deg(D + p_\infty) = 1 > 2g - 2 = 0
  \]
  so by Riemann-Roch \(\ell(D + p_\infty) = 1\). Let \(0 \neq f \in L(D + p_\infty)\) so
  \[
    D + p_\infty + \div (f) \geq 0.
  \]
  But the degree of this is \(1\), implying that \(D + p_\infty + \div(f) = q\), i.e.\ \(D = q - p_\infty\) in \(\Cl(E)\).
\end{proof}

\begin{corollary}
  \(E\) is an algebraic group, where the group operation \(\boxplus\) is define by
  \[
    p \boxplus q = r \iff (p - p_\infty) + (q - p_\infty) = (r - p_\infty)
  \]
  in \(\Cl(E)\), i.e.\ if \(p + q = r + p_\infty\) in \(\Cl(E)\).
\end{corollary}
Notice that the identity of the group is \(p_\infty\).

\begin{definition}[elliptic curve]\index{elliptic curve}
  An \emph{elliptic curve} is a pair \((E, p_\infty)\) where \(E\) is a curve of genus \(1\) and \(p_\infty \in E\).
\end{definition}

In fact, the group law is algebraic: consider \(\alpha_{3p_\infty}: E \to \P^2\) and let \(X, Y, Z\) be coordinates on \(\P^2\). As we know \(E \cap \{Z = 0\} = 3p_\infty\) and if \(L = \{\ell = 0\}\) is any line in \(\P^2\), \([L \cap E] = p_1 + p_2 + p_3\) and \(\div(\ell/z) = p_1 + p_2 + p_3 - 3p_\infty\). Note \(\ell/z \in k(E)\). Thus \(p_1 + p_2 + p_3 = 3p_\infty\) in \(\Cl(E)\), i.e.
\[
  p_1 \boxplus p_2 \boxplus p_3 = p_\infty \boxplus p_\infty \boxplus p_\infty = p_\infty.
\]
Thus geometrically the group law can be characterised as follow: any line \(L\) intersects \(E\) at three points, and the sum of the three points in the group is \(p_\infty\).

\begin{ex}\leavevmode
  \begin{enumerate}
  \item Show that for fixed \(p \in E\), the map
    \begin{align*}
      E &\rational E \\
      e &\mapsto e \boxplus p
    \end{align*}
    is a rational map, hence a morphism, hence an isomorphism.
  \item Show the map \(y \mapsto \boxminus y\) is a morphism (i.e.\ it is a rational function).
  \item Show that \(\boxplus: E \times E \to E\) defines a morphism so \(E\) is a group object in the category of smooth projective varieties.
  \end{enumerate}
\end{ex}

Suppose \(E = \{y^2 = (x - \lambda_1)(x - \lambda_2)(x - \lambda_3)\} \cup \{p_\infty\}\) and \(\ch k \neq 2, 3\). Consider the line \(\{x = a\}\) in \(\P^2\). It intersects \(E\) at \(p_\infty\) and at \((a, \pm b)\) for some \(b \in k\). Hence
\[
  (a, b) \boxplus (a, -b) \boxplus p_\infty = p_\infty
\]
i.e.
\[
  (a, b) \boxplus (a, -b) = p_\infty,
\]
that is \(\boxminus (a, b) = (a, -b)\), so this proves a special case of 2. This implies that \([2] p = 0\), that is \(p \boxplus p = p_\infty\) if and only if \(b = 0\) or \(p = p_\infty\), i.e.\ \(p = (\lambda_i, 0)\) or \(p = p_\infty\). These are exactly the ramification points of the morphism \(\alpha_{2p_\infty} = [x:1]: E \to \P^1\). That is, \(E\) is a double cover of \(\P^1\), ramified at 4 points, and these four points are just the points of order \(2\) on \(E\), i.e.\ \(\P^1 = E/(\Z/(2))\) where \(\Z/(2)\) acts on \(E\) by \(p \mapsto \boxminus p\). These 4 points are well-defined, independent of choices, up to a coordinate change on \(\P^1\), i.e.\ up to action of \(\PGL_2\) on \(\P^1\).

Let \(j(E)\) be the cross ratio of these 4 points \(\infty, \lambda_1, \lambda_2, \lambda_3\). It is an invariant of \((\P^1)^2/\PGL_2\). For example if we scale (change of coordinates?) so that \(y^2 = x(x - 1)(x - \lambda)\), then
\[
  j(E) = j(\lambda) = 2^8 \frac{(\lambda^2 - \lambda + 1)^3}{\lambda^2 (l - 1)^2}.
\]
Thus \(j(E) = j(E')\) if and only if \(E \cong E'\): only if because given \(\lambda_1, \lambda_2, \lambda_3, \infty\), we can define \(E\), if by the discussion above.

\begin{corollary}
  There is a three way correspondence
  \begin{align*}
    &\{\text{genus 1 curves up to isomorphism}\} \\
    \leftrightarrow & \{4 \text{ distinct points in } \P^1\}/\PGL_2 \\
    \leftrightarrow & \A^1 \quad \text{ given by } j
  \end{align*}
\end{corollary}

\subsection{Riemann-Hurwitz}

\begin{theorem}[Riemann-Hurwitz]\index{Riemann-Hurwitz}
  Let \(\alpha: X \to Y\) be a nonconstant morphism of smooth projective curves such that \(k(X)/k(Y)\) is a separable algebraic extension (for example if \(\ch k = 0\)). Set \(\chi(X) = 2 - 2g(X)\). Then
  \[
    \chi(X) = \chi(Y) \deg \alpha - \sum_{p \in X} (e_p(\alpha) - 1).
  \]
\end{theorem}

\begin{proof}
  \(\alpha\) defines a map
  \begin{align*}
    \alpha^*: \Omega^1_{k(Y)/k} &\to \Omega^1_{k(X)/k} \\
    f \d g &\mapsto (f \alpha) \d (g\alpha)
  \end{align*}
  Separability implies that \(\alpha^*\) is injective (as \(\alpha\) is nonconstant). Pick \(0 \neq \omega \in \Omega^1_{k(Y)/k}\), then by Riemann-Roch
  \[
    \deg \omega = 2 g(Y) - 2 = - \chi(Y).
  \]
  Let \(p \in X, q = \alpha(p) \in Y\) and pick local coordinates \(t_p, t_q\) at \(p, q\) respectively, so \(t_q \compose \alpha = u t_p^{e_p(\alpha)}\) where \(u\) is a unit. Write \(\omega = f \d t_q\) for some \(f \in k(Y)\), so \(\alpha^* \omega = f \alpha \d (u t^{e_p})\). Hence
  \begin{align*}
    \nu_p(\alpha^* \omega)
    &= \nu_p(f \alpha) + \nu_p(\d (ut^{e_p})) \\
    &= \nu_q(f) e_p + \nu_p(u t^{e_p}) - 1 \quad \text{if } \ch k \ndivides e_p \\
    &= \nu_q(\omega) e_p + e_p - 1
  \end{align*}
  Therefore
  \begin{align*}
    -\chi(X)
    &= \deg \alpha^* \omega \\
    &= \sum_{q \in Y} (\sum_{p \in \alpha^{-1}(q)} e_p) \nu_q(\omega) + \sum_{p \in X} (e_p - 1) \\
    &= \deg \alpha \sum_{q \in Y} \nu_q(\omega) + \sum_{p \in X} (e_p - 1)
  \end{align*}
\end{proof}

\begin{corollary}
  Let \(k = \C\). Then the topological Euler characteristic of a smooth projective curve \(X\) is \(2 - 2g\), i.e.\ \(g\) is the ``number of holes''.
\end{corollary}

\begin{proof}
  The topological characteristic of \(\P^1\) is \(2 = 2 - 0\) so the statement holds for \(X = \P^1\). In general, let \(f \in k(X)\) nonconstant. Then \(f\) defines a morphism \(\alpha: X \to \P^1\). Now Riemann-Hurwitz for \(f\) as a Riemann surface and as an algebraic curve coincide.
\end{proof}

\begin{corollary}
  If \(g(X) < g(Y)\) then there are no non-constant maps \(X \to Y\). In particular if \(g(Y) > 0\) then there are no non-constant maps \(\P^1 \to Y\).
\end{corollary}
c.f.\ exercise proving the non-existence of non-constant map from \(\P^1\) to an elliptic curve.

\begin{proof}
  By Riemann-Hurwitz for any \(\alpha: X \to Y\) non-constant,
  \[
    0 \leq 2(g(X) - g(Y)) + (-2g(Y) + 2)(\deg \alpha - 1) < 0,
  \]
  absurd.
\end{proof}

\begin{definition}[hyperelliptic]\index{hyperelliptic}
  If a curve \(X\) admits a degree \(2\) map \(X \to \P^1\), we say \(X\) is \emph{hyperelliptic}.
\end{definition}
For example an elliptic curve is hyperelliptic.

Suppose \(X\) is hyperelliptic, \(\pi: X \to \P^1\) is a degree \(2\) map and \(\ch k \neq 2\). If \(p \in X\), either \(e_p = 1\) and \(p\) is unramified, or \(e_p = 2\) and \(p\) is ramified (constrast this with the case \(\alpha: X \to \P^1\) with degree \(\geq 3\), where there are more than one type of ramification). Then Riemann-Hurwitz says that
\[
  2 - 2g = 2 \times 2 - \#\{\text{ramification points}\}
\]
so there are \(2 + 2g\) ramification points, which in particular is always even. For example if \(g = 1\) then there are \(4\), if \(g = 2\) then there are \(6\).

\subsection{Curves of genus \(2\)}

If a curve \(X\) has \(g(X) > 0\) then we can then consider the map \(\alpha_{\mathcal K}: X \to \P^{g - 1}\), the \emph{canonical morphism}\index{canonical morphism}. This is not very interesting for \(g(X) = 1\). Suppose \(X\) has genus \(2\).

\begin{proposition}
  \(\alpha_{\mathcal K}\) is a map of degree \(2\), so \(X\) is a hyperelliptic curve and \(\alpha_{\mathcal K}\) is ramified at \(6\) points.
\end{proposition}

\begin{proof}
  Only thing needs proving is that \(\alpha_{\mathcal K}\) has degree \(2\). As \(\ell(\mathcal K_X) = g(X) = 2 > 0\), \(\mathcal K_X = p + q\) in \(\Cl(X)\) and
  \[
    \ell(p + q) = \ell(\mathcal K_X) = 2 > 1
  \]
  so there exists a non-constant function \(h \in L(p + q)\), i.e.\ \(\div (h) + p + q \geq 0\). As \(h\) has poles at most at \(p\) and \(q\), \(\deg h = 1\) or \(2\). But \(\deg h = 1\) would imply \(X \cong \P^1\), contradicting \(X\) has genus \(2\). Thus \(\deg h = 2\) and \(\alpha_{\mathcal K_X} = [1:h]: X \to \P^1\) has degree \(2\).
\end{proof}

\begin{corollary}
  There is a map from

  the set of isomorphism classes of curves of genus 2 embeds

  to

  \{tuples of 6 points in \(\P^1\)\}/\(\PGL_2\),
\end{corollary}
We'll see in a moment these 6 points determine the curve, so this is an open embedding, suggesting that \(\dim\) \{curves of genus \(2\)\} is \(6 - 3 = 3\).

\begin{remark}
  For \(g \geq 2\), \(\alpha_{2\mathcal K_X}: X \to \P^n\) is always an embedding by Riemann-Roch and embedding theorem.
\end{remark}

\begin{proposition}
  Let \(X\) be a smooth curve of genus \(g\), \(g \geq 2\). Then
  \begin{enumerate}
  \item either \(X\) is hyperelliptic, i.e.\ admits a degree \(2\) map to \(\P^1\), in which case the canonical map factors
    \[
      \alpha_{\mathcal K_X}: X \surj \P^1 \embed \P^{g - 1}
    \]
    and \(\alpha_{\mathcal K_X}: X \to \P^1\) has degree \(2\).
  \item or \(X\) is not hyperelliptic, in which case \(\alpha_{\mathcal K_X}: X \to \P^{g - 1}\) is an embedding, called the \emph{canonical embedding}.
  \end{enumerate}
  Moreover, 2 happens for most curves of genus \(g\), \(g \geq 3\). The set of all curves of genus \(g\), i.e.\ the moduli space of curves of genus \(g\), denoted \(\mathcal M_g\), is an algebraic variety of dimension \(3g - 3\), and the set of all hyperelliptic curves of genus \(g\) is a subvariety, isomorphic to \((\P^1)^{2g + 2}/\PGL_2\), of dimension \(2g - 1\).
\end{proposition}

\begin{proof}
  We prove 2 first. The embedding criteria says \(\alpha_{\mathcal K_Z}\) is an embedding if and only if for all \(p, q \in X\),
  \[
    \ell(\mathcal K_X - p - q) = \ell(\mathcal K_X) - 2 = g - 2.
  \]
  Riemann-Roch says \(\ell(\mathcal K_X - p - q) = \ell(p + q) + g - 3\) so the embedding criteria is equivalent to \(\ell(p + q) = 1\). But \(\ell(p + q) > 1\) implies that \(X\) is hyperelliptic by the argument last time on \(g = 2\) curves. Conversely if \(X\) is hyperelliptic there exist \(p, q\) with \(\ell(p + q) > 1\) (obvious). Thus \(\ell(p + q) = 1\) if and only if \(X\) is not hyperelliptic and \(\alpha_{\mathcal K_X}\) is an embedding.

  For the first part, suppose \(X\) is hyperelliptic, i.e.\ there exists a double cover (degree \(2\) map) \(X \to \P^1\). This gives an embedding \(k(x) = k(\P^1) \embed k(X)\) which makes \(k(X)/k(x)\) an algebraic extension of degree \(2\). Assume \(\ch k \neq 2\), there exists \(y \in k(X)\) such that \(y^2 = f(x)\) for some \(f \in k(x)\) (by completing the square). This gives a rational function \(f: X \rational \P^1\). As \(X\) is smooth, get a morphism \(f: X \to \P^1\), ramified at \(\infty\) and at points \(a_1, \dots, a_r\) if \(f(x) = (x - a_1) \cdots (x - a_r)\). But we say that Riemann-Roch implies that there are \(2g + 2\) ramification oints, so \(\deg f = 2g + 1\). Need to show that \(\alpha_{\mathcal K_X}\) factors through \(\P^1\). To finish choose \(\omega = \frac{\d x}{y}\), and check that \(X^0\), defined to be
  \[
    \begin{tikzcd}
      X \ar[r, "f"] \ar[d, "\subseteq"] & \P^1 = \A^1 \cup \{\infty\} \ar[d, "\subseteq"] \\
      X^0 = f^{-1}(A) \ar[r] & \A^1
    \end{tikzcd}
  \]
  has \(X^0 = \{(x, y): y^2 = f(x)\}\) and \(L(\mathcal K_X) = \langle \omega, x\omega, \dots, x^{g - 1} \omega \rangle\) and \(f|_{X^0}: X^0 \to \A^1\) is \((x, y) \mapsto x\), so that
  \[
    \alpha_{\mathcal K_X} = [1:x:x^2:\cdots:x^{g - 1}]: X \to \P^{g - 1}
  \]
  Indeed factors through \(\P^1\) as
  \begin{align*}
    X &\to \P^1 &\to \P^{g - 1} \\
    (x, y) &\mapsto x &\mapsto [1:x: \cdots : x^{g - 1}]
  \end{align*}

  Finally we will not prove 3. See what happens when you restrict \(f\) to \(f^{-1}(\P^1 \setminus \{0\})\).
\end{proof}

\section{Abel-Jacobi theorem}

Let \(k = \C\) and \(X\) a smooth curve. Pick \(\omega \in L(\mathcal K_X)\). For concreteness, consider
\begin{align*}
  y^2 &= x^3 - a_2 x + a_4 \\
  \omega &= \frac{\d x}{y} = \frac{\d x}{\sqrt{x^3 - a_2 x + a_4}}
\end{align*}
For \(P, Q \in X\), we would like to define \(\int_P^Q \omega\), but this is not defined unless unless we choose a path \(\gamma\) from \(P\) to \(Q\). If \(\gamma\) is a loop and the loop is contractible then \(\int_\gamma \omega = 0\), but if we choose \(\gamma\) to be \(\gamma_1, \gamma_2\), two elements giving independent classes in homology, then the integral is not zero. Thus \(\int_P^Q\) is not well-defined, but it is well-defined up to multiples
\[
  k_1 \int_{\gamma_1} \omega + k_2 \int_{\omega_2} \omega,
\]
i.e.\ up to an element of \(\Z \tau_1 + \Z \tau_2\). Thus there is a well-defined pairing
\begin{align*}
  H_1(X; \Z) \times L(\mathcal K_X) &\to \C \\
  ([\gamma], \omega) &\mapsto \int_\gamma \omega
\end{align*}
which is linear, so defines a map
\[
  L(\mathcal K_X) \to \Hom_\Z(H_1(X, \Z), \C) \cong H^1(X; \C)
\]
If \(\ell(\mathcal K_G) = g\) then \(H_1(X, \Z) \cong \Z^{2g}\), so the cohomology group is \(\C^{2g}\). It is a fact that this is an injection, and RHS does not depende on the complex structure on \(X\) (and in particular, on the algebraic structure of \(X\)). However the map does change so we get a faimly of \(\C^g\) sitting inside a fixed \(\C^{2g}\).

\begin{theorem}[Abel-Jacobi]\index{Abel-Jacobi theorem}
  Pick a basis \(\omega_1, \dots, \omega_g\) of \(L(\mathcal K_X)\). Then the map
  \[
    P - Q \mapsto (\int_P^Q \omega_1, \dots, \int_P^Q \omega_g)
  \]
  extends to a well-defined map
  \[
    \Cl^0(X) \to \C^{g}/\Z^{2g}
  \]
  which is an isomorphism, so
  \[
    \Cl^0(X) \cong \C^g/\Z^{2g} = (S^1)^{2g}.
  \]
  The number \(\int_\gamma \omega\) for \(\gamma \in H_1(X; \Z)\) are called \emph{periods}.

  Moreover \(\Cl^0(X)\) is a projective algebraic variety, so an \emph{abelian variety}.
\end{theorem}

Elementary application: we can do integrals
\[
  \int_\gamma \frac{\d x}{x^2 + ax + b}
\]
by writing in elementary terms. but we cannot integrate
\[
  \int_\gamma \frac{\d x}{x^3 - x + 1}.
\]
The former is a quadric so isomorphic to \(\P^1\). The failure in doing so for cubic gives a point in \(\Cl^0(X)\).

\printindex
\end{document}