\chapter{Projective varieties}
\label{ch:projective_varieties}
Having studied affine varieties in $\Aff^n$, we now consider $\CP^n$.
We will also make it into a baby ringed space
in the same way as with $\Aff^n$.

\section{Graded rings}
\prototype{$\CC[x_0, \dots, x_n]$ is a graded ring.}
We first take the time to state what a graded ring is,
just so that we have this language to use (now and later).

This definition is the same as \Cref{def:graded_ring}.

\begin{definition}
	A \vocab{graded ring} $R$ is a ring with the following additional structure:
	as an abelian group, it decomposes as
	\[ R = \bigoplus_{d \ge 0} R^d \]
	where $R^0$, $R^1$, \dots, are abelian groups.
	The ring multiplication has the property that
	if $r \in R^d$ and $s \in R^e$, we have $rs \in R^{d+e}$.
	Elements of an $R^d$ are called \vocab{homogeneous elements};
	we write ``$d = \deg r$'' to mean ``$r \in R^d$''.

	We denote by $R^+$ the ideal $R \setminus R^0$ generated by
	the homogeneous elements of nonzero degree,
	and call it the \vocab{irrelevant ideal}.
\end{definition}
\begin{remark}
	For experts: all our graded rings are commutative with $1$.
\end{remark}
\begin{example}
	[Examples of graded rings]
	\listhack
	\begin{enumerate}[(a)]
		\ii The ring $\CC[x]$ is graded by degree: as abelian groups,
		$\CC[x] \cong \CC \oplus x\CC \oplus x^2\CC \oplus \dots$.
		\ii More generally, the polynomial ring $\CC[x_0, \dots, x_n]$
		is graded by degree.
	\end{enumerate}
\end{example}
\begin{abuse}
	The notation $\deg r$ is abusive in the case $r = 0$;
	note that $0 \in R^d$ for every $d$.
	So it makes sense to talk about ``the'' degree of $r$
	except when $r = 0$.
\end{abuse}

We will frequently refer to homogeneous ideals:
\begin{definition}
	An ideal $I \subseteq \CC[x_0, \dots, x_n]$ is \vocab{homogeneous}
	if it can be written as $I = (f_1, \dots, f_m)$
	where each $f_i$ is a homogeneous polynomial.
\end{definition}
\begin{remark}
	If $I$ and $J$ are homogeneous,
	then so are $I+J$, $IJ$, $I \cap J$, $\sqrt I$.
\end{remark}
\begin{lemma}[Graded quotients are graded too]
	Let $I$ be a homogeneous ideal of a graded ring $R$.
	Then
	\[ R/I = \bigoplus_{d \ge 0} R^d / (R^d \cap I) \]
	realizes $R/I$ as a graded ring.
\end{lemma}
Since these assertions are just algebra,
we omit their proofs here.
\begin{remark}
	In some other books, a homogeneous ideal (or \vocab{graded ideal}) is sometimes equivalently defined as an ideal $I$
	such that $I = \bigoplus_{d \ge 0} (R^d \cap I)$ as abelian group.
	In fact, we can verify that graded ideals are precisely the ones such that the quotient is naturally graded.
\end{remark}
\begin{example}
	[Example of a graded quotient ring]
	Let $R = \CC[x,y]$ and set $I = (x^3, y^2)$.
	Let $S = R/I$. Then
	\begin{align*}
		S^0 &= \CC \\
		S^1 &= \CC x \oplus \CC y \\
		S^2 &= \CC x^2 \oplus \CC xy \\
		S^3 &= \CC x^2y \\
		S^d &= 0 \qquad \forall d \ge 4.
	\end{align*}
	So in fact $S = R/I$ is graded,
	and is a six-dimensional $\CC$-vector space.
\end{example}


\section{The ambient space}
\prototype{Perhaps $\Vp(x^2+y^2-z^2)$.}
The set of points we choose to work with is $\CP^n$ this time,
which for us can be thought of as the set of $n$-tuples
\[ \left( x_0 : x_1 : \dots : x_n \right) \]
not all zero, up to scaling.
Equivalently, it is the set of lines through the origin in $\CC^{n+1}$.
Projective space is defined in full in \Cref{sec:top_spaces},
and you should refer there if you aren't familiar with projective space.

The right way to think about it is ``$\Aff^n$ plus points at infinity'':
\begin{definition}
	We define the set
	\[ U_i = \left\{ (x_0 : \dots : x_n) \mid x_i \neq 0  \right\}
		\subseteq \CP^n. \]
	These are called the \vocab{standard affine charts}.
\end{definition}
The name comes from:
\begin{exercise}
	[Mandatory]
	Give a natural bijection from $U_i$ to $\Aff^n$.
	Thus we can think of $\CP^n$ as the affine set $U_i$
	plus ``points at infinity''.
