\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,hidelinks]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{enumitem}
\usepackage{xr}
\usepackage{tabls}
\usepackage{ytableau}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[type={CC}, modifier={zero}, version={1.0},]{doclicense}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Monday, October 05, 2026 21:09:05}
%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
\pgfplotsset{compat=1.13}
\externaldocument{lec01-331}
\externaldocument{lec02-331}
\externaldocument{lec04-331}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newtheorem{exer}{Exercise}[subsubsection]
\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}
\usetikzlibrary{arrows,arrows.meta,decorations.markings}
\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{\mono}{\hookrightarrow}
\newcommand{\epi}{\twoheadrightarrow}
\newcommand{\iso}{\overset{\cong}{\to}}
\newcommand{\arinj}{\ar@{_{(}->}}
\newcommand{\arinjrev}{\ar@{^{(}->}}
\newcommand{\arsurj}{\ar@{->>}}
\newcommand{\arelem}{\ar@{|->}}
\newcommand{\arback}{\ar@{<-}}
\newcommand{\Ker}{\operatorname{Ker}}
\newcommand{\Coker}{\operatorname{Coker}}
\newcommand{\incpdftexpic}[1]{{\def\svgwidth{\columnwidth} \input{#1} }}
\definecolor{dbluecolor}{rgb}{0.01,0.02,0.7}
\definecolor{dgreencolor}{rgb}{0.2,0.4,0.0}
\definecolor{darkred}{rgb}{0.7,0,0}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Math 331, Fall 2026, Lecture 5, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 331 Fall 2026, Lecture 5: Powers}

\textbf{website:}
\texttt{\href{https://www.cip.ifi.lmu.de/~grinberg/t/26fa}{\texttt{https://www.cip.ifi.lmu.de/\symbol{126}%
grinberg/t/26fa/}}}

(GPT-6 was used to polish the writing that follows, and to draw pictures.)

\setcounter{section}{1}\setcounter{subsection}{6}

\subsection{Powers}

\label{sec.sg.powers}

\subsubsection{Definition of the \texorpdfstring{$n$}{n}-th power}

\label{sec.sg.powers.definition}

We have defined the product of $n$ elements of a semigroup. If these $n$
elements are all equal to a single element $a$, this product is called a
power, just as for numbers. Again, just as for numbers, we can extend this
definition to $n=0$ when there is a neutral element, and to negative $n$ when
$a$ is invertible:

\begin{definition}
\phantomsection
\label{def.sg.powers} Let $S$ be a semigroup (written multiplicatively), and
let $a\in S$ be arbitrary.

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{def.sg.powers.a} For any positive integer $n$, we define
\[
a^{n}:=\underbrace{aa\cdots a}_{n\text{ times}}.
\]
(Thus, $a^{1}=a$ and $a^{2}=aa$ and $a^{3}=aaa$ and so on.)

\item \label{def.sg.powers.b} If $S$ is a monoid, then we define%
\[
a^{0}:=1\qquad\left(  \text{the neutral element of }S\right)  .
\]


Thus, in this case, $a^{n}$ is defined for all $n\in\mathbb{N}$ (where
$\mathbb{N}=\mathbb{Z}_{\geq0}=\left\{  0,1,2,\ldots\right\}  $ is the set of
all nonnegative integers).

\item \label{def.sg.powers.c} If $S$ is a monoid and $a$ has an inverse, then
we define%
\[
a^{n}:=\left(  a^{-1}\right)  ^{-n}\qquad\text{for all negative integers }n.
\]
Thus, in this case, $a^{n}$ is defined for all $n\in\mathbb{Z}$.
\end{enumerate}

We refer to $a^{n}$ as the $n$\textbf{-th power} of $a$.
\end{definition}

(The attentive reader will have noticed that we have previously defined
$a^{-1}$ to mean the inverse of $a$, whereas now $a^{-1}$ acquires a new
meaning thanks to Definition \ref{def.sg.powers} \textbf{(c)}. Have we given
the same name to two different things? No, because the new meaning of $a^{-1}$
agrees precisely with its old meaning. Indeed, Definition \ref{def.sg.powers}
\textbf{(c)} (applied to $n=-1$) yields $a^{-1}:=\left(  a^{-1}\right)
^{-\left(  -1\right)  }$, where the $a^{-1}$ on the left-hand side is the new
meaning while the $a^{-1}$ on the right-hand side is the old one. Since
$\left(  a^{-1}\right)  ^{-\left(  -1\right)  }=\left(  a^{-1}\right)
^{1}=a^{-1}$, this is saying that the new $a^{-1}$ equals the old $a^{-1}$,
and everything is good.)

\subsubsection{Laws of exponents: nonnegative powers}

\label{sec.sg.powers.nonnegative}

\Needspace{9\baselineskip} What rules do you expect the powers to satisfy? For
powers of numbers, we know the laws of exponents:

\begin{itemize}
\item We have $a^{n}a^{m}=a^{n+m}$.

\item We have $\left(  a^{n}\right)  ^{m}=a^{nm}$.

\item We have $a^{-n}=\left(  a^{-1}\right)  ^{n}$ (when $a$ has an inverse).

\item We have $\left(  ab\right)  ^{n}=a^{n}b^{n}$.
\end{itemize}

We will soon see which of these laws still hold for elements of a semigroup
(potentially assuming that an inverse exists). Not all of them do! Can you
tell which ones don't?

Let us prove them one by one (the ones that do hold). We start with the ones
that don't involve inverses or negative powers, as they are the easiest.

\begin{convention}
\phantomsection\label{conv.sg.powers.multiplicative} All semigroups (and thus
all monoids and groups) in this section will be written multiplicatively. In
particular, their neutral elements, when they exist, will be denoted by $1$.
The inverse $a^{-1}$ of an element $a$ (when it exists) thus satisfies
$aa^{-1}=a^{-1}a=1$.
\end{convention}

\begin{theorem}
\phantomsection\label{thm.sg.powers.add} Let $S$ be a semigroup. Let $a\in S$. Then:

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{thm.sg.powers.add.a} For any positive integers $n$ and $m$, we
have $a^{n}a^{m}=a^{n+m}$.

\item \label{thm.sg.powers.add.b} Assume that $S$ is a monoid. Then,
$a^{n}a^{m}=a^{n+m}$ holds for all nonnegative integers $n$ and $m$.
\end{enumerate}
\end{theorem}

\begin{proof}
\leavevmode


\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=0pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.thm.sg.powers.add.a}Let $n$ and $m$ be two positive integers.
Generalized associativity (Theorem \ref{thm.sg.genass} \textbf{(a)} from
Lecture 4, applied to $n+m$ and $n$ instead of $n$ and $k$) yields%
\[
\underbrace{a\ast a\ast\cdots\ast a}_{n+m\text{ times}}=\underbrace{\left(
a\ast a\ast\cdots\ast a\right)  }_{n\text{ times}}\ast\underbrace{\left(
a\ast a\ast\cdots\ast a\right)  }_{m\text{ times}}.
\]
Since we are writing $S$ multiplicatively, this equality takes the form%
\[
\underbrace{aa\cdots a}_{n+m\text{ times}}=\underbrace{\left(  aa\cdots
a\right)  }_{n\text{ times}}\underbrace{\left(  aa\cdots a\right)  }_{m\text{
times}}.
\]
But this is saying precisely that $a^{n+m}=a^{n}a^{m}$ (since we defined the
positive powers $a^{k}$ to be $\underbrace{aa\cdots a}_{k\text{ times}}$).
This proves part \textbf{(\ref{thm.sg.powers.add.a})} of the theorem.

\item \label{pf.thm.sg.powers.add.b}Let $n$ and $m$ be two nonnegative
integers. We must prove that $a^{n}a^{m}\overset{?}{=}a^{n+m}$. If both $n$
and $m$ are positive, then this follows from part
\textbf{(\ref{thm.sg.powers.add.a})}. It remains to handle the cases when
$n=0$ and when $m=0$. If $n=0$, then the claim $a^{n}a^{m}\overset{?}{=}%
a^{n+m}$ becomes $a^{0}a^{m}\overset{?}{=}a^{0+m}$, that is, $1a^{m}%
\overset{?}{=}a^{m}$, which is true because $1$ is neutral. The case $m=0$ can
be handled similarly. \qedhere

\end{enumerate}
\end{proof}

\begin{theorem}
\phantomsection
\label{thm.sg.powers.mul} Let $S$ be a semigroup. Let $a\in S$. Then:

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{thm.sg.powers.mul.a} For any positive integers $n$ and $m$, we
have $\left(  a^{n}\right)  ^{m}=a^{nm}$.

\item \label{thm.sg.powers.mul.b} Assume that $S$ is a monoid. Then, $\left(
a^{n}\right)  ^{m}=a^{nm}$ holds for all nonnegative integers $n$ and $m$.
\end{enumerate}
\end{theorem}

\begin{proof}
\leavevmode


\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=0pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.thm.sg.powers.mul.a} Fix a positive integer $n$. We induct on
$m$. The \textit{base case} (the case $m=1$) says that $\left(  a^{n}\right)
^{1}=a^{n\cdot1}$, which is clearly true (both sides are $a^{n}$). For the
\textit{induction step} (from $m$ to $m+1$), we fix a positive integer $m$ and
assume that $\left(  a^{n}\right)  ^{m}=a^{nm}$; and we set out to prove that
$\left(  a^{n}\right)  ^{m+1}\overset{?}{=}a^{n\left(  m+1\right)  }$. We note
that Theorem~\ref{thm.sg.powers.add} \textbf{(a)} (applied to $a^{n}$, $m$ and
$1$ instead of $a$, $n$ and $m$) yields $\left(  a^{n}\right)  ^{m}\left(
a^{n}\right)  ^{1}=\left(  a^{n}\right)  ^{m+1}$. Hence,\footnote{The
shorthand \textquotedblleft IH\textquotedblright\ means \textquotedblleft
induction hypothesis\textquotedblright.}%
\begin{align*}
\left(  a^{n}\right)  ^{m+1}  &  =\underbrace{\left(  a^{n}\right)  ^{m}%
}_{\substack{=a^{nm}\\\text{(by the IH)}}}\underbrace{\left(  a^{n}\right)
^{1}}_{=a^{n}}\\
&  =a^{nm}a^{n}=a^{nm+n}\qquad\left(  \text{by Theorem~\ref{thm.sg.powers.add}
\textbf{(a)}}\right) \\
&  =a^{n\left(  m+1\right)  }\qquad\left(  \text{since }nm+n=n\left(
m+1\right)  \right)  ,
\end{align*}
which is precisely what we wanted to prove. Thus, the induction is complete,
and part \textbf{(a)} is proved.

\item \label{pf.thm.sg.powers.mul.b} This is analogous to part \textbf{(a)},
with just two changes: Instead of using Theorem~\ref{thm.sg.powers.add}
\textbf{(a)}, we must now use Theorem~\ref{thm.sg.powers.add} \textbf{(b)}
(since $n$ and $m$ can be $0$). Moreover, the base case is now the case $m=0$
(not $m=1$), but is equally easy because it boils down to $1=1$ (since the
$0$-th power of any element of $S$ is defined to be $1$). \qedhere

\end{enumerate}
\end{proof}

Next, we could try to prove the rule $\left(  ab\right)  ^{n}=a^{n}b^{n}$ for
all $a,b\in S$ and $n>0$; but we would soon hit a hurdle: even for $n=2$, we
cannot transform $\left(  ab\right)  ^{2}=abab$ into $a^{2}b^{2}=aabb$ without
swapping factors, which is not allowed by our axioms. And in fact, $\left(
ab\right)  ^{n}=a^{n}b^{n}$ is not generally true in a semigroup, or even in a
group. Here is a counterexample:

\begin{example}
\phantomsection\label{exa.group.powers.noncomm} Let $S_{3}$ be the group of
all bijective maps from $\left\{  1,2,3\right\}  $ to $\left\{  1,2,3\right\}
$ with respect to composition (that is, $fg$ means $f\circ g$). These
bijective maps are called the \emph{permutations} of $\left\{  1,2,3\right\}
$, and we will learn more about them soon. Consider the two specific
permutations $s_{1}\in S_{3}$ and $s_{2}\in S_{3}$ given by%
\[%
\begin{array}
[c]{ccc}%
s_{1}(1)=2,\qquad & s_{1}(2)=1,\qquad & s_{1}(3)=3,\\
s_{2}(1)=1,\qquad & s_{2}(2)=3,\qquad & s_{2}(3)=2.
\end{array}
\]
Then, $s_{1}^{2}=s_{1}s_{1}=s_{1}\circ s_{1}=\operatorname*{id}=1$ and
similarly $s_{2}^{2}=1$. But $s_{1}s_{2}$ is the $3$-cycle that sends $1,2,3$
to $2,3,1$, respectively; its square $\left(  s_{1}s_{2}\right)  ^{2}$ is the
other $3$-cycle that sends $1,2,3$ to $3,1,2$, respectively. So $\left(
s_{1}s_{2}\right)  ^{2}\neq1$ but $s_{1}^{2}s_{2}^{2}=1\cdot1=1$. Thus,
$\left(  ab\right)  ^{2}=a^{2}b^{2}$ does not hold for $a=s_{1}$ and $b=s_{2}$.
\end{example}

So we cannot expect $\left(  ab\right)  ^{n}=a^{n}b^{n}$ as a general rule.
However, it does hold when $a$ and $b$ commute, i.e., when $ab=ba$. That is:

\begin{theorem}
\phantomsection\label{thm.sg.powers.prod} Let $S$ be a semigroup. Let $a,b\in
S$ be such that $ab=ba$. Then,
\begin{equation}
\left(  ab\right)  ^{n}=a^{n}b^{n}\qquad\text{for each }n\in\mathbb{Z}_{>0}.
\label{eq.thm.sg.powers.prod.eq}%
\end{equation}
This also holds for $n=0$ if $S$ is a monoid.
\end{theorem}

We defer the proof of this theorem until later.

%The following proof was written by GPT-6.1. I will probably prove it
%differently later on.


%\begin{proof}
%Before proving the formula, we need to justify moving $a$ past a power of
%$b$. We claim that
%\[
%b^{r}a=ab^{r}\qquad\text{for every positive integer }r.
%\]
%We prove this auxiliary claim by induction on $r$. For $r=1$, it is just
%$ba=ab$, which is one of our assumptions. For the induction step, assume
%that $b^{r}a=ab^{r}$. Then,
%\begin{align*}
%b^{r+1}a
%&=b\left(b^{r}a\right)
%=b\left(ab^{r}\right)\\
%&=(ba)b^{r}
%=(ab)b^{r}
%=ab^{r+1}.
%\end{align*}
%Here we have used associativity, the induction hypothesis, $ba=ab$, and
%Theorem~\ref{thm.sg.powers.add}~\textbf{(\ref{thm.sg.powers.add.a})}.
%Thus, the auxiliary claim is proved.


%Now we prove~\eqref{eq.thm.sg.powers.prod.eq} by induction on the positive
%integer $n$. The \textit{base case} $n=1$ says $ab=ab$. For the
%\textit{induction step}, assume that $(ab)^{n}=a^{n}b^{n}$. Then,
%\begin{align*}
%(ab)^{n+1}
%&=(ab)^{n}(ab)\\
%&=a^{n}b^{n}ab\\
%&=a^{n}ab^{n}b\\
%&=a^{n+1}b^{n+1}.
%\end{align*}
%The second equality uses the induction hypothesis. The third uses the
%auxiliary claim $b^{n}a=ab^{n}$; this is exactly the rearrangement of factors
%that we needed to justify. The first and last equalities use
%Theorem~\ref{thm.sg.powers.add}~\textbf{(\ref{thm.sg.powers.add.a})}.
%This completes the induction.


%Finally, if $S$ is a monoid, then the case $n=0$ is also valid, since
%$(ab)^{0}=1=1\cdot1=a^{0}b^{0}$.
%\end{proof}


Also, there is a problem on homework set \#1 that claims that
\eqref{eq.thm.sg.powers.prod.eq} holds when $ab$ is central, i.e., when $ab$
commutes with all elements of $S$.

\subsubsection{Laws of exponents: negative powers}

\label{sec.sg.powers.negative}

\Needspace{7\baselineskip} Now we come to the rules of exponents that contain
inverses. We begin with the most basic one:

\begin{theorem}
\phantomsection
\label{thm.monoid.powers.neg} Let $S$ be a monoid. Let $a\in S$ have an
inverse. Then,%
\[
a^{-n}=\left(  a^{-1}\right)  ^{n}\qquad\text{for each }n\in\mathbb{Z}.
\]

\end{theorem}

\begin{proof}
Let $n\in\mathbb{Z}$. We must prove that $a^{-n}\overset{?}{=}\left(
a^{-1}\right)  ^{n}$. We distinguish between three cases, depending on the
sign of the integer $n$:

\begin{enumerate}
[label=\textit{Case \arabic*:},ref=\arabic*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.thm.monoid.powers.neg.positive} We have $n>0$. In this case,
$-n$ is negative, so the definition of $a^{-n}$ (see
Definition~\ref{def.sg.powers}~\textbf{(\ref{def.sg.powers.c})}) yields
$a^{-n}=\left(  a^{-1}\right)  ^{-\left(  -n\right)  }=\left(  a^{-1}\right)
^{n}$, which is precisely our claim.

\item \label{pf.thm.monoid.powers.neg.zero} We have $n=0$. In this case, our
claim just says $a^{-0}\overset{?}{=}\left(  a^{-1}\right)  ^{0}$, which is
simply saying that $1=1$.

\item \label{pf.thm.monoid.powers.neg.negative} We have $n<0$. The element
$a^{-1}$ is itself invertible, with inverse $a$, by
Theorem~\ref{thm.monoid.inverse-rules}~\textbf{(a)} from Lecture 2--3. Thus,
negative powers of $a^{-1}$ are defined, and we can apply
Definition~\ref{def.sg.powers}~\textbf{(\ref{def.sg.powers.c})} to $a^{-1}$
instead of $a$. This gives
\[
\left(  a^{-1}\right)  ^{n}=\left(  \underbrace{\left(  a^{-1}\right)  ^{-1}%
}_{=a}\right)  ^{-n}=a^{-n},
\]
so that $a^{-n}=\left(  a^{-1}\right)  ^{n}$. But this is precisely our claim.
\end{enumerate}

Thus, we have proved Theorem \ref{thm.monoid.powers.neg} in all three cases.
\end{proof}

The following lemma will be used in the proof of
Theorem~\ref{thm.monoid.powers.add} below:

\begin{lemma}
\phantomsection\label{lem.monoid.powers.succ} Let $S$ be a monoid. Let $a\in
S$ have an inverse. Then:

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{lem.monoid.powers.succ.a} We have $a^{n}a=a^{n+1}$ for all
$n\in\mathbb{Z}$.

\item \label{lem.monoid.powers.succ.b} We have $aa^{n}=a^{n+1}$ for all
$n\in\mathbb{Z}$.
\end{enumerate}
\end{lemma}

\begin{proof}
\leavevmode


\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=0pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.lem.monoid.powers.succ.a} Let $n\in\mathbb{Z}$. We must prove
that $a^{n}a\overset{?}{=}a^{n+1}$. We again distinguish between three cases:
$n>-1$ and $n=-1$ and $n<-1$.

