\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[PURE Math 2012 Residents' Program Week 1]
{PURE Math Residents' Program\\
Gr\"obner Bases and Applications\\
Week 1 Lectures}

\author
{John B. Little}

\institute[College of the Holy Cross]
{
  Department of Mathematics and Computer Science\\
  College of the Holy Cross\\
  $\ $\\
}

\date[June 2012]
{June 2012}

\begin{document}

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

\section{Day 1}

\begin{frame}
\frametitle{Overview}
Our work this summer will be concerned mostly with
polynomials in several variables, and
\begin{itemize}
\item techniques for solving systems of polynomial equations
\item understanding geometric objects defined by polynomial equations
\item algorithmic and computational techniques for working with
polynomials
\item applications to some interesting questions from \emph{celestial mechanics}
(central configurations)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Polynomials}
A polynomial in two variables $x,y$ is just a {\it finite}
sum of terms of the form $c x^a y^b$, where
\begin{itemize}
\item $c$ is a constant coefficient, for us always coming
from some {\it field} of constants (e.g. $\mathbb{Q}, \mathbb{R}, \mathbb{C}$, etc.)
\item $a,b$ are integers $\ge 0$  (we sometimes write
$a,b \in \mathbb{Z}_{\ge 0}$)
\end{itemize}
For example,
$$p(x,y) = 5x^3 y^4 - \frac{3}{2} xy^2 - 3$$
is a polynomial in $x,y$ with coefficients in $\mathbb{Q}$.
\end{frame}

\begin{frame}
\frametitle{Multiindex notation}
\begin{itemize}
\item<1-> If there are more than two or three variables, then we might
want to \emph{number} them as $x_1, x_2, \ldots, x_n$.
\item<2-> A \emph{monomial} is a product $x_1^{\a_1} x_2^{\a_2} \cdots x_n^{\a_n}$
where $\a_i \in \mathbb{Z}_{\ge 0}$ for all $i$.
\item<3-> Abbreviate as $x^\a$ where $\a \in \mathbb{Z}_{\ge 0}$ is the vector
of exponents
\item<4-> Examples:  $x_1^3 x_2^2 x_3^4$ corresponds to $\a = (3,2,4)$
and $x_1^7 x_3$ corresponds to $\a = (7,0,1)$ if those
are the only variables
\item<5-> A general polynomial can be compactly written as
$\sum_\a c_\a x^\a$, where $c_\a = 0$ for all but finitely many of the $\a \in \mathbb{Z}_{\ge 0}$.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Polynomial algebra}
In high school algebra, calculus, etc.  you probably remember working with
expressions of this form.  Recall that we can combine them
\begin{itemize}
\item<1-> by addition, for instance:
$$(3x^2 y + 2 x + 3) + (-2 x^2 y + y + 4) = x^2 y + 2x + y + 7$$
\item<2-> by multiplication, for instance:
$$(x^2 y - x)\cdot (x + x y) = x^3y - x^2 + x^3 y^2 - x^2y$$
\item<3->  Note that both of these come down to rules:
\begin{enumerate}
\item[1.] $c x^\a + d x^\a = (c + d)x^\a$, and
\item[2.] $x^\a x^\beta = x^{\a + \beta}$ where $\a + \beta$ means add the exponent vectors
coordinate-wise in $\mathbb{Z}_{\ge 0}$
\item[3.] Multiplication distributes over addition as in arithmetic
with ordinary rational or real numbers
\end{enumerate}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Some notation}

\begin{definition} The set of all polynomials in the variables
$x_1,\ldots,x_n$ with coefficients in the field $k$ is denoted
$$k[x_1,\ldots,x_n]$$
\end{definition}

So, for example we can say
$$p(x,y) = 5x^3 y^4 - \frac{3}{2} xy^2 - 3 \in \mathbb{Q}[x,y]$$
\end{frame}

