\documentclass{beamer}
\usepackage{amscd,amssymb,epsfig}
\def\bF{{\mathbb F}}
\def\a{\alpha}
\def\Fqstar{\bF_q^{\,*}}
\def\Z{\mathbb Z}
\def\R{\mathbb R}
\def\N{\mathbb N}
\setbeamertemplate{theorems}[numbered]
%\newcommand{\maintitle}[1]{\begin{center}\Large #1 \end{center}}
%\newcommand{\slidetitle}[1]{\begin{par}\Large #1\end{par}}
%\newtheorem{thm}{Theorem}
%\newtheorem{defn}{Definition}
%\newtheorem{cor}{Corollary}
%\newtheorem{prop}{Proposition}

\mode<presentation>
{
  \usetheme{Warsaw}

  \setbeamercovered{opaque}
}


\usepackage[english]{babel}

\usepackage[latin1]{inputenc}

\usepackage{times}
\usepackage[T1]{fontenc}

\title[]
{Introduction to Gr\"obner Bases and Computational Algebraic Geometry}

\author
{John B. Little}

\institute[College of the Holy Cross]
{
  Department of Mathematics and Computer Science\\
  College of the Holy Cross\\
  {\tt jlittle@holycross.edu}\\
  $\ $\\
}

\date[April 7, 2017]
{April 7, 2017}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\section{Questions about varieties}

\begin{frame}
\frametitle{Varieties -- the definition}
\begin{itemize}
\item Let $k$ be a field (usually $\mathbb{Q}, \mathbb{R}$, or $\mathbb{C}$ in this talk)
\item $k[x_1,\ldots,x_n]$ is the polynomial ring in indeterminates $x_i$, coefficients in $k$
\item If $f_1,\ldots,f_s \in k[x_1,\ldots,x_n]$, then we define
$${\bf V}(f_1, \ldots, f_s) = \{(a_1,\ldots,a_n) \in k^n \mid f_i(a_1,\ldots,a_n) = 0, i = 1,\ldots,s\}$$
in $k^n$.  
\item If we want to be specific about where a variety ``lives,'' we might write 
something like $V_{\mathbb{R}}(f_1,\ldots,f_s)$ for the real points, etc.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{First examples}
To draw pictures, we will almost always take $k = \mathbb{R}$
\begin{itemize}
\item ${\bf V}\left(\frac{x^2}{9} - \frac{y^2}{4} - 1\right)$ is a hyperbola in the plane
\item ${\bf V}\left(x^2 + y^2 - 1, x - y + \frac{1}{2}\right)$ consists of the two
intersection points of the circle defined by $x^2 + y^2 - 1 = 0$ and the line
defined by $x - y + \frac{1}{2} = 0$.
\item ${\bf V}(z - xy)$ is a hyperbolic paraboloid (``saddle surface'') in $\mathbb{R}^3$
\item ${\bf V}(y - x^2, z - x^3)$ is the \emph{twisted cubic curve} in $\mathbb{R}^3$.  It
is contained in the saddle surface from the previous bullet.  
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Parametrizations}
{\it Some, but not all} varieties can also be described as the images of 
\emph{parametrization mappings}
\begin{eqnarray*}
F : k^m &\to& k^n,\\
(t_1,\ldots,t_m) &\mapsto& (F_1(t_1,\ldots,t_m), \ldots, F_n(t_1,\ldots,t_m))
\end{eqnarray*}
where the $F_i$ are polynomial or rational functions
\begin{itemize}
\item For instance, the circle ${\bf V}(x^2 + y^2 - 1)$ can be
parametrized by $F(t) = \left(\frac{1 - t^2}{1 + t^2},\frac{2t}{1 + t^2}\right)$;
image is the circle minus $\{(-1,0)\}$.  
\item The twisted cubic ${\bf V}(y - x^2, z - x^3)$ is the image of
$F(t) = (t,t^2,t^3)$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{An Example (I think) you have studied}

\begin{itemize}
\item Key idea:  probabilities for discrete random variables
often depend {\it polynomially} on some parameters
\item So can think of parametrized families of distributions
\item Example:  If $X$ is a \emph{binomial random variable} based on $n$
trials, with success probability $\theta$, then $X$ takes values in
$\{0,1,\ldots,n\}$ with probabilities given by:
$$P(X = k) = p_k(\theta) = \binom{n}{k} \theta^k (1 - \theta)^{n-k}$$
\item Gives:
\begin{align*}
\varphi : \R &\to \R^{n+1}\\
         \theta &\mapsto (p_0(\theta),p_1(\theta),\ldots,p_n(\theta))
\end{align*}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Example, continued}

\begin{itemize}
\item Since $\sum_i p_i(\theta) = 1$, the image $\varphi(\R)$ is subset of the hyperplane
${\bf V}(p_0 + \cdots + p_n - 1)$
\item If $\theta \in [0,1]$, then $\varphi(\theta) \in \Delta_{n+1}$, the probability
simplex defined by $\sum_i p_i = 1$, and $0 \le p_i \le 1$ for $i = 0,\ldots,n$.
\item  Question:  Is this image a variety?
\item  With $n = 2$, 
$$p_0(\theta) = (1-\theta)^2,\ p_1(\theta) = 2\theta(1 - \theta),\ p_2(\theta) = \theta^2$$  
and $\varphi(\R) = {\bf V}(p_1^2 - 4p_0p_2,p_0 + p_1 + p_2 - 1)$.
\item  For general $n$, we get what's called a \emph{rational normal curve} of degree $n$
 -- a (simple) example of a {\it toric variety} 
\end{itemize}
\end{frame}

%\begin{frame}
%\frametitle{Some observations}
%\begin{itemize}
%\item<1->  Since $V(f_1,\ldots,f_s)$ is the set of solutions of the
%simultaneous system of equations $f_1 = 0, \ldots, f_s = 0$, we
%have
%$$V(f_1,\ldots,f_s) = V(f_1) \cap \cdots \cap V(f_s)$$
%\item<2->  Since our polynomial functions take values in a field,
%a product $f(a_1,\ldots,a_n)g(a_1,\ldots,a_n) = 0$
%if and only if $f(a_1,\ldots,a_n) = 0$ or $g(a_1,\ldots,a_n) = 0$.
%So,
%$$V(fg) = V(f) \cup V(g)$$
%\item<3-> In fact if $V = V(f_1,\ldots,f_s)$ and $W = V(g_1,\ldots,g_t)$
%are varieties, then so are $V\cap W$ and $V \cup W$:
%\item<4-> $V \cap W = V(f_1,\ldots,f_s,g_1,\ldots,g_t)$ and
%$V \cup W = V(f_i g_j \mid 1 \le i\le s, 1 \le j \le t)$.
%\end{itemize}
%\end{frame}

\begin{frame}
\frametitle{What do we want to know about varieties?} 
Given a variety $V = {\bf V}(f_1,\ldots,f_s)$ might ask
\begin{itemize}
\item  Is $V = \emptyset$?  If not, what points does it contain?
\item  If $V$ is finite as a set in $k^n$, how many points does it have?
\item  If $V$ is not finite, how does it decompose as a union of varieties,
what are their dimensions, etc.?
\item  The answers are nicest if $k$ is algebraically closed(!) Then there's an
especially close connection between varieties and {\it ideals} in $k[x_1,\ldots,x_n]$.
\item  Then, invariants of a variety like degree, genus (for curves -- $\dim V = 1$), ... 
\end{itemize}
\end{frame}

\section{Ideals in the polynomial ring}

\begin{frame}
\frametitle{To Ideals}
The set of defining equations $f_1 = 0, \ldots, f_s = 0$ defining
a variety $V = {\bf V}(f_1,\ldots,f_s)$ is \emph{never unique}.

\begin{itemize}
\item  First notice that if $g,\ldots,g_s$ are any polynomials
at all and $(a_1,\ldots,a_n) \in V(f_1,\ldots,f_s)$, then
$f = g_1 f_1 + \cdots + g_s f_s$ satisfies
$$f(a_1,\ldots,a_n) = g_1(a_1,\ldots,a_n)\cdot 0 + \cdots + g_1(a_1,\ldots,a_n)\cdot 0 = 0$$
\item  Hence $f$ \emph{also vanishes at every point of} $V = {\bf V}(f_1,\ldots,f_s)$, and
\item It follows that ${\bf V}(f_1,\ldots,f_s,f) = {\bf V}(f_1,\ldots,f_s)$ 
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{More motivation}
\begin{itemize}
\item This gives a way to detect extra, unneeded
equations in some cases:  If $V = {\bf V}(f_1,\ldots,f_s)$ and $f_s = g_1 f_1 + \ldots + g_{s-1}f_{s-1}$
for some polynomials $g_1,\ldots,g_{s-1}$, then $V = {\bf V}(f_1,\ldots,f_{s-1})$ also.
\item Finding polynomials $f = g_1f_1 + \ldots + g_s f_s$
with ``special'' features like \emph{factorizations} can also be useful.
\item Example:  Consider $W  = {\bf V}\left(x^2 + y^2 + z^2 - 1, x^2 + y^2 - \frac{1}{4}\right)$
in $\mathbb{R}^3$.  Notice:
\begin{eqnarray*}
(1)(x^2 + y^2 + z^2 - 1) &+& (-1)(x^2 + y^2 - \frac{1}{4}) = z^2 - \frac{3}{4}\\
&=& (z - \sqrt{3}/2)(z + \sqrt{3}/2)
\end{eqnarray*}
What does this tell us about the variety $W$?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Ideal generated by $f_1,\ldots,f_s$}
\begin{definition}  Let $f_1,\ldots,f_s \in k[x_1,\ldots,x_n]$.  The
\emph{ideal generated by the $f_1,\ldots,f_s$} is the subset of $k[x_1,\ldots,x_n]$
defined by
$$\langle f_1, \ldots, f_s\rangle = \{g_1 f_1 + \cdots + g_s f_s \mid g_i \in k[x_1,\ldots,x_n]\}$$
\end{definition}