\begin{enumerate}
[label=\textit{Case \arabic*:},ref=\arabic*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.lem.monoid.powers.succ.nonnegative} We have $n>-1$. Thus,
$n\geq0$ (since $n$ is an integer). Therefore, we can apply Theorem
\ref{thm.sg.powers.add} \textbf{(b)} to $m=1$. This yields $a^{n}a^{1}%
=a^{n+1}$; in other words, $a^{n}a=a^{n+1}$ (since $a^{1}=a$). Thus, we are
done in Case~\ref{pf.lem.monoid.powers.succ.nonnegative}.

\item \label{pf.lem.monoid.powers.succ.minus-one} We have $n=-1$. Thus,
$n+1=0$, so that our claim $a^{n}a\overset{?}{=}a^{n+1}$ rewrites as
$a^{-1}a\overset{?}{=}a^{0}$. But this is true because both sides of this
equality are $1$.

\item \label{pf.lem.monoid.powers.succ.negative} We have $n<-1$. In this case,
both $n$ and $n+1$ are negative, so that the respective powers $a^{n}$ and
$a^{n+1}$ are defined by $a^{n}=\left(  a^{-1}\right)  ^{-n}$ and
$a^{n+1}=\left(  a^{-1}\right)  ^{-\left(  n+1\right)  }$ (see
Definition~\ref{def.sg.powers}~\textbf{(\ref{def.sg.powers.c})}). Therefore,
the desired claim $a^{n}a\overset{?}{=}a^{n+1}$ rewrites as%
\[
\left(  a^{-1}\right)  ^{-n}a\overset{?}{=}\left(  a^{-1}\right)  ^{-\left(
n+1\right)  }.
\]
Moving the $a$ onto the right-hand side (using Theorem \ref{thm.monoid.cancel}
\textbf{(b)} from Lecture 4, applied to $b=\left(  a^{-1}\right)  ^{-n}$ and
$c=\left(  a^{-1}\right)  ^{-\left(  n+1\right)  }$), we see that this claim
is equivalent to%
\[
\left(  a^{-1}\right)  ^{-n}\overset{?}{=}\left(  a^{-1}\right)  ^{-\left(
n+1\right)  }a^{-1}.
\]
If we set $b:=a^{-1}$ and $k:=-\left(  n+1\right)  $ (this is a nonnegative
integer because $n<-1$), then we can rewrite this as%
\[
b^{k+1}\overset{?}{=}b^{k}b
\]
(since $k=-\left(  n+1\right)  $ entails $k+1=-\left(  n+1\right)  +1=-n$).
But this follows easily from Theorem \ref{thm.sg.powers.add} \textbf{(b)}:
Indeed, $k$ is nonnegative, so that Theorem \ref{thm.sg.powers.add}
\textbf{(b)} (applied to $b$, $k$ and $1$ instead of $a$, $n$ and $m$) yields
$b^{k+1}=b^{k}b^{1}=b^{k}b$.
\end{enumerate}

