text:
\def\scalefactor{.3}

This chapter introduces {\em toric varieties}, which are the setting of all the subsequent results of this book. Our treatment will be mostly based on the results from \cref{var-chapter,appolytopes}; only in \cref{xone-section} we use the notion of {\em closed subschemes} discussed in \cref{subscheme-section}. Unless explicitly stated otherwise, from this chapter onward $\kk$ denotes an algebraically closed field (of arbitrary characteristic), and $\kk^*$ denotes $\kk \setminus \{0\}$.

\section{Algebraic torus}

If $(x_1, \ldots, x_n)$ are coordinates on $\kk^n$, $n \geq 1$, then $\nktorus = \kk^n \setminus V(x_1 \cdots x_n)$. This implies that $\nktorus$ is an affine variety, and its coordinate ring is the ring $\kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ of {\em Laurent polynomials} in $x_1, \ldots, x_n$ over $\kk$ (\cref{exercise:affine-complement}). An {\em (algebraic) torus} is a variety $X$ isomorphic to $\nktorus$ for some $n \geq 1$. A {\em system of coordinates} on $X$ is an ordered collection $(x_1, \ldots, x_n)$ of regular functions on $X$ such that the coordinate ring $\kk[X]$ of $X$ is $\kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$. A basic property of a torus is that {\em every} morphism between two tori is a group homomorphism and also a {\em monomial} map with respect to {\em every} set of coordinates. Indeed, let $\phi: X \to Y \cong \nktoruss{N}$ be a morphism. Choose coordinates $(y_1, \ldots, y_N)$ on $Y$. If $\phi(x) = (\phi_1(x), \ldots, \phi_N(x))$, then each $\phi_j$ must be a monomial in $(x_1, \ldots, x_n)$, for otherwise it will be zero at some point of $X$ (\cref{exercise:vanishing-monomial}). This shows that $\phi$ is a monomial map. Write $\phi_j(x) = x^{\alpha_j}$, $\alpha_1, \ldots, \alpha_N \in \zz^n$. If $x = (x_1, \ldots, x_n), x' = (x'_1, \ldots, x'_n) \in X$, then it follows that $\phi(x \cdot x') = \phi(x_1x'_1, \ldots, x_nx'_n) = ((x \cdot x')^{\alpha_1}, \ldots, (x \cdot x')^{\alpha_N}) = \phi(x) \cdot \phi(x')$, so that $\phi$ is indeed a homomorphism. This implies in particular that the multiplication with respect to every set of (algebraic) coordinates on a torus induces the same group structure on it, and the image of a morphism between two tori is a subgroup of the target. \Cref{torus-image} below shows that it is in addition a Zariski closed subset of the target\footnote{Contrast this to the case of $\kk^n$: the additive group structures on $\kk^n$ with respect to different systems of algebraic coordinates are in general different, and the image of a morphism from $\kk^n$ to $\kk^n$ is in general neither a subgroup nor a closed subvariety of the target (see \cref{constructible-section}).}. We use the following notation in \cref{torus-image}: given a monomial map $\phi:x \mapsto (x^{\alpha_1}, \ldots, x^{\alpha_N})$ between tori with fixed systems of coordinates, we write $\mat\phi$ for the $N \times n$ matrix whose rows are the $\alpha_i$. Some basic properties of $\mat{\phi}$ are established in \cref{exercise:mat-properties}.

\begin{prop} \label{torus-image}
 Let $G$ be the subgroup of $\zz^n$ generated by the $\alpha_i$, and $\bar G := \{\alpha \in \zz^n: k\alpha \in G$ for some $k \geq 1\}$ be the ``saturation'' of $G$ in $\zz^n$. Let $q$ be the index of $G$ in $\bar G$. Let $r$ be the rank of $\mat{\phi}$ as a matrix over $\qq$. Then
\begin{enumerate}
\item $\phi(X)$ is a torus and a closed subvariety of $Y$ of dimension $r$.
\item $\bar G/G \cong \prod_{j=1}^r \zz/q_j\zz$ for positive integers $q_1, \ldots, q_r$ such that $q = \prod_j q_j$.
\item $\ker(\phi)$ is an $(n-r)$-dimensional subgroup of $X$ isomorphic to $(\bar G/G) \times \nktoruss{n-r}$. In particular, if $r=n$, then the degree of $\phi$ (as a map from $X$ to $\phi(X)$) is $q$.
\item Pick a basis $(\beta_1, \ldots, \beta_{n-r})$ of $\ker \mat{\phi} \subseteq \zz^n$, and let $\eta: \nktoruss{n-r} \to \nktorus$ be the morphism such that the column vectors of $[\eta]$ are the $\beta_j$. Then the irreducible component of $\ker(\phi)$ containing $(1, \ldots, 1)$ is the image of $\eta$.
\end{enumerate}
\end{prop}

\begin{proof}
Let $\phi': \zz^n \to \zz^N$ be the map corresponding to multiplication by $\mat{\phi}$. With respect to appropriate coordinates on $\zz^n$ and $\zz^N$, the matrix of $\phi'$ is of the form
\begin{align*}
\left[
	\begin{array}{c|c}
	D & 0\\
	\hline
	0 & 0
	\end{array}
\right]
\end{align*}
where $D$ is a diagonal matrix with positive integers as diagonal entries (\cref{change-of-basis-lemma}). This means that we can choose coordinates $(x_1, \ldots, x_n)$ on $X$ and $(y_1, \ldots, y_N)$ on $Y$ with respect to which $\phi$ takes the form $(x_1, \ldots, x_n) \mapsto (x_1^{q_1}, \ldots, x_r^{q_r}, 1, \ldots, 1)$ for positive integers $q_1, \ldots, q_r$. All the assertions are now straightforward; their proofs are left as \cref{exercise:torus-image}.
\end{proof}

\subsection{Exercises}
\begin{exercise} \label{exercise:vanishing-monomial}
Show that every polynomial in $(x_1, \ldots, x_n)$ which is not a monomial vanishes at some points on $\nktorus$. [Hint: use \cref{exercise:nonempty-hypersurface}.]
\end{exercise}

\begin{exercise} \label{exercise:mat-properties}
Let $\phi: X \to Y$ be a morphism between two tori. Let $(x_1, \ldots, x_n)$ (respectively, $(y_1, \ldots, y_N)$) be coordinates on $X$ (respectively, $Y$) and $\mat{\phi}$ be the corresponding matrix of $\phi$. Show that
\begin{enumerate}

\item  for each $\beta = (\beta_1, \ldots, \beta_N) \in \zz^n$, $(\phi(x))^\beta = x^{\beta \mat{\phi}}$, where $\beta \mat{\phi}$ is the product of $\beta$ (regarded as a $1 \times N$ matrix) and $[\phi]$;
\item $\phi$ is an isomorphism if and only if $N = n$ and $\mat\phi$ is invertible over $\zz$;
\item \label{mat:composition=prod} if $Z$ is a torus and $\psi: Y \to Z$ is a morphism, then $\mat{\psi \circ \phi} = \mat{\psi}\mat{\phi}$.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:torus-image}
Complete the proof of \cref{torus-image}.
\end{exercise}

\section{Toric varieties from finite subsets of $\zz^n$} \label{xa-section}
A {\em toric variety} is a variety $X$ which contains an algebraic torus as a dense open subset such that the (multiplicative) action of the torus on itself extends to an action on all of $X$. Given a finite subset $\scrA = \{\alpha_0, \ldots, \alpha_N\}$ of $\zz^n$, we write $\phi_\scrA: \nktorus \to \pp^N$ for the map given by
\begin{align}
x \mapsto [x^{\alpha_0}: \cdots: x^{\alpha_N}] \label{phi_A}
\end{align}
We write $\xzeroa$ for the image of $\phi_\scrA$ and $\xa$ for the closure of $\xzeroa$ in $\pp^N$. We will now show that $\xa$ is a toric variety with torus $\xzeroa$. Denote the homogeneous coordinates of $\pp^N$ by $[z_{\alpha_0}: \cdots : z_{\alpha_N}]$. Let $U_\alpha := \pp^N \setminus V(z_\alpha)$, $\alpha \in \scrA$, be the basic open subsets of $\pp^N$.

\begin{prop} \label{xa-toric}
$\xa$ is a toric variety. More precisely,
\begin{enumerate}
\item \label{xa:torus} $\xzeroa$ is a torus and $\xzeroa = \xa \cap \bigcap_{\alpha \in \scrA} U_\alpha$.
\item \label{xa:U-alpha} For each $\alpha \in A$, $\xa \cap U_\alpha$ is an affine variety with coordinate ring $\kk[x^\beta: \beta \in S_\alpha]$, where $S_\alpha$ is the subsemigroup of $\zz^n$ generated by $\scrA - \alpha := \{\beta - \alpha: \beta \in \scrA\}$.
\item \label{xa:dimension} The dimension of $\xa$ (and equivalently, of $\xzeroa$) equals the dimension (as a polytope) of the convex hull of $\scrA$ in $\rr^n$.
\item \label{xa:action} $\xzeroa$ acts on $\xa$ via the multiplicative action of $\xzeroa$ on $\pp^N$ given by:
\begin{align}
[y_{\alpha_0}: \cdots: y_{\alpha_N}] \cdot [z_{\alpha_0}: \cdots: z_{\alpha_N}]:= [y_{\alpha_0}z_{\alpha_0}: \cdots: y_{\alpha_N}z_{\alpha_N}] \label{xa-action}
\end{align}
for all $[y_{\alpha_0}: \cdots: y_{\alpha_N}] \in \xzeroa$ and $[z_{\alpha_0}: \cdots: z_{\alpha_N}]\in \pp^N$.
\end{enumerate}
\end{prop}

\begin{proof}
Since $\xzeroa \subset U := \bigcap_{\alpha \in \scrA} U_\alpha$, and since $U \cong \nktoruss{N}$ via the map $[z_{\alpha_0}: \cdots : z_{\alpha_N}] \mapsto (z_{\alpha_1}/z_{\alpha_0}, \ldots, z_{\alpha_N}/z_{\alpha_0})$, it follows that $\xzeroa$ is the image in $\nktoruss{N}$ of the map $x \mapsto (x^{\alpha_1-\alpha_0}, \ldots, x^{\alpha_n - \alpha_0})$. \Cref{torus-image} then implies that $\xzeroa$ is a torus, and also implies assertion \eqref{xa:dimension}. It also says that $\xzeroa$ is a closed subset of $U$, which implies that $\xzeroa = \xa \cap U$, and proves assertion \eqref{xa:torus}. Assertion \eqref{xa:U-alpha} follows directly from \cref{projective-embedding}. Finally, since for a fixed $y \in \xzeroa$, the action of $y$ on $\pp^N$ given by \eqref{xa-action} is an isomorphism (\cref{exercise:continuous-action}) and since $\xzeroa$ is closed under this action, it follows that $\xa$ is also closed under it (\cref{exercise:action-closure}), as required to prove assertion \eqref{xa:action}.
\end{proof}

\Cref{xa-toric} states in particular that $\xa$ is ``equivariantly embedded'' in $\pp^N$, i.e.\ the action of the torus on $\xa$ extends to all of $\pp^N$. Conversely every equivariantly embedded projective toric variety is essentially of the form $\xa$ for some appropriate $\scrA$ (see e.g.\ \cite[Proposition 5.1.5]{gkz}); we will not use this result. We now show that $\xzeroa$ and $\xa$ depend only on the affine geometry of the set $\scrA$.

\begin{prop}[{\cite[Proposition 5.1.2]{gkz}}] \label{xa-invariant}
Let $\scrA \subset \zz^n$, $\scrB \subset \zz^m$, and $T: \zz^n \to \zz^m$ be an injective integer affine transformation such that $T(\scrA) = \scrB$. Then $\xzeroa = \xzerob$ and $\xa = \xb$ as subsets of $\pp^N$, where $N = |\scrA| - 1$.
\end{prop}

\begin{proof}
Let $A = \{\alpha_0, \ldots, \alpha_N\}$, $\scrB = \{\beta_0, \ldots, \beta_N\}$, where $\beta_j = T(\alpha_j)$, $j = 0, \ldots, N$. By definition there is $\lambda = (\lambda_1, \ldots, \lambda_m) \in \zz^m$ and an $n \times  m$ matrix $M$ such that for each $\gamma = (\gamma_1, \ldots, \gamma_n) \in \zz^n$, $T(\gamma) = \lambda + \gamma M$. Let $\mu_j \in \zz^m$ be the $j$-th row vector of $M$, $j = 1, \ldots, n$, and $T^*: \nktoruss{m} \to \nktorus$ be the map defined by $T^*(y) = (y^{\mu_1}, \ldots, y^{\mu_n})$. \Cref{exercise:mat-properties} implies that $T^*(y)^{\alpha_j} = y^{\alpha_j M} = y^{\beta_j - \lambda}$ for each $j = 0, \ldots, N$. Since the rank of $M = \mat{T^*}$ is $n$, \cref{torus-image} implies that $T^*$ is surjective, and therefore
\begin{align*}
\xzerob
	&= \{[y^{\beta_0}: \cdots : y^{\beta_N}]: y \in \nktoruss{m}\}
	= \{[y^{-\lambda}y^{\beta_0}: \cdots : y^{-\lambda}y^{\beta_N}]: y \in \nktoruss{m}\}\\
	&= \{[T^*(y)^{\alpha_0}: \cdots : T^*(y)^{\alpha_N}]: y \in \nktoruss{m}\}
	= \{[x^{\alpha_0}: \cdots : x^{\alpha_N}]: x \in \nktorus\}
	= \xzeroa
\end{align*}
which completes the proof.
\end{proof}

\subsection{Exercises}

\begin{exercise} \label{exercise:continuous-action}
Show that for a fixed $y \in \xzeroa$, the action of $y$ on $\pp^N$ given by \eqref{xa-action} is an isomorphism from $\pp^N$ to itself.
\end{exercise}

\begin{exercise} \label{exercise:action-closure}
Let $W$ be a subset of a topological space $X$ and $\phi: X \to X$ be a continuous map. Show that $\phi(\overline{W}) \subseteq \overline{\phi(W)}$ (where the ``bar'' indicates closure in $X$). Deduce that if $\phi(W) \subseteq W$, then $\phi(\overline{W}) \subseteq \overline{W}$.
\end{exercise}

\begin{exercise} \label{exercise:xa-binomial}
In this exercise you will show that $\xa$ is a {\em binomial variety}, i.e.\ $\xa$ is defined in $\pp^N$ by binomial equations.  Given $q = (q_0, \ldots, q_N) \in \zz^N$, write $z^q := \prod_{j=0}^N z_{\alpha_j}^{q_j}$. Let $J$ be the ideal of $R := \kk[z_{\alpha_0}, \ldots, z_{\alpha_N}]$ generated by binomials of the form $z^{q_1} - z^{q_2}$, where $q_i := (q_{i,0}, \ldots, q_{i,N}) \in \zz^n$, $i = 1, 2$, are such that $\sum_{j=0}^N q_{1,j} = \sum_{j=0}^N q_{2,j}$ and $\sum_{j=0}^N q_{1,j} \alpha_j = \sum_{j=0}^N q_{2,j} \alpha_j$.  Let $I$ be the ideal of $R$ consisting of all homogeneous polynomials that vanish on $\xa$.
\begin{enumerate}
\item Show that $J \subset I$.
\item Let $f = \sum_{q \in \zzeroo{N}} c_q z^q \in I$. Use the fact that $f(x^{\alpha_0}, \ldots, x^{\alpha_N})$ is identically zero on $\nktorus$ to show that for each $\alpha \in \zz^n$, $\sum_{q \in \scrS_\alpha}c_q = 0$, where $\scrS_\alpha := \{(q_0, \ldots, q_N) \in \zzeroo{N}:  \sum_{j=0}^N q_j\alpha_j = \alpha\}$.
\item Given $\alpha \in \zz^n$, write $f_\alpha := \sum_{q \in \scrS_\alpha}c_qz^q$. Use the preceding step to show that $f_\alpha \in J$. Deduce that $I = J$.
\end{enumerate}
\end{exercise}

\section{Examples of toric varieties}
\label{toric-exaction}
Given a subset $Y$ of a topological space $X$, in this section we write $\cl_X(Y)$ for the closure of $Y$ in $X$. We also write $e_1, \ldots, e_n$ for the standard unit vectors of $\rr^n$, i.e.\ for each $i,j$, the $j$-th coordinate of $e_i$ is $0$ if $j \neq i$, and $1$ if $j = i$.