For instance the example on the last slide shows
$$z^2 - \frac{3}{4} \in \left\langle x^2 + y^2 + z^2 - 1, x^2 + y^2 - \frac{1}{4}\right\rangle.$$
\end{frame}

\begin{frame}
\frametitle{Ideals}
Note that $I = \langle f_1,\ldots,f_s\rangle$ has the following properties:
\begin{itemize}
\item[a.]  If $f,g \in I$, then $f + g \in I$
\item[b.]  If $f \in I$ and $h \in k[x_1,\ldots,x_n]$, then $h \cdot f \in I$
\end{itemize}

\begin{definition} A nonempty subset $I$ of a $k[x_1,\ldots,x_n]$ is said to be
{\it an ideal} if
\begin{itemize}
\item[a.]  $f,g \in I$ implies $f + g \in I$, and
\item[b.]  $f\in I$ and $h \in k[x_1,\ldots,x_n]$ implies $h\cdot f \in I$.
\end{itemize}
\end{definition}

Given any $f_1,\ldots,f_s$, $\langle f_1,\ldots,f_s\rangle$ satisfies this
definition.  But are there other ideals too in $k[x_1,\ldots,x_s]$ -- (perhaps ones
with only infinite generating sets)?  The answer is ``no'' -- we'll see an explanation shortly.
\end{frame}