\item \label{pf.lem.monoid.powers.succ.b} This follows by reading all products
in the proof of part~\textbf{(\ref{lem.monoid.powers.succ.a})} right-to-left.
(For example, instead of \textquotedblleft$\left(  a^{-1}\right)  ^{-\left(
n+1\right)  }a^{-1}$\textquotedblright, read \textquotedblleft$a^{-1}\left(
a^{-1}\right)  ^{-\left(  n+1\right)  }$\textquotedblright.) \qedhere

\end{enumerate}
\end{proof}

\Needspace{8\baselineskip} We can now extend Theorem \ref{thm.sg.powers.add}
to negative powers of $a$, provided that $a$ has an inverse:

\begin{theorem}
\phantomsection\label{thm.monoid.powers.add} Let $S$ be a monoid. Let $a\in S$
have an inverse. Then,%
\[
a^{n}a^{m}=a^{n+m}\qquad\text{for all integers }n\text{ and }m.
\]

\end{theorem}

\begin{proof}
Fix $n\in\mathbb{Z}$. We must prove that $a^{n}a^{m}=a^{n+m}$ for all integers
$m$.

We do this by two-sided induction on $m$. Recall that \textbf{two-sided
induction} is an analogue of the usual method of induction that can be used to
prove a statement for \textbf{all} integers (not just for the nonnegative
ones, or the ones that are $\geq g$ for a given lower bound $g$). It proceeds
as follows: If we want to prove a certain statement $\mathcal{A}\left(
m\right)  $ for all integers $m$, then we must show that