\begin{frame}
\frametitle{Ring properties for polynomials}
It is not difficult to show that the addition and multiplication
operations on $k[x_1,\ldots,x_n]$ have the
following properties:
\begin{enumerate}
\item[1.]  For all $f,g,h \in k[x_1,\ldots,x_n]$, $(f + g) + h = f + (g + h)$ (addition is associative)
\item[2.]  There is a zero polynomial $0\in k[x_1,\ldots,x_n]$ such that $f + 0 = 0 + f = f$ for all $f \in k[x_1,\ldots,x_n]$
\item[3.]  For each $f \in k[x_1,\ldots,x_n]$, there is a $-f \in k[x_1,\ldots,x_n]$ such that $f + (-f) = (-f) + f = 0$ (the
zero polynomial from 3)
\item[4.]  For all $f,g \in k[x_1,\ldots,x_n]$, $f + g = g + f$ (addition is commutative)
\end{enumerate}
(Together properties 1-4 say that $k[x_1,\ldots,x_n]$ is an \emph{abelian group} under
addition.)
\end{frame}

\begin{frame}
\frametitle{Ring properties for polynomials, cont.}
\begin{enumerate}
\item[5.]  For all $f,g,h \in k[x_1,\ldots,x_n]$, $(fg)h = f(gh)$ (multiplication is associative)
\item[6.]  There is a polynomial $1\in k[x_1,\ldots,x_n]$ such that $f\cdot 1 = 1 \cdot f = f$ for all $f \in k[x_1,\ldots,x_n]$
\item[7.]  For all $f,g \in k[x_1,\ldots,x_n]$, $fg = gf$ (multiplication is commutative)
\item[8.]  For all $f,g,h \in k[x_1,\ldots,x_n]$, $f(g + h) = fg + fh$ and $(f + g)h = fh + gh$ (multiplication distributes over addition)
\end{enumerate}
Together 1-8 say that $k[x_1,\ldots,x_n]$ is an \emph{commutative ring with (multiplicative) identity}.

Note:  A {\it field} is an algebraic structure in which all of these properties
hold, \emph{and} in which every nonzero element has a multiplicative inverse.  $k[x_1,\ldots,x_n]$ is \emph{not a field}.
(For example, is there a polynomial $f$ such that $x_1 \cdot f = 1$?  Why or why not?)
\end{frame}

\begin{frame}
\frametitle{Polynomial functions}
\begin{itemize}
\item<1-> Up to now the $f \in k[x_1,\ldots,x_n]$ are essentially formal expressions, but
\item<2-> Each such f also defines a \emph{function} $f : k^n \to k$
\item<3-> defined by evaluation $(a_1,\ldots,a_n) \mapsto f(a_1,\ldots,a_n)$
\item<4-> For example $f(x,y) = x^2 y - 3 x\in \mathbb{R}[x,y]$ defines a function
from $\mathbb{R}^2$ to $\mathbb{R}$ with $f(0,0) = 0$, $f(1,1) = -2$, etc.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Polynomial functions, continued}
\begin{itemize}
\item<1-> Can two different polynomials define the same polynomial function?
\item<2-> Answer is \emph{yes}, if $k$ is a \emph{finite field}(!)
\item<3-> For instance, $k = \mathbb{Z}_p$ is a field if $p$ is prime.  With
$n=1$, the polynomials $f(x) = x^p$ and $g(x) = x$ actually define the
same function since $a^p = a$ for all $a \in \mathbb{Z}_p$.
\item<4-> \emph{But}, if $k$ is infinite (e.g. $k = \mathbb{Q}, \mathbb{R}, \mathbb{C}$, etc.)
then $f,g \in k[x_1,\ldots,x_n]$ define the same polynomial function
if and only if $f = g$.   (Note: the $\Leftarrow$ implication is always true)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Proof of the $\Rightarrow$ implication}
\begin{itemize}
\item<1-> We argue by induction on $n$, the number of variables.
\item<2-> When $n = 1$, recall from high school algebra that a
nonzero
polynomial of degree $n$ in one variable has at most $n$ roots.
\item<3-> So if $f(a) = g(a)$ for all $a \in k$, the polynomial $f - g$
is zero at all $a\in k$.  This implies $f - g$ is the zero polynomial,
so $f = g$.
\item<4->  Now assume the result is true for polynomials in $n - 1$
variables, and consider $f,g \in k[x_1,\ldots,x_n]$ defining
the same polynomial function.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Proof, concluded}
\begin{itemize}
\item<1->  Write $f = f_k(x_1,\ldots,x_{n-1}) x_n^k + \cdots + f_0(x_1,\ldots,x_{n-1})$
and similarly for $g$.
\item<2->  By assumption, for all $f(a_1,\ldots,a_{n-1})\in k^{n-1}$,
$f(a_1,\ldots,a_{n-1},x_n) = g(a_1,\ldots,a_{n-1},x_n)$ define the same function
of $x_n$.
\item<3-> By the base case, this implies that $f_i(a_1,\ldots,a_{n-1}) = g_i(a_1,\ldots,a_{n-1})$
for all $i$ and all $(a_1,\ldots,a_{n-1})$.
\item<4-> But then, the induction hypothesis implies $f_i = g_i$ all $i$, and hence
$f = g$.  QED
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Geometric objects from polynomials}
We can use polynomials $f \in k[x_1,\ldots,x_n]$ to define geometric objects
as subsets of $k^n$ as follows.
\begin{definition}
Let $f_1,\ldots,f_s \in k[x_1,\ldots,x_n]$.  Then $V(f_1,\ldots,f_s)$
(called the \emph{variety} defined by the $f_i$)
is the subset of $k^n$ given as the common zero locus of all
the $f_i$:
$$V(f_1,\ldots,f_s) = \{(a_1,\ldots,a_n) \mid f_i(a_1,\ldots,a_n) = 0, i = 1,\ldots,s\}$$
\end{definition}
\end{frame}