\begin{frame}
\frametitle{Other examples of ideals}
The answer is not so clear at first:
\begin{itemize}
\item  Let $S \subset k^n$ be any subset (for example a variety),
$${\bf I}(S) = \{ f\in k[x_1,\ldots,x_n]\mid f(a) = 0{\rm\ all\ } a = (a_1,\ldots,a_n) \in S\}$$
Easy to check this satisfies the definition.  (Why?)
\item  If $I$ is an ideal in $k[x_1,\ldots,x_n]$, $\sqrt{I}$ {\it (the radical of I)} is
$$\sqrt{I} = \{ f \in k[x_1,\ldots, x_n] \mid f^k \in I {\rm\ for\ some\ } k \ge 1\}.$$
\item Have:
\begin{theorem}  Let $I$ be an ideal in $k[x_1,\ldots,x_n]$.  Then
$\sqrt{I}$ is an ideal.
\end{theorem}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{An observation}

\begin{theorem} Let $V = V(f_1,\ldots,f_s)$ be a variety, and let
$\langle g_1,\ldots,g_t\rangle = \langle f_1,\ldots,f_s\rangle$.  Then
$V = V(g_1,\ldots,g_t)$ also. \end{theorem}

\begin{itemize}
\item  In other words, it's better to think that varieties are defined by ideals,
not particular sets of equations -- we'll write ${\bf V}(I)$.
\item  Proof:  $V \subset {\bf V}(g_1,\ldots,g_t)$ is more or less clear since
each $g_i = h_{i1} f_1 + \cdots + h_{is} f_s$ for some polynomials $h_{ij}$.
\item  The reverse inclusion follows in the same way since each
$f_j = p_{j1} g_1 + \cdots p_{jt}g_t$ for some polynomials $p_{ji}$.  QED
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{${\bf I}({\bf V}(I))$}
\begin{itemize}
\item Suppose we start with an ideal and look at the variety ${\bf V}(I)$.  Is
${\bf I}({\bf V}(I)) = I$?
\item One inclusion is always true.  Which one?
\item Answer to first question: \emph{not always!}  Example:  Let $I = \langle x^2\rangle$ in
$\mathbb{R}[x,y]$.  Then ${\bf V}(I)$ is the $y$-axis in the plane, and it's not too hard
to show ${\bf I}({\bf V}(I)) = \langle x\rangle \ne I$.
\item In fact, it follows directly that $\sqrt{I} \subset {\bf I}({\bf V}(I))$:  If $f \in \sqrt{I}$, then
$f^k\in I$ for some $k \ge 1$.  At any point $a$ in ${\bf V}(I)$, $(f^k)(a) = (f(a))^k = 0$,
which implies $f(a) = 0$.  Therefore, $f \in {\bf I}({\bf V}(I))$.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{${\bf I}({\bf V}(I))$, continued.}
\begin{itemize}
\item  On the other hand, here is another example where ${\bf I}({\bf V}(I)) = I$ is true.   As above
$I \subset {\bf I}({\bf V}(I))$ always holds.
\item Say
$I = \langle y - x^2\rangle$ in $\mathbb{R}[x,y]$.  Then ${\bf V}(I)$ is the usual
parabola.
\item  Given any $f(x,y)$ we can substitute $f(x,y) = f(x,(y - x^2) + x^2)$
expand out and collect terms to obtain:
$$f(x,y) = q(x,y)(y - x^2) + r(x)$$
\item  If $f \in {\bf I}({\bf V}(I))$ (that is if $f$ vanishes at every point of the
parabola $y - x^2$), then we must have $r(x) = 0$ for all $x\in \mathbb{R}$.
\item But that implies $r(x)$ is the zero polynomial, so $f \in \langle y - x^2\rangle$.
This shows ${\bf I}({\bf V}(I)) \subset I$ in this case, so they are equal.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Nullstellens\"atze}
\begin{theorem}[Weak Nullstellensatz] If $k$ is algebraically closed, ${\bf V}(I) = \emptyset
\Leftrightarrow I = k[x_1,\ldots,x_n]$.\end{theorem}
(Can be understood as the ``multivariable Fundamental Theorem of Algebra'')
\begin{theorem}[Hilbert's Nullstellensatz] If $k$ is algebraically closed, then 
${\bf I}({\bf V}(I)) = \sqrt{I}$.\end{theorem}
Both statements can fail without the hypothesis, e.g. ${\bf V}_{\R}(x^2 + y^2) = \emptyset$, but
$\langle x^2 + y^2\rangle \ne \R[x,y]$.  

\end{frame}

\section{Gr\"obner bases -- theory}


\begin{frame}
\frametitle{The key idea -- ``big picture''}

\begin{itemize}
\item Particular generating sets (``bases'') for ideals
contain the information we need to answer questions posed before
\item Among the ``nicest'' are the \emph{Gr\"obner bases}
\item Moreover each ideal $I$ has many different Gr\"obner bases
depending on \emph{monomial orders}
\item Potential downside: computing them takes a lot of computational effort and storage 
space in realistic cases (too much to do by hand);
software like Singular, Macaulay 2, CoCoA, Magma, Sage, Maple typically used.
\item In \emph{big} examples, a very fast computer and or significant cleverness might 
be required!
\item In \emph{really big} examples, might be infeasible altogether 
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{A first monomial order -- lexicographic order}
\begin{itemize}
\item In $k[x_1,\ldots,x_n]$, let's start out by assuming
$x_1 > x_2 > \cdots > x_n$.  Then we get a first example of a monomial
order by the following:
\item \begin{definition}  We say $x^\a >_{lex} x^\beta$ if
the leftmost nonzero entry in $\a - \beta \in \mathbb{Z}^n$ is
positive. \end{definition}
\item  Example:  In $k[x,y,z]$, let $x^\a = x^3 y^4 z$ and $x^\beta = x^2 y z^8$.
\item  Then $\a = (3,4,1)$, $\beta = (2,1,8)$, $\a - \beta = (1,3,-7)$
\item  So $x^3 y^4 z >_{lex} x^2 y z^8$ (with $x > y > z$).
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Another {\it lex} example}
\begin{itemize}
\item  Consider the polynomial $f(x,y) =  x^3 y^3 + x^5 + x y^4$
from before
\item Which is the {\it lex} leading term (taking $x > y$)?
\item The exponent vectors are $(3,3), (5,0), (1,4)$.
\item In {\it lex} order, we have $(5,0) >_{lex} (3,3) >_{lex} (1,4)$
\item Note:  {\it lex} order is analogous to dictionary order for words(!)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{A second order -- graded reverse lex order}
\begin{definition}  We say $x^\a >_{grevlex} x^\beta$ if
$|\a| > |\beta|$ or if $|\a| = |\beta|$ and in $\a - \beta$ the
rightmost nonzero entry is {\it negative}.
\end{definition}
\begin{itemize}
\item  Example:  $x^3 y^2 z >_{grevlex} x^4 z$ as for {\it grlex}
\item  Example:  $x^4 y z >_{grevlex} x^3 y^2 z$ since total degrees are both 6, but
$(4,1,1) - (3,2,1) = (1,-1,0)$
\item  Note that  $f(x,y,z) = x^2 y^2 z^2 + x y^4 z + x^5$
has different leading terms depending on which of the orders {\it lex, grevlex} we use
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Why different monomial orders?}
\begin{itemize}
\item When we introduce Gr\"obner bases, 
we'll see a monomial order is built
into the definition
\item Best answer -- GB's with respect to different
monomial orders do different (and all useful) things!
\item {\it lex} order GB's systematically eliminate variables
(good for direct approach to solving systems of equations,
but computationally ``expensive'')
\item GB's with respect to graded orders (including {\it grevlex},
are usually less ``expensive'' computationally
\item There are also {\it conversion algorithms} to
go from a GB with respect to one order to a GB with respect
to another order
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Leading terms, etc.}
\begin{itemize}
\item Given a monomial order, we get
a \emph{leading term} in each polynomial.
\item For instance, if $f(x,y,z) = 2 x^3 y^2 + \frac{1}{3} x y^2 z + 4z^5$
and we use $>_{lex}$ (with $x > y > z$), then
\item $LT_{>_{lex}}(f) = 2 x^3 y^2$ (including the coefficient)
\item If order is clear from context we'll often omit it
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Division in $k[x_1,\ldots,x_n]$}
\begin{itemize}
\item Major difference with 1-variable case -- we'll allow
more than one divisor $f_1,\ldots,f_s$ (reason: not every ideal is
generated by a single polynomial). So there will be as many quotients as divisors.
\item There can be several $LT(f_i)$ that divide
$LT$ of the dividend.  If so, we'll go down the list
of the $f_i$ from the start and use the first one found.
\item Second major difference with 1-variable case -- when
a term is not divisible by any of the $LT(f_i)$, it goes into the remainder,
but \emph{division is not necessarily finished}.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Division theorem}
\begin{theorem}
Given any input $f_1,\ldots,f_s$, $f$, and a monomial order,
there is a division algorithm that terminates and yields an expression
$$f = a_1 f_1 + \cdots + a_s f_s + r$$
where
\begin{enumerate}
\item[i.]  If $a_i f_i \ne 0$, then $LT(a_i f_i) \le LT(f)$
\item[ii.] If $r \ne 0$, then no monomial in $r$ is divisible by 
$LT(f_i)$ for any $i$, $1 \le i \le s$.
\end{enumerate}
\end{theorem}
(Note: there is a sense in which this expression is unique too,
but it's more subtle than in the 1-variable case)
\end{frame}

\begin{frame}
\frametitle{Example}
Here's a first example.  Suppose $f_1 = x z - y^2$, $f_2 = x^3 - y z$ and use {\it lex}
order with $x > y > z$ so the first term in each is the leading term.  Say $f = x^4 + x^3 z$.
[work out on board]

\begin{itemize}
\item Result is
$$x^4 + x^3 z = (x^2+y)(xz - y^2) + (x)(x^3 - yz) + (x^2y^2+y^3)$$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Observations -- an ideal membership test?}
\begin{itemize}
\item  If $r = 0$, it follows that $f \in \langle f_1,\ldots,f_s\rangle$.
\item  But the converse \emph{fails}.  Here is an example:
\item  Say $f_i$ are as above: $f_1 = xy + x + 1$, $f_2 = y^2 - x$.  If
we take $f = yf_1 - xf_2 = xy + y + x^2$, and divide by $(f_1,f_2)$ in
that order, we get
$$xy + y + x^2 = (1)(xy + x + 1) + (0)\cdot (y - x^2) + (x^2 + y - x - 1)$$
\item  Doesn't seem especially useful (yet)!
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Motivation for definition of Gr\"obner bases}
\begin{itemize}
\item Let $f_1 = x y  + 1$, $f_2 = y^2 - x$,
$f = yf_1 - xf_2 = y - x^2 \in I = \langle f_1,f_2\rangle$
\item If we use $>_{grlex}$, then $LT(f_1) = xy$, $LT(f_2) = y^2$,
but $LT(f) = -x^2$
\item If we divide $f$ by $(f_1,f_2)$, then $r \ne 0$, even
though $f \in \langle f_1,f_2\rangle$
\item The leading terms of the given
generators $f_1,f_2$ don't account for \emph{all possible leading terms} of elements of $I$
\item Goal: ``good'' generating sets satifying $f \in I \Leftrightarrow r = 0$ on division
(would give an {\it ideal membership test}!)
\item Equivalently, we want generators $\{g_1,\ldots,g_t\}$ for $I$ such that 
for every $f \in I$, $LT(f)$ is divisible by $LT(g_i)$ for some $i$.  
\end{itemize}
\end{frame}