\begin{enumerate}
\item \label{pf.thm.monoid.powers.add.induction-base} it holds for
\textbf{some} integer $m$ (we often take $m=0$, but we can just as well take
any other integer), and that

\item \label{pf.thm.monoid.powers.add.induction-step} for each integer $m$,
the \textbf{equivalence} $\mathcal{A}\left(  m\right)  \Longleftrightarrow
\mathcal{A}\left(  m+1\right)  $ holds (i.e., that $\mathcal{A}\left(
m\right)  $ implies $\mathcal{A}\left(  m+1\right)  $ but also the other way round).
\end{enumerate}

\noindent The first of these two steps is called the \textit{base case}; the
second is called the \textit{(two-sided) induction step}. Unlike in regular
induction, the induction step requires proving the equivalence $\mathcal{A}%
\left(  m\right)  \Longleftrightarrow\mathcal{A}\left(  m+1\right)  $ rather
than merely the implication $\mathcal{A}\left(  m\right)  \Longrightarrow
\mathcal{A}\left(  m+1\right)  $. As a consequence, if we have shown
$\mathcal{A}\left(  0\right)  $ as our base case, then we obtain both chains
of implications
\[
\begin{aligned}
&\mathcal{A}(0)\Longrightarrow\mathcal{A}(1)
\Longrightarrow\mathcal{A}(2)\Longrightarrow\cdots,\\
&\mathcal{A}(0)\Longrightarrow\mathcal{A}(-1)
\Longrightarrow\mathcal{A}(-2)\Longrightarrow\cdots.
\end{aligned}
\]
These two chains together entail that $\mathcal{A}(m)$ holds for all integers
$m$.

