\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=True]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{bbding}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Thursday, August 17, 2023 02:41:40}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{calc}
\newcounter{exer}
\newcounter{exera}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{convention}[1][Convention]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\setlength\textheight{22.5cm}
\setlength\textwidth{14.8cm}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\defn}[1]{{\color{darkred}\emph{#1}}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\arinj}{\ar@{_{(}->}}
\newcommand{\arinjrev}{\ar@{^{(}->}}
\newcommand{\arsurj}{\ar@{->>}}
\newcommand{\arelem}{\ar@{|->}}
\newcommand{\arback}{\ar@{<-}}
\newcommand{\are}{\ar@{-}}
\newcommand{\arebi}[1][]{\ar@{<-}@/_/[#1] \ar@/^/[#1]}
\newcommand{\of}{\text{ of }}
\definecolor{darkgreen}{rgb}{0,.5,0}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Lecture 29, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 332 Winter 2023, Lecture 29: Polynomials}

\textbf{website:}
\texttt{\href{https://www.cip.ifi.lmu.de/~grinberg/t/23wa}{\texttt{https://www.cip.ifi.lmu.de/\symbol{126}%
grinberg/t/23wa}}}

\setcounter{section}{4}

\section{Polynomials II}

In this last lecture, we will catch a very brief glimpse of the study of
multivariate polynomials. The material that I will show (without proofs) is at
the spring of several renowned fields of mathematics (algebraic geometry,
Gr\"{o}bner bases, combinatorial commutative algebra) and deserves a whole
course of its own. Alas, now that the quarter is almost over, all I can give
are a few basic results and pose a few questions. More can be found in Chapter
6 of the text, in de Graaf's notes \cite{deGraaf-CA}, or in the book
\cite{CoLiOs15} (listed here roughly in the order of increasing
comprehensiveness, although I am not saying that each source is fully
contained in the next).

\begin{convention}
Again, for this entire chapter, we fix a \textbf{commutative} ring $R$.
\end{convention}

As we saw last time (\S 3.5 in Lecture 28), univariate polynomials are very
well-behaved as long as their leading coefficients are invertible. If $b\in
R\left[  x\right]  $ is a degree-$m$ polynomial with this property, then
$R\left[  x\right]  /b$ is a free $R$-module with basis $\left(
\overline{x^{0}},\overline{x^{1}},\ldots,\overline{x^{m-1}}\right)  $.
Furthermore, in this case, each polynomial in $R\left[  x\right]  $ can be
divided with remainder by $b$, and thus divisibility by $b$ can be easily
checked. Also, if $F$ is a field, then the polynomial ring $F\left[  x\right]
$ is a Euclidean domain (by Theorem 3.3.16 in Lecture 26), thus a PID, so that
all its ideals are principal, and therefore the quotient rings of $F\left[
x\right]  $ always have the form $F\left[  x\right]  /b$ for some single
polynomial $b$.

Everything becomes more complicated once we pass to multivariate polynomials.
I will just outline some of the main questions and a few of the simplest
results. Generally, the study of ideals and quotient rings of multivariate
polynomial rings is one of the main topics in
\textbf{\href{https://en.wikipedia.org/wiki/Algebraic_geometry}{\textbf{algebraic
geometry}}}.

\subsection{Non-principal ideals}

If $R$ is a field, then the ring $R\left[  x\right]  $ is a PID, but the ring
$R\left[  x,y\right]  $ is not. Here is the simplest example of a
non-principal ideal: Let $P=R\left[  x,y\right]  $. Then, the ideal $xP+yP$ of
$P$ can be rewritten as follows:%
\begin{align*}
xP+yP  &  =\left\{  \text{all multiples of }x\right\}  +\left\{  \text{all
multiples of }y\right\} \\
&  =\left\{  \text{all polynomials whose constant term is }0\right\}
\ \ \ \ \ \ \ \ \ \ \left(  \text{why?}\right) \\
&  =\left\{  f\in P\ \mid\ f\left[  0,0\right]  =0\right\}
\ \ \ \ \ \ \ \ \ \ \left(  \text{since }f\left[  0,0\right]  \text{ is the
constant term of }f\right)  .
\end{align*}
If $R$ is nontrivial, then this ideal $xP+yP$ of $P$ is not principal (i.e.,
not of the form $uP$ for some $u\in P$).

The quotient ring $P/\left(  xP+yP\right)  $ is quite simple: It is isomorphic
to $R$ (as an $R$-algebra). Specifically, the map%
\begin{align*}
P/\left(  xP+yP\right)   &  \rightarrow R,\\
\overline{f}  &  \mapsto f\left[  0,0\right]
\end{align*}
is an $R$-algebra isomorphism. (This is not hard to check.)

For comparison,
\[
P/\left(  xP\right)  =P/x\cong R\left[  y\right]  ,
\]
via the $R$-algebra isomorphism%
\begin{align*}
P/x  &  \rightarrow R\left[  y\right]  ,\\
\overline{f}  &  \mapsto f\left[  0,y\right]  .
\end{align*}
This should be quite intuitive: If we quotient out $x$ from the polynomial
ring $P=R\left[  x,y\right]  $, we should be left with the other indeterminate
$y$.

Here is a slightly trickier version of this isomorphism: We have%
\[
P/\left(  x+y\right)  \cong R\left[  x\right]  ,
\]
via the $R$-algebra isomorphism%
\begin{align*}
P/\left(  x+y\right)   &  \rightarrow R\left[  x\right]  ,\\
\overline{f}  &  \mapsto f\left[  x,-x\right]  .
\end{align*}
Intuitively, this is because quotienting out $x+y$ from the polynomial ring
$P=R\left[  x,y\right]  $ means that we are \textquotedblleft setting
$y:=-x$\textquotedblright, so that we are left with only one free variable $x$.

Note, in particular, that $P/\left(  x+y\right)  $ is not the same as
$P/\left(  xP+yP\right)  $, since the principal ideal $\left(  x+y\right)  P$
is not the same as $xP+yP$. (For instance, $2x+3y\notin\left(  x+y\right)  P$.)

\subsection{More interesting example: $R\left[  x,y\right]  /\left(
x^{2}+y^{2}-1\right)  $}

How does the quotient ring $R\left[  x,y\right]  /\left(  x^{2}+y^{2}%
-1\right)  $ look like? For $R=\mathbb{R}$ in particular, it is known as the
\textbf{ring of trigonometric polynomials}, since there is an $\mathbb{R}%
$-algebra morphism%
\begin{align*}
\mathbb{R}\left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)   &
\rightarrow\underbrace{\mathbb{R}^{\mathbb{R}}}_{\substack{\text{ring of
functions }\mathbb{R}\rightarrow\mathbb{R}\\\text{(with pointwise
addition}\\\text{and multiplication and}\\\text{scaling)}}},\\
\overline{f}  &  \mapsto f\left[  \sin t,\cos t\right]  .
\end{align*}
It can be shown that this map is injective (not obvious!), so that
$\mathbb{R}\left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $ is isomorphic
to a subring of $\mathbb{R}^{\mathbb{R}}$. It can also be shown that
$\mathbb{R}\left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $ is an integral
domain. But, for instance, $\left(  \mathbb{Z}/2\right)  \left[  x,y\right]
/\left(  x^{2}+y^{2}-1\right)  $ is not an integral domain, because over
$\mathbb{Z}/2$, we have%
\[
x^{2}+y^{2}-1=\left(  x+y-1\right)  ^{2}\ \ \ \ \ \ \ \ \ \ \left(
\text{check this!}\right)  ,
\]
so that the nonzero residue class $\overline{x+y-1}$ is nilpotent in $\left(
\mathbb{Z}/2\right)  \left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $.

Another question: As an $R$-module, is $R\left[  x,y\right]  /\left(
x^{2}+y^{2}-1\right)  $ free? Equivalently, is there a unique
division-with-remainder procedure in the ring $R\left[  x,y\right]  $ by the
polynomial $x^{2}+y^{2}-1$ ?

There are two answers to this question, one more specific to this polynomial,
and one more general.

For the more specific answer, we note the following:

\begin{proposition}
\label{prop.polring.Rxy-stepwise}We have%
\[
R\left[  x,y\right]  \cong\left(  R\left[  x\right]  \right)  \left[
y\right]  \ \ \ \ \ \ \ \ \ \ \text{as }R\text{-algebras.}%
\]
More concretely, the map%
\begin{align*}
R\left[  x,y\right]   &  \rightarrow\left(  R\left[  x\right]  \right)
\left[  y\right]  ,\\
\sum_{i,j\in\mathbb{N}}a_{i,j}x^{i}y^{j}  &  \mapsto\sum_{j\in\mathbb{N}%
}\left(  \sum_{i\in\mathbb{N}}a_{i,j}x^{i}\right)  y^{j}%
\end{align*}
is an $R$-algebra isomorphism.
\end{proposition}

This isomorphism sends $x^{2}+y^{2}-1\in R\left[  x,y\right]  $ to
$x^{2}+y^{2}-1=y^{2}+\left(  x^{2}-1\right)  \in\left(  R\left[  x\right]
\right)  \left[  y\right]  $, which is a monic polynomial in $y$ of degree $2$
over the ring $R\left[  x\right]  $. Hence, by what we know about monic
polynomials (specifically, Theorem 3.5.2 in Lecture 28), we can divide with
remainder by $y^{2}+\left(  x^{2}-1\right)  $, and the quotient ring $\left(
R\left[  x\right]  \right)  \left[  y\right]  /\left(  y^{2}+\left(
x^{2}-1\right)  \right)  $ is a free $R\left[  x\right]  $-module with basis
$\left(  \overline{y^{0}},\overline{y^{1}}\right)  =\left(  \overline
{1},\overline{y}\right)  $. Now, unapplying the isomorphism from Proposition
\ref{prop.polring.Rxy-stepwise}, we conclude that the quotient ring $R\left[
x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $ is a free $R\left[  x\right]
$-module with basis $\left(  \overline{1},\overline{y}\right)  $, therefore a
free $R$-module with basis%
\[
\left(  \overline{x^{0}},\overline{x^{1}},\overline{x^{2}},\ldots
\ ,\ \overline{x^{0}y},\overline{x^{1}y},\overline{x^{2}y},\ldots\right)  .
\]


Note that Proposition \ref{prop.polring.Rxy-stepwise} can be generalized to
many variables:

\begin{proposition}
\label{prop.polring.Rxn-stepwise}For any $n>0$, we have%
\[
R\left[  x_{1},x_{2},\ldots,x_{n}\right]  \cong\left(  R\left[  x_{1}%
,x_{2},\ldots,x_{n-1}\right]  \right)  \left[  x_{n}\right]  \text{ as
}R\left[  x_{1},x_{2},\ldots,x_{n-1}\right]  \text{-algebras.}%
\]

\end{proposition}

By applying this proposition iteratively, we obtain%
\[
R\left[  x_{1},x_{2},\ldots,x_{n}\right]  \cong\left(  \left(  \left(
R\left[  x_{1}\right]  \right)  \left[  x_{2}\right]  \right)  \left[
x_{3}\right]  \right)  \cdots\left[  x_{n}\right]  \text{ as }%
R\text{-algebras.}%
\]
In other words, a multivariate polynomial ring can be constructed by
introducing the variables \textquotedblleft one at a time\textquotedblright.

The variables in a multivariate polynomial ring can also be reordered
arbitrarily: e.g., we have $R\left[  x,y,z,w\right]  \cong R\left[
y,z,x,w\right]  $. Thus, while Proposition \ref{prop.polring.Rxy-stepwise}
gives an isomorphism $R\left[  x,y\right]  \cong\left(  R\left[  x\right]
\right)  \left[  y\right]  $, we can just as easily obtain an isomorphism
$R\left[  x,y\right]  \cong\left(  R\left[  y\right]  \right)  \left[
x\right]  $. As a consequence, a polynomial in $x$ and $y$ can be regarded as
a univariate polynomial in two ways: either as a univariate polynomial in $y$
over $R\left[  x\right]  $ (using the isomorphism $R\left[  x,y\right]
\cong\left(  R\left[  x\right]  \right)  \left[  y\right]  $), or as a
univariate polynomial in $x$ over $R\left[  y\right]  $ (using the isomorphism
$R\left[  x,y\right]  \cong\left(  R\left[  y\right]  \right)  \left[
x\right]  $). By viewing our polynomial $x^{2}+y^{2}-1$ in the former way, we
obtained the basis
\[
\left(  \overline{x^{0}},\overline{x^{1}},\overline{x^{2}},\ldots
\ ,\ \overline{x^{0}y},\overline{x^{1}y},\overline{x^{2}y},\ldots\right)
\]
of $R\left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $. Likewise, viewing
it in the latter way, we can obtain the basis%
\[
\left(  \overline{y^{0}},\overline{y^{1}},\overline{y^{2}},\ldots
\ ,\ \overline{xy^{0}},\overline{xy^{1}},\overline{xy^{2}},\ldots\right)
\]
of $R\left[  x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $. There are, of
course, many other bases.

\begin{noncompile}
the difference is immaterial (since it is symmetric), but it often happens
that one viewpoint is better than the other.
\end{noncompile}

\subsection{Trickier examples}

Now we understand the $R$-modules $R\left[  x,y\right]  /y$ and $R\left[
x,y\right]  /\left(  x^{2}+y^{2}-1\right)  $ well enough. What about $R\left[
x,y\right]  /\left(  xy\right)  $ ?

Our above method does not help us here, since the polynomial $xy$ neither has
an invertible leading coefficient when considered as a polynomial in $x$ (over
$R\left[  y\right]  $) nor when considered as a polynomial in $y$ (over
$R\left[  x\right]  $). We need a new idea.

However, $xy$ is just a monomial, so that it is pretty clear what happens when
we quotient it out: All monomials $x^{i}y^{j}$ with $i>0$ and $j>0$ are
equated to $0$ (since they are multiples of $xy$), whereas all the other
monomials (i.e., the monomials $1,\ x,\ x^{2},\ x^{3},\ \ldots,\ y,\ y^{2}%
,\ y^{3},\ \ldots$) remain $R$-linearly independent (since no $R$-linear
combination of them is a multiple of $xy$, except for the trivial combination
$0$). Thus, the $R$-module $R\left[  x,y\right]  /\left(  xy\right)  $ is free
with basis
\[
\left(  \overline{1},\ \overline{x},\ \overline{x^{2}},\ \overline{x^{3}%
},\ \ldots,\ \overline{y},\ \overline{y^{2}},\ \overline{y^{3}},\ \ldots
\right)  .
\]
As an $R$-algebra, it is not an integral domain, since $\overline{x}%
\cdot\overline{y}=\overline{xy}=\overline{0}$.

So we were lucky again. But what about $R\left[  x,y\right]  /\left(
xy\left(  x-y\right)  \right)  $ ? None of our above tricks can help us now.

\subsection{Degrees and the deg-lex order}

It is time for a general method, or at least as general as we can hope for. In
the univariate case, we were able to answer many questions about $R\left[
x\right]  /b$ using division with remainder. So let us try to extend division
with remainder to the multivariate case. The first question is: What is a
leading coefficient?

For example, in the polynomial%
\[
\left(  x+y+1\right)  ^{2}=x^{2}+2xy+y^{2}+2x+2y+1,
\]
the terms $x^{2}$, $2xy$ and $y^{2}$ have the largest degrees. It makes sense
for one of them to count as the leading term. But which one? We clearly need a
systematic method to break ties.

First, we get some basic terminology in place:

\begin{convention}
As we said, $R$ is a fixed commutative ring.

Now we also fix $n\in\mathbb{N}$. We let $P$ be the polynomial ring $R\left[
x_{1},x_{2},\ldots,x_{n}\right]  $.
\end{convention}

As we recall, a \textbf{monomial} is an element of the free abelian monoid
$C^{\left(  n\right)  }$ with $n$ generators $x_{1},x_{2},\ldots,x_{n}$, and
has the form $x_{1}^{a_{1}}x_{2}^{a_{2}}\cdots x_{n}^{a_{n}}$ for some
$a_{1},a_{2},\ldots,a_{n}\in\mathbb{N}$.

We have already used the notion of a degree of such a monomial, but let us
define it formally:

\begin{definition}
The \textbf{degree} of a monomial $\mathfrak{m}=x_{1}^{a_{1}}x_{2}^{a_{2}%
}\cdots x_{n}^{a_{n}}$ is defined to be $a_{1}+a_{2}+\cdots+a_{n}\in
\mathbb{N}$. It is called $\deg\mathfrak{m}$.
\end{definition}

\begin{definition}
A monomial $\mathfrak{m}$ is said to \textbf{appear} in a polynomial $f\in P$
if $\left[  \mathfrak{m}\right]  f\neq0$. (Recall that $\left[  \mathfrak{m}%
\right]  f$ denotes the coefficient of $\mathfrak{m}$ in $f$.)
\end{definition}

\begin{definition}
The \textbf{degree} of a nonzero polynomial $f\in P$ is the largest degree of
a monomial that appears in $f$.
\end{definition}

For example, the polynomial $\left(  x+y+1\right)  ^{3}-\left(  x+y\right)
^{3}\in\mathbb{Q}\left[  x,y\right]  $ has degree $2$, since it equals
$3x^{2}+3y^{2}+6xy+3x+3y+1$. But the polynomial $\left(  x+y+\overline
{1}\right)  ^{3}-\left(  x+y\right)  ^{3}\in\left(  \mathbb{Z}/3\right)
\left[  x,y\right]  $ has degree $0$, since it equals $\overline{1}$.

The following proposition is the multivariate analogue to parts \textbf{(a)}
and \textbf{(c)} of Proposition 3.3.5 in Lecture 25:

\begin{proposition}
[degree-of-a-product formula]\label{prop.polring.deg-pq-mulvar}Let $p,q\in P$
be nonzero. Then:

\textbf{(a)} We have $\deg\left(  pq\right)  \leq\deg p+\deg q$.

\textbf{(b)} We have $\deg\left(  pq\right)  =\deg p+\deg q$ if $R$ is an
integral domain.
\end{proposition}

Part \textbf{(a)} of this proposition is easy (since $\deg\left(
\mathfrak{mn}\right)  =\deg\mathfrak{m}+\deg\mathfrak{n}$ for any monomials
$\mathfrak{m}$ and $\mathfrak{n}$). But why should part \textbf{(b)} be true?
It is no longer clear what a \textquotedblleft leading term\textquotedblright%
\ should be, so what guarantees us that there is not some \textquotedblleft
magic\textquotedblright\ cancellation in the highest degree when we multiply
$p$ with $q$?

There are, in fact, many different ways to define leading terms. Here is the simplest:

\begin{definition}
Let $\mathfrak{m}=x_{1}^{a_{1}}x_{2}^{a_{2}}\cdots x_{n}^{a_{n}}$ and
$\mathfrak{n}=x_{1}^{b_{1}}x_{2}^{b_{2}}\cdots x_{n}^{b_{n}}$ be two
monomials. We write $\mathfrak{m}\prec\mathfrak{n}$ (and say that
$\mathfrak{m}$ is \textbf{smaller than }$\mathfrak{n}$\textbf{ in deg-lex
order}) if and only if

\begin{itemize}
\item either $\deg\mathfrak{m}<\deg\mathfrak{n}$

\item or $\deg\mathfrak{m}=\deg\mathfrak{n}$ and the smallest $i\in\left\{
1,2,\ldots,n\right\}  $ that satisfies $a_{i}\neq b_{i}$ satisfies
$a_{i}<b_{i}$.
\end{itemize}
\end{definition}

Thus, the deg-lex order is a way to compare two monomials $\mathfrak{m}$ and
$\mathfrak{n}$, and it compares them as follows: If their degrees are
different, then the monomial with smaller degree is automatically declared to
be smaller. If their degrees are equal, then the exponents on each variable
are compared, starting with $x_{1}$ and moving up the list of variables. The
first time the exponents differ on some variable, the monomial having the
smaller exponent is declared to be smaller.

For example, writing $x_{1},x_{2},x_{3}$ as $x,y,z$, we have $x^{3}y^{2}%
z^{1}\prec z^{8}$ (since $\deg\left(  x^{3}y^{2}z^{1}\right)  <\deg\left(
z^{8}\right)  $) and $x^{3}y^{1}z^{2}\prec x^{3}y^{2}z^{1}$ (since
$\deg\left(  x^{3}y^{1}z^{2}\right)  =\deg\left(  x^{3}y^{2}z^{1}\right)  $
and $3=3$ and $1<2$) and%
\[
x^{2}\prec y^{2}z\prec xyz\prec x^{2}z\prec y^{4}\prec x^{2}y^{2}\prec
x^{3}y\prec\cdots.
\]


This deg-lex order (\textquotedblleft deg-lex\textquotedblright\ is short for
\textquotedblleft degree-lexicographic\textquotedblright) has some nice
properties, including (most importantly) the fact that if two monomials
$\mathfrak{m}$ and $\mathfrak{n}$ satisfy $\mathfrak{m}\prec\mathfrak{n}$,
then $\mathfrak{mp}\prec\mathfrak{np}$ for any further monomial $\mathfrak{p}%
$. (See \S 6.2.2 in the text for more details.)

Now, we can define use the deg-lex order to define leading coefficients for
multivariate polynomials:

\begin{definition}
Let $p\in P$ be a nonzero polynomial. Then:

\textbf{(a)} The \textbf{leading monomial} of $p$ is defined to be the largest
monomial $\mathfrak{m}$ (largest with respect to deg-lex order) that appears
in $p$. We denote this leading monomial by $\operatorname*{LM}p$.

\textbf{(b)} The \textbf{leading coefficient} of $p$ is defined to be the
coefficient $\left[  \operatorname*{LM}p\right]  p$ of $p$. It is denoted by
$\operatorname*{LC}p$.

\textbf{(c)} The \textbf{leading term} of $p$ is defined to be
$\operatorname*{LC}p\cdot\operatorname*{LM}p$.
\end{definition}

For example, the leading monomial of $\left(  x+y+3\right)  ^{2}\in
\mathbb{Q}\left[  x,y\right]  $ is $x^{2}$, and the leading coefficient is
$1$. For another example, the leading monomial of $\left(  2x+3y\right)
^{2}\in\mathbb{Q}\left[  x,y\right]  $ is $x^{2}$, the leading coefficient is
$4$, and the leading term is $4x^{2}$.

Thanks to the above $\mathfrak{mp}\prec\mathfrak{np}$ property of deg-lex
order, leading monomials behave well: In particular, when we multiply two
nonzero polynomials $p,q\in P$, their leading terms get multiplied, unless the
coefficients multiply to $0$. This yields Proposition
\ref{prop.polring.deg-pq-mulvar} \textbf{(b)}. As a consequence, we conclude:

\begin{corollary}
If $R$ is an integral domain, then the multivariate polynomial ring
$P=R\left[  x_{1},x_{2},\ldots,x_{n}\right]  $ is an integral domain as well.
\end{corollary}

(Alternatively, this can also be proved using Proposition
\ref{prop.polring.Rxn-stepwise}, since we know how to prove the univariate
case already.)

\subsection{Division with remainder}

So the deg-lex order is a nice and consistent way to break ties when deciding
what monomial of a polynomial is leading. It is not the only such way, and in
fact, the existence of many possible \textquotedblleft monomial
orders\textquotedblright\ that each fit the bill is more of a blessing than a
curse, since it allows you to pick and choose in specific problems. There is
no single best order, although the deg-lex order is perhaps the simplest to
work with. See \S 6.3.3 in the text for another important monomial order (the
lex order, which does \textbf{not} take degrees into account before comparing
exponents), and see \cite[\S 2.2]{CoLiOs15} for a general theory of monomial orders.

Having a monomial order in place, we can try to imitate the standard
\textquotedblleft long division\textquotedblright\ (i.e.,
division-with-remainder) algorithm for univariate polynomials with
multivariate polynomials. We obtain the following generalization of the
univariate division-with-remainder theorem (Theorem 3.3.8 in Lecture 25):

\begin{theorem}
[Division-with-remainder theorem for multivariate polynomials]Let $b\in P$ be
a nonzero polynomial whose leading coefficient is a unit of $R$. Let $a\in P$
be any polynomial.

Then, there is a \textbf{unique} pair $\left(  q,r\right)  $ of polynomials in
$P$ such that%
\[
a=qb+r
\]
and such that no multiples of the leading monomial of $b$ appear as monomials
in $r$.
\end{theorem}

\begin{proof}
Much like the univariate case. Note that the \textquotedblleft no multiples of
the leading monomial of $b$ appear as monomials in $r$\textquotedblright%
\ condition is a multivariate analogue of the \textquotedblleft$\deg r<\deg
b$\textquotedblright\ condition from the univariate case. See Theorem 6.3.1 in
the text for some examples.

(But note that the uniqueness is only relative to the choice of monomial
order. A different monomial order can lead to a different pair $\left(
q,r\right)  $.)
\end{proof}

\begin{corollary}
Let $b\in P$ be a nonzero polynomial whose leading coefficient is a unit of
$R$. Then, the $R$-module $P/b$ is free with basis
\[
\left(  \overline{\mathfrak{m}}\right)  _{\mathfrak{m}\text{ is a monomial
that is not a multiple of the leading monomial of }b}.
\]

\end{corollary}

This answers (at least under the \textquotedblleft leading coefficient is a
unit\textquotedblright\ condition) the question of how a quotient ring of $P$
by a single polynomial looks like.

\subsection{What about non-principal ideals?}

But recall that $P$ has non-principal ideals, too (if $n>1$). What happens if
we quotient $P$ by a non-principal ideal? In other words, what if we want to
equate several polynomials with $0$ at the same time?

Here, the theory becomes really interesting. You can try dividing with
remainder by several polynomials, but the remainder will often be non-unique.
There is a way to make remainders unique by bringing the list of polynomials
to a special form, called a \textbf{Gr\"{o}bner basis}. A taste of Gr\"{o}bner
bases can be found in \S 6.3 of the text, and a systematic introduction is
given in \cite{CoLiOs15} and in \cite{deGraaf-CA}. Let me mention that, at
least when $R$ is a field, the whole theory is algorithmic, and the algorithms
are available in most computer algebra packages. For example:

\begin{example}
Let $R=\mathbb{Q}$ and $n=3$, and write $x,y,z$ for $x_{1},x_{2},x_{3}$. Let
$I=b_{1}P+b_{2}P+b_{3}P$, where%
\begin{align*}
b_{1}  &  =x^{2}+xy,\\
b_{2}  &  =y^{2}+yz,\\
b_{3}  &  =z^{2}+zx.
\end{align*}
Does $z^{4}$ belong to $I$ ? Direct division with remainder does not help, at
least not if you are using the deg-lex order, since none of the leading
monomials of $b_{1},b_{2},b_{3}$ or any of their multiples appear in $z^{4}$
(keep in mind that the leading monomial of $b_{3}$ is $zx$, not $z^{2}$).
However, if you first compute the Gr\"{o}bner basis of $I$, and then divide
$z^{4}$ with remainder by that Gr\"{o}bner basis, then you obtain the
remainder $0$, which shows that $z^{4}$ does belong to $I$.

For example, the
\href{https://sagecell.sagemath.org/?z=eJwL0LOp0FGo1FGoslOwVQjIz6nMy8_NTMwJysxL1wgM1OTyBAnrZaakJuZoVMQZKWgrVGgBlVeCmZVaVUCdYGaVVgVQsV56UX5qUl5qUXxSYnFmsYYmAFkYHJ0=&lang=sage&interacts=eJyLjgUAARUAuQ==}{SageMath}
computer algebra system computes the Gr\"{o}bner basis to be%
\[
\left(  x^{2}+xy,\ \ y^{2}+yz,\ \ xz+z^{2},\ \ yz^{2}-z^{3},\ \ z^{4}\right)
,
\]
which makes it particularly clear that $z^{4}\in I$.
\end{example}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[CoLiOs15]{CoLiOs15}David A. Cox, John Little, Donal O'Shea,
\textit{Ideals, Varieties, and Algorithms}, Undergraduate Texts in
Mathematics, 4th edition, Springer 2015.\newline\url{https://dx.doi.org/10.1007/978-3-319-16721-3}

\bibitem[deGraa20]{deGraaf-CA}Willem de Graaf, \textit{Computational Algebra},
5 August 2021.\newline\url{https://www.science.unitn.it/~degraaf/algnotes/compalg.pdf}
\end{thebibliography}


\end{document}