%\begin{frame}
%\frametitle{Questions}
%\begin{itemize}
%\item<1-> Given an arbitrary ideal $I \subset k[x_1,\ldots,x_n]$, 
%does there always exist $G = \{g_1,\ldots,g_t\} \subset I$ such that
%for every $f \in I$, $LT(f)$ is divisible by $LT(g_i)$ for some $i$?
%\item<2-> If so, how do we find them?  
%\item<3-> For instance, starting from an arbitrary set of 
%generators for $I$, how compute a set $G$ with the property above?
%\item<4->  Can also ask: To what extent does $G$ depend on the choice of 
%monomial order?
%\end{itemize}
%\end{frame}

\begin{frame}
\frametitle{The ideal of leading terms}
\begin{itemize}
\item Start from a given ideal $I$ and a given monomial order $>$
\item For each $f\in I$, we have $LT_>(f)$
\item Define $\langle LT_>(I)\rangle = \langle LT_>(f) \mid f \in I \rangle$
\item That is $\langle LT_>(I)\rangle$ is the \emph{ideal generated by 
the leading terms of all elements of $I$} according to the given monomial
order.  
\item An example of a \emph{monomial ideal} -- an ideal generated
by a collection of monomials -- these have some nice properties
\end{itemize} 
\end{frame}