So let us apply this to our situation, in which the statement $\mathcal{A}%
\left(  m\right)  $ that we must prove is saying that $a^{n}a^{m}=a^{n+m}$. We
prove this by two-sided induction. As the \textit{base case}, we pick the case
$m=0$; that is, we show that $\mathcal{A}\left(  0\right)  $ holds. This boils
down to the identity $a^{n}a^{0}=a^{n+0}$, which is indeed true because
$a^{n}\underbrace{a^{0}}_{=1}=a^{n}1=a^{n}$ and $a^{n+0}=a^{n}$. For the
\textit{induction step}, we fix an integer $m$; we must then prove the
equivalence $\mathcal{A}\left(  m\right)  \Longleftrightarrow\mathcal{A}%
\left(  m+1\right)  $. However, the statement $\mathcal{A}\left(  m+1\right)
$ says that $a^{n}a^{m+1}=a^{n+m+1}$. Meanwhile,
Lemma~\ref{lem.monoid.powers.succ} tells us that $a^{m}a=a^{m+1}$ and
$a^{n+m}a=a^{n+m+1}$. Now, we have the following chain of equivalences:
\begin{align*}
\mathcal{A}(m+1)\  &  \Longleftrightarrow\ \left(  a^{n}\underbrace{a^{m+1}%
}_{=a^{m}a}=\underbrace{a^{n+m+1}}_{=a^{n+m}a}\right) \\
\  &  \Longleftrightarrow\ \left(  a^{n}a^{m}a=a^{n+m}a\right) \\
\  &  \Longleftrightarrow\ \left(  a^{n}a^{m}=a^{n+m}\right)
\ \ \ \ \ \ \ \ \ \ \left(  \text{see below}\right) \\
\  &  \Longleftrightarrow\ \mathcal{A}(m).
\end{align*}
(The third equivalence here is obtained by right cancellation of $a$, which is
legitimate because $a$ has an inverse. More precisely, it is
Theorem~\ref{thm.monoid.cancel}~\textbf{(d)} from Lecture 4, applied to
$b=a^{n}a^{m}$ and $c=a^{n+m}$.) In other words, we have $\mathcal{A}\left(
m\right)  \Longleftrightarrow\mathcal{A}\left(  m+1\right)  $. But this is
precisely what we had to prove in order to complete our induction step. Thus,
we are done with the induction and thus with the proof of the theorem.
\end{proof}