\end{exercise}
\begin{remark}
	In fact, these charts $U_i$ make $\CP^n$ with its usual topology
	into a complex manifold with holomorphic transition functions.
\end{remark}

\begin{example}
	[Colloquially, $\CP^1 = \Aff^1 \cup \{\infty\}$]
	The space $\CP^1$ consists of pairs $(s:t)$,
	which you can think of as representing the complex number $z/1$.
	In particular $U_1 = \{ (z:1) \}$
	is basically another copy of $\Aff^1$.
	There is only one new point, $(1:0)$.
\end{example}

However, like before we want to impose a Zariski topology on it.
For concreteness, let's consider $\CP^2 = \left\{ (x_0 : x_1 : x_2) \right\}$.
We wish to consider zero loci in $\CP^2$, just like we did in affine space,
and hence obtain a notion of a projective variety.

But this isn't so easy: for example,
the function ``$x_0$'' is not a well-defined function on points in $\CP^2$
because $(x_0 : x_1 : x_2) = (5x_0 : 5x_1 : 5x_2)$!
So we'd love to consider these ``pseudo-functions''
that still have zero loci. These are just the homogeneous polynomials $f$,
because $f$ is homogeneous of degree $d$ if and only if
\[
	f(\lambda x_0, \dots, \lambda x_n)
	= \lambda^d f(x_0, \dots, x_n).
\]
In particular, the relation ``$f(x_0, \dots, x_n) = 0$'' is
well-defined if $f$ is homogeneous. Thus, we can say:
\begin{definition}
	If $f$ is homogeneous, we can then define its \vocab{vanishing locus} as
	\[
		\Vp(f)
		= \left\{ (x_0 : \dots : x_n) \mid f(x_0, \dots, x_n) = 0 \right\}.
	\]
\end{definition}

The homogeneous condition is really necessary.
For example, to require ``$x_0 - 1 = 0$'' makes no sense,
since the points $(1:1:1)$ and $(2015:2015:2015)$ are the same.

It's trivial to verify that homogeneous polynomials do exactly what we want;
hence we can now define:
\begin{definition}
	A \vocab{projective variety} in $\CP^n$
	is the common zero locus of an arbitrary
	collection of homogeneous polynomials in $n+1$ variables.
\end{definition}

\begin{example}[A conic in $\CP^2$, or a cone in $\CC^3$]
	Let's try to picture the variety
	\[ \Vp(x^2+y^2-z^2) \subseteq \CP^2 \]
	which consists of the points $[x:y:z]$ such that $x^2+y^2=z^2$.
	If we view this as subspace of $\CC^3$
	(i.e.\ by thinking of $\CP^2$ as the set of lines through the origin),
	then we get a ``cone'':
	\begin{center}
		\includegraphics{media/cone.pdf}
	\end{center}

	If we take the standard affine charts now, we obtain:
	\begin{itemize}
		\ii At $x=1$, we get a hyperbola $\VV(1+y^2-z^2)$.
		\ii At $y=1$, we get a hyperbola $\VV(1+x^2-z^2)$.
		\ii At $z=1$, we get a circle $\VV(x^2+y^2-1)$.
	\end{itemize}
	That said, over $\CC$ a hyperbola and circle
	are the same thing; I'm cheating a little by drawing $\CC$
	as one-dimensional, just like last chapter.
\end{example}
\begin{ques}
	Draw the intersection of the cone above
	with the $z=1$ plane, and check that you do in fact get a circle.
	(This geometric picture will be crucial later.)
\end{ques}

\section{Homogeneous ideals}
Now, the next thing we want to do is define $\Vp(I)$ for an ideal $I$.
Of course, we again run into an issue with things like $x_0-1$ not
making sense.

The way out of this is to use only \emph{homogeneous} ideals.
\begin{definition}
	If $I$ is a homogeneous ideal, we define
	\[ \Vp(I) = \{ x \mid f(x) = 0 \; \forall f \in I\}. \]
\end{definition}
\begin{exercise}
	Show that the notion ``$f(x) = 0 \; \forall f \in I$''
	is well-defined for a homogeneous ideal $I$.
\end{exercise}
So, we would hope for a Nullstellensatz-like theorem
which bijects the homogeneous radical ideals to projective varieties.
Unfortunately:
\begin{example}
	[Irrelevant ideal]
	To crush some dreams and hopes, consider the ideal
	\[ I = (x_0, x_1, \dots, x_n). \]
	This is called the \vocab{irrelevant ideal};
	it is a homogeneous radical yet $\Vp(I) = \varnothing$.
\end{example}