\begin{frame}
\frametitle{Dickson's Lemma}
\begin{theorem}[Dickson's Lemma]
Let $M$ be a monomial ideal in $k[x_1,\ldots,x_n]$.
Then $M$ is generated by a finite collection of monomials.
\end{theorem}

\begin{itemize}
\item Return to the monomial ideal $\langle LT(I)\rangle$
for a given $I$ and a given monomial order.
\item  By Dickson, we know that $\langle LT(I) \rangle = \langle x^{\a(1)}, \ldots, x^{\a(t)}\rangle$.
\item  Every monomial in $\langle LT(I)\rangle$ is $LT(g)$ for some $g \in I$ 
\item  Consequence:  There exist $g_i \in I$ such that $LT(g_i) = x^{\a(i)}$ for all $1 \le i \le t$.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Gr\"obner bases defined}
\begin{itemize}
\item This leads to 
\begin{definition} Let $I$ be a nonzero ideal and $>$ be a monomial order.  
A \emph{Gr\"obner basis} for $I$ with respect to $>$ is a finite set 
$G = \{g_1,\ldots,g_t\} \subset I$ such that 
$\langle LT_>(I)\rangle = \langle LT_>(g_1),\ldots, LT_>(g_t)\rangle$.  
\end{definition}
\item  Dickson's Lemma $\Rightarrow$ 
\begin{theorem}  If $I$ is a nonzero ideal and $>$ is a monomial
order, then Gr\"obner bases of $I$ with respect to $>$ exist.
\end{theorem}
\item  Not unique, though, since generating
sets for the monomial ideal $\langle LT(I)\rangle$ are not unique.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Consequences of Dickson, continued}

\begin{theorem} A Gr\"obner basis $G = \{g_1,\ldots,g_t\}$ for $I$ \emph{generates} $I$.\end{theorem}

\begin{proof} Let $f \in I$ and divide by $G$ -- no terms end up in $r$, so we
get $f = a_1 g_1 + \cdots + a_t g_t$. \end{proof} 

This also proves an unexpected ``big theorem!''  

\begin{theorem}[Hilbert Basis Theorem]
Every ideal in $k[x_1,\ldots,x_n]$ is finitely generated. \end{theorem}
\end{frame}

\begin{frame}
\frametitle{Main tool for computing Gr\"obner bases -- S-polynomials}
\begin{itemize}
\item The definition: \begin{definition} Let $f,g\in k[x_1,\ldots,x_n]$
and $>$ be a monomial order.  The \emph{$S$-polynomial} of $f,g$ is 
$$S(f,g) = \frac{{\rm lcm}(LM(f),LM(g))}{LT(f)} f - \frac{{\rm lcm}(LM(f),LM(g))}{LT(g)} g$$
\end{definition}
\item This is defined to make the leading terms cancel.  
\end{itemize}
\end{frame}

%\begin{frame}
%\frametitle{A more elaborate example}
%\begin{itemize}
%\item<1->  Another example:  $f = 2x^2 y + xy$, $g = x y^2 + 2x + y$, using {\it lex} order $x > y$:
%\begin{eqnarray*}
%S(f,g) &=& \frac{x^2 y^2}{2x^2y}(2x^2 y + x y) - \frac{x^2y^2}{xy^2}(xy^2 + 2x + y)\\
%&=& x^2 y^2 + \frac{1}{2} x y^2 - (x^2 y^2 + 2x^2 + x y)\\
%&=& \frac{1}{2} x y^2 - 2x^2 - x y
%\end{eqnarray*}
%\item<2->  In this case, the leading term of the $S$-polynomial
%is a multiple of $LT(g)$.   
%\item<3-> But we would get something ``new'' if we subtracted $\frac{1}{2}g$
%\end{itemize}
%\end{frame}

\begin{frame}
\frametitle{Idea of Buchberger algorithm}
\begin{itemize}
\item  When we find a ``new'' leading term in an $S$-polynomial, we will just
append the new polynomial to our list of generators(!)
\item  Even if the $S$-polynomial itself does not have a ``new''
leading term, we can still try to ``strip away'' terms we already
know by computing \emph{the remainder on division of the $S$-polynomial}
by the generators of the ideal we already have.  
\item  Note that if 
$S(f_i,f_j) = a_1 f_1 + \cdots + a_s f_s + r$
then by definition $r \in I = \langle f_1,\ldots,f_s\rangle$ so 
if $r \ne 0$, then its leading term will be something we want to know(!)
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{Buchberger's algorithm -- basic form}
\begin{verbatim}
Input: F = {f_1,...,f_s}
Output: G containing F
G := F
repeat
   G' := G
   for each pair p <> q in G' do
      S := remainder of S(p,q) on division by G'
      if S <> 0 then
         G = G union {S}
until G = G'
\end{verbatim}
\end{frame}


\begin{frame}
\frametitle{A technical result and the algorithm}

\begin{itemize}
\item Buchberger's Criterion (proof is hard!) says that a finite
basis $G$ for $I$ is a Gr\"obner basis of $I$ 
if and only if the remainder on division of $S(g_i,g_j)$ by $G$ is zero for all $1 \le i < j \le t$.
\item The process of adding non-zero $S$-polynomial remainders 
terminates (after a finite number of iterations) because the ideals of leading
terms of the $G$ form an \emph{ascending chain} (HBT $\Rightarrow$ ACC)
and then we have a Gr\"obner basis.  
\item Many ``tweaks'' and improvements are also possible.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Reduced Gr\"obner bases -- a test for ${\bf V}(I) = \emptyset$}

\begin{itemize}
\item A GB $G = \{g_1,\ldots,g_t\}$ is \emph{reduced} if the $LM_>(g_i)$ are
a \emph{minimal basis} of $\langle LT_>(I)\rangle$, and no term in $g_i$
is divisible by $LT_>(g_j)$ for $j \ne i$ (analogous to row-reduced echelon form
for linear equations!)
\item Every ideal has reduced GB's wrt all monomial orders, and they are unique(!)
\item For instance, $\{1\}$ is the unique reduced GB of $I = k[x_1,\ldots,x_n]$
\item $\Rightarrow$ if $k$ alg. closed,  then ${\bf V}(I) = \emptyset \Leftrightarrow \{1\}$
is the unique reduced GB of $I$.  (Note: $\Leftarrow$ is true for all $k$, so we now have
a test for when ${\bf V}(I) = \emptyset$(!))
\end{itemize}
\end{frame}

\section{Applications of Gr\"obner bases}

\begin{frame}  
\frametitle{Elimination}
\begin{itemize}
\item In elementary algebra, linear algebra, etc., 
a standard method for solving simultaneous equations
in several variables is to form polynomial combinations 
that \emph{eliminate variables}.
\item Example:  In the system 
\begin{eqnarray*}
2x - 3y &=& 1\\
4x + 5y &=& 3
\end{eqnarray*}
\item second equation minus $2 \times $ first equation yields
$11y = 1$, so $y = \frac{1}{11}$, and then $x = \frac{7}{11}$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Elimination ideals}
\begin{itemize}
\item  In our terms, 
$$(-2)(2x - 3y - 1) + (1)(4x + 5y - 3) = 11y - 1$$
is in $I = \langle 2x - 3y - 1, 4x + 5y - 3\rangle$, \emph{and} contains
no $x$.
\item  Generalizing this,
\begin{definition}
Let $I \subset k[x_1,\ldots,x_n]$ be an ideal. The $\ell$th elimination ideal of $I$ is
$$I_\ell = I \cap k[x_{\ell+1},\ldots,x_n]$$
(in which the variables $x_1,\ldots,x_\ell$ have been eliminated).
\end{definition}
\item  For example, $11y - 1 \in I_1 = I \cap \mathbb{Q}[y]$.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Geometry of elimination}
\begin{itemize}
\item If $I \subset k[x_1,\ldots,x_n]$, then we have the geometric
object ${\bf V}(I) \subset k^n$
\item If we then eliminate the first $\ell$ variables, we
can ask, what is the corresponding variety ${\bf V}(I_\ell)$?
\item Partial answer -- it's very closely related to 
the projection of ${\bf V}(I)$ into the coordinate space $k^{n - \ell}$ of
the variables $x_{\ell + 1}, \ldots, x_n$.
\item  But a projection of a variety is not always a variety.  (Example:
project ${\bf V}(xy - 1)$ onto the $x$-axis.)  However
over $\mathbb{C}$ at least, ${\bf V}(I_\ell)$ is the \emph{smallest variety} 
containing the projection of ${\bf V}(I)$.  
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Lex Gr\"obner bases and elimination}
\begin{itemize}
\item A special property of {\it lex} order:  Say the variables are
ordered $x_1 > x_2 > \cdots > x_n$.  If a monomial contains any positive
power of $x_1$, then it is larger in {\it lex} order than all monomials 
that contain only $x_2,\ldots,x_n$.  Similarly, any monomial that contains
a positive power of $x_2$ is larger than all monomials containing only $x_3,\ldots,x_n$, etc.
\item  Suppose $I$ is an ideal for which $I_\ell \ne \{0\}$, and let $f\ne 0$
be an element of $I_\ell$
\item  If $G$ is a {\it lex} Gr\"obner basis for $I$, there must be some $g_i \in G$
such that $LT(g_i)$ divides $LT(f)$, hence $LT(g_i)$ contains only $x_{\ell+1}, \ldots, x_n$. 
\item  But then the observation above shows 
$g_i \in I \cap k[x_{\ell+1},\ldots,x_n] = I_\ell$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Elimination Theorem}
This is the key idea in the proof of:
\begin{theorem}[Elimination Theorem]
Let $I$ be an ideal in $k[x_1,\ldots,x_m]$ and let $G$ be a 
Gr\"obner basis for $I$ with respect to lex order with $x_1 > x_2 > \cdots > x_n$.
For all $\ell$ let $G_\ell = G\cap k[x_{\ell + 1}, \ldots, x_n]$.  Then 
$G_\ell$ is a Gr\"obner basis for the elimination ideal $I_\ell$. 
\end{theorem}

(Note:  If $G_\ell = \emptyset$, this says $I_\ell = \{0\}$.)

In other words, \emph{lex Gr\"obner bases systematically eliminate variables ``as much as 
possible''}
\end{frame}

\begin{frame}
\frametitle{A first example}
\begin{itemize}
\item Let 
$$I = \langle x^2 y + y^2 + 2, x y - 3 y + 1 \rangle \subset \mathbb{Q}[x,y]$$
\item If we compute a (reduced) {\it lex} Gr\"obner basis for $I$ with
$x > y$, we get $G_y = $
$$\{y^3 + 9 y^2 - 4 y + 1, x - y^2 - 9 y + 1\} $$
\item Note that the first polynomial depends only on $y$.  It is the monic
generator for $I_1 = I \cap \mathbb{Q}[y]$.  
\item  The second polynomial contains $x$ too.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Example, continued}
\begin{itemize}
\item Note the form of 
$$G_y = \{y^3 + 9 y^2 - 4 y + 1, x - y^2 - 9 y + 1\} $$
\item To find the points in ${\bf V}(I) = {\bf V}(x^2y + y^2 + 2, xy - 3y + 1)$,
we could solve the one-variable equation $y^3 + 9 y^2 - 4 y + 1 = 0$ (numerically),
\item Then, substitute the values into the other equation and determine $x$.  
\item There are
three points in ${\bf V}(I)$ over $\mathbb{C}$, one with coordinates in $\mathbb{R}$, approx.
$$( -3.10598633669341, -9.43517845033930)$$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Example, continued}
\begin{itemize}
\item If we reverse the order of the variables (i.e. look at {\it lex} order
with $y > x$), then the reduced Gr\"obner basis changes
\item Get $G_x = $
$$\{ x^3 - 5 x^2 + 12 x - 19, y + x^2 - 2 x + 6\}$$
\item Now, the first basis element generates $I \cap \mathbb{Q}[x]$, and the 
second contains $x,y$.
\item This other basis could be used in the same way to determine ${\bf V}(I)$
(and would yield the same results!)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Finite varieties}
\begin{itemize}
\item Note that in this last example, for {\it lex} order with $x > y$, the complement
of $\langle LT_>(I)\rangle$ contains just $\{1,y,y^2\}$
\item In general ${\bf V}(I)$ finite over an algebraically closed field $\Leftrightarrow$
the {\it complement of the monomials in $\langle LT_>(I)\rangle$ in the set of all monomials}
is a finite set for some ($\Rightarrow$ all) monomial order(s).  
\item Moreover the cardinality of the complement gives an upper bound on $|{\bf V}(I)|$
\item See the Finiteness Theorem in Chapter 5 of ``IVA''
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{``Implicitization'' $=$ elimination}
\begin{itemize}
\item Before, we briefly discussed how some varieties
can be given in parametric form as well as by implicit equations
\item The process of deriving implicit equations from a parametrization
is called ``implicitization''
\item This can also be performed by means of elimination and
{\it lex} Gr\"obner bases, when the coordinate functions are \emph{polynomial}
(or rational) functions
\item Example: A parametric surface in $\mathbb{R}^3$: 
\begin{eqnarray*}
x &=& u^2 \\
y &=& u + v \\
z &=& u - v^2 
\end{eqnarray*}
\end{itemize}
\end{frame} 