In order to extend the $\left(  a^{n}\right)  ^{m}=a^{nm}$ rule (Theorem
\ref{thm.sg.powers.mul}) to negative $n$'s and $m$'s, we must first show that
the existence of an inverse is inherited by the powers of an element. That is:

\begin{lemma}
\label{lem.monoid.powers.neg-pow}Let $S$ be a monoid. Let $a\in S$ have an
inverse. Let $n\in\mathbb{Z}$. Then, $a^{n}$ has an inverse, and this inverse
is $\left(  a^{n}\right)  ^{-1}=a^{-n}$.
\end{lemma}

\begin{proof}
Theorem~\ref{thm.monoid.powers.add} gives
\[
a^{n}a^{-n}=a^{n+\left(  -n\right)  }=a^{0}=1\qquad\text{and}\qquad
a^{-n}a^{n}=a^{\left(  -n\right)  +n}=a^{0}=1.
\]
These two equalities show that $a^{-n}$ is an inverse of $a^{n}$. This proves
Lemma \ref{lem.monoid.powers.neg-pow}.
\end{proof}

Now we can state our negative version of Theorem \ref{thm.sg.powers.mul}:

\begin{theorem}
\phantomsection
\label{thm.monoid.powers.mul} Let $S$ be a monoid. Let $a\in S$ have an
inverse. Then,%
\[
\left(  a^{n}\right)  ^{m}=a^{nm}\qquad\text{for all integers }n\text{ and
}m.
\]

\end{theorem}

\begin{proof}
This will be on homework set \#2.
\end{proof}

\Needspace{10\baselineskip} We can extend Theorem \ref{thm.sg.powers.prod} as well:

\begin{theorem}
\phantomsection
\label{thm.monoid.powers.prod} Let $S$ be a monoid. Let $a,b\in S$ be two
elements that have inverses and satisfy $ab=ba$. Then,
\[
\left(  ab\right)  ^{n}=a^{n}b^{n}\qquad\text{for each }n\in\mathbb{Z}.
\]

\end{theorem}

\begin{proof}
This will be on homework set \#2.
\end{proof}

All the above results about semigroups and monoids can, of course, be applied
to groups. In this setting, they become even easier to state, because we no
longer need to require our elements to have inverses; after all, every element
in a group has an inverse by definition. We will mostly use these results in
the setting of a group.

\subsubsection{Powers in finite semigroups}

\label{sec.sg.powers.finite}

For \textbf{finite} semigroups, the powers of a given element form an
eventually periodic sequence (not necessarily periodic from the start):

\begin{theorem}
\phantomsection
\label{thm.sg.powers.periodic} Let $S$ be a \textbf{finite} semigroup. Let
$a\in S$. Then:

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{thm.sg.powers.periodic.a} There exist positive integers $n>m$
such that $a^{n}=a^{m}$.