\begin{example} \label{example:p^n}
If $\scrA = \{0, 1\} \subset \zz$, then $\xa = \cl_{\pp^2}(\{[1: x]: x \in \kk^*\} = \pp^1$. More generally, if $\scrA = \{0, e_1, \ldots, e_n\}$, then $\xa = \cl_{\pp^n}(\{[1:x_1: \cdots : x_n]: (x_1, \ldots, x_n) \in \nktorus\}) = \pp^n$.
\end{example}

\begin{example} \label{example:cube}
If $\scrA = \{(0,0), (1,0), (0,1), (1,1)\}$, then $\xa = \cl_{\pp^3}(\{[1:x:y:xy]: x,y \in \kk^*\}) = V(z_1z_2 - z_0z_3) \subset \pp^3$. In the literature $\xa$ is denoted as the {\em quadric surface} in $\pp^3$. Note that $\xa \cong \pp^1 \times \pp^1$ via the morphism
$$\pp^1 \times \pp^1 \ni ([x_0:x_1], [y_0:y_1]) \mapsto [x_0y_0:x_0y_1:x_1y_0:x_1y_1] \in \xa$$
More generally, if $\scrA = \{0,1\}^n$, assertion \eqref{toric-product} of \cref{segre-veronese} below implies that $\xa \cong (\pp^1)^n$.
\end{example}

Given a set $\scrA \subset \rr^n$ and a positive integer $d$, in this chapter we write $d\scrA := \{\alpha_1 + \cdots + \alpha_d: \alpha_j \in \scrA$ for each $j\} \subset \rr^n$. If $\scrA,\scrB$ are finite subsets of $\zz^n$, we write $\delta_{\scrA, \scrB}$ for the {\em diagonal} map from $\kk^n$ to $\pp^{|\scrA| -1} \times \pp^{|\scrB| - 1}$ given by
\begin{align}
x \mapsto (\phi_{\scrA}(x), \phi_{\scrB}(x))
\label{delta_AB}
\end{align}
where $\phi_{\scrA}$ and $\phi_{\scrB}$ are defined as in \eqref{phi_A}.

\begin{prop} \label{segre-veronese}
Let $\scrA_1, \scrA_2$ be finite subsets of $\zz^{n_i}$ and $d_1, d_2$ be positive integers.
\begin{enumerate}
\item \label{toric-veronese} $\xaa{\scrA_1} \cong \xaa{d_1\scrA_1}$.
\item \label{toric-product} $\xaa{\scrA_1} \times \xaa{\scrA_2} \cong \xaa{d_1\scrA_1 \times d_2\scrA_2}$.
\item \label{toric-diagonal} Assume $n_1 = n_2 = n$. Let $X_{d_1, d_2}$ be the closure in $\xaa{d_1\scrA_1} \times \xaa{d_2\scrA_2}$ of $\delta_{d_1\scrA_1,d_2\scrA_2}(\nktorus)$. Then $\xaa{\scrA_1 + \scrA_2} \cong \xaa{d_1\scrA_1+d_2\scrA_2} \cong X_{d_1, d_2} \cong X_{1,1}$.
\qed
\end{enumerate}
\end{prop}

\begin{proof}
We may assume \woutlog\ that each $\scrA_i$ contains the origin. If $\nu_{d_i}$ is the degree-$d_i$ {\em Veronese map} (see \cref{veronese-subsection}), then it follows that $\phi_{d_i\scrA_i} = \pi \circ \nu_{d_i} \circ \phi_{\scrA_i}$, where $\pi$ is a projection which omits ``redundant'' coordinates of $\nu_{d_i} \circ \phi_{\scrA_i}$ (i.e.\ for each $\alpha \in d_i\scrA_i$, $\pi$ retains only one of the coordinates of $\nu_{d_i} \circ \phi_{\scrA_i}$ equalling $x^\alpha$). Assertion \eqref{toric-veronese} then follows from \cref{veronese-embedding}. For assertion \eqref{toric-product}, let $\phi_{\scrA_1} \times \phi_{\scrA_2}: \nktoruss{n_1+n_2} \to \xaa{\scrA_1} \times \xaa{\scrA_2}$ be the morphism which maps $(x_1,x_2) \mapsto (\phi_{\scrA_1}(x_1), \phi_{\scrA_2}(x_2))$, where $x_i \in \nktoruss{n_i}$, $i = 1, 2$. If $s: \pp^{|\scrA_1|-1} \times \pp^{|\scrA_2|-1} \to \pp^{|\scrA_1||\scrA_2|-1}$ is the Segre map, then assertion \eqref{toric-product} follows from assertion \eqref{toric-veronese} and the observation that $s \circ (\phi_{\scrA_1} \times \phi_{\scrA_2}) = \phi_{\scrA_1 \times \scrA_2}$. The proof of assertion \eqref{toric-diagonal} is left as \cref{exercise:toric-diagonal}.
\end{proof}

\begin{example} \label{example:rational-normal-curve}
Let $d$ be a positive integer. If $\scrA = \{0,1,2, \ldots, d\} \subset \zz$, then assertion \eqref{toric-veronese} of \cref{segre-veronese} and \cref{example:p^n} imply that $\xa \cong \pp^1$. In the literature $\xa$ is denoted as the {\em rational normal curve of degree $d$} in $\pp^d$.
\end{example}

\begin{example}
If $\scrA = \{0,2, 3\} \subset \zz$, then $\xa = \cl_{\pp^2}(\{[1:x^2:x^3]: x \in \kk^*\}) = V(z_0z_2^2 - z_1^3) \subset \pp^2$. If $(x,y) = (z_1/z_0, z_2/z_0)$ are coordinates on the basic open subset $U_0 = \pp^2 \setminus V(z_0)$ of $\pp^2$, then $\xa \cap U_0$ is the curve defined by $y^2 =x^3$. Note that the curve is singular at the origin (\cref{example:curve-singularities}).
\end{example}

A toric variety of dimension $n$ by definition contains an open subset isomorphic to $\nktorus$. For some classes of $\scrA$, it is not hard to see that $\xa$ contains open subsets isomorphic to $\kk^n$, i.e.\ $\xa$ is a {\em compactification} of $\kk^n$.

\begin{prop} \label{toric-k^n}
Let $\scrA$ be a finite subset of $\zz^n$.
\begin{enumerate}
\item \label{toric-k^n:origin} Assume $\scrA \subset \znzero$ and $\scrA \supset \{\origin, e_1, \ldots, e_n\}$. Show that $U_\origin \cap \xa \cong \kk^n$.
\item More generally, assume there is a vertex $\alpha$ of $\scrA$ such that there are precisely $n$ edges $\scrE_1, \ldots, \scrE_n$ of $\conv(\scrA)$ containing $\alpha$ and on each $\scrE_i$, there is an element of $\scrA$ of the form $\alpha + \beta_i$, where $\beta_1, \ldots, \beta_n$ is a basis of $\zz^n$. Then show that $U_\alpha \cap \xa \cong \kk^n$.
\end{enumerate}
\end{prop}

\begin{proof}
This is \cref{exercise:toric-k^n}.
\end{proof}

\subsection{Exercises}
\begin{exercise} \label{exercise:toric-diagonal}
Prove assertion \eqref{toric-diagonal} of \cref{segre-veronese}.
\end{exercise}

\begin{exercise} \label{exercise:toric-k^n}
Prove \cref{toric-k^n}.
\end{exercise}

\section{Structure of $\xa$}

We continue with the notation and the set up of \cref{xa-section}. In this section we study the complement of $\xzeroa$ in $\xa$ (i.e.\ the subvariety of $\xa$ ``at infinity'') and catch a glimpse of its beautiful combinatorial structure. Let $\scrP$ be the convex hull of $\scrA$. Then $\scrP$ is a rational polytope (\cref{poly-rational-thm}). A {\em face} of $\scrA$ is by definition a set $\scrB$ of the form $\scrQ \cap \scrA$ where $\scrQ$ is a face of $\scrP$. We say that $\scrB$ is a {\em facet} (respectively {\em vertex, edge}) of $\scrA$ if $\scrQ$ is a facet (respectively vertex, edge) of $\scrP$, see \cref{fig:face-set}.

\begin{center}
\begin{figure}[h]
\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-4.5}
\def\ymax{5.5}
\def\tx{0}
\def\ty{5}
\def\tw{5cm}
\def\opazero{0.5}
\def\colorzero{green}
\def\colorone{blue}

\tikzstyle{dot} = [red, circle, minimum size=4pt, inner sep = 0pt, fill]

\begin{subfigure}[b]{0.45\textwidth}
\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);

\node[dot] (A) at (1,-4) {};
\node[dot] (B) at (13,2) {};
\node[dot] (C) at (10,5) {};
\draw[thick, \colorone, fill=\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center) -- cycle;

\node[dot] (D) at (10,2) {};
\node[dot] (E) at (7,-1) {};

\node[anchor = north] at (A) {\picfontsize $A$};
\node[anchor = west] at (B) {\picfontsize $B$};
\node[anchor = south] at (C) {\picfontsize $C$};
\node[anchor = east] at (D) {\picfontsize $D$};
\node[anchor = north] at (E) {\picfontsize $E$};

\node [below right, text width= \tw, align=left] at (\tx,\ty) {
	\picfontsize

};
\end{tikzpicture}
\caption{
$\scrA = \{A, B, C, D, E\}$\\
Facets: $\{A, E, B\}$, $\{B, C\}$, $\{C, A\}$\\
Vertices: $A$, $B$, $C$
} \label{fig:A}
\end{subfigure}
\begin{subfigure}[b]{0.45\textwidth}
\def\xmin{-3.5}
\def\xmax{7.5}
\def\tx{-8}
\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);