However, other than the irrelevant ideal:
\begin{theorem}
	[Homogeneous Nullstellensatz]
	Let $I$ and $J$ be homogeneous ideals.
	\begin{enumerate}[(a)]
		\ii If $\Vp(I) = \Vp(J) \neq \varnothing$ then $\sqrt I = \sqrt J$.
		\ii If $\Vp(I) = \varnothing$, then either $I = (1)$
		or $\sqrt I = (x_0, x_1, \dots, x_n)$.
	\end{enumerate}
	Thus there is a natural bijection between:
	\begin{itemize}
		\ii projective varieties in $\CP^n$, and
		\ii homogeneous radical ideals of $\CC[x_0, \dots, x_n]$
		except for the irrelevant ideal.
	\end{itemize}
\end{theorem}
\begin{proof}
	For the first part, let $V = \Vp(I)$ and $W = \Vp(J)$
	be projective varieties in $\CP^n$.
	We can consider them as \emph{affine varieties} in $\Aff^{n+1}$
	by using the interpretation of $\CP^n$
	as lines through the origin in $\CC^{n+1}$.

	Algebraically, this is done by taking the homogeneous ideals
	$I, J \subseteq \CC[x_0, \dots, x_n]$
	and using the same ideals to cut out \emph{affine} varieties
	$V_{\text{aff}} = \VV(I)$ and $W_{\text{aff}} = \VV(J)$ in $\Aff^{n+1}$.
	For example, the cone $x^2+y^2-z^2=0$ is a conic (a one-dimensional curve)
	in $\CP^2$, but can also be thought of as a cone
	(which is a two-dimensional surface) in $\Aff^3$.

	Then for (a), we have $V_{\text{aff}} = W_{\text{aff}}$,
	so $\sqrt I = \sqrt J$.

	For (b), either $V_{\text{aff}}$ is empty
	or it is just the origin of $\Aff^{n+1}$,
	so the Nullstellensatz implies either $I = (1)$
	or $\sqrt I = (x_0, \dots, x_n)$ as desired.
\end{proof}
Projective analogues of \Cref{thm:many_aff_variety}
(on intersections and unions of varieties) hold verbatim
for projective varieties as well.


\section{As ringed spaces}
\prototype{The regular functions on $\CP^1$ minus a point
are exactly those of the form $P(s/t)$.}
Now, let us make every projective variety $V$ into a baby ringed space.
We already have the set of points, a subset of $\CP^n$.

The topology is defined as follows.
\begin{definition}
	We endow $\CP^n$ with the \vocab{Zariski topology}
	by declaring the sets of the form $\Vp(I)$,
	where $I$ is a homogeneous ideal, to be the closed sets.

	Every projective variety $V$ then inherits the Zariski
	topology from its parent $\CP^n$.
	The \vocab{distinguished open sets} $D(f)$ are $V \setminus \Vp(f)$.
\end{definition}

Thus every projective variety $V$ is now a topological space.
It remains to endow it with a sheaf of regular functions $\OO_V$.
To do this we have to be a little careful.
In the affine case we had a nice little ring of functions,
the coordinate ring $\CC[x_0,\dots,x_n] / I$,
that we could use to provide the numerator and denominators.
So, it seems natural to then define:
\begin{definition}
	The \vocab{homogeneous coordinate ring} of a projective variety
	$V = \Vp(I) \subseteq \CP^n$, where $I$ is homogeneous radical,
	is defined as the ring
	\[ \CC[V] = \CC[x_0, \dots, x_n] / I. \]
\end{definition}

\begin{remark}
	Unlike the case of \Cref{remark:meaning_name_coordinate_ring}, an element
	of $\CC[V]$ no longer corresponds to a function from $V$ to $\CC$;
	nevertheless, it is a function from $\VV(I) \subseteq \Aff^{n+1}$ to $\CC$.
\end{remark}

However, when we define a rational function we must impose
a new requirement that the numerator and denominator are the same degree.
\begin{definition}
	Let $U \subseteq V$ be an open set of a projective variety $V$.
	A \vocab{rational function} $\phi$ on a projective variety $V$
	is a quotient $f/g$, where $f,g \in \CC[V]$,
	and $f$ and $g$ are homogeneous of the same degree,
	and $\Vp(g) \cap U = \varnothing$.
	In this way we obtain a function $\phi \colon U \to \CC$.
\end{definition}
\begin{example}
	[Examples of rational functions]
	Let $V = \CP^1$ have coordinates $(s:t)$.
	\begin{enumerate}[(a)]
		\ii If $U = V$, then constant functions $c/1$
		are the only rational functions on $U$.
		\ii Now let $U_1 = V \setminus \{(1:0)\}$.
		Then, an example of a regular function is
		\[ \frac{s^2+9t^2}{t^2} = \left( \frac st \right)^2 + 9. \]
		If we think of $U_1$ as $\CC$
		(i.e.\ $\CP^1$ minus an infinity point, hence like $\Aff^1$)
		then really this is just the function $x^2+9$.
	\end{enumerate}