\item \label{thm.sg.powers.periodic.b} The sequence $\left(  a^{1},a^{2}%
,a^{3},\ldots\right)  $ is periodic from some point on. That is, there exist
positive integers $m$ and $p$ such that all $k\geq m$ satisfy $a^{k}=a^{k+p}$.
\end{enumerate}
\end{theorem}

\begin{proof}
\leavevmode


\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=0pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.thm.sg.powers.periodic.a} Set $N:=\left\vert S\right\vert $,
the number of elements of $S$. (This is an actual integer, since $S$ is
finite.) The $N+1$ elements
\[
a^{1},a^{2},\ldots,a^{N+1}%
\]
all belong to the $N$-element set $S$. Thus, two of them must be equal (since
the pigeonhole principle says that $N+1$ elements in an $N$-element set cannot
all be distinct). In other words, there are integers $1\leq m<n\leq N+1$ such
that $a^{n}=a^{m}$. This proves part \textbf{(a)}.

\item \label{pf.thm.sg.powers.periodic.b} Part
\textbf{(\ref{thm.sg.powers.periodic.a})} tells us that there exist positive
integers $n>m$ such that $a^{n}=a^{m}$. Consider them, and set $p:=n-m$. Then,
$n=m+p$, so that $a^{n}=a^{m+p}$ and therefore $a^{m+p}=a^{n}=a^{m}$. So the
equality $a^{k}=a^{k+p}$ holds at least for $k=m$. However, if this equality
holds for a given integer $k\geq m$, then it holds for $k+1$ as well, because
Theorem~\ref{thm.sg.powers.add}~\textbf{(\ref{thm.sg.powers.add.a})} yields
\begin{align*}
a^{k+1}  &  =\underbrace{a^{k}}_{=a^{k+p}}a^{1}=a^{k+p}a^{1}=a^{k+p+1}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{again by Theorem~\ref{thm.sg.powers.add}%
~\textbf{(\ref{thm.sg.powers.add.a})}}\right) \\
&  =a^{k+1+p}.
\end{align*}


Thus, by induction, it holds for all $k\geq m$. This proves part \textbf{(b)}.
\qedhere

\end{enumerate}
\end{proof}

\begin{remark}
\label{rmk.thm.sg.powers.periodic.pic}The following picture visualizes the
powers of an arbitrary element $a$ in a finite semigroup:%
\[
\begin{tikzpicture}[>=Stealth, line width=0.65pt,
every node/.style={inner sep=2pt},
power/.style={circle,draw,minimum size=15mm,inner sep=1pt}]
\def\cycleradius{2.15}
% The tail starts with a^1: a semigroup need not have an identity.
\node[power] (tail1) at (-10.2,0) {$a^1$};
\node[power] (tail2) at (-8.2,0) {$a^2$};
\node[power] (tailend) at (-4.25,0) {$a^{m-1}$};
% The cycle has length p; its last arrow returns to a^m, not to a^0.
\node[power] (am) at (180:\cycleradius) {$a^m$};
\node[power] (am1) at (120:\cycleradius) {$a^{m+1}$};
\node[power] (am2) at (60:\cycleradius) {$a^{m+2}$};
\node[power] (amp2) at (-60:\cycleradius) {$a^{m+p-2}$};
\node[power] (amp1) at (-120:\cycleradius) {$a^{m+p-1}$};
\draw[->] (tail1) -- node[above=3pt] {$\cdot a$} (tail2);
\draw[densely dotted] (tail2.east) -- (-6.65,0);
\node at (-6.2,0) {$\cdots$};
\draw[densely dotted] (-5.75,0) -- (tailend.west);
\draw[->] (tailend) -- node[above=3pt] {$\cdot a$} (am);
\draw[->] (159:\cycleradius)
arc[start angle=159,end angle=141,radius=\cycleradius]
node[midway,above left=3pt] {$\cdot a$};
\draw[->] (99:\cycleradius)
arc[start angle=99,end angle=81,radius=\cycleradius]
node[midway,above=3pt] {$\cdot a$};
\draw[densely dotted] (39:\cycleradius)
arc[start angle=39,end angle=12,radius=\cycleradius];
\node[rotate=90] at (0:\cycleradius) {$\cdots$};
\draw[densely dotted] (-12:\cycleradius)
arc[start angle=-12,end angle=-39,radius=\cycleradius];
\draw[->] (-81:\cycleradius)
arc[start angle=-81,end angle=-99,radius=\cycleradius]
node[midway,below=3pt] {$\cdot a$};
\draw[->] (-141:\cycleradius)
arc[start angle=-141,end angle=-159,radius=\cycleradius]
node[midway,below left=3pt] {$\cdot a$};
\end{tikzpicture}
\]
Here, the nodes are the (positive) powers of $a$; each solid arrow means right
multiplication by $a$. Repeated multiplication by $a$ eventually leads us into
a cycle, as Theorem~\ref{thm.sg.powers.periodic}~\textbf{(a)} predicts. Note
that it can happen that $a^{1}$ is already part of that cycle; in this case,
the \textquotedblleft tail\textquotedblright\ (the part of the chain from
$a^{1}$ to $a^{m}$) is reduced to a single node. Also, it is possible that the
cycle consists of just a single node (i.e., that $a^{m}=a^{m+1}$) with an arc
looping directly back into it.
\end{remark}