\def\singularPtwo#1#2#3{
\begin{scope}[shift={#1}]
\node[dot] (A) at (0,0) {};
\node[dot] (B) at (#2,0) {};
\node[dot] (C) at (0,#3) {};
\draw[thick, \colorone, fill=\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center) -- cycle;
\node[dot] (D) at (0,1) {};
\node[dot] (E) at (#2-1,0) {};

\node[anchor = north] at (A) {\picfontsize $A'$};
\node[anchor = north] at (B) {\picfontsize $B'$};
\node[anchor = south] at (C) {\picfontsize $C'$};
\node[anchor = east] at (D) {\picfontsize $D'$};
\node[anchor = north] at (E) {\picfontsize $E'$};
\end{scope}
}
\singularPtwo{(-3,-4)}{9}{9}

\end{tikzpicture}
\caption{
	$\scrA' = \{A', B', C', D', E'\}$ \\
	Facets: $\{A', E', B'\}$, $\{B', C'\}$, $\{C', D', A'\}$\\
	Vertices: $A'$, $B'$, $C'$
} \label{fig:A'}
\end{subfigure}

\caption{Faces of some planar sets}  \label{fig:face-set}

\end{figure}
\end{center}

\begin{prop} \label{point-face}
Let $z \in \xa$. Define $\scrA_z := \{\alpha \in \scrA: z \in U_\alpha\}$. Then $\scrA_z$ is a face of $\scrA$.
 \end{prop}

\begin{proof}
Pick $\alpha_1, \alpha_2 \in \scrA_z$. For each $i$, let $\scrQ_i$ be the (unique) face of $\scrP$ which contains $\alpha_i$ in its interior. For every $\epsilon \in (0,1)$, the convex combination $\alpha_\epsilon := \epsilon \alpha_1 + (1- \epsilon)\alpha_2$ of $\alpha_1$ and $\alpha_2$ belongs to the relative interior of a face $\scrQ$ of $\scrP$ containing both $\scrQ_i$ (\cref{prop:positively-relative}). It suffices to show that $\scrQ \cap \scrA \subset \scrA_z$. Indeed, let $\epsilon$ be a rational number in $(0,1)$. Let $\beta_1, \ldots, \beta_k$ be the vertices of $\scrQ$. There are positive integers $N_1, \ldots, N_k$ such that $(\sum_{j=1}^k N_j)\alpha_\epsilon = \sum_{j=1}^k N_j\beta_j$ (\cref{positive-linear-comb-lemma}). Write $N := \sum_{j=1}^k N_j$. Multiplying the $N_j$ by some appropriate integer we may ensure that $N\epsilon$ is a positive integer. Then $\prod_{j = 1}^k z_{\beta_j}^{N_j} = z_{\alpha_1}^{N\epsilon}z_{\alpha_2}^{N-N\epsilon}$ on $\xa$. Since both $\alpha_i$ are in $\scrA_z$, it follows that $z_{\beta_j}|_z \neq 0$ for each $j$. Since each $\beta \in \scrQ \cap \scrA$ is a convex rational linear combination of the $\beta_j$, it follows by the same reasoning that $z_\beta|_z \neq 0$ for each $\beta \in \scrQ \cap \scrA$, as required.
\end{proof}

Given $\scrB' \subseteq \scrB \subseteq \scrA$, we write $\scrB' \preceq \scrB$ (respectively, $\scrB' \precneqq \scrB$) to denote that $\scrB'$ is a face (respectively, a proper face) of $\scrB$.

\begin{thm} \label{xa-thm}
For each face $\scrB$ of $\scrA$, define $\corbit{\scrB} := \xa \setminus \bigcup_{\alpha \not\in \scrB} U_\alpha$ and $\orbit{\scrB} := \corbit{\scrB} \cap \bigcap_{\beta \in \scrB} U_\beta$.
\begin{enumerate}
\item \label{union-of-orbits} $\corbit{\scrB} = \bigcup_{\scrB' \preceq \scrB} \orbit{\scrB'}$. In particular,
\begin{align}
\xa\setminus \xzeroa
	= \bigcup_{\scrB \precneqq \scrA} \orbit{\scrB}
	= \bigcup_{\scrB \precneqq \scrA} \corbit{\scrB}
	= \bigcup_{j=1}^k \corbit{\scrA_j}
\label{eq:union-of-orbits}
\end{align}
where $\scrA_1, \ldots, \scrA_k$ are the facets of $\scrA$.
\item \label{orbits} There is a one-to-one correspondence between the collection of $\orbit{\scrB}$ for $\scrB \preceq \scrA$ and the set of orbits of $\xzeroa$ on $\xa$. In particular, each $\corbit{\scrB}$ is invariant under the action of $\xzeroa$.
\item \label{toric-faces} Each $\corbit{\scrB}$ is a toric variety with torus $\orbit{\scrB}$. More precisely, the pair $(\corbit{\scrB}, \orbit{\scrB})$ is isomorphic to $(\xaa{\scrB}, \xzeroaa{\scrB})$. The isomorphism is given by the projection map $\pi_\scrB: V_\scrB\to \pp^{|\scrB|-1}$ which `forgets' all the coordinates $z_\alpha$ such that $\alpha \not\in \scrB$; in other words, $\pi_\scrB([z_\alpha: \alpha \in \scrA]) = [z_\beta: \beta \in \scrB]$.
\item \label{compatible-action} The action of $\orbit{\scrB}$ on $\corbit{\scrB}$ is compatible with the action of $\xzeroa$. More precisely, assume $y_\scrA \in \xzeroa$ and $y_\scrB \in \orbit{\scrB} \cong \xzerob$ correspond to the same $x \in \nktorus$, i.e.\ $y_\scrA = [x^{\alpha}: \alpha \in \scrA]$ and $y_\scrB = [x^{\beta}: \beta \in \scrB]$. Then for all $z \in \corbit{\scrB}$,
\begin{align*}
y_\scrA \cdot_\scrA z = y_\scrB \cdot_\scrB z
\end{align*}

where we write $\cdot_\scrA$ (respectively, $\cdot_\scrB$) to denote the action of $\xzeroa$ (respectively, $\orbit{\scrB}$) on $\corbit{\scrB}$.
\end{enumerate}
\end{thm}

\begin{proof}
The first statement of assertion \eqref{union-of-orbits} follows from \cref{point-face}, and this in turn implies the first two equalities of \eqref{eq:union-of-orbits}. Since $\corbit{\scrB'} \subseteq \corbit{\scrB}$ whenever $\scrB' \preceq \scrB$, and since every proper face is contained in a facet (\cref{prop:facet-containment}), the last equality of \eqref{eq:union-of-orbits} follows. We now prove the remaining assertions. Given $\scrB \preceq \scrA$, let $H_\scrB := V(z_\alpha: \alpha \not\in \scrB) \subset \pp^N$ be the coordinate subspace containing $\corbit{\scrB}$. Let $\pi_\scrB: \pp^N \setminus V(z_\beta: \beta \in \scrB) \to H_\scrB$ be the natural projection and $\zb$ be the closure in $\pp^N$ of $\pi_\scrB(\xzeroa)$.

\begin{proclaim} \label{corbit-claim}
$\corbit{\scrB} = \zb$.
\end{proclaim}

\begin{proof}

The inclusion $\corbit{\scrB} \subseteq \zb$ follows from a general property of morphisms (assertion \eqref{subspace-intersection} of \cref{projective-embedding}). For the opposite inclusion it suffices (due to the definition of $\corbit{\scrB}$) to show that $\xa \supset \zb$. Pick $\beta \in \scrB$. We will show that $\xa \cap U_\beta \supseteq \zb \cap U_\beta$. We may assume $\beta = \alpha_0$. Write $z'_i := z_{\alpha_i}/z_{\alpha_0}$, so that $U_\beta \cong \kk^N$ with coordinates $(z'_1, \ldots, z'_N)$. Let $f(z'_1, \ldots, z'_N) = \sum_{\gamma \in \zz^N} c'_\gamma z'^\gamma$ be a polynomial in $(z'_1, \ldots, z'_N)$ which vanishes on $\xzeroa \cap U_\beta$. It suffices to show that $f$ vanishes on $\zb \cap U_\beta$ as well.  Note that $\xzeroa \cap U_\beta = \{(x^{\alpha'_1}, \ldots, x^{\alpha'_N}): x \in \nktorus\}$, where $\alpha'_i := \alpha_i - \alpha_0$, $i = 1, \ldots, N$. Write $f = f' + f''$, where the monomials in $f'$ consist solely of the $z'_i$ such that $\alpha_i \in \scrB$ and each monomial in $f''$ contains at least one $z'_i$ such that $\alpha_i \not\in \scrB$. If $B$ is the {\em affine hull} of $\{\alpha_i - \alpha_0: \alpha_i \in \scrB\}$, \cref{exercise:face-semi-affine-hull} implies that the exponent of each monomial in $f'(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$ is on $B$, whereas the exponent of no monomial in $f''(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$ is on $B$; in particular, the monomials that appear in $f'(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$ are distinct from those appearing in $f''(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$. Since $f(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$ is identically zero on $\nktorus$, it follows that  $f'(x^{\alpha'_1}, \ldots, x^{\alpha'_N})$ is also identically zero on $\nktorus$. This implies that $f \circ \pi_\scrB(x^{\alpha'_1}, \ldots, x^{\alpha'_N}) = f'(x^{\alpha'_1}, \ldots, x^{\alpha'_N}) = 0$ for all $x \in \nktorus$, so that $f$ vanishes on $\pi_\scrB(\xzeroa)$, as required.
\end{proof}

It is evident that $\zb$ can be identified to $\xb$ by ``forgetting'' the coordinates $z_\alpha$ for all $\alpha \not\in \scrB$. Since $\corbit{\scrB} = \zb$, \cref{xa-toric} implies that this induces an identification of $\xzerob$ with $\orbit{\scrB}$, which proves assertion \eqref{toric-faces}. Assertion \eqref{compatible-action} then follows from identity \eqref{xa-action}. Since assertion \eqref{compatible-action} in particular implies that $\orbit{\scrB}$ is an orbit of $\xzeroa$, this proves assertion \eqref{orbits} as well.
\end{proof}

\Cref{cartier-infty} below is an immediate corollary of \cref{xa-thm}. The second statement of \cref{cartier-infty} in particular implies that the complement of the torus is locally defined by a single equation on $\xp$; in the terminology of \cref{scheme:cartier-section}, $\xp\setminus \xzerop$ is the ``support of a Cartier divisor'' on $\xa$.

\begin{cor} \label{cartier-infty}
If $\scrV$ is the set of vertices of $\scrA$, then $\xa \subset \bigcup_{\alpha \in \scrV} U_\alpha$. In particular, $\xa \setminus \xzeroa = V(\prod_{\alpha \in \scrV} z_\alpha) \cap \xa$.
\end{cor}

\begin{proof}
The proof of this is left as an exercise.
\end{proof}

\subsection{Exercises}

\begin{exercise} \label{exercise:face-semi-affine-hull}
Let $\scrQ$ be a face of a polyhedron $\scrP \subset \rr^n$. Assume that the origin is in $\aff(\scrQ)$. Let $\alpha = \sum_{j= 1}^k r_j \alpha_j$, where $r_j > 0$ and $\alpha_j \in \scrP$ for each $j$. Show that $\alpha \in \aff(\scrQ)$ if and only if $\alpha_j \in \scrQ$ for each $j$. [Hint: if $\scrQ =\In_\nu(\scrP)$, consider the value of $\langle \nu, \cdot \rangle$ on $\scrQ$, $\scrP$ and $\alpha$.]
\end{exercise}

\begin{exercise}
Prove \cref{cartier-infty}. [Hint: use \cref{prop:face-of-face}.]
\end{exercise}

\section{Toric varieties from polytopes} \label{toric-polysection}

If $\scrA \subset \scrA'$ are finite subsets of $\zz^n$, then the natural projection $\pp^{|\scrA'|-1} \dashrightarrow \pp^{|\scrA|-1}$ restricts to a rational map $\pi_{\scrA, \scrA'}:\xaa{\scrA'} \dashrightarrow \xa$. This map is in general not defined everywhere on $\xaa{\scrA'}$. For example, if $\scrA = \{(0,0), (1,0)\}$ and $\scrA' = \{(0,0), (1,0), (0,1)\}$, then \cref{example:p^n} implies that $\xaa{\scrA'} \cong \pp^2$, $\xa \cong \pp^1$, and $\pi_{\scrA,\scrA'}$ maps $[x_0:x_1:x_2] \mapsto [x_0:x_1]$, which is not defined at the point $[0:0:1]$. However, if in addition $\scrA$ and $\scrA'$ have the same convex hull in $\rr^n$, then \cref{cartier-infty} implies that $\pi_{\scrA,\scrA'}$ is well-defined everywhere on $\xaa{\scrA'}$ (\cref{exercise:equi-hull-projection}). If $\scrP$ is the convex hull of $\scrA$ in $\rr^n$, this observation shows that there is a natural morphism $X_{\scrP \cap \zz^n} \to \xa$, and for every positive integer $k$ there is a natural morphism
\begin{align*}
\xaa{(k+1)\scrP \cap \zz^n} \to \xaa{(k\scrP \cap \zz^n) + (\scrP \cap \zz^n)}
\end{align*}
(For subsets $\scrS$ of $\rr^n$ and a positive integer $d$, in \cref{appolytopes} we defined $d\scrS$ as a ``dilation,'' whereas in \cref{toric-exaction} we defined it as the sum of $d$-copies of $\scrS$. This does not lead to any conflict for the case of convex polytopes - see \cref{equivalent-multiplication}.) \Cref{segre-veronese} implies that $\xaa{(k\scrP \cap \zz^n) + (\scrP \cap \zz^n)}$ is isomorphic to a subset of $\xaa{k\scrP \cap \zz^n} \times \xaa{\scrP \cap \zz^n}$, so that the projection onto the first factor induces a morphism $\xaa{(k\scrP \cap \zz^n) + (\scrP \cap \zz^n)} \to \xaa{k\scrP \cap \zz^n}$. Consequently, there is a sequence of morphisms
\begin{align}
 \cdots
 	\xrightarrow{\pi_{3,4}} \xaa{3\scrP \cap \zz^n}
 	\xrightarrow{\pi_{2,3}} \xaa{2\scrP \cap \zz^n} \xrightarrow{\pi_{1,2}} \xaa{\scrP \cap \zz^n}
 	\xrightarrow{\pi_1} \xa
 \label{xp-to-xa}
\end{align}

\begin{prop} \label{xprop}
For $k$ sufficiently large, $\pi_{k,k+1}:\xaa{(k+1)\scrP \cap \zz^n} \to \xaa{k\scrP \cap \zz^n}$ is an isomorphism.
\end{prop}

\begin{proof}
Let $\alpha_0, \ldots, \alpha_s$ be the vertices of $\scrP$, so that $k\alpha_j$, $j = 0, \ldots, s$, are the vertices of $k\scrP$. \Cref{cartier-infty} implies that $\xaa{k\scrP \cap \zz^n}$ is the union of affine open sets $\xaa{k\scrP \cap \zz^n} \cap U_{k\alpha_j}$, $j = 0, \ldots, s$. For each $j$, \cref{xa-toric} implies that the coordinate ring of $\xaa{k\scrP \cap \zz^n} \cap U_{k\alpha_j}$ is the semigroup algebra $\kk[S_{j,k}]$, where $S_{j,k}$ is the subsemigroup of $\zz^n$ generated by $\{\alpha - k\alpha_j: \alpha \in k\scrP \cap \zz^n \}$. Since $\alpha - k\alpha_j = (\alpha + \alpha_j) - (k+1)\alpha_j$, it follows that $S_{j,k} \subset S_{j, k+1}$, and $\pi_{k,k+1}$ is simply the morphism induced by this inclusion. Note that each $S_{j,k}$ is a subsemigroup of $\scrC_{\alpha_j} \cap \zz^n$, where $\scrC_{\alpha_j}$ is the {\em rational} convex polyhedral cone in $\rr^n$ generated by $\{\alpha_i - \alpha_j: i = 0, \ldots, s\}$. Gordan's lemma (\cref{gordan}) implies that $\scrC_{\alpha_j}  \cap \zz^n$ is finitely generated. Due to \cref{exercise:C-alpha-j} below we may choose an integer $K$ such that for each $j$, $S_{j,k}$ contains each of these generators for each $k > K$. For each $k > K$ and each $j$, it follows that $S_{j,k} = \scrC_{\alpha_j}  \cap \zz^n$ is independent of $k$; consequently $\xaa{(k+1)\scrP \cap \zz^n} \cong \xaa{k\scrP \cap \zz^n}$.
\end{proof}

\begin{figure}[h]
\begin{center}

\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-5.5}
\def\ymax{5.5}
\def\opazero{0.5}
\def\colorzero{green}

\tikzstyle{dot} = [red, circle, minimum size=4pt, inner sep = 0pt, fill]
\tikzstyle{smalldot} = [black, circle, minimum size=3pt, inner sep = 0pt, fill]

\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);
\node[dot] (A) at (1,-4) {};
\node[dot] (B) at (13,2) {};
\node[dot] (C) at (10,5) {};

\fill[\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center);
\draw[thick, \colorAB] (A) -- (B);
\draw[thick, \colorBC] (B) -- (C);
\draw[thick, \colorCA] (C) -- (A);
\node[anchor = north] at (A) {$A$};
\node[anchor = west] at (B) {$B$};
\node[anchor = south] at (C) {$C$};

\node at (8,1) {\picfontsize $\scrP$};

\def\xmin{-5.5}
\def\xshift{5}
\pgfmathsetmacro\shiftone{\xshift + \xmax -\xmin};
\def\xmax{5.5}

\begin{scope}[shift={(\shiftone,0)}]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);

\coordinate (O) at (0,0);
\coordinate (BA) at (\xmin, \xmin/2);
\coordinate (AB) at (\xmax, \xmax/2);
\coordinate (CA) at (\ymin, \ymin);
\coordinate (AC) at (\ymax, \ymax);
\coordinate (BC) at (-\ymax, \ymax);
\coordinate (CB) at (-\ymin, \ymin);

\fill[\colorzero, opacity=\opazero ] (O) --  (BA) -- (BC);
\fill[\colorzero, opacity=\opazero ] (O) --  (AC) -- (AB);
\fill[\colorzero, opacity=\opazero ] (O) --  (CA) -- (CB);

\draw [thick, \colorAB] (AB) -- (BA);
\draw [thick, \colorBC] (CB) -- (BC);
\draw [thick, \colorCA] (AC) -- (CA);

\node at (-3.5,0.5) {\picfontsize $\scrC_B$};
\node at (4.5,3.5) {\picfontsize $\scrC_A$};
\node at (0.5,-3.5) {\picfontsize $\scrC_C$};

\node[smalldot] at (-1, -1) {};
\node[smalldot] at (0, -1) {};
\node[smalldot] at (1, -1) {};

\node[smalldot] at (2,1) {};
\node[smalldot] at (1,1) {};

\node[smalldot] at (-1,1) {};
\node[smalldot] at (-1,0) {};
\node[smalldot] at (-2,-1) {};

\end{scope}
\end{tikzpicture}
\caption{Cones of regular functions on basic open subsets of $\xp$. The dots in each cone mark generators of the semigroup of integral points in the cone.}  \label{fig:xp-support-algebra}
\end{center}
\end{figure}

Given a convex integral polytope $\scrP \subseteq \rr^n$, we write $\xp$ for the toric variety isomorphic to $\xaa{k \scrP \cap \zz^n}$ for sufficiently large $k$ and $\xzerop$ for the torus $\xzeroaa{k\scrP \cap \zz^n}$ of $\xp$; we also write $\phi_\scrP$ for the morphism $\phi_{k\scrP \cap \zz^n}: \nktorus \to \xzerop$ defined as in \eqref{phi_A}. The arguments from the proof of \cref{xprop} show that $\xp$ is the union of open affine subsets $U'_\alpha := \xp \cap U_\alpha$ corresponding to vertices $\alpha$ of $\scrP$, and the coordinate ring of each $U'_\alpha$ is generated by the monomials whose exponents belong to the cone $\scrC_\alpha$ generated by $\scrP - \alpha$. See \cref{fig:xp-support-algebra} for the cones corresponding to the vertices of a triangle. The following proposition summarizes some basic properties of $\xp$.

\begin{prop} \label{xp-thm}
Let $\scrA$ be a finite subset of $\zz^n$ and $\scrP$ be the convex hull of $\scrA$ in $\rr^n$.  Let $G_\scrP$ be the subgroup of $\zz^n$ generated by pairwise differences of integral elements in the affine hull of $\scrP$ and $G_\scrA$ be the subgroup of $G_\scrP$ generated by the pairwise differences of elements from $\scrA$.
\begin{enumerate}
\item \label{phi-P} If $k$ is such that $G_\scrP$ is generated by $\{\alpha - \beta: \alpha, \beta \in k\scrP \cap \zz^n\}$, then $\xp \cong \xaa{k \scrP \cap \zz^n}$.
\item \label{torus-identification} The dimension of $\xp$ is the same as the dimension of $\scrP$. If $\dim(\scrP) = n$, then $\phi_\scrP$ is an isomorphism between $\nktorus$ and $\xzerop$; i.e.\ $\xp$ is a compactification of $\nktorus$.
\item There is a natural finite-to-one morphism $\phi_{\scrP, \scrA}: \xp \to \xa$ defined as the composition of the following maps:
\begin{align}
\xp
	\cong \xaa{k\scrP \cap \zz^n}
 	\xrightarrow{\pi_{k\scrP \cap \zz^n, k\scrA}} \xaa{k\scrA}
 	\xrightarrow{\phi_{k\scrA, \scrA}} \xa
 \label{xp-to-xa-short}
\end{align}
where $k$ is as in assertion \eqref{phi-P}, $\pi_{k\scrP \cap \zz^n, k\scrA}$ is the projection which drops coordinates corresponding to elements in $(k\scrP \cap \zz^n) \setminus k\scrA$, and $\phi_{k\scrA, \scrA}$ is the inverse of the Veronese isomorphism of degree $k$ (see \cref{segre-veronese}). The degree of $\phi_{\scrP, \scrA}$ is the index of $G_\scrA$ in $G_\scrP$. In particular, if $G_\scrA= G_\scrP$, then $\phi_{\scrP, \scrA}$ restricts to an isomorphism between $\xzerop$ and $\xzeroa$.
\item \label{C-S-alpha} There is an open cover $\{U'_\alpha\}_{\alpha \in  \scrP \cap \zz^n}$ of $\xp$ such that the coordinate ring of each $U'_\alpha$ is the semigroup algebra $\kk[S_\alpha]$, where $S_\alpha$ is the semigroup of integral points in the convex polyhedral cone $\scrC_\alpha$ generated by $\{\alpha' - \alpha: \alpha' \in \scrP\}$.
\item There is a natural one-to-one correspondence between the faces of $\scrP$ and the orbits of $\xzerop$ on $\xp$. For each face $\scrQ$ of $\scrP$, let $\orbit{\scrQ}$ be the corresponding orbit and $\corbit{\scrQ}$ be the closure of $\orbit{\scrQ}$ in $\xp$. Then $\corbit{\scrQ}$ is naturally isomorphic to $\xq$, and the isomorphism identifies $\orbit{\scrQ}$ with $\xzeroq$.
\item In particular, $\xp \setminus \xzerop$ is the union of the $\corbit{\scrQ}$ for the facets $\scrQ$ of $\scrP$.
\item \label{xp:diagonal} Let $\scrP'$ be a convex integral polytope in $\rr^n$. Then $\xaa{\scrP+\scrP'}$ is isomorphic to the closure in $\xp \times \xaa{\scrP'}$ of the image of the diagonal map $\nktorus \to \xp \times \xaa{\scrP'}$ which sends $x \mapsto (\phi_{\scrP}(x), \phi_{\scrP'}(x))$. Moreover, $\xaa{k\scrP+l\scrP'} \cong \xaa{\scrP+ \scrP'}$ for every pair of positive integers $k,l$.
\end{enumerate}
\end{prop}

\begin{proof}
Due to \cref{xa-invariant} we may assume $\dim(\scrP) = n$ and $\scrP$ contains the origin. If $k$ is as in assertion \eqref{phi-P}, then after another application of \cref{xa-invariant} we may assume that each standard unit vector is in $k\scrP \cap \zz^n$, which immediately implies that $\phi_\scrP$ is an isomorphism and proves the first two assertions. The last assertion is a straightforward corollary of \cref{segre-veronese,xprop}.  The remaining statements follow from \cref{torus-image,xa-toric,xa-thm}. We leave it as an exercise to complete the proof.
\end{proof}

\begin{example} \label{example:deg2}
Let $\scrA := \{0, 2\} \subset \zz$. Since $x \mapsto 2x$ maps $\{0,1\}$ onto $\scrA$, \cref{xa-invariant,example:rational-normal-curve} imply that $\xa \cong \pp^1$. If $\scrP = \conv(\scrA) \subset \rr$, then $G_\scrP = \zz$ and assertion \eqref{phi-P} of \cref{xp-thm} is satisfied with $k = 1$, i.e.\ $\xp$ is the closure in $\pp^2$ of the image of $\kk^*$ under the map $x \mapsto [1:x:x^2]$. \Cref{example:rational-normal-curve} implies that $\xp$ is also isomorphic to $\pp^1$. The map $\phi_{\scrP, \scrA}: \xp \to \xa$ is the restriction to $\xp$ of the projection $[z_0:z_1:z_2] \to [z_0: z_2]$, and therefore on the level of the tori it is simply the map $x \mapsto x^2$. Note that $\deg(\phi_{\scrP, \scrA}) = 2$ is also the index of $G_\scrA = 2\zz$ in $\zz = G_\scrP$.
\end{example}

\begin{example} \label{example:xp^n}
Let $\scrS^n$ be the $n$-dimensional simplex in $\rr^n$ with vertices at the origin and at the elements of the standard unit basis of $\rr^n$, and let $\scrK^n := [0,1]^n \subset \rr^n$. Then $G_{\scrS ^n}= G_{\scrK^n} = \zz^n$, and both $\scrS^n$ and $\scrK^n$ satisfy assertion \eqref{phi-P} of \cref{xp-thm} with $k = 1$. Therefore it follows from \cref{example:p^n,example:cube} that $\xpp{\scrS^n} \cong \pp^n$ and $\xpp{\scrK^n} \cong (\pp^1)^n$.
\end{example}

\begin{example} \label{A'-example}
Consider $\scrA'$ from \cref{fig:A'}. The convex hull $\scrP'$ of $\scrA$ is a translation of $9\scrS^2$, so that \cref{segre-veronese,xp-thm,example:xp^n} imply that $\xpp{\scrP'} \cong \xpp{\scrS^2} \cong \pp^2$. Note that $G_{\scrP'} = G_{\scrA'} = \zz^2$, i.e.\ the map $\phi_{\scrP', \scrA'}: \xpp{\scrP'} \to \xpp{\scrA'}$ has degree one. However, it is {\em not} an isomorphism. Indeed, \cref{xa-toric} implies that the coordinate ring of $\xpp{\scrA'} \cap U_{A'}$ is $\kk[x^8, x^9, y] \cong \kk[u,v,w]/\langle u^9 - v^8 \rangle$ (\cref{exercise:desingxample2}). Therefore $\xpp{\scrA'} \cap U_{A'}$ is isomorphic to the hypersurface in $\kk^3$ defined by $u^9 - v^8 = 0$, which is {\em singular} at all points of the $w$-axis, and $\phi_{\scrP', \scrA'}: \xpp{\scrP'} \to \xpp{\scrA'}$ is a {\em desingularization} of $\xpp{\scrA'}$.
\end{example}

Even though $\xp$ is by definition isomorphic to $\xaa{k\scrP \cap \zz^n}$ for $k \gg 1$, in each of the preceding examples it suffices to take $k = 1$. In general it suffices to take $k \geq \dim(\scrP) - 1$, see e.g.\ \cite[Theorem 2.2.12]{littlehalcox}. In particular, to find examples for which one needs to take $k > 1$ requires polytopes with dimensions at least $3$.

\subsection{Exercises}
\begin{exercise}\label{exercise:equi-hull-projection}
Let $\scrA \subset \scrA'$ be finite subsets of $\zz^n$ such that $\conv(\scrA) = \conv(\scrA')$. Show that $\pi_{\scrA,\scrA'}$ is well-defined everywhere on $\xaa{\scrA'}$. [Hint: $\scrA$ and $\scrA'$ have the same set of vertices. Use \cref{cartier-infty}.]
\end{exercise}

\begin{exercise} \label{exercise:C-alpha-j}
In the notation of the proof of \cref{xprop}, show that for each $\beta \in \scrC_{\alpha_j}$, there is $K \geq 0$ such that $\beta \in k\scrP - k\alpha_j$ for each $k \geq K$.
\end{exercise}

\begin{exercise} \label{exercise:xp}
Complete the proof of \cref{xp-thm}.
\end{exercise}

\begin{exercise} \label{exercise:desingxample2}
Show that $\kk[x^8, x^9, y] \cong \kk[u,v,w]/\langle u^9 - v^8 \rangle$. Prove that the hypersurface $V(u^9 - v^8)$ in $\kk^3$ is singular at all points of the $w$-axis.
\end{exercise}

\begin{exercise} \label{exercise:singxp}
In the set up of \cref{fig:xp-support-algebra}, let $S_A$ (respectively, $S_B,S_C$) be the subsemigroup of $\zz^n$ consisting of integral elements in $\scrC_A$ (respectively, $\scrC_B,\scrC_C$).
\begin{enumerate}
\item Show that $S_A$ is generated as a semigroup by $(1,1), (2,1)$; $S_B$ is generated as a semigroup by $(-1,1), (-1,0), (-2,-1)$; $S_C$ is generated as a semigroup by $(-1,-1), (0,-1), (1,-1)$.
\item Deduce that $\xp \cap U_A \cong \kk^2$, $\xp \cap U_B \cong V(uv - w^3) \subset \kk^3$, and $\xp \cap U_C \cong V(uv - w^2) \subset \kk^3$. [Hint: $\kk[\xp \cap U_A] = \kk[xy, x^2y]$, $\kk[\xp \cap U_B] = \kk[x^{-1}y, x^{-1},x^{-2}y^{-1}]$, $\kk[\xp \cap U_C] = \kk[x^{-1}y^{-1}, y^{-1},xy^{-1}]$.]
\item Conclude that $\xp$ has precisely two singular points.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:invertible-on-intersection}
Let $\scrP$ be a convex integral polytope in $\rr^n$ and $\alpha, \alpha'$ be vertices of $\scrP$.
\begin{enumerate}
\item \label{invertible:0} Show that $x^{\alpha' - \alpha}$ is an invertible regular function on $U_\alpha \cap U_{\alpha'} \cap \xp$.
\item  Let $\scrQ$ be the smallest face of $\scrP$ containing both $\alpha$ and $\alpha'$, and $\scrQ_\alpha$ be the cone generated by $\{\beta - \alpha: \beta \in \scrQ\}$. Show that $\alpha' - \alpha$ is in the relative interior of $\scrQ_\alpha$.
\item Let $H$ be the linear subspace of $\rr^n$ spanned by $\{\beta - \alpha: \beta \in \scrQ\}$. For each $\gamma \in H \cap \zz^n$, show that $x^\gamma$ is an invertible regular function on $U_\alpha \cap U_{\alpha'} \cap \xp$. [Hint: Choose $\beta_1, \ldots, \beta_k \in \scrQ \cap \zz^n$ such that $\beta_j - \alpha$, $j = 1, \ldots, k$, generate $\scrQ_\alpha$ as a cone. Use \cref{exercise:relatively-positive-interior} and the preceding assertions to show that for each $j$, $x^{\beta_j - \alpha}$ is a regular function on $U_\alpha \cap \xp$ which does not vanish at any point of $U_\alpha \cap U_{\alpha'} \cap \xp$.]
\item Deduce that if $\scrQ = \scrP$, then $U_\alpha \cap U_{\alpha'} \cap \xp = \xzerop$.
\end{enumerate}
\end{exercise}

\section{Nonsingularity in codimension one on $\xp$} \label{U_Q-section}
\Cref{A'-example,exercise:singxp} above show that toric varieties $\xp$ from polytopes might be singular. However, we will see in this section that the $\xp$ is nonsingular outside a subvariety of dimension at most $\dim(\xp) - 2$, i.e.\ $\xp$ is ``nonsingular in codimension one.'' Note that this is in general {\em not} true for varieties $\xa$ (see \cref{A'-example} above). We continue to use the notation of \cref{toric-polysection}. Let $\scrQ$ be a facet of $\scrP$. We will show that $\xp$ is nonsingular at all points of $\orbit{\scrQ}$. Due to \cref{xa-invariant} we may assume \woutlog\ that $\scrP$ is {\em full dimensional}, i.e.\ $\scrP$ is an $n$-dimensional polytope in $\rr^n$. Let $\nu$ be the {\em primitive inner normal} (see \cref{primitive-remark}) to $\scrQ$. Let $\znnuzero := \{\beta \in \zz^n: \langle \nu, \beta \rangle \geq 0\}$ and $\znnuperp := \{\beta \in \zz^n: \langle \nu, \beta \rangle = 0\}$. Choose an arbitrary element $\alpha_\nu \in \zz^n$ such that $\langle \nu, \alpha_\nu \rangle = 1$. We write $\zzero \langle \alpha_\nu \rangle := \{k\alpha_\nu: k \in \zz,\ k \geq 0\}$. The following is a straightforward implication of \cref{basis-lemma}.

\begin{lemma} \label{lemma:nuzero-decomposition}
There is a basis of $\zz^n$ of the form $\beta_1, \ldots, \beta_n$, where $\beta_n = \alpha_\nu$ and $\beta_1, \ldots, \beta_{n-1}$ constitute a basis of $\znnuperp$. In particular, $\znnuperp \cong \zz^{n-1}$, and as a semigroup $\znnuzero$ is isomorphic to $\znnuperp + \zzero \langle \alpha_\nu \rangle \cong \zz^{n-1} \times \zzero$. \qed
\end{lemma}

\begin{prop} \label{U_Q}
Let $U_\scrQ := \xzerop \cup \orbit{\scrQ}$.
\begin{enumerate}
\item \label{U_Q:open} $U_\scrQ$ is an open affine neighborhood of $\orbit{\scrQ}$ in $\xp$.
\item \label{U_Q:coordinates} $\kk[U_\scrQ] = \kk[x^\beta : \beta \in \znnuzero] \cong \kk[\zz^{n-1} \times \zzero]$. In particular, $U_\scrQ \cong \nktoruss{n-1} \times \kk$.
\item \label{O_Q-nonsingular} $\orbit{\scrQ} = V(x^{\alpha_\nu}) \subset U_\scrQ$ and $\kk[\orbit{\scrQ}] \cong \kk[U_\scrQ]/\langle x^{\alpha_\nu} \rangle \cong \kk[\znnuperp]$. In particular, the embedding $\orbit{\scrQ} \into U_\scrQ$ is isomorphic to the embedding $\nktoruss{n-1} \times \{0\} \into  \nktoruss{n-1} \times \kk$.
\end{enumerate}
\end{prop}

\begin{proof}
Let $\scrA := k\scrP \cap \zz^n$, where $k$ is large enough so that $\xp \cong \xa$ and there is an integral element $\alpha_0$ in the relative interior of $k\scrQ$. Since $\scrQ$ is the smallest face of $\scrP$ containing $\alpha_0$ (\cref{prop:relative-containment}),  \cref{point-face} implies that $U_\scrQ = \xp \cap U_{\alpha_0}$, which proves assertion \eqref{U_Q:open}. Let $\beta_1, \ldots, \beta_n = \alpha_\nu$ be a basis of $\zz^n$ as in \cref{lemma:nuzero-decomposition}. Choosing a large enough $k$ we can also ensure that $\alpha_0 + \beta_j \in k\scrP \cap \zz^n$ for each $j = 1, \ldots, n$ (\cref{exercise:deformation-relint}). It is then straightforward to check that the semigroup generated by $\scrA - \alpha_0$ is precisely $\znnuzero$. Assertions \eqref{U_Q:coordinates} and \eqref{O_Q-nonsingular} then follow from \cref{xp-thm,lemma:nuzero-decomposition} in a straightforward manner - we leave the proof as an exercise.
\end{proof}

\begin{cor}[Nonsingularity of $\xp$ in codimension one]
The set $\sing(\xp)$ of singular points of $\xp$ is contained in $\bigcup_i  \orbit{\scrQ'_{i}}$, where $\scrQ'_i$ are faces of $\scrP$ of dimension $\leq n - 2$. In particular, $\dim(\sing(\xp)) \leq n - 2$.
\end{cor}

\begin{proof}
$\xp \setminus \bigcup_i  \orbit{\scrQ'_{i}}$ is the union of $U_{\scrQ}$ over all facets $\scrQ$ of $\scrP$, which is nonsingular due to \cref{U_Q}. Since $\dim(\bigcup_i  \orbit{\scrQ'_{i}}) = n - 2$, the result follows.
\end{proof}

\def\colorg{orange}
\def\gp#1#2#3{
\begin{scope}[shift={(#1,#2)}]
	\def\gh{1}

	\draw[fill=\colorg, opacity = \opazero] (0,0) -- (-2*\gh,0) -- (-4*\gh,-2*\gh) -- cycle;

	\node[anchor=north] at (-2*\gh,-2*\gh) {\picfontsize #3};
\end{scope}
}

\begin{figure}[h]
\begin{center}

\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-5.5}
\def\ymax{5.5}
\def\opazero{0.5}
\def\colorzero{green}

\tikzstyle{dot} = [red, circle, minimum size=4pt, inner sep = 0pt, fill]

\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);
\node[dot] (A) at (1,-4) {};
\node[dot] (B) at (13,2) {};
\node[dot] (C) at (10,5) {};

\fill[\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center);
\draw[thick, \colorAB] (A) -- (B);
\draw[thick, \colorBC] (B) -- (C);
\draw[thick, \colorCA] (C) -- (A);
\node[anchor = north] at (A) {\picfontsize $A$};
\node[anchor = west] at (B) {\picfontsize $B$};
\node[anchor = south] at (C) {\picfontsize $C$};
\node[anchor = west] at ($(B)!0.6!(C)$) {\picfontsize $\scrQ$};

\node at (8,1) {\picfontsize $\scrP$};

\gp{4}{4}{$\np(g)$}

\def\xmin{-5.5}
\def\xshift{5}
\pgfmathsetmacro\shiftone{\xshift + \xmax -\xmin};
\def\xmax{5.5}
\begin{scope}[shift={(\shiftone,0)}]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);

\coordinate (BC) at (\xmin, -\xmin);
\coordinate (CB) at (\xmax, -\xmax);
\draw [thick, \colorBC] (BC) -- (CB);

\coordinate (tshift) at (0,0.2);

\coordinate (perp) at (-1,-1);
\draw [thick, \colorBC, ->] (0,0) -- (perp);

\node [anchor = north] at ($(perp) + (tshift)$) {\picfontsize $\nu = (-1,-1)$};

\def\alphax{-4}
\def\alphay{4}
\gp{\alphax}{\alphay}{$\np(\talphanu(g))$}
\node[dot] (alpha) at (\alphax, \alphay) {};

\coordinate (tshift) at (-0.15,0.3);
\node [anchor=west] at ($(alpha) + (tshift)$) {\picfontsize $\alpha_\nu = (-1,0)$};

\def\alphax{4}
\def\alphay{-4}
\gp{\alphax}{\alphay}{$\np(\talphanu(g))$}
\node[dot] (alpha) at (\alphax, \alphay) {};

\node [anchor= west] at ($(alpha) + (tshift)$) {\picfontsize $\alpha_\nu = (0,-1)$};

\end{scope}
\end{tikzpicture}
\caption{Different choices for $\talphanu(g)$ when $g = 2y^2 - 3x^2y^3 + 7x^4y^4 - 6x^2y^4$}  \label{fig:g-nu}
\end{center}
\end{figure}

Let $\nu$ and $\alpha_\nu$ be as in \cref{U_Q}. Given $g  = \sum_\beta c_\beta x^\beta \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$, the {\em support} $\supp(g)$ of $g$ is the set of all $\beta \in \zz^n$ such that $c_\beta \neq 0$, and the {\em Newton polytope} $\np(g)$ of $g$ is the convex hull of $\supp(g)$. Let $m := \min_{\supp(g)}(\nu) = \min_{\np(g)}(\nu)$. Choose an arbitrary isomorphism $\psi_\nu:  \znnuperp \cong \zz^{n-1}$. Define $\talphanu(g) := x^{-m\alpha_\nu} g$ and $\Inalphapsinu(g) :=  \sum_{ \langle \nu, \beta \rangle = m} c_{\beta}x^{\psi_\nu(\beta - m\alpha_\nu)}$ (the ``$T$'' in $\talphanu(\cdot)$ is supposed to imply ``translation,'' and ``$\In$'' in $\Inalphapsinu(\cdot)$ is to suggest ``initial form''). See \cref{fig:g-nu} for an example with $\scrP$ from \cref{fig:xp-support-algebra}. The following result is an immediate corollary of \cref{U_Q}. Its proof is left as an exercise.

\begin{cor} \label{O_Q}
\begin{enumerate}
\item $\talphanu(g)$ is a regular function on $U_\scrQ$ for each Laurent polynomial $g$.
\item The correspondence $\talphanu(g)|_{\orbit{\scrQ}} \mapsto \Inalphapsinu(g)$ induces an isomorphism $\psi_\nu^*: \nktoruss{n-1} \cong \orbit{\scrQ}$.
\item If $\alpha'_\nu$ is another element in $\zz^n$ such that $\langle \nu, \alpha'_\nu \rangle = 1$, then $\talphanu(g)/\talphanuu{\alpha'_\nu}(g) = x^{m(\alpha'_\nu - \alpha_\nu)}$ is invertible on $U_\scrQ$.
\end{enumerate}
\end{cor}

A basic property of the varieties $\xp$ is that they are ``normal,'' and nonsingularity in codimension one follows from normality. In this book we do not treat this notion - see \cite[Section 2.1]{fultoric} or \cite[Section 2.4]{littlehalcox} for an exposition of this and other fundamental properties of $\xp$ including the following result (which we do not use): assume $\scrP \subset \rr^n$ is full dimensional. Then $\xp$ is nonsingular if and only if both of the following are true for every vertex $\alpha$ of $\scrP$:
\begin{itemize}
\item $\scrC_\alpha$ has precisely $n$ edges, and
\item the primitive integral elements of the edges of $\scrC_\alpha$ form a basis of $\zz^n$.
\end{itemize}

\subsection{Exercises}

\begin{exercise}
Complete the proof of \cref{U_Q}.
\end{exercise}

\begin{exercise}
Prove \cref{O_Q}.
\end{exercise}

\section{Extending closed subschemes of the torus to $\xp$} \label{xone-section}
Recall (from \cref{subscheme-section}) that a {\em closed subscheme} $V$ of a variety $X$ is essentially a Zariski closed subset $V'$ of a variety together with a {\em sheaf of ideals} $\scrI$ such that $V'$ is precisely the set of zeroes of elements in $\scrI$. If $\bar X$ is a variety containing $X$ as a Zariski open subset, and $\bar V$ is a closed subscheme of $\bar X$, we say that $\bar V$ {\em extends} $V$ if the scheme-theoretic intersection $\bar V \cap X$ is precisely $V$. In this section we will study the case that $X = \nktorus$ and $\bar X$ is the toric variety $\xp$ corresponding to an $n$-dimensional convex integral polytope $\scrP$. We are specially interested in the case that
\begin{defnlist}
\item \label{Cartier-extension} both $V$ and $\bar V$ are {\em Cartier divisors} (see \cref{scheme:cartier-section}), and
\item \label{tight-extension} $\supp(\bar V)$ is the closure of $\supp(V)$.
\end{defnlist}
Each Laurent polynomial $g \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ defines a Cartier divisor $V(g)$ on $\nktorus$ (in fact it is not hard to see, using the fact that the ring of Laurent polynomials is a UFD, that {\em every} Cartier divisor on $\nktorus$ is of the form $V(g)$ for some Laurent polynomial $g$ - but we will not use it). There are many ways to extend $V(g)$ to $\xp$, e.g.\ if $\np(g) \subset \scrP$, then \cref{exercise:in-extension} below prescribes a way to extend $V(g)$ to a Cartier divisor on $\xp$ which satisfies property \ref{tight-extension} if and only if $\np(g)$ intersects each facet of $\scrP$. However, we will shortly see that for a given $\scrP$, there are Cartier divisors on $\nktorus$ which can {\em not} be extended to $\xp$ in a way to satisfy property \ref{tight-extension}. Then we will define an open subset $\xonep$ of $\xp$ such that $\xp \setminus \xonep$ has dimension $\leq n -2$, and every Cartier divisor on $\nktorus$ does admit extensions to $\xonep$ satisfying both properties \ref{Cartier-extension} and \ref{tight-extension}.

\def\colorh{purple}
\def\hp#1#2#3{
\begin{scope}[shift={(#1,#2)}]
	\draw[fill=\colorh, opacity = \opazero] (0,0) -- (2,0) -- (2,2) -- cycle;
	\node[anchor=north] at (1,0) {\picfontsize #3};
\end{scope}
}

\begin{center}
\begin{figure}[h]

\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-5.5}
\def\ymax{5.5}
\tikzstyle{dot} = [red, circle, minimum size=4pt, inner sep = 0pt, fill]

\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);
\node[dot] (A) at (1,-4) {};
\node[dot] (B) at (13,2) {};
\node[dot] (C) at (10,5) {};

\fill[\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center);
\draw[thick, \colorAB] (A) -- (B);
\draw[thick, \colorBC] (B) -- (C);
\draw[thick, \colorCA] (C) -- (A);
\node[anchor = north] at (A) {\picfontsize $A$};
\node[anchor = west] at (B) {\picfontsize $B$};
\node[anchor = south] at (C) {\picfontsize $C$};

\node at (8,1) {\picfontsize $\scrP$};
\gp{4}{4}{$\np(g)$}
\hp{9}{-3}{$\np(h)$}

\def\xmin{-5.5}
\def\xshift{5}
\pgfmathsetmacro\shiftone{\xshift + \xmax -\xmin};
\def\xmax{5.5}
\begin{scope}[shift={(\shiftone,0)}]

\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);

\coordinate (O) at (0,0);
\coordinate (BA) at (\xmin, \xmin/2);
\coordinate (AB) at (\xmax, \xmax/2);
\coordinate (CA) at (\ymin, \ymin);
\coordinate (AC) at (\ymax, \ymax);
\coordinate (BC) at (-\ymax, \ymax);
\coordinate (CB) at (-\ymin, \ymin);

\draw [thick, \colorAB] (AB) -- (BA);
\draw [thick, \colorBC] (CB) -- (BC);
\draw [thick, \colorCA] (AC) -- (CA);

\gp{0}{0}{}
\gp{1}{-1}{}
\gp{4}{2}{}

\fill[\colorzero, opacity=\opazero ] (0,0) -- (-2,0) -- (-4,-2) -- (BA) -- (BC);
\fill[\colorzero, opacity=\opazero ] (0,0) --  (-1,-1) -- (1,-1);
\fill[\colorzero, opacity=\opazero ] (1,-1) -- (-3,-3) -- (CA) -- (CB);
\fill[\colorzero, opacity=\opazero ] (2,2) -- (4,2) -- (AB) -- (AC);

\node at (-4.5,0.5) {\picfontsize $\scrC_B$};
\node at (5.5,3.5) {\picfontsize $\scrC_A$};
\node at (-0.5,-4.5) {\picfontsize $\scrC_C$};
\end{scope}

\pgfmathsetmacro\shiftwo{\shiftone + \xshift + \xmax -\xmin};
\begin{scope}[shift={(\shiftwo,0)}]

\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);

\coordinate (O) at (0,0);
\coordinate (BA) at (\xmin, \xmin/2);
\coordinate (AB) at (\xmax, \xmax/2);
\coordinate (CA) at (\ymin, \ymin);
\coordinate (AC) at (\ymax, \ymax);
\coordinate (BC) at (-\ymax, \ymax);
\coordinate (CB) at (-\ymin, \ymin);

\draw [thick, \colorAB] (AB) -- (BA);
\draw [thick, \colorBC] (CB) -- (BC);
\draw [thick, \colorCA] (AC) -- (CA);

\hp{-2}{-2}{}
\hp{2}{2}{}
\hp{-10/3}{-2/3}{}

\fill[\colorzero, opacity=\opazero ] (0,0) -- (-4/3,-2/3) -- (-4/3,4/3);
\fill[\colorzero, opacity=\opazero ] (-4/3,4/3) -- (-10/3,-2/3) -- (-4/3,-2/3) -- (BA) -- (BC);
\fill[\colorzero, opacity=\opazero ] (0,0) --  (0,-2) -- (-2,-2) -- (CA) -- (CB);
\fill[\colorzero, opacity=\opazero ] (0,0) -- (4,2) -- (2,2);
\fill[\colorzero, opacity=\opazero ] (4,4) -- (4,2) -- (AB) -- (AC);

\node at (-4.5,0.5) {\picfontsize $\scrC_B$};
\node at (5.5,3.5) {\picfontsize $\scrC_A$};
\node at (-0.5,-4.5) {\picfontsize $\scrC_C$};
\end{scope}
\end{tikzpicture}
\caption{Extending Cartier divisors in dimension two}  \label{fig:sub2extension}
\end{figure}
\end{center}

\begin{example} \label{example:2-extension}
Consider $\scrP$ and $g$ from \cref{fig:g-nu}. \Cref{xa-thm,xp-thm} imply that $\xp \subset U_A \cup U_B \cup U_C$, and for each $P \in \{A,B,C\}$, the coordinate ring of $U_P \cap \xp$ consists of Laurent polynomials supported at the cone $\scrC_P$; consider the (unique) translation of $\np(g)$ which is contained in $\scrC_P$ and touches both sides of $\scrC_P$ (see the middle panel of \cref{fig:sub2extension}). More precisely, let
\begin{align*}
g_P :=
	\begin{cases}
		2 - 3x^2y + 7x^4y^2 - 6x^2y^2               & \text{if}\ P = A, \\
		x^{-4}y^{-2}(2 - 3x^2y + 7x^4y^2 - 6x^2y^2) & \text{if}\ P = B, \\
		x^{-3}y^{-3}(2 - 3x^2y + 7x^4y^2 - 6x^2y^2) & \text{if}\ P = C.
	\end{cases}
\end{align*}
Then it is straightforward to check that the pairs $(U_P \cap \xp, g_P)$, $P \in \{A, B,C\}$, defines a Cartier divisor $D$ on $\xp$ such that $D$ extends the Cartier divisor $V(g)$ and $\supp(D)$ is the closure in $\xp$ of $V(g) \subset \nktoruss{2}$ (see \cref{exercise:simplicial-extension} for a more general result). On the other hand, if $h$ is any Laurent polynomial with $\np(h)$ as in the left panel of \cref{fig:sub2extension}, then the translation of $\np(h)$ that is contained in $\scrC_B$ and touches both sides of $\scrC_B$ is {\em not} integral - see the right panel of \cref{fig:sub2extension}. It follows that if $E$ is any extension of $V(h) \subset \nktoruss{2}$ to $\xp$, then $\supp(E)$ must contain either $\corbit{AB}$ or $\corbit{BC}$; in particular, $E$ does not satisfy property \ref{tight-extension} of the extension.  $\supp(E)$ is greater than the closure in $\xp$ of $V(h) \subset \xp$ (\cref{exercise:non-2-extension}).
\end{example}

\begin{center}
\begin{figure}[h]
\def\scalefactor{0.4}
\def\xmin{-3.5}
\def\xmax{3.5}
\def\ymin{-3.5}
\def\ymax{3.5}
\def\opazero{0.5}
\def\colorzero{green}

\tikzstyle{dot} = [red, circle, minimum size=4pt, inner sep = 0pt, fill]

\begin{subfigure}[b]{0.3\textwidth}
\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);

\coordinate (A) at (-2,2);
\coordinate (B) at (-2,-2);
\coordinate (C) at (2,-2);
\coordinate (D) at (2,2);

\coordinate (E) at (-2,1);
\coordinate (F) at (-2,-1);
\coordinate (G) at (2,-1);
\coordinate (H) at (2,1);

\fill[\colorg, opacity=\opazero ] (E) --  (F) -- (G) -- (H);
\fill[\colorzero, opacity=\opazero ] (A) --  (E) -- (H) -- (D);
\fill[\colorzero, opacity=\opazero ] (C) --  (G) -- (F) -- (B);

\draw[thick] (A) -- (B) -- (C) -- (D);

\node [anchor = north] at (0,-2) {\picfontsize $\scrP$};
\node at (0,0) {\picfontsize $\np(g)$};

\end{tikzpicture}
\caption{Crossections of $\scrP$ and $\np(g)$}  \label{fig:subnonextension-cross}
\end{subfigure}
\def\viewx{60}
\def\viewy{30}
\begin{subfigure}[b]{0.3\textwidth}
\begin{tikzpicture}[scale=0.66]
\pgfplotsset{every axis title/.append style={at={(0,-0.2)}}, view={\viewx}{\viewy}, axis lines=middle, enlargelimits={upper}}

\begin{axis}
\addplot3[ thick, draw, fill=\colorzero,opacity=\opazero] coordinates{(-2,2,0) (-2,-2,0) (2,-2,0) (2,2,0)};
\addplot3[ thick, draw, fill=red,opacity=\opazero] coordinates{(0,0,2) (2,-2,0) (2,2,0)};
\addplot3[ thick, draw, fill=blue,opacity=\opazero] coordinates{(0,0,2) (2,-2,0) (-2,-2,0)};
\addplot3[draw, thick, dashed] coordinates {(0,0,2) (-2,2,0)};
\end{axis}
\end{tikzpicture}
\caption{$\scrP$}  \label{fig:subnonextension-P}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\def\viewx{60}
\def\viewy{30}
\begin{tikzpicture}[scale=0.66]
\pgfplotsset{every axis title/.append style={at={(0,-0.2)}}, view={\viewx}{\viewy}, axis lines=middle, enlargelimits={upper}}

\begin{axis}
\addplot3[ thick, draw, fill=\colorg,opacity=\opazero] coordinates{(-2,1,0) (-2,-1,0) (2,-1,0) (2,1,0)};
\addplot3[ thick, draw, fill=\colorg,opacity=\opazero] coordinates{(-2,1,2) (-2,-1,2) (2,-1,2) (2,1,2)};
\addplot3[ thick, draw, fill=red,opacity=\opazero] coordinates{(2,-1,2) (2,1,2) (2,1,0) (2,-1,0)};
\addplot3[ thick, draw, fill=blue,opacity=\opazero] coordinates{(2,-1,2) (-2,-1,2) (-2,-1,0) (2,-1,0)};
\addplot3[draw, thick, dashed] coordinates {(-2,1,2) (-2,1,0)};

\addplot3[draw] coordinates {(0,0,0) (0,-2,0)};
\addplot3[draw] coordinates {(0,0,0) (0,2,0)};
\end{axis}
\end{tikzpicture}
\caption{$\np(g)$}  \label{fig:subnonextension-g}
\end{subfigure}
\caption{Obstruction to extension of Cartier divisors in dimension $\geq 3$}  \label{fig:subnonextension}
\end{figure}
\end{center}

\begin{example} \label{example:3-non-extension}
Let $\scrP$ be the polytope in $\rr^3$ with vertices $(2,2,0)$, $(-2,2,0)$, $(-2, -2,0)$, $(2, -2,0)$, $(0, 0,2)$, and let $g \in \kk[x,y,z]$ be a polynomial such that $\np(g)$ is the ``cuboid'' with vertices $(2,1,0)$, $(-2,1,0)$, $(-2, -1,0)$, $(2, -1,0)$, $(2,1,2)$, $(-2,1,2)$, $(-2, -1,2)$, $(2, -1,2)$ (see \cref{fig:subnonextension}). It is straightforward to check that for each $m \geq 1$, if a translation $\scrQ$ of $m\np(g)$ is contained in $\scrC_P$, then $\scrQ$ can not touch all the facets of $\scrC_P$, and therefore any extension to $\xp$ of $V(g^m) \subset \nktoruss{3}$ by a Cartier divisor fails property \ref{tight-extension} (\cref{exercise:non-3-extension}).
\end{example}

In general, to find a Cartier divisor on $\xp$ which extends $V(g) \subset \nktorus$ and satisfies property \ref{tight-extension} requires a ``modification'' of $\xp$ by finding a ``common refinement'' of the normal fans of $\scrP$ and $\np(g)$. This leads to beautiful combinatorial geometry, but we will not get into this. We will rather find an open subset $\xonep$ of $\xp$ so that every Cartier divisor of $\nktorus$ can be extended to a Cartier divisor on $\xonep$ and the extension also satisfies property \ref{tight-extension}.

\subsection{The subset $\xonep$} \label{xonep-section}
Let $\scrP$ be an $n$-dimensional convex integral polytope in $\rr^n$. \Cref{xp-thm} implies that we can identify $\nktorus$ with $\xzerop$. Denote the facets of $\scrP$ by $\scrQ_1, \ldots, \scrQ_s$, and the faces of $\scrP$ of dimension $\leq n - 2$ by $\scrQ'_1, \ldots, \scrQ'_{s'}$. Define
\begin{align*}
\xonep
	:= \xzerop \cup \bigcup_{i=1}^s \orbit{\scrQ_i}
	= \bigcup_{i=1}^s U_{\scrQ_i}
	= \xp \setminus \bigcup_{i'=1}^{s'} \orbit{\scrQ'_{i'}}
	= \xp \setminus \bigcup_{i'=1}^{s'} \corbit{\scrQ'_{i'}}
\end{align*}
where the equalities are implications of \cref{xa-thm,xp-thm,U_Q}. In particular, it follows that $\xonep$ is Zariski open in $\xp$, and it is the union of torus orbits in $\xp$ of ``codimension smaller than one'' (this is the motivation for the ``$1$'' in the notation $\xonep$). Let $\nu_i$ be the primitive inner normal to $\scrQ_i$, $i = 1, \ldots, s$. Pick $\alpha_{\nu_i}$ such that $\langle \nu_i, \alpha_{\nu_i} \rangle = 1$. Given $g \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$, \cref{O_Q} implies that $\talphanuu{\alpha_{\nu_i}}(g)$ is a regular function on $U_{\scrQ_i}$ for each $i$. Since $U_{\scrQ_i} \cap U_{\scrQ_j} = \xzerop \cong \nktorus$ for $i \neq j$ (\cref{U_Q}) and since $\talphanuu{\alpha_{\nu_i}}(g)/\talphanuu{\alpha_{\nu_j}}(g)$ is a monomial in $x_1, \ldots, x_n$, it follows that $\{(U_{\scrQ_i}, \talphanuu{\alpha_{\nu_i}}(g))\}_i$ defines a Cartier divisor $\vonep(g)$ on $\xonep$. In \cref{exercise:vonep-Cartier} you will check that $\vonep(g)$ is an extension to $\xonep$ of the Cartier divisor $V(g)$ of $\nktorus$, and it also satisfies property \ref{tight-extension}. This construction can be carried out for arbitrary closed subschemes of $\nktorus$. Indeed, given $g_1, \ldots, g_k \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}$, for each $i$, define $I_{\scrQ_i}$ to be the ideal of $\kk[U_{\scrQ_i}]$ generated by $\talphanuu{\alpha_{\nu_i}}(g_j)$, $j = 1, \ldots, k$. \Cref{exercise:vonep-subscheme} implies that the ideals $I_{\scrQ_i}$ can be glued over their intersection to form a {\em sheaf of ideals} $\scrI$ of $\sheaf_{\xp}$. We write $\vonep(g_1, \ldots, g_k)$ for the corresponding closed subscheme $V(\scrI)$ of $\xp$. Assertion \eqref{alpha-non-dependence} of \cref{exercise:vonep-subscheme} implies that $\vonep(g_1, \ldots, g_k)$ does not depend on the choice of the $\alpha_{\nu_i}$.

\begin{example} \label{example:different-vonep}
\Cref{exercise:vonep-Cartier} implies that if $k = 1$, then $\vonep(g_1, \ldots, g_k)$ depends only on the ideal $I$ of $\kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ generated by $g_1, \ldots, g_k$. We now show that this is in general false if $k > 1$. Let $\scrP$ be the triangle in $\rr^2$ with vertices $(0,0), (1,0), (0,1)$, so that $\xp \cong \pp^2$ (\cref{example:xp^n}), and with respect to corresponding homogeneous coordinates $[z_{0,0}:z_{1,0}:z_{0,1}]$ on $\pp^2$, $\xzerop = \pp^2 \setminus V(z_{0,0}z_{1,0}z_{0,1})$ and $\xonep = \xp \setminus \{[0:0:1], [0:1:0], [1:0:0]\}$. Note that $(x,y) := (z_{1,0}/z_{0,0}, z_{0,1}/z_{0,0})$ is a system of coordinates on $\xzerop$. Let $g_1 := x - 1$ and $g_2 := y - 1$. It is straightforward to check that $\vonep(g_1, g_2) \cap (\xonep \setminus \xzerop) = \emptyset$, and as a subscheme of $\xzerop$, $\vonep(g_1, g_2) = V(g_1, g_2)$. Now let $h_1 := x - y$ and $h_2 := x + y - 2 + (x-y)^2$, so that the ideal generated by $h_1, h_2$ in $\kk[x,x^{-1}, y, y^{-1}]$ is the same as the ideal generated by $g_1, g_2$. It can be checked that $\vonep(h_1, h_2)$ contains the point $[0:1:1] \in  \xonep \setminus \xzerop$, so that $\vonep(h_1, h_2) \neq \vonep(g_1, g_2)$.
\end{example}

Let $\scrQ$ be a facet of $\scrP$ with primitive inner normal $\nu$, and $\alpha_\nu$ be an arbitrary element of $\zz^n$ such that $\langle \nu, \alpha_\nu \rangle = 1$. \Cref{U_Q} implies that the ideal of $\kk[U_\scrQ]$ consisting of elements vanishing on $\orbit{\scrQ}$ is generated by $x^{\alpha_\nu}$. Therefore $\orbit{\scrQ}$ is precisely the support of the closed {\em subscheme} $Z_{\alpha_\nu} := V(x^{\alpha_\nu})$ of $U_\scrQ$. Since $\orbit{\scrQ}$ is Zariski closed in $\xonep$ (\cref{exercise:orbit-closed-in-xonep}), it follows that $Z_{\alpha_\nu}$ is in fact a closed subscheme of $\xonep$. We now determine the {\em embedded isomorphism} (see \cref{scheme:compactification}) type of the ``scheme-theoretic intersection'' $\vonep(g_1, \ldots, g_k) \cap Z_{\alpha_\nu}$. Let $\psi_\nu^*: \nktoruss{n-1} \cong \orbit{\scrQ}$ be as in \cref{O_Q}.

\begin{prop} \label{vonepinfinity}
As a closed subscheme of $\orbit{\scrQ}$, the scheme-theoretic intersection $\vonep(g_1, \ldots, g_k) \cap Z_{\alpha_\nu}$ is embedded isomorphic via $\psi_\nu^*$ to the closed subscheme $V(\Inbetapsinu(g_1), \ldots, \Inbetapsinu(g_k))$ of $\nktoruss{n-1}$.
\end{prop}

\begin{proof}
The ideal $I_\scrQ$ of $\vonep(g_1, \ldots, g_k) \cap Z_{\alpha_\nu}$ is generated in $\kk[U_\scrQ]$ by $x^{\alpha_\nu}, \talphanuu{\alpha_\nu}(g_1), \ldots, \talphanuu{\alpha_\nu}(g_k)$. \Cref{U_Q,O_Q} imply that $\kk[U_\scrQ]/\langle x^{\alpha_\nu},\talphanuu{\alpha_\nu}(g_1), \ldots, \talphanuu{\alpha_\nu}(g_k) \rangle$ is isomorphic via $\psi_\nu^*$ to $\kk[\nktoruss{n-1}]/\langle \Inbetapsinu(g_1), \ldots, \Inbetapsinu(g_k)\rangle$, which directly implies the result.
\end{proof}

\subsection{Exercises}

\begin{exercise} \label{exercise:in-extension}
Let $\scrP$ be an $n$-dimensional convex integral polytope in $\rr^n$ and $g$ be a Laurent polynomial with $\np(g) \subseteq \scrP$.
\begin{enumerate}
\item Show that the collection $(U_\alpha \cap \xp, x^{-\alpha}g)$, where $\alpha$ varies over the vertices of $\scrP$, defines a Cartier divisor $D$ on $\xp$ such that $D$ extends the Cartier divisor $V(g)$ of $\nktorus$. [Hint: use \cref{exercise:invertible-on-intersection}.]
\item Show that the following are equivalent:
\begin{enumerate}
\item $\supp(D)$ is the closure in $\xp$ of $V(g) \subset \nktorus$.
\item $\np(g) \cap \scrQ \neq \emptyset$ for each facet $\scrQ$ of $\scrP$.
\end{enumerate}
\item \label{in-extension:k^n} Assume in addition that $\scrA := \scrP \cap \zz^n$ satisfies the hypothesis of assertion \eqref{toric-k^n:origin} of \cref{toric-k^n} so that $U_\origin \cap \xp \cong \kk^n$. Show that the following are equivalent:
\begin{enumerate}
\item $\supp(D)$ is the closure in $\xp$ of $V(g) \subset \kk^n$.
\item $\np(g) \cap \scrQ \neq \emptyset$ for each facet $\scrQ$ of $\scrP$ which is not contained in any coordinate hyperplane of $\rr^n$.
\end{enumerate}
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:simplicial-extension}
Let $\scrP$ be an $n$-dimensional convex integral polytope in $\rr^n$. For each vertex $\alpha$ of $\scrP$, let $\scrC_\alpha$ be the cone in $\rr^n$ generated by $\{\alpha' - \alpha: \alpha' \in \scrP\}$. Assume there is $g \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ such that for each vertex $\alpha$ of $\scrP$, there is $\beta_\alpha \in \zz^n$ such that $\beta_\alpha + \np(g) \subset \scrC_\alpha$ and $\beta_\alpha + \np(g)$ touches every edge of $\scrC_\alpha$.
\begin{enumerate}
\item Let $\alpha, \alpha'$ be vertices of $\scrP$, and $\scrQ$ be the smallest face of $\scrP$ containing both $\alpha$ and $\alpha'$. Let $H$ be the linear subspace of $\rr^n$ spanned by $\{\beta - \alpha: \beta \in \scrQ\}$. Show that $\beta_\alpha - \beta_{\alpha'} \in H$. [Hint: use \cref{exercise:edge-graph} to reduce to the case that there is an edge of $\scrP$ connecting $\alpha$ and $\alpha'$. In that case show that $\beta_\alpha - \beta_{\alpha'}$ is on the line through the origin and $\alpha - \alpha'$.]
\item Deduce that the collection of pairs $(U_\alpha \cap \xp, x^{\beta_\alpha}g)$, where $\alpha$ varies over the vertices of $\scrP$, defines a Cartier divisor $D$ on $\xp$ such that $D$ extends the Cartier divisor $V(g)$ of $\nktorus$, and $\supp(D)$ is the closure in $\xp$ of $V(g) \subset \nktorus$. [Hint: use \cref{exercise:invertible-on-intersection}.]
\item If $\scrP$ is {\em simplicial}, i.e.\ each vertex of $\scrP$ is connected to precisely $n$ distinct edges, then show that for every $g \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$, there is $m \geq 1$ such that $V(g^m) \subset \nktorus$ extends to a Cartier divisor $D$ on $\xp$ such that $\supp(D)$ is the closure in $\xp$ of $V(g^m) \subset \nktorus$.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:non-2-extension}
Let $\scrP$ and $h$ be as in \cref{example:2-extension}. If $D$ is any Cartier divisor on $\xp$ which extends $V(h^m) \subset \nktoruss{2}$, where $m$ is a positive integer, then show that $D$ satisfies property \ref{tight-extension} if and only if $m$ is a multiple of $3$.
\end{exercise}

\begin{exercise} \label{exercise:non-3-extension}
Prove the claims made in \cref{example:3-non-extension}.
\end{exercise}

\begin{exercise} \label{exercise:orbit-closed-in-xonep}
Let $\scrQ$ be a facet of an $n$-dimensional convex integral polytope $\scrP$ in $\rr^n$. Show that $\orbit{\scrQ}$ is a closed subvariety of $\xonep$.
\end{exercise}

\begin{exercise} \label{exercise:vonep-Cartier}
Let $g \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ and $\scrP$ be a convex integral polytope of dimension $n$. Show that
\begin{enumerate}
\item The Cartier divisor $\vonep(g)$ of $\xonep$ does not depend on the choice of the $\alpha_{\nu_i}$.
\item If $g/h$ is a monomial in $x_1, \ldots, x_n$, then $\vonep(g) = \vonep(h)$.
\item $\supp(\vonep(g))$ is the closure in $\xonep$ of $V(g) \subset \nktorus$.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:vonep-subscheme}
Let $g_1, \ldots, g_k \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ and $\scrP$ be a convex integral polytope of dimension $n$.
\begin{enumerate}
\item Let $\scrQ_1, \scrQ_2$ be facets of $\scrP$, $\nu_i$ be the primitive inner normal to $\scrQ_i$, and $\alpha_{\nu_i} \in \zz^n$ be such that $\langle \nu_i, \alpha_{\nu_i} \rangle = 1$. Show that for each $x \in U_{\scrQ_1} \cap U_{\scrQ_2}$ the ideal of $\local{\xp}{x}$ generated by $\talphanuu{\alpha_{\nu_1}}(g_1), \ldots, \talphanuu{\alpha_{\nu_1}}(g_k)$ is the same as the ideal generated by $\talphanuu{\alpha_{\nu_2}}(g_1), \ldots, \talphanuu{\alpha_{\nu_2}}(g_k)$.
\item \label{alpha-non-dependence} If $g_j/h_j$ is a monomial in $x_1, \ldots, x_n$ for each $j$, then show that for each $i$ and each $x \in U_{\scrQ_i}$, the ideal of $\local{\xp}{x}$ generated by $\talphanuu{\alpha_{\nu_i}}(g_1), \ldots, \talphanuu{\alpha_{\nu_i}}(g_k)$ is the same as the ideal generated by $\talphanuu{\alpha_{\nu_i}}(h_1), \ldots, \talphanuu{\alpha_{\nu_i}}(h_k)$.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:different-vonep}
Verify the claims made in \cref{example:different-vonep}.
\end{exercise}

\section{Branches of curves on the torus} \label{branchion}
\subsection{Branch of a curve on a variety} \label{branchion-0}
Let $C$ be a {\em curve}, i.e.\ a pure dimension one variety. Fix a desingularization $\pi: C' \to C$ of $C$ and a nonsingular compactification $\bar C'$ of $C'$. A {\em branch} of $C$ is the germ of a point in $\bar{C'}$. Equivalently, consider the equivalence relation $\sim$ on the collection of pairs $\{(Z,z): z \in \bar{C'}$ and $Z$ is an open neighborhood of $z$ in $C'\}$ defined as follows: $(Z, z) \sim (Z',z')$ if and only if $z = z'$. Then a branch of $C$ is a equivalence class of $\sim$. Let $X$ be a variety containing $C$ as a subvariety. Let $\bar X$ be an arbitrary projective compactification of $X$ and $\bar C$ be the closure of $C$ in $\bar X$. Then $\pi$ extends to a map $\bar C' \to \bar C$ (\cref{exercise:curve-nonsingular-morphextension}), which we also denote by $\pi$. If $B := (Z,z)$ is a branch of $C$ and $y := \pi(z)$, we say that $y$ is the {\em center} of $B$ on $\bar X$, or equivalently, $B$ is a {\em branch of $C$ at $y$}. If $y \not\in X$, we say that (with respect to $X$) $B$ is a {\em branch at infinity}, or that it is {\em centered at infinity}. Since $\bar C'$ is nonsingular, $\local{Z}{z}$ is a discrete valuation ring (\cref{exercise:curve-dvr}), and corresponds to a {\em unique} discrete valuation $\ord_z(\cdot)$ on the field of fractions of $\local{Z}{z}$ (assertion \ref{uniquely-dvr} of \cref{prop:discrete-properties}). If $f$ is a regular function on a neighborhood of $z$ on $X$, then we write $\ord_z(f)$ for $\ord_z(\pi^*(f))$.

\subsection{Weights of a branch on the torus} \label{branch-weight-section}
Fix a system of coordinates $(x_1, \ldots, x_n)$ on $\nktorus$. Let $B = (Z,z)$ be a branch of a curve on $\nktorus$. The {\em weight} of $x_j$ corresponding to $B$ is $\ord_z(x_j|_Z)$. By $\nu_B$ we denote the element in $\rnstar$ with coordinates $(\ord_z(x_1), \ldots, \ord_z(x_n))$ with respect to the basis dual to the standard basis of $\rr^n$.

\begin{lemma} \label{branch-lemma-0}
\begin{enumerate}
\item  \label{dot-property} For each $\alpha \in \zz^n$, $x^\alpha$ restricts to a well-defined rational function on $Z$ and $\ord_z(x^{\alpha}) = \langle \nu_B, \alpha \rangle$.
\item $\nu_B \neq 0$ if and only if $B$ is centered at infinity with respect to $\nktorus$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is left as an exercise.

\end{proof}

\subsection{Weighted order on Laurent polynomials} \label{wt-order-section}
Let $\nu$ be an integral element $\nu$ of $\rnstar$. The {\em weighted order} corresponding to $\nu$ is an integer valued map, which by an abuse of notation we also denote by $\nu$, on the ring of Laurent polynomials defined as follows: given a Laurent polynomial $f = \sum_\alpha c_\alpha x^\alpha$,
\begin{align*}
\nu(f) := \min\{ \langle \nu, \alpha \rangle: c_\alpha \neq 0\}
\end{align*}
In particular, if $f$ is the zero polynomial, then $\nu(f)$ is defined to be $\infty$. The {\em initial form} $\In_\nu(f)$ of $f$ with respect to $\nu$ is the sum of all $c_\alpha x^{\alpha}$ such that $\langle \nu, \alpha \rangle= \nu(f)$. Given a subset $\scrS$ of $\rr^n$, we say that $f$ is {\em supported at} $\scrS$ if $\supp(f) \subseteq \scrS$, and we write $\scrL(\scrS)$ for the set of all Laurent polynomials supported at $\scrS$. In the case that $\scrS \cap \zz^n$ is a finite set, we equip $\scrL(\scrS)$ with the Zariski topology by identifying it with $\kk^{|\scrS \cap \zz^n|}$ via the map
\begin{align*}
\sum_{\alpha \in \scrS \cap \zz^n}  c_\alpha x^\alpha \mapsto (c_\alpha)_{\alpha \in \scrS \cap \zz^n}
\end{align*}
The result we will now prove ties these notions with those from \cref{branch-weight-section}; we will encounter many of its variants in the forthcoming chapters. Let $B = (Z,z)$ be a branch of a curve on $\nktorus$, and $\nu_B$ be as in \cref{branch-weight-section}. By an abuse of notation, we denote by $\nu_B$ also the weighted order corresponding to $\nu_B$.

\begin{prop}
Assume $\scrS \cap \zz^n$ has finitely many elements. There is a nonempty Zariski open subset $U$ of $\scrL(\scrS)$ such that $\ord_z(f) = \nu_B(f)$ for each $f \in U$. More precisely, define
\begin{align*}
\scrL^*(\scrS) := \{f \in \scrL(\scrS): \ord_z(f) = \nu_B(f)\}
\end{align*}
Then $\scrL^*(\scrS)$ is a constructible subset of $\scrL(\scrS)$ of dimension $|\scrS|$.
\end{prop}

\begin{proof}
Pick a parameter $\rho$ of $\local{Z}{z}$. Then $\ord_z(\rho) = 1$. For each $i = 1, \ldots, n$, if $m_i := \nu_B(x_i)$, then there is a representation of the form $x_i = c_i\rho^{m_i} + h_i$ where $c_i \in \kk^*$, and $h_i \in \local{Z}{z}$ such that $\ord_z(h_i) > m_i$ (\cref{exercise:parameter-expansion1}). For each $\scrA \subseteq \scrS \cap \zz^n$, let $\scrL^*_B(\scrA) :=  \{f \in \scrL^*(\scrA): \supp(\In_{\nu_B}(f)) \subset \In_{\nu_B}(\scrA) \}$. It is straightforward to check that
\begin{align*}
\scrL^*_B(\scrA)
	&=  \{( c_\alpha)_{\alpha \in \scrS \cap \zz^n}:
		c_\alpha = 0\ \text{if}\ \alpha \not\in \scrA,\

		\sum_{\alpha \in \In_{\nu_B}(\scrA)} \prod_{i=1}^n (c_i)^{\alpha_i} c_\alpha \neq 0 \}
\end{align*}
which implies that $\scrL^*_B(\scrA)$ is a {\em nonempty} open subset of a closed subset of $\scrL(\scrS)$. Since $\scrL^*(\scrS)$ is the union of $\scrL^*_B(\scrA)$ over all subsets $\scrA$ of $\scrS \cap \zz^n$, it follows that it is a constructible subset of $\scrL(\scrS)$. The remaining parts of the proposition follows from taking $\scrA = \scrS \cap \zz^n$.
\end{proof}

\subsection{Exercises}
\begin{exercise}
Consider the singular curves $C_1, C_2$ from \cref{example:curve-singularities}. Show that $C_1$ has a single branch at its singular point, whereas $C_2$ has two branches at its singular point. [Hint: $t \mapsto (t^3, t^2)$ induces a desingularization of $C_1$. For $C_2$ use \cref{exercise:curve-morph-nonextension}.]
\end{exercise}

\begin{exercise}
Prove \cref{branch-lemma-0}.
\end{exercise}

\section{Points at infinity on toric varieties} \label{toric-infinity-section}
\subsection{Centers of branches at infinity on the torus} \label{toric-center-section}
Let $\scrA:= \{\alpha_0, \ldots, \alpha_N\}$ be a finite subset of $\zz^n$ and $B = (Z,z)$ be a branch centered at infinity on $\nktorus$. If $\phi_\scrA: \nktorus \to \xzeroa$ is the map from \eqref{phi_A}, then $\phi_\scrA(B)$ is a branch centered at infinity on $\xzeroa$. We now determine the torus orbit of $\xa$ that contains the center $o_B$ of $\phi_\scrA(B)$ on $\xa$; we will see that this orbit is completely determined by the element $\nu_B \in \rnstar$ defined in \cref{branch-weight-section}. Let $\scrP$ be the convex hull of $\scrA$ and $\scrB$ be a face of $\scrA$. Then the convex hull $\scrQ$ of $\scrB$ is a face of $\scrP$. As in \cref{normal-section} we write $\Sigma_\scrP$ for the {\em normal fan} of $\scrP$, and denote the {\em normal cone} of $\scrQ$ by $\sigma_\scrQ$ and the relative interior of $\sigma_\scrQ$ by $\sigma^0_\scrQ$.

\begin{figure}[h]
\begin{center}
\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-5.5}
\def\ymax{5.5}
\def\opazero{0.5}
\def\colorzero{green}

\tikzstyle{dot} = [circle, minimum size=5pt, inner sep = 0pt, fill]

\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);
\node[dot, \colorA] (A) at (1,-4) {};
\node[dot, \colorB] (B) at (13,2) {};
\node[dot, \colorC] (C) at (10,5) {};
\fill[\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center);
\draw[thick, \colorAB] (A) -- (B);
\draw[thick, \colorBC] (B) -- (C);
\draw[thick, \colorCA] (C) -- (A);
\node[anchor = north] at (A) {\picfontsize $A$};
\node[anchor = west] at (B) {\picfontsize $B$};
\node[anchor = south] at (C) {\picfontsize $C$};

\node at (8,1) {\picfontsize $\scrP$};

\def\xmin{-7.5}
\def\xshift{5}
\pgfmathsetmacro\shiftone{\xshift + \xmax -\xmin};
\def\xmax{7.5}

\begin{scope}[shift={(\shiftone,0)}]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);

\coordinate (O) at (0,0);

\coordinate (ABperp) at (-\ymax/2, \ymax);
\coordinate (BCperp) at (\ymin, \ymin);
\coordinate (CAperp) at (-\ymin, \ymin);

\fill[\colorB, opacity=\opazero ] (O) --  (ABperp) -- (\xmin,\ymax) -- (\xmin,\ymin) -- (BCperp);
\fill[\colorC, opacity=\opazero ] (O) --  (BCperp) -- (CAperp);
\fill[\colorA, opacity=\opazero ] (O) --  (CAperp) -- (\xmax, \ymin) -- (\xmax,\ymax) -- (ABperp);

\draw [thick, \colorAB] (O) -- (ABperp);
\draw [thick, \colorBC] (O) -- (BCperp);
\draw [thick, \colorCA] (O) -- (CAperp);

\node[dot, \colorzero] at (O) {};

\node at (-4.5,0.5) {\picfontsize $\sigma^0_B$};
\node at (4.5,1.5) {\picfontsize $\sigma^0_A$};
\node at (.5,-3.5) {\picfontsize $\sigma^0_C$};

\node [anchor= north] at (BCperp) {\picfontsize $\sigma^0_{BC}$};
\node [anchor=north] at (CAperp) {\picfontsize $\sigma^0_{CA}$};
\node [anchor=south] at (ABperp) {\picfontsize $\sigma^0_{AB}$};

\end{scope}
\end{tikzpicture}
\caption{Normal fan of $\scrP$}  \label{fig:xp-normal-fan}
\end{center}
\end{figure}

\begin{prop} \label{curve-to-orbit}
$o_B \in \orbit{\scrB}$ if and only if $\nu_B \in \sigma^0_\scrQ$. In particular, if $\scrB$ is a facet of $\scrA$, then $o_B \in \orbit{\scrB}$ if and only if $\nu_B$ is a positive multiple of the {\em primitive inner normal} to $\scrQ$.
\end{prop}

\begin{proof}

Pick $\beta \in \scrB$. \Cref{xa-thm} implies that $x^{\alpha - \beta} = z_\alpha/z_\beta$ is a regular function on $\orbit{\scrB}$ for each $\alpha \in \scrA$. It also implies that $o_B \in \orbit{\scrB}$ if and only if the following holds: ``$x^{\alpha-\beta}|_{o_B} \neq 0$ if and only if $\alpha \in \scrB$.'' Due to assertion \eqref{dot-property} of \cref{branch-lemma-0} the latter condition is  equivalent to the condition that $\In_{\nu_B}(\scrA) =  \scrB$, which is in turn equivalent to the condition that $\In_{\nu_B}(\scrP) = \scrQ$, as required.
\end{proof}

We now describe the coordinates of $o_B$. As in \cref{wt-order-section}, we write $\nu_B$ also for the {\em weighted order} on $\kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ induced by $\nu_B$. Fix an arbitrary element $\rho_B \in \local{Z}{z}$ such that $\ord_z(\rho_B|_Z) = 1$. We say that $\rho_B$ is a {\em parameter} of $B$. Define
\begin{align}
\begin{split}
\In_B(x_j)
	&:=
		\left. \frac{x_j}{(\rho_B)^{\nu_B(x_j)}} \right|_z \in \kk^*, \\
\In(B)
	&:= (\In_B(x_1), \ldots, \In_B(x_n)) \in \nktorus
\end{split}
\label{in-B-torus}
\end{align}
That $\In_B(x_j)$ and $\In(B)$ are well defined follows from \cref{exercise:curve-dvr}. Note that $\In(B)$ depends on the choice of $\rho_B$. In all cases considered in this book, whenever a branch $B$ of a curve is considered, a corresponding parameter $\rho_B$ is assumed to be fixed from the beginning. Let $\scrB$ be the face of $\scrA$ such that $o_B \in \orbit{\scrB}$ (\cref{curve-to-orbit} shows that $\scrB$ is uniquely determined by $\nu_B$). Let $\phi_\scrB : \nktorus \to \xzerob$ be the map from \eqref{phi_A}. \Cref{xa-thm} implies that we may think of $\phi_\scrB$ as a map from $\nktorus$ to $\orbit{\scrB} \subset \xa$, simply by adjoining a zero in place of each coordinate $z_\alpha$ on $\pp^{N}$ such that $\alpha \not\in \scrB$.

\begin{prop} \label{branch-center}
$o_B = \phi_\scrB(\In(B))$. In particular, $\phi_\scrB(\In(B))$ does not depend on the choice of $\rho_B$ (even though $\In(B)$ does).
\end{prop}

\begin{proof}
Pick $\alpha, \beta \in \scrB$. \Cref{curve-to-orbit} implies that $(z_\alpha/z_\beta)|_{o_B} = x^{\alpha - \beta}|_{o_B} = (\In(B))^{\alpha - \beta}$. The result then follows immediately from \cref{xa-thm}.
\end{proof}

\subsection{Closure of subvarieties of the torus}
Let $W$ be a closed subvariety of $\nktorus$ defined by Laurent polynomials $f_1, \ldots, f_m$ in $\nktorus$. Let $\scrA$ be a finite subset of $\zz^n$ and $\phi_\scrA: \nktorus \to \xzeroa$ be the map from \eqref{phi_A}. Write $\bar W'$ for the closure in $\xa$ of $W' := \phi_\scrA(W) \subset \xzeroa$. In this section we give a partial description of the points in $\bar W'$. \\

\begin{lemma} \label{branch-lemma-1}
Let $B$ be a branch of a curve contained in $W$. Then $\In (B)$ is a common zero of $\In_{\nu_B}(f_i)$, $i = 1, \ldots, m$.
\end{lemma}

\begin{proof}
Let $B = (Z,z)$. Pick a parameter $\rho_B$ of $B$. \Vref{exercise:curve-dvr,exercise:parameter-expansion1} imply that for each $j$, $x_j/\rho_B^{\nu_B(x_j)}$ is a regular function on a neighborhood of $z$ on $Z$, and it can be expressed as $\In_B(x_j) + g_j$, where $g_j \in \local{Z}{z}$, $\ord_z(g_j) > 0$. Consequently, for each $i$, $f_i/\rho_B^{\nu_B(f_i)}$ can be expressed in $\local{Z}{z}$ as $\In_{\nu_B}(f_i)(\In(B)) + h_i$, where $h_i \in \local{Z}{z}$, $\ord_z(h_i) > 0$. Since $f_i/\rho_B^{\nu_B(f_i)}$ maps to the zero element in $\local{Z}{z}$, it follows that $\In_{\nu_B}(f_i)(\In(B))= 0$, as required.
\end{proof}

Let $\nu$ be an integral element of $\rnstar$; we write $\nu$ also for the corresponding weighted order on $\kk[x_1,  x_1^{-1},\ldots, x_n, x_n^{-1}]$ and define $W_\nu(f_1, \ldots, f_m) := V(\In_\nu(f_1), \ldots, \In_\nu(f_m)) \subset \nktorus$.
Let $\scrB$ be a face of $\scrA$. As in \cref{branch-center}, we regard the map $\phi_\scrB : \nktorus \to \xzerob$ from \eqref{phi_A} as a map from $\nktorus$ to $\orbit{\scrB} \subset \xa$. As in \cref{curve-to-orbit} we write $\scrQ$ for the convex hull of $\scrB$ and $\sigma^0_\scrQ$ for the relative interior of the corresponding cone of the normal fan of the convex hull of $\scrA$.

\begin{cor} \label{closure-containment}
$\bar W' \cap  \orbit{\scrB} \subset \bigcup_{\nu \in \sigma^0_\scrQ} \phi_\scrB(W_\nu(f_1, \ldots, f_m))$.
\end{cor}

\begin{proof}
Let $w \in \bar W' \cap \orbit{\scrB}$. If $w \in W'$, then we must have that $\scrB = \scrA$. In that case $0 \in \sigma^0_\scrQ$. Since $W_0(f_1, \ldots, f_m) =  W$, it follows that $w \in \phi_\scrB(W_0(f_1, \ldots, f_m)) = W'$, as required. So assume $w \in \bar W' \setminus W'$. Then there is an irreducible curve $C' \subset W'$ such that $w$ is in the closure of $C'$ (\cref{closure-curve-prop}). Pick a branch $B = (Z,z)$ of $\phi_\scrA^{-1}(C)$ such that $z \mapsto w$ under the morphism induced by $\phi_\scrA$. \Cref{curve-to-orbit} implies that $\nu_B \in \sigma^0_\scrQ$ and \cref{branch-center} implies that $w = \phi_\scrB(\In(B))$. Since $\In(B) \in W_{\nu_B}(f_1, \ldots, f_m)$ (\cref{branch-lemma-1}), the result follows.
\end{proof}

For each $i = 1, \ldots, m$, there are only finitely many possibilities for $\In_\nu(f_i)$ as $\nu$ varies over $\rnstar$. It follows that the union in the statement of \cref{closure-containment} can be regarded as being over a {\em finite} collection of $\nu \in \rnstar$. \Cref{exercise:closure-proper-containment} shows that the containment of \cref{closure-containment} is in general proper. However, if $W$ is a hypersurface (i.e.\ $m = 1$), then \cref{exercise:closure-hypersurface} shows that \cref{closure-containment} holds with ``$=$'' in place of $\subset$.

\subsection{Exercises}

\begin{exercise} \label{exercise:closure-proper-containment}
Let $\scrA := \{(0,0), (1,0), (0,1)\} \subset \rr^2$ and $h_1, h_2$ be as in \cref{example:different-vonep}. Let $W := V(h_1, h_2) = \{(1,1)\} \in \nktoruss{2}$ and $\scrB := \{(1,0), (0,1)\}$. Note that $\scrQ := \conv(\scrB)$ is an edge of $\scrP := \conv(\scrA)$.
\begin{enumerate}
\item Show that $\bar W' \cap  \orbit{\scrB} = \emptyset$.
\item Let $\nu$ be the primitive inner normal to $\scrQ$. Show that $W_\nu(h_1, h_2) \neq \emptyset$.
\end{enumerate}
\end{exercise}

\begin{exercise} \label{exercise:closure-hypersurface}
Let $f \in \kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ and $W := V(f) \subset \nktorus$. Show that in the notation of \cref{closure-containment}, $\bar W' \cap  \orbit{\scrB} = \bigcup_{\nu \in \sigma^0_\scrQ} \phi_\scrB(W_\nu(f))$ for each face $\scrB$ of $\scrA$. [Hint: use \cref{exercise:vonep-Cartier} to prove it in the case that $\scrQ$ is a facet of $\scrP$. Then use induction on $\dim(\scrP)$.]
\end{exercise}

\section{$^*$Weighted projective spaces} \label{weighted-toric-section}
\footnote{The asterisk in the section name is to indicate that the material of this section is not going to be used in the proof of Bernstein's theorem. It is used for the first time in \cref{bezout-chapter}.} Recall from \cref{projective-intro} that the $n$-dimensional projective space is the space of straight lines through the origin in $\kk^{n+1}$. A {\em weighted projective space} is constructed in the same way, using {\em weighted rational curves} in place of straight lines. Let $\omega$ be an integral element of $\rnnstar{n+1}$ with coordinates $(\omega_0, \ldots, \omega_n)$ with respect to the basis dual to the standard basis of $\rr^{n+1}$. Assume each $\omega_j$ is {\em positive}.
The corresponding weighted projective space, which we denote by $\wpn$ or $\wwpn{\omega_0, \ldots, \omega_n}$, is the set of curves in $\kk^{n+1}$ of the form $C_a := \{(a_0t^{\omega_0}, \ldots, a_nt^{\omega_n}): t \in \kk\}$, where $a  := (a_0, \ldots, a_n) \in \kk^{n+1} \setminus \{0\}$. The {\em weighted homogeneous coordinates} of $C_a$ are $[a_0: \cdots : a_n]$. Note that the projective space $\pp^n$ is the special case of $\wpn$ for $\omega = (1, \ldots, 1)$. Like $\pp^n$, each $\wpn$ can be given the structure of a complete algebraic variety. In this section we give two
(equivalent) realizations of $\wpn$ as a toric variety.

\begin{figure}[h]
\begin{center}
\def\xmin{-0.5}
\def\xmax{13.5}
\def\ymin{-5.5}
\def\ymax{5.5}
\def\opazero{0.5}
\def\colorzero{green}

\tikzstyle{dot} = [circle, minimum size=5pt, inner sep = 0pt, fill]

\begin{tikzpicture}[scale=\scalefactor]
\draw [gray,  line width=0pt] (\xmin, \ymin) grid (\xmax,\ymax);
\draw [<->] (0, \ymax) |- (\xmax, 0);
\node[dot, \colorA] (A) at (1,-4) {};
\node[dot, \colorB] (B) at (13,2) {};
\node[dot, \colorC] (C) at (10,5) {};
\fill[\colorzero, opacity=\opazero ] (A.center) --  (B.center) -- (C.center);
\draw[thick, \colorAB] (A) -- (B);
\draw[thick, \colorBC] (B) -- (C);
\draw[thick, \colorCA] (C) -- (A);
\node[anchor = north] at (A) {\picfontsize $A$};
\node[anchor = west] at (B) {\picfontsize $B$};
\node[anchor = south] at (C) {\picfontsize $C$};

\node at (8,1) {\picfontsize $\scrP$};

\def\xmin{-7.5}
\def\xshift{5}
\pgfmathsetmacro\shiftone{\xshift + \xmax -\xmin};
\def\xmax{7.5}

\begin{scope}[shift={(\shiftone,0)}]

\coordinate (O) at (0,0);
\coordinate (ABperp) at (-1, 2);
\coordinate (BCperp) at (-1, -1);
\coordinate (CAperp) at (1, -1);

\draw [thick, \colorAB, ->] (O) -- (ABperp);
\draw [thick, \colorBC, ->] (O) -- (BCperp);
\draw [thick, \colorCA, ->] (O) -- (CAperp);

\node [anchor = north east] at (BCperp) {\picfontsize $\nu_{BC} = (-1,-1)$};
\node [anchor = north west] at (CAperp) {\picfontsize $\nu_{CA} = (1,-1)$};
\node [anchor = south] at (ABperp) {\picfontsize $\nu_{AB} = (-1,2)$};

\node [anchor = north] at (0,-4) {\picfontsize $\nu_{BC} + 2\nu_{AB} + 3\nu_{BC} = 0$};

\end{scope}
\end{tikzpicture}
\caption{$\xp \cong \pp^2(1,2,3)$}  \label{fig:wt-proj-n-construction}
\end{center}
\end{figure}

\subsection{$\wpn$ via polytopes in $\rr^n$} \label{implicit-wpn}
Pick integral elements $\nu_0, \ldots, \nu_n$ of $\rnstar$ such that $\nu_0, \ldots, \nu_n$ span $\znstar$, and $\sum_{j=0}^n \omega_j \nu_j = 0$. Let $\scrP$ be an $n$-dimensional integral simplex in $\rr^n$ such that its inner facet normals are $\nu_0, \ldots, \nu_n$; note that $\scrP$ is uniquely determined by the $\nu_j$ up to translation and scaling - see \cref{fig:wt-proj-n-construction}. We will show that $\wpn$ can be identified with $\xp$.

\begin{center}
\begin{figure}[h]

\def\shiftone{7.5}
\def\colorzero{green}
\def\colorone{red}
\def\opazero{0.5}
\def\viewx{75}
\def\viewy{30}
\def\titlex{1}
\def\titley{-1}
\begin{tikzpicture}[scale=0.6]
\pgfplotsset{every axis/.append style = {view={\viewx}{\viewy}, axis lines=middle, enlargelimits={upper}}}

\begin{axis}
\addplot3[ultra thick, draw=\colorone, fill=\colorzero,opacity=\opazero] coordinates{(6,0,0) (0,3,0) (0,0,2) (6,0,0)};
\draw (axis cs:3,0.5,1) node {$\scrP'$};
\end{axis}
\end{tikzpicture}

\caption{A polytope $\scrP'$ in $\rr^3$ such that $\xpp{\scrP'} \cong \pp^2(1,2,3)$} \label{fig:wt-proj-n+1-construction}
\end{figure}
\end{center}

\subsection{$\wpn$ via polytopes in $\rr^{n+1}$} \label{explicit-wpn}
Let $p := \lcm(\omega_0, \ldots, \omega_n)$ and $\scrP'$ be the $n$-dimensional simplex in $\rr^{n+1}$ with vertices $\beta_j := (p/\omega_j)e_j$, $j = 0, \ldots, n$, where $e_0, \ldots, e_n$ are the standard unit vectors in $\rr^{n+1}$ (\cref{fig:wt-proj-n+1-construction}). We will show that $\xpp{\scrP'} \cong \xp$, where $\scrP$ is from \cref{implicit-wpn}.

\subsection{Equivalence of the constructions} \label{wt-equivalence-section}
Let $\scrP$ be as in \cref{implicit-wpn}. For each $j = 0, \ldots, n$, let $\scrQ_j$ be the facet of $\scrP$ with inner normal $\nu_j$, and $\alpha_j$ be the (unique) vertex of $\scrP$ which is not on the facet $\scrQ_j$. Pick $j$, $0 \leq j \leq n$. \Cref{xp-thm} implies that the coordinate ring of $U_{\alpha_j} \cap \xp$ is $\kk[S_j]$, where $S_j$ is the semigroup of integral points in the polyhedral cone $\scrC_{\alpha_j} \subset \rr^n$ generated by $\alpha_i - \alpha_j$, $i = 0, \ldots, n$. \Cref{exercise:equivalent-cones} below implies that $\alpha \in S_j$ if and only if $\alpha \in \zz^n$ and $\langle \nu_i, \alpha \rangle \geq 0$ for each $i = 0, \ldots, \hat j, \ldots, n$. Consider the map $\phi: \zz^n \mapsto \zz^{n+1}$ given by $\alpha \mapsto (\langle \nu_0, \alpha \rangle, \ldots, \langle \nu_n, \alpha \rangle)$.

\begin{claim}
$\phi$ induces an isomorphism between $S_j$ and $S'_j := \{\beta = (\beta_0, \ldots, \beta_n) \in \zz^{n+1}: \langle \omega, \beta \rangle = 0,\ \beta_i \geq 0$ for each $i = 0, \ldots, \hat j,\ldots,  n\}$.
\end{claim}

\begin{proof}
\Cref{exercise:equivalent-cones} implies that $S_j = \phi^{-1}(S'_j)$. We now show that $S'_j = \phi(S_j)$. Indeed, let $H_j$ and $H'_j$ be the subgroups of $\zz^{n+1}$ generated respectively by $\phi(S_j)$ and $S'_j$. It suffices to show that $H'_j = H_j$. Since $H_j \subset H'_j$ are subgroups of $\zz^n$ of the same rank $n$, we have to show that if $k\beta \in H_j$ for some positive integer $k$ and $\beta = (\beta_0, \ldots, \beta_n) \in \zz^{n+1}$, then $\beta \in H_j$. Indeed, if $k\beta_j = \langle \nu_j, \alpha \rangle$ for each $j = 0, \ldots, n$, then since the $\nu_j$ span $\znstar$, it follows that $\alpha/k \in \zz^n$, and $\beta = \phi(\alpha/k) \in H_j$. Therefore $H'_j = H_j$, which proves the claim.
\end{proof}

As in \cref{explicit-wpn} let $\beta_j$ be the vertex of $\scrP'$ on the $j$-th axis. \Cref{exercise:equivalent-cones} implies that $S'_j$ is the semigroup of integral points in the polyhedral cone $\scrC'_{\beta_j} \subset \rr^{n+1}$ generated by $\beta_i - \beta_j$, $i = 0, \ldots, n$. Therefore \cref{xp-thm} implies that $\phi$ induces an isomorphism $\xp \cong \xpp{\scrP'}$.

\subsection{Identification with $\wpn$} \label{wt-identification-section}
Let $f \in \kk[x_0, \ldots, x_n]$. We say that $f$ is {\em weighted homogeneous} with respect to $\omega$ (or in short, {\em $\omega$-homogeneous}) if $\omega$ is constant on $\supp(f)$. If $f$ is $\omega$-homogeneous, then the set $V(f) := \{[a_0 : \cdots : a_n]: f(a_0, \ldots, a_n) = 0\} \subset \wpn$ of zeroes of $f$ is a well defined subset of $\wpn$. As in the case of $\pp^n$, the basic open subsets of $\wpn$ are $U_j := \wpn \setminus V(x_j)$, $j = 0, \ldots, n$. If $f$ is $\omega$-homogeneous with $\omega(f)$ a multiple of $\omega_j$, say $\omega(f) = k\omega_j$, $k \geq 0$, then $(f/x_j^k)|_{C_a}$ is constant for all $C_a \in U_j$ and therefore $f/x_j^k$ is a well defined function on $U_j$. \Cref{exercise:R_j-S_j} shows that the $\kk$-algebra $R_j$ generated by all these $f/x_j^k$, $k \geq 0$, is finitely generated, and if $h_1, \ldots, h_s$ generate $R_j$ as a $\kk$-algebra, then they induce a bijection from $U_j$ to an open affine subvariety of $\xpp{\scrP'}$ (where $\scrP'$ is as in \cref{explicit-wpn}) which extend to a bijection from $\wpn \to \xpp{\scrP'}$. We use this bijection to identify $\wpn$ with $\xpp{\scrP'} \cong \xp$ (where $\scrP$ is as in \cref{implicit-wpn}). In particular, it follows that each $U_j$ is an open affine subvariety of $\wpn$ with coordinate ring $R_j$. To completely describe the identification of $\wpn$ and $\xpp{\scrP'}$ it remains to explicitly identify points in $\wpn$ with those of $\xpp{\scrP'}$. Given $a := [a_0: \cdots : a_n] \in \wpn$, we now compute the ideal $I_a$ of all $\omega$-homogeneous polynomials in $(x_0, \ldots, x_n)$ that vanish at $a$. Let $J_a$ be the ideal of $\kk[x_0, \ldots, x_n]$ generated by all the $x_i$ such that $a_i = 0$, and all binomials of the form $a^{\alpha_2}x^{\alpha_1} - a^{\alpha_1}x^{\alpha_2}$ where $\alpha_1, \alpha_2 \in \zzeroo{n+1}$ such that $\langle \omega, \alpha_1 \rangle = \langle \omega, \alpha_2 \rangle$. It is clear that $J_a \subset I_a$. The following proposition, which you will prove in \cref{exercise:ideal-prop}, shows that the converse is also true.

\begin{prop} \label{ideal-prop}
$I_a = J_a$. \qed
\end{prop}

\subsection{Exercises}

\begin{exercise}\label{exercise:equivalent-cones}
In the notation of \cref{wt-equivalence-section} show that
\begin{enumerate}
\item $\scrC_{\alpha_j} = \{\alpha \in \rr^n : \langle \nu_i, \alpha \rangle \geq 0,\ i = 0, \ldots, \hat j, \ldots, n\}$.
\item $\scrC'_{\beta_j} = \{\beta \in \rr^{n+1} : \langle \omega, \beta \rangle \geq 0,\ \beta_i \geq 0,\ i = 0, \ldots, \hat j, \ldots, n\}$.
\end{enumerate}
[Hint: use \cref{prop:minimal-polynequalities}.]
\end{exercise}

\begin{exercise}\label{exercise:R_j-S_j}
For each $j = 0, \ldots, n$, let $R_j$ be as in \cref{wt-identification-section} and $S'_j$ be as in \cref{wt-equivalence-section}.
\begin{enumerate}
\item Show that $R_j = \kk[S'_j]$ for each $j$.
\item Let $U'_j := U_{\beta_j} \cap \xpp{\scrP'}$ be the affine open subset of $\xpp{\scrP'}$ (where $\scrP'$ is as in \cref{explicit-wpn}) with coordinate ring $\kk[S'_j]$. If $h_1, \ldots, h_s$ generate $R_j$ as a $\kk$-algebra, then show that the map $x \mapsto (h_1(x), \ldots, h_s(x))$ induces a bijection $\phi_j$ from $U_j := \wpn \setminus V(x_j)$ to $U'_j$.
\item Show that for distinct $j$, the maps $\phi_j$ are ``compatible,'' i.e.\ for each $j,j'$, $\phi_j$ maps $U_j \cap U_{j'}$ bijectively onto $U'_j \cap U'_{j'}$.
\end{enumerate}
\end{exercise}

\begin{exercise}\label{exercise:ideal-prop}
Prove \cref{ideal-prop}. [Hint: use arguments analogous to those outlined in \cref{exercise:xa-binomial}.]
\end{exercise}

\section{$^*$Weighted blow up} \label{weighted-blow-up-section}
\footnote{The asterisk in the section name is to indicate that the material of this section is not going to be used in the proof of Bernstein's theorem. It is used for the first time in \cref{multiplicity-chapter}.}Let $\nu$ be a weighted order on $\kk[x_1, x_1^{-1}, \ldots, x_n, x_n^{-1}]$ with {\em positive} weights $\nu_j := \nu(x_j)$, $j = 1, \ldots, n$. Identify $\nu$ with the integral element of $\rnstar$ with coordinates $(\nu_1, \ldots, \nu_n)$ with respect to the basis dual to the standard basis of $\rr^n$. Fix a positive integer $k$. Let $\scrB_k := \{\alpha \in \zzeroo{n}: \langle \nu, \alpha \rangle = kp\}$, where $p := \lcm(\nu_1, \ldots, \nu_n)$, and $\qqq_k$ be the ideal of $\kk[x_1, \ldots, x_n]$ generated by $\{x^\alpha: \alpha \in \scrB_k\}$. Recall that the {\em blow up} $\bl_{\qqq_k}(\kk^n)$ of $\kk^n$ at $\qqq_k$ is the closure in $\kk^n \times \xaa{\scrB_k}$ of the graph of the map $\phi_{\scrB_k}: \nktorus \to \xaa{\scrB_k}$ defined as in \eqref{phi_A}. Let $\scrP := \{\alpha \in \rzeroo{n}: \langle \nu, \alpha \rangle = p\}$. Then $\scrP$ is the $(n-1)$-dimensional simplex in $\rr^n$ with vertices $(p/\nu_j)e_j$, $j = 1, \ldots, n$, where $e_1, \ldots, e_n$ form the standard basis of $\rr^n$. Let $\scrQ$ be the $n$-dimensional simplex in $\rr^n$ whose vertices are $0,e_1, \ldots, e_n$, so that $\kk^n$ can be naturally identified with the basic open set $U_0$ of $\xq \cong \pp^n$. If $k$ is sufficiently large, then $\xaa{\scrB_k} \cong \xp$, so that assertion \eqref{xp:diagonal} of \cref{xp-thm} implies that $\bl_{\qqq_k}(\kk^n)$ is isomorphic to the open subset of $\xaa{\scrP + \scrQ}$ which is the union of basic open subsets $U_{e_j}$, $j = 1, \ldots, n$ (note that each $e_j$ is a vertex of $\scrP+ \scrQ$). In particular, $\bl_{\qqq_k}(\kk^n)$ are isomorphic for all sufficiently large $k$; we call the corresponding algebraic variety the {\em $\nu$-weighted blow up of $\kk^n$} and denote it by $\blnukn$. Let $\sigma: \blnukn \to \kk^n$ be the blow up map. The {\em exceptional divisor} on $\blnukn$ is $\Enu := \sigma^{-1}(0)$. Note that $\sigma$ is an isomorphism on $\blnukn \setminus \Enu$. If $V$ is a subvariety of $\kk^n$, the {\em strict transform} of $V$ on $\blnukn$ is the closure in $\blnukn$ of $\sigma^{-1}(V \setminus \{0\})$. Note that $\scrP$ is the ``lower'' facet of $\scrP+ \scrQ$ (see \cref{fig:wt-blow-up}) and $\Enu$ is precisely the subvariety $\corbit{\scrP}$ of $\xaa{\scrP+ \scrQ}$ corresponding to the facet $\scrP$ of $\scrP+ \scrQ$. The construction in \cref{explicit-wpn} therefore shows that $\Enu \cong \wwpnn{\nu}{n-1}$. The following proposition makes this isomorphism more explicit.

\begin{center}
\begin{figure}[h]

\def\shiftx{7.5}
\def\colorzero{green}
\def\colorone{red}
\def\colortwo{blue}
\def\colorthree{yellow}
\def\opazero{0.5}
\def\viewx{60}
\def\viewy{30}
\def\titlex{2}
\def\titley{-1}
\begin{tikzpicture}[scale=0.66]

\pgfplotsset{every axis title/.append style={at={(0,-0.2)}}, view={\viewx}{\viewy}, axis lines=middle, enlargelimits={upper}}

\begin{axis}
\addplot3[ultra thick, draw, fill=\colorzero,opacity=\opazero] coordinates {(6,0,0) (0,3,0) (0,0,2) (6,0,0)};
\end{axis}
\draw (\titlex,\titley) node {$\scrP$};

\begin{scope}[shift={(\shiftx,0)}]
\begin{axis}
	\addplot3 [draw, ultra thick, fill=\colortwo,opacity=\opazero] coordinates{(0,0,1) (0,1,0) (1,0,0) (0,0,1)};
	\addplot3 [draw, ultra thick, fill=\colorone,opacity=\opazero] coordinates{(0,0,0) (1,0,0) (0,0,1) (0,0,0)};
\end{axis}
\draw (\titlex,\titley) node {$\scrQ$};
\end{scope}

\begin{scope}[shift={(2*\shiftx,0)}]
\begin{axis}

	\addplot3[ultra thick, draw, fill=\colorzero, opacity=\opazero] coordinates {(6,0,0) (0,3,0) (0,0,2) (6,0,0)};
	\addplot3[ultra thick, draw, fill=\colorthree, opacity=\opazero] coordinates {(0,0,3) (6,0,1) (0,3,1) (0,0,3)};
	\addplot3 [draw, ultra thick, fill=\colornu, opacity=\opazero] coordinates {(6,0,1) (7,0,0) (6,1,0) (6,0,1)};
	\addplot3 [draw, ultra thick, fill=gray, opacity=\opazero] coordinates {(0,3,1) (0,4,0) (6,1,0) (6,0,1)};

\end{axis}
\draw (\titlex,\titley) node {Lower and upper faces of $\scrP + \scrQ$};
\end{scope}

\end{tikzpicture}

\caption{Construction of $\bl_{(1,2,3)}(\kk^3)$} \label{fig:wt-blow-up}
\end{figure}
\end{center}

\begin{prop} \label{Enu-Pnu}
For each $a = (a_1, \ldots, a_n) \in \kk^n \setminus \{0\}$, let $C_a := \{(a_1t^{\nu_1}, \ldots, a_nt^{\nu_n}): t \in \kk\} \subset \kk^n$. The strict transform of each $C_a$ intersects $\Enu$ at precisely one point which we denote by $[a]$. The map $[a_1: \cdots : a_n] \to [a]$ yields an isomorphism between $ \wwpnn{\nu}{n-1}$ and $\Enu$.
\end{prop}

\begin{proof}

Fix $a = (a_1, \ldots, a_n) \in \kk^n \setminus \{0\}$ and $j$ such that $a_j \neq 0$. Let $\scrC'_j$ be the convex polyhedral cone  generated by $(p/\nu_i)e_i - (p/\nu_j)e_j$, $i = 1, \ldots, \hat j, \ldots, n$, and $\scrC_j$ be the convex polyhedral cone generated by $\scrC'_j$ and $e_j$. Let $S_j$ and $S'_j$ be the semigroups of integral elements respectively in $\scrC_j$ and $\scrC'_j$. \Cref{xp-thm} implies that $\kk[U_{\alpha_j} \cap \xaa{\scrP+\scrQ}] = \kk[S_j]$ and $\kk[U_{\alpha_j} \cap \corbit{\scrP} ] = \kk[S'_j]$. Let $C'_a$ be the strict transform of $C_a$ in $\blnukn$. It turns out that (\cref{exercise:Enu-Pnu})
\begin{prooflist}
\item \label{Enu-Pnu:S_j} For every $\alpha \in S_j$, either $x^\alpha$ identically vanishes on $C_a$ or $\ord_t(x^\alpha|_{(a_1t^{\nu_1}, \ldots, a_nt^{\nu_n})})$ is nonnegative. This implies that $C'_a \cap \Enu \subset U_{\alpha_j}$.
\item \label{Enu-Pnu:S'_j} $S'_j = \{\alpha = (\alpha_1, \ldots, \alpha_n) \in \zz^n: \langle \nu, \alpha \rangle = 0,\ \alpha_i \geq 0,\ i = 1, \ldots, \hat j, \ldots, n\}$. If $\alpha \in S'_j$, it follows that
\begin{prooflist}
\item either $\alpha_i > 0$ for some $i$ such that $a_i = 0$, in which case $x^\alpha$ identically vanishes on $C'_a$,
\item or $\alpha_i \neq 0$ if and only if $a_i \neq 0$, in which case $x^\alpha$ takes the constant (nonzero) value $a^\alpha$ on $C'_a$.
\end{prooflist}
\end{prooflist}
These observations together with \cref{ideal-prop} implies that $C'_a \cap E_\nu$ corresponds precisely to the point $[a_1: \cdots : a_n] \in \pp^{n-1}(\nu)$, as required.
\end{proof}

We write $\Onu$ for the torus $\orbit{\scrP}$ of $\Enu = \corbit{\scrP}$. The isomorphism between $\Enu$ and $\pp^{n-1}(\nu)$ from \cref{Enu-Pnu} induces an isomorphism $\Onu \cong \pp^{n-1}(\nu) \setminus V(x_1 \cdots x_n) \cong \nktoruss{n-1}$. \Cref{U_Q} implies that $\Onu$ is a nonsingular hypersurface of $\blnukn$. Let $I \subset [n] := \{1, \ldots, n\}$ and $\Ki := V(x_j: j \not\in I)$ be the corresponding coordinate subspace of $\kk^n$. We identify $\Ki$ with $\kk^{|I|} $. Let $\nu'$ be a weighted order with positive weights on $\kk[x_i : i \in I]$ such that $(\nu'(x_i): i \in I)$ is proportional to $(\nu_i: i \in I)$. It follows from the definition of a weighted blow up that $\blnuprimeknn{I}$ can be identified with the strict transform of $\Ki$ on $\blnukn$. The following proposition compiles some properties of the embedding $\blnuprimeknn{I} \into \blnukn$.

\begin{prop} \label{blow-up-coordinates}

Assume $\gcd(\nu_i: i \in I) =  1$. Let $k := |I|$. Then

there is a Zariski open neighborhood $U$ of $\Onuprime$ in $\blnukn$ and regular functions $(z_1, \ldots, z_n)$ on $U$ such that
\begin{enumerate}
\item $U \cong  \kk \times \nktoruss{k-1} \times \kk^{n-k}$ with coordinates $(z_1, \ldots, z_n)$,
\item $z_1, \ldots, z_k$ are monomials in $(x_i: i \in I)$,
\item $\nu(z_1) = 1$, $\nu(z_i) = 0$, $2 \leq i \leq n$,

\item for all $i' \not\in I$, there is $i'$ such that $z_{i'} = x_{i'}/z_1^{\nu_{i'}}$,
\item $\Enu \cap U = V(z_1) \cong \nktoruss{k-1} \times \kk^{n-k}$,
\item $\Onu  = (\Enu \cap U) \setminus V(z_{k+1} \cdots z_n)$,
\item $\blnuprimeknn{I} \cap U  = V(z_{k+1}, \ldots, z_n) \cong \kk \times \nktoruss{k-1}$,
\item $\Enuprime \cap U  = \Onuprime = V(z_1, z_{k+1}, \ldots, z_n) \cong \nktoruss{k-1}$.
\end{enumerate}
\end{prop}

\begin{proof}
This is left as an exercise.
\end{proof}

\subsection{Exercises}

\begin{exercise} \label{exercise:Enu-Pnu}
Verify observations \ref{Enu-Pnu:S_j} and \ref{Enu-Pnu:S'_j} from the proof of \cref{Enu-Pnu}.
\end{exercise}

\begin{exercise}
Prove \cref{blow-up-coordinates}.

\end{exercise}