\begin{frame}
\frametitle{Examples}
To draw pictures, we will almost always take $k = \mathbb{R}$
\begin{itemize}
\item<1-> $V(y - g(x))$ is the usual \emph{graph} of the polynomial function $g(x)$
\item<2-> $V\left(\frac{x^2}{9} - \frac{y^2}{4} - 1\right)$ is a hyperbola in the plane
\item<3-> $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$.  [Sage demo]
\item<4-> $V(y - x^2, z - x^3)$ is the \emph{twisted cubic curve} in $\mathbb{R}^3$.
[Sage demo]
\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{Parametrizations}
Some 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*}
\begin{itemize}
\item For instance, the circle $V(x^2 + y^2 - 1)$ can be
parametrized by $F(t) = (\cos(t),\sin(t))$ (not polynomial functions, of course!)
\item The twisted cubic $V(y - x^2, z - x^3)$ is the image of
$F(t) = (t,t^2,t^3)$
\end{itemize}
\end{frame}

\section{Day 2}

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

\begin{itemize}
\item<1->  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<2->  Hence $f$ \emph{also vanishes at every point of} $V = V(f_1,\ldots,f_s)$, and
\item<3-> It follows that $V(f_1,\ldots,f_s,f) = V(f_1,\ldots,f_s)$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{More motivation}
\begin{itemize}
\item<1->  The polynomial $f$ is above superfluous
\item<2->  If we turn this around though, we see a way for detecting extra, unneeded
equations in some cases:  If $V = 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 = V(f_1,\ldots,f_{s-1})$ also.
\item<3-> Finding polynomials $f = g_1f_1 + \ldots + g_s f_s$
with ``special'' features like \emph{factorizations} can also be useful.
\item<4-> Example:  Consider $W  = 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$ satifies this
definition.  But are there other ideals too in $k[x_1,\ldots,x_s]$ (ones
with n finite generating set?
\end{frame}

\begin{frame}
\frametitle{Other examples of ideals}
The answer is not so clear at first, because of examples like these:
\begin{itemize}
\item<1->  Let $S \subset k^n$ be any subset and define
$$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<2->  Let $I$ be an ideal in $k[x_1,\ldots,x_n]$ and let $\sqrt{I}$ {\it (the radical of I)} be
$$\sqrt{I} = \{ f \in k[x_1,\ldots, x_n] \mid f^k \in I {\rm\ for\ some\ } k \ge 1\}.$$
\item<3-> \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{Proof of the theorem}
\begin{itemize}
\item<1->  For part b of the definition, if $f \in \sqrt{I}$, then $f^k \in I$ for some integer $k \ge 1$.  If
$h$ is an arbitrary polynomial, $(hf)^k = h^k f^k \in I$, since $f^k \in I$.  Hence $hf \in \sqrt{I}$.
\item<2->  For part a, if $f,g\in \sqrt{I}$, then $f^k \in I$ and $g^m\in I$ for some $k,m$ (not
necessarily the same).  By looking at the binomial expansion
$$(f + g)^{k + m - 1} = \sum_{\ell = 0}^{k + m - 1} \binom{k+m-1}{\ell} f^\ell g^{k + m - 1 - \ell}$$
we can see that
each term contains either $f^\ell$ for $\ell\ge k$ or $g^p$ for $p \ge m$.  Hence $(f + g)^{k + m - 1} \in I$,
which says $f + g\in \sqrt{I}$.  QED
\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<1->  In other words, varieties are ``really'' defined by ideals,
not particular sets of equations -- we'll write $V(I)$.
\item<2->  Proof:  $V \subset 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<3->  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{An example}
\begin{itemize}
\item<1->  Consider $V = V(x^2 + y^2 - 1, x^2 - x + y^2 - 3/4)$.
\item<2->  We have
$$x - 1/4 = (1)(x^2 + y^2 - 1) + (-1)(x^2 - x + y^2 - 3/4)$$
\item<3-> Hence
$$\langle x^2 + y^2 - 1, x - 1/4\rangle = \langle x^2 + y^2 - 1, x^2 - x + y^2 - 3/4\rangle$$
(why?)
\item<4-> The theorem implies that
$$V = V(x^2 + y^2 - 1, x - 1/4).$$
\item<5-> The same sort of thing happens for all pairs of circles
in $\mathbb{R}^2$.  The variety is also defined by one of the circles and
a linear polynomial in $x,y$.  (What happens if the circles don't intersect?)
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{$I(V(I))$, continued.}
\begin{itemize}
\item<1->  On the other hand, here is another example where $I(V(I)) = I$ is true.   As above
$I \subset I(V(I))$ always holds.
\item<2-> Say
$I = \langle y - x^2\rangle$ in $\mathbb{R}[x,y]$.  Then $V(I)$ is the usual
parabola.
\item<3->  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<4->  If $f \in I(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<5-> But that implies $r(x)$ is the zero polynomial, so $f \in \langle y - x^2\rangle$.
This shows $I(V(I)) \subset I$ in this case, so they are equal.
\end{itemize}
\end{frame}

\section{Day 3}

\begin{frame}
\frametitle{Division in $k[x]$}

There is a basic operation in the polynomial ring in one
variable over a field that has extremely strong implications
for ideals in this case.  This is the \emph{polynomial division
algorithm}.  You probably saw this in high school algebra
at some point.  [Recall idea with an example on the board]
The precise results of what we're doing here can be stated
like this:

\begin{theorem}  Let $f(x), g(x)$ be polynomials in $k[x]$.
Then there exist unique polynomials $q(x)$ and $r(x)$
such that
\begin{enumerate}
\item $f(x) = q(x) g(x) + r(x)$, and
\item either $r(x) = 0$ or $\deg r(x) < \deg g(x)$.
\end{enumerate}
\end{theorem}
\end{frame}

\begin{frame}[fragile]
\frametitle{Division algorithm}
Hand process to produce quotient $q(x)$ and remainder $r(x)$ can be
described using \emph{pseudocode} like this:
\begin{verbatim}
Input: f,g
Output: q,r
q := 0; r := f
while r <> 0 and LT(g) divides LT(r) do
   q := q + LT(r)/LT(g)
   r := r - (LT(r)/LT(g))g
\end{verbatim}
(Here $LT(f)$ denotes the ``leading term'' or term of highest degree in a polynomial $f$.)
\end{frame}

\begin{frame}
\frametitle{Idea of proof}
\begin{proof}
The full details of the proof are given in the text.  The key idea is that the equation
$f = q g + r$ holds after the initial assignments, and if it holds
at the start of one pass through the while loop, then it also holds
and the end of the pass because we have just ``rearranged the terms'' like this:
$$f = (q + LT(r)/LT(g)) g + r - (LT(r)/LT(g))g$$
Hence it will also be true at the conclusion of the while loop.
The loop terminates  because
the degree of $r$ is reduced by at least one on each pass through the
while loop.  On termination, $r(x) = 0$ or $\deg r(x) < \deg g(x)$ because
if not, then $LT(g)$ would still divide $LT(g)$.
\end{proof}
\end{frame}

\begin{frame}
\begin{theorem}
Let $I$ be an ideal in $k[x]$.  Then $I = \langle g(x)\rangle$
for some $g(x) \in I$.
\end{theorem}

In other words, every ideal in $k[x]$ is \emph{principal} (generated
by a single polynomial.  Abstract algebra:  $k[x]$ is a PID.

\begin{proof}  If $I = \{0\}$, then take $g(x) = 0$.  Otherwise, let $g(x)$
be a nonzero polynomial in $I$ of \emph{minimal degree}.  We claim that $I = \langle f(x)\rangle$.
The $\supset$ inclusion is clear.  To show $\subset$: let $f(x) \in I$ be an arbitrary polynomial.
Using the division algorithm, write $f(x) = q(x) g(x) + r(x)$.  If $r(x) \ne 0$, then
$\deg r(x) < \deg g(x)$.  But $r(x) = f(x) - q(x)g(x) \in I$.  This is a contradiction
to the way we chose $g(x)$.  Hence $r(x) = 0$, so $f(x) = q(x) g(x)\in \langle g(x)\rangle$.
It follows that $I = \langle g(x)\rangle$.
\end{proof}
\end{frame}

\begin{frame}
\frametitle{Ideal membership test}
\begin{itemize}
\item<1-> If we know the generator polynomial $g(x)$, we can
also test for membership in the ideal $I = \langle g(x)\rangle$
using division:
\item<2-> Given $f(x)$, compute $f(x) = q(x)g(x) + r(x)$ by division
\item<3-> Then by uniqueness, $f(x) \in I \Leftrightarrow r(x) = 0$
\item<4-> Example:  Let $g(x) = x^2 - 5x + 6$, and $f(x) = x^3 + 25 x + 30$.
\item<5-> $f(x) = (x + 5)(x^2 - 5x + 6) + 0 \Rightarrow f(x) \in \langle g(x) \rangle$.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Polynomial gcd's}
\begin{itemize}
\item<1-> An example:  Consider $I = \langle x^4 - 16, x^2 - 2 x - 8\rangle$ in $\mathbb{Q}[x]$.
By the theorem, there must be some single polynomial $g(x)$ such that $\langle g(x)\rangle = I$.
\item<2-> Note that $g(x)$ must divide each of $x^4 - 16 = (x - 2)(x + 2)(x^2 + 4)$ and
$x^2 - 2x - 8 = (x + 2)(x - 4)$.
\item<3-> Hence we can see that $g(x) = x + 2$, the gcd of the two polynomials.
\item<4-> In general $g(x) = \gcd(f(x),h(x))$ can be defined as the monic generator of the ideal
$\langle f(x),h(x)\rangle$ using the theorem, or it can be characterized by its properties (see Definition
5 in Chapter 1, \S 5 in IVA).
\item<5-> ``Ideally,'' we would like a way to compute $\gcd(f(x),h(x))$ without
factoring.
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{The Euclidean Algorithm}
The method here goes all the way back to the {\it Elements} of Euclid
(although he discussed the corresponding procedure for integers, not
polynomials).  In the following, {\tt remainder} means compute
the remainder using the division algorithm above:

\begin{verbatim}
Input:  f,g
Output: h
h := f; s := g
while s <> 0 do
   rem := remainder(h,s)
   h := s
   s := rem
\end{verbatim}
\end{frame}

\begin{frame}
\frametitle{Euclidean algorithm, step-by-step}
If we give separate names to the remainders obtained at each step, we get something like:
\begin{eqnarray*}
f &=& q_1 g + r_1\\
g &=& q_2 r_1 + r_2\\
r_1 &=& q_3 r_2 + r_3\\
    &\vdots & \\
r_{k-1} &=& q_k r_{k-1} + r_k
\end{eqnarray*}
The algorithm terminates the first time a zero remainder
$r_k$ is found.  (This must happen after a finite number
of steps since the degrees of the remainders form
a strictly decreasing sequence.)
\end{frame}

\begin{frame}
\frametitle{An example}
We will carry this out for $f = x^4 - 16$, $g = x^2 - 2x -8$ as above:
\begin{eqnarray*}
x^4 - 16 &=& (x^2 + 2 x + 12)(x^2 - 2x - 8) + 40 x + 80\\
x^2 - 2x - 8 &=& \left(\frac{1}{40} x - \frac{1}{10}\right)(40x + 80) + 0
\end{eqnarray*}
Note that the loop terminates here since $s = 0$.  The gcd is the \emph{final nonzero
remainder} -- that is
$40x + 80$, or $x + 2$ if we require a monic polynomial.  This agrees
with our earlier results obtained by factorization.
\end{frame}

\begin{frame}
\frametitle{Another example}
Now say $f = x^5 + x + 1$, $g = x^4 + x^2 + 1$.  What is $\gcd(f,g)$?
\begin{eqnarray*}
x^5 + x + 1 &=& x(x^4 + x + 1) + (-x^2 + 1)\\
x^4 + x + 1 &=& (-x^2-1) (-x^2+1) +  (x + 2)\\
-x^2 + 1 &=& (-x + 2)(x + 2) + (-3)\\
x + 2 &=& (x/3 + 2/3)(3) + 0
\end{eqnarray*}
Up to a constant multiple, the final nonzero remainder is $1$.  We say
the polynomials $f,g$ are \emph{relatively prime} in this case.
\end{frame}


\section{Day 4}

\begin{frame}
\frametitle{Leading terms}
\begin{itemize}
\item<1-> Since division is so useful for revealing properties
of ideals in $k[x]$, can ask whether there is a generalization
to $k[x_1,\ldots,x_n]$.
\item<2-> You may have seen a naive version (``pseudo-division'') in two variables
\item<3-> For instance, say $g(x,y) = y^n + g_1(x) y^{n-1} + \cdots + g_n(x)$
\item<4-> We can divide $g$ into any $f(x,y)$ as for polynomials in $y$
alone, but doing arithmetic in $k[x]$ for the coefficients.
\item<5-> Do an [example on board]
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{But, ... }
\begin{itemize}
\item<1-> Not a complete analog of division in $k[x]$ for
several reasons:
\item<2->  The variable $y$ plays a special role and note that leading
coefficient of $g$ must be 1 as above, or else we start introducing
denominators (remainder is of degree $ < n$ in $y$ with coefficients
rational functions in $x$, or zero)
\item<3-> More seriously, not every ideal in $k[x_1,\ldots,x_n]$
has form $\langle g(x) \rangle$ if $n \ge 2$.
\item<4-> Example:  $I = \langle x,y\rangle \subset k[x,y]$
\item<5-> Why is there no $g(x,y)$ such that $\langle g(x,y) \rangle = \langle x,y\rangle$ ?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Leading terms}
\begin{itemize}
\item<1->  If we want to try to generalize division, we need a way
to select a \emph{leading term} from each polynomial
\item<2->  But that is not so clear in general!  For instance, which
should be the leading term in
$$f(x,y) = x^3 y^3 + x^5 + x y^4?$$
\item<3->  (Surprising?) answer:  There are many possible ways, and
\emph{each of the three terms could
be the leading term}, depending on how we order monomials!
\item<4-> What properties do we want?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Desired properties}
\begin{itemize}
\item<1->  We should be able to put the terms in any nonzero polynomial
into a unique (say decreasing) order
\item<2->  Then the leading term will the \emph{largest} term (leading
term of 0 is undefined)
\item<3-> If we multiply $f = \sum_\a c_\a x^\a$ by a monomial
$x^\gamma$, then the terms in $x^\gamma f = \sum_\a c_\a x^{\a + \gamma}$
should not ``switch around'' -- that is,
$$x^\a > x^\beta \Rightarrow x^{\a + \gamma} > x^{\beta + \gamma}.$$
\item<4-> (Not so obvious at first, maybe):  There should be no
\emph{infinite} descending chains starting from a fixed $x^{\a(1)}$:
$$x^{\a(1)} > x^{\a(2)} > \cdots > x^{\a(n)} > \cdots$$
(otherwise processes like division could go on forever(!))
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Monomial orders}
\begin{definition}
A \emph{monomial order} is a relation $>$ on the set of monomials $x^\a$ in $k[x_1,\ldots,x_n]$
(or on the $\a \in \mathbb{Z}_{\ge 0}^n$ such that
\begin{enumerate}
\item[i.] $>$ is a total order relation (that is, for every pair of monomials $x^\a$ and
$x^\beta$, exactly one of the statements:  $x^\a > x^\beta$, $x^\a = x^\beta$, or $x^\beta > x^\a$ is true)
\item[ii.]  For all $\a, \beta, \gamma$, if $x^\a > x^\beta$, then $x^{\a + \gamma} > x^{\beta + \gamma}$
\item[iii.]  $>$ is a well-ordering (every nonempty set of monomials has a smallest element, or
equivalently, there are no infinite descending chains of monomials starting from any $x^\a$ )
\end{enumerate}
\end{definition}
\end{frame}

\begin{frame}
\frametitle{Monomial orders on $k[x]$}
\begin{itemize}
\item<1->  Consider the pair of monomials $1,x$.  Since $1 \ne x$, then property
i in the definition implies either
$x > 1$, or $1 > x$.
\item<2->  If $1 > x$, then by property ii in the definition,
$x > x^2$, $x^2 > x^3$, etc.  So we
get an infinite descending chain starting from $1$(!)
\item<3->  Hence, the \emph{only} monomial order on $k[x]$ has $x > 1$, and
then $\cdots x^3 > x^2 > x > 1$ is just the usual degree ordering
\item<4->  Note that this is just the order used in division in $k[x]$(!)
\item<5->  Leading term in a nonzero polynomial in $k[x]$ is the term of
highest degree
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{The lexicographic order}
\begin{itemize}
\item<1->  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<2-> \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<3->  Example:  In $k[x,y,z]$, let $x^\a = x^3 y^4 z$ and $x^\beta = x^2 y z^8$.
\item<4->  Then $\a = (3,4,1)$, $\beta = (2,1,8)$, $\a - \beta = (1,3,-7)$
\item<5->  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<1->  Consider the polynomial $f(x,y) =  x^3 y^3 + x^5 + x y^4$
from before
\item<2-> Which is the {\it lex} leading term (taking $x > y$)?
\item<3-> The exponent vectors are $(3,3), (5,0), (1,4)$.
\item<4-> In {\it lex} order, we have $(5,0) >_{lex} (3,3) >_{lex} (1,4)$
\item<5-> Note:  {\it lex} order is analogous to dictionary order for words(!)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Showing {\it lex} satisfies the definition}
\begin{itemize}
\item<1->  Property i follows from properties of integers
\item<2->  Property ii is easy since $(\a + \gamma) - (\beta + \gamma) = \a - \beta$
\item<3->  Property iii is the ``interesting'' and subtle one here
\item<4->  Idea is that the usual order on $\mathbb{Z}_{\ge 0}$ is a well-order.
\item<5->  So in any descending chain of monomials in the {\it lex} order,
eventually the exponent of $x_1$ must ``stabilize,'' then the exponent of $x_2$ must
``stabilize,'' etc.  But the way this works is a bit subtle -- arbitrarily long chains exist:
\item<6->  Example $x^3 y > x^2 y^2 > x y^5 > x y^4 > x y^3 > x y^2 > x y$
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Graded lex order}
\begin{itemize}
\item<1->  For $\a \in \mathbb{Z}_{\ge 0}^n$, let $|\a| = \a_1 + \cdots + \a_n$
\item<2->  \begin{definition}  We say $x^\a >_{grlex} x^\beta$ if
$|\a| > |\beta|$ or if $|\a| = |\beta|$ and $x^\a >_{lex} x^\beta$.
\end{definition}
\item<3->  Easy to see satisfies definition; {\it grlex} compares by
total degree first, then ``break ties'' with $>_{lex}$
\item<4-> Examples:  $x^3 y^2 z >_{grlex} x^4 z$ since $|(3,2,1)| = 6 > 5 = |(4,0,1)|$.
$x^3 y^2 z >_{grlex} x^3 y z^2$ since $|(3,2,1)| = 6 = |(3,1,2)|$ but $(3,2,1) - (3,1,2) = (0,1,-1)$.
\item<4-> {\it grlex} leading term of $f(x,y) =  x^3 y^3 + x^5 + x y^4$ ?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{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<1->  Example:  $x^3 y^2 z >_{grevlex} x^4 z$ as for {\it grlex}
\item<2->  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<3->  Note that  $f(x,y,z) = x^2 y^2 z^2 + x y^4 z + x^5$
has three different leading terms depending on which of the orders {\it lex, grlex, grevlex} we use
\end{itemize}
\end{frame}

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

\end{document} 