\begin{frame}
\frametitle{Implicitization example, continued}
\begin{itemize}
\item  The ideal $I = \langle x - u^2, y - u - v, z - u + v^2\rangle$
defines the \emph{graph} of the parametrization map (a subset of $\mathbb{R}^5$).  
\item  Geometrically, we want to project that into the $x,y,z$-coordinate
space to find the image of the parametrization map
\item  In algebraic terms, we want to order the variables with $u,v$ bigger than
$x,y,z$ (for instance as $u > v > x > y > z$) and find the elimination ideal 
$I_2 = I \cap \mathbb{R}[x,y,z]$.
\item  Computing a lex Gr\"obner basis we find 5 polynomials in all; only the 
last one contains no $u,v$ terms:
$$I_2 = \langle -x + z^2 + 2 x z - 4 y x + x^2 + 2 z y^2 - 2 x y^2 + y^4\rangle$$
\item  ${\bf V}(I_2)$ is a surface in $\mathbb{R}^3$ that contains the image 
of the parametrization.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Implicitization example, continued}
\begin{itemize}
\item  The rest of the Gr\"obner basis is an ``illustrated book''
of exactly the way this parametrization works.
\item  For instance, the next three polynomials in the basis have $x,y,z,v$, but
no $u$, so $I_1 = I \cap \mathbb{R}[v,x,y,z]$ has {\it lex} Gr\"obner basis consisting
of the generator for $I_2$ above, plus
\item
\begin{eqnarray*} 
&&(1 + 2y)v + x - y + z - y^2\\
&&(1 + 4z + 4x)v + 5x - y + z + 2 y x + y^2 - 6 z y - 2 y^3\\
&&v - y + z + v^2
\end{eqnarray*}
\item  Final polynomial is $u - y + v$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Interpreting the basis elements}
\begin{itemize}
\item  The polynomials $v - y + z + v^2$ and $u - y + v$ show that given 
$(x,y,z) \in {\bf V}(I_2)$, there are never more than $2$ pairs $(u,v)$ that
yield that $(x,y,z)$.  
\item  The polynomials $(1 + 2y) v + x - y + z - y^2$ and $(1 + 4z + 4x)v + \cdots $
show that for ``most'' $(x,y,z)$, there is only one pair $(u,v)$.  
\item  The only possible ``different'' points would come from places
on ${\bf V}(I_2)$ where $1 + 2y = 0$ and $1 + 4z + 4x = 0$. Those equations define
a straight line that lies on the surface ${\bf V}(I_2)$.  
\item  Precise statement of all this comes from the Extension Theorem in Chapter 3 of ``IVA''
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Where next?}
\begin{itemize}
\item GB's can be used to compute the \emph{Hilbert function} of a (homogeneous) 
ideal (or its variety) -- encodes degree, dimension, other invariants, etc.  
(Idea: comes from dimensions of degree-$s$ pieces of the complement of 
$\langle LT(I)\rangle$ when the complement is not finite.)
See Chapter 9 of ``IVA''
\item GB's are used in algorithms for primary decomposition and finding 
irreducible components of varieties.  
\item Many applications in areas of pure and applied math
\item Much ongoing research in improving algorithms for computing GB's.  See Chapter 10
in ``IVA,'' 4th edition for something close to the ``state of the art.''
\item Thanks for your attention! 
\end{itemize}
\end{frame}


\end{document}