\end{example}
Then we can repeat the same definition as before:
\begin{definition}
	Let $U \subseteq V$ be an open set of a projective variety $V$.
	We say a function $\phi \colon U \to \CC$ is a \vocab{regular function} if
	for every point $p$, we can find an open set $U_p$ containing $p$
	and a rational function $f_p/g_p$ on $U_p$ such that
	\[ \phi(x) = \frac{f_p(x)}{g_p(x)} \qquad \forall x \in U_p. \]
	In particular, we require $U_p \cap \Vp(g_p) = \varnothing$.
	We denote the set of all regular functions on $U$ by $\OO_V(U)$.
\end{definition}
Of course, the rational functions from the previous example
are examples of regular functions as well.
This completes the definition of a projective variety $V$
as a baby ringed space.

\section{Examples of regular functions}
Naturally, I ought to tell you what the regular functions
on distinguished open sets are; this is an analog to
\Cref{thm:reg_func_distinguish_open} from last time.
\begin{theorem}
	[Regular functions on distinguished open sets for projective varieties]
	\label{thm:proj_reg_func_dist_open}
	Let $V$ be a projective variety, and let $g \in \CC[V]$ be homogeneous
	of \emph{positive degree} (thus $g$ is nonconstant).
	Then
	\[
		\OO_V(D(g))
		= \left\{ \frac{f}{g^r} \mid
		f \in \CC[V] \text{ homogeneous of degree $r\deg g$}
		\right\}.
	\]
\end{theorem}
What about the case $g = 1$?
A similar result holds, but we need the assumption that $V$ is irreducible.
\begin{definition}
	A projective variety $V$ is irreducible
	if it can't be written as the union of two proper (projective) sub-varieties.
\end{definition}
\begin{theorem}
	[Only constant regular functions on projective space]
	Let $V$ be an \emph{irreducible} projective variety.
	Then the only regular functions on $V$ are constant,
	thus we have \[ \OO_V(V) \cong \CC. \]
	This relies on the fact that $\CC$ is algebraically closed.
\end{theorem}
Proofs of these are omitted for now.
\begin{example}
	[Irreducibility is needed above]
	The reason we need $V$ irreducible is otherwise
	we could, for example, take $V$ to be the union of two points;
	in this case $\OO_V(V) \cong \CC^{\oplus 2}$.
\end{example}

\begin{remark}
	It might seem strange that $\OO_V(D(g))$ behaves so differently
	when $g = 1$. One vague explanation is that in a projective variety,
	a distinguished open $D(g)$ looks much like an affine variety if $\deg g > 0$.
	For example, in $\CP^1$ we have $\CP^1 \setminus \{0\} \cong \Aff^1$
	(where $\cong$ is used in a sense that I haven't made precise).
	Thus the claim becomes related to the corresponding affine result.
	But if $\deg g = 0$ and $g \neq 0$, then $D(g)$ is the entire projective variety,
	which does not look affine, and thus the analogy breaks down.
\end{remark}

\begin{example}[Regular functions on $\CP^1$]
	Let $V = \CP^1$, with coordinates $(s:t)$.
	\begin{enumerate}[(a)]
		\ii By \Cref{thm:proj_reg_func_dist_open},
		if $U_1$ is the standard affine chart
		omitting the point $(1:0)$, we have
		$ \OO_V(U_1) = \left\{ \frac{f}{t^n} \mid \deg f = n \right\} $.
		One can write this as
		\[ \OO_V(U_1) \cong \left\{ P(s/t) \mid P \in \CC[x] \right\}
			\cong \OO_{\Aff^1} (\Aff^1). \]
		This conforms with our knowledge that $U_1$
		``looks very much like $\Aff^1$''.
		\ii As $V$ is irreducible, $\OO_V(V) = \CC$:
		there are no nonconstant functions on $\CP^1$.
	\end{enumerate}
\end{example}

\begin{example}
	[Regular functions on $\CP^2$]
	Let $\CP^2$ have coordinates $(x:y:z)$ and
	let $U_0 = \left\{ (x:y:1) \in \CP^2 \right\}$
	be the distinguished open set $D(z)$.
	Then in the same vein,
	\[
		\OO_{\CP^2}(U_0)
		= \left\{ \frac{P(x,y)}{z^n} \mid \deg P = n \right\}
		\cong \left\{ P(x/z, y/z) \mid P \in \CC[x,y] \right\}.
	\]
\end{example}

\section\problemhead
\todo{Problems:}
% should be easy to come up with some explicit examples to play with