For an element with an inverse (in a monoid), Theorem
\ref{thm.sg.powers.periodic} can be improved, yielding a \textbf{purely}
periodic sequence:

\begin{theorem}
\phantomsection\label{thm.group.powers.periodic} Let $S$ be a \textbf{finite}
monoid. Let $a\in S$ have an inverse. Then:

\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=4pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{thm.group.powers.periodic.a} There exists a positive integer $n$
such that $a^{n}=1$.

\item \label{thm.group.powers.periodic.b} The sequence $\left(  a^{0}%
,a^{1},a^{2},\ldots\right)  $ is purely periodic (i.e., the period starts
right away). That is, there exists some positive integer $n$ such that all
$k\geq0$ satisfy $a^{k}=a^{k+n}$.
\end{enumerate}
\end{theorem}

\begin{proof}
\leavevmode


\begin{enumerate}
[label=\textbf{(\alph*)},ref=\alph*,leftmargin=*, topsep=0pt,partopsep=0pt,itemsep=4pt,parsep=0pt]

\item \label{pf.thm.group.powers.periodic.a} Theorem
\ref{thm.sg.powers.periodic} \textbf{(\ref{thm.sg.powers.periodic.a})} tells
us that there exist positive integers $n>m$ such that $a^{n}=a^{m}$. Consider
these $n$ and $m$, and set $p:=n-m>0$. Then, $n=m+p$, so that $a^{n}%
=a^{m+p}=a^{m}a^{p}$ (by Theorem \ref{thm.sg.powers.add} \textbf{(a)}).
Comparing this with $a^{n}=a^{m}=a^{m}1$, we obtain%
\begin{equation}
a^{m}a^{p}=a^{m}1. \label{pf.thm.group.powers.periodic.a.1}%
\end{equation}
But $a$ has an inverse, so $a^{m}$ also has an inverse (by Lemma
\ref{lem.monoid.powers.neg-pow}, applied to $m$ instead of $n$). Hence, we can
cancel $a^{m}$ in the equality (\ref{pf.thm.group.powers.periodic.a.1}) (i.e.,
apply Theorem \ref{thm.monoid.cancel} \textbf{(c)} in Lecture 4 to $a^{m}$,
$a^{p}$ and $1$ instead of $a$, $b$ and $c$). Thus, we obtain $a^{p}=1$. So we
have found a positive integer $n$ such that $a^{n}=1$ (but it's our $p$, not
our $n$). Hence, such an $n$ exists. This proves part \textbf{(a)} of the theorem.

\item \label{pf.thm.group.powers.periodic.b} Part \textbf{(a)} shows that
there exists a positive integer $n$ such that $a^{n}=1$. Consider this $n$.
Then, Theorem \ref{thm.sg.powers.add} \textbf{(b)} shows that every $k\geq0$
satisfies
\[
a^{k+n}=a^{k}\underbrace{a^{n}}_{=1}=a^{k}1=a^{k},
\]
and therefore $a^{k}=a^{k+n}$. This proves part~\textbf{(b)}. \qedhere

\end{enumerate}
\end{proof}

\begin{remark}
\label{rmk.thm.group.powers.periodic.pic}Similarly to Remark
\ref{rmk.thm.sg.powers.periodic.pic}, we can visualize the powers of an
arbitrary element $a$ in a finite monoid that has an inverse:%
\[
\begin{tikzpicture}[>=Stealth, line width=0.65pt,
every node/.style={inner sep=2pt},
power/.style={circle,draw,minimum size=11mm,inner sep=1pt}]
\def\cycleradius{1.85}
\node[power] (a0) at (90:\cycleradius) {$a^0$};
\node[power] (a1) at (30:\cycleradius) {$a^1$};
\node[power] (a2) at (-30:\cycleradius) {$a^2$};
\node[power] (an2) at (-150:\cycleradius) {$a^{n-2}$};
\node[power] (an1) at (150:\cycleradius) {$a^{n-1}$};
\draw[->] (72:\cycleradius)
arc[start angle=72,end angle=48,radius=\cycleradius]
node[midway,above right=3pt] {$\cdot a$};
\draw[->] (12:\cycleradius)
arc[start angle=12,end angle=-12,radius=\cycleradius]
node[midway,right=3pt] {$\cdot a$};
\draw[densely dotted] (-48:\cycleradius)
arc[start angle=-48,end angle=-78,radius=\cycleradius];
\node at (-90:\cycleradius) {$\cdots$};
\draw[densely dotted] (-102:\cycleradius)
arc[start angle=-102,end angle=-132,radius=\cycleradius];
\draw[->] (-168:\cycleradius)
arc[start angle=-168,end angle=-192,radius=\cycleradius]
node[midway,left=3pt] {$\cdot a$};
\draw[->] (132:\cycleradius)
arc[start angle=132,end angle=108,radius=\cycleradius]
node[midway,above left=3pt] {$\cdot a$};
\end{tikzpicture}
\]
Here, we only have a cycle, no tail leading into it, since Theorem
\ref{thm.group.powers.periodic} \textbf{(a)} tells us that the powers
eventually loop back into $1=a^{0}$.
\end{remark}


\end{document}