\section{Derived Constructions}

\subsection{Cancellable Invariants}

Iris invariants as described in \Sref{sec:invariants} are persistent---once established, they hold forever.
However, based on them, it is possible to \emph{encode} a form of invariants that can be ``cancelled'' again.

First, we need some ghost state:
\begin{align*}
  \textmon{CInvTok} \eqdef{}& \fracm
\end{align*}

Now we define:
\begin{align*}
  \CInvTok{\gname}{q} \eqdef{}& \ownGhost\gname{q} \\
  \CInv{\gname}{\namesp}{\prop} \eqdef{}& \knowInv\namesp{\prop \lor \ownGhost\gname{1}}
\end{align*}

It is then straightforward to prove:
\begin{mathpar}
  \inferH{CInv-new}{}
  {\later\prop \vs[\bot] \Exists \gname. \CInvTok\gname{1} * \always\CInv\gname\namesp\prop}

  \inferH{CInv-acc}{}
  {\CInv\gname\namesp\prop \proves \Acc[\namesp][\emptyset]{\CInvTok\gname{q}}{\later\prop}}

  \inferH{CInv-cancel}{}
  {\CInv\gname\namesp\prop \proves \CInvTok\gname{1} \vs[\namesp] \later\prop}
\end{mathpar}

Cancellable invariants are useful, for example, when reasoning about data structures that will be deallocated:  Every reference to the data structure comes with a fraction of the token, and when all fractions have been gathered, \ruleref{CInv-cancel} is used to cancel the invariant, after which the data structure can be deallocated.

\subsection{Non-atomic (``Thread-Local'') Invariants}

Sometimes it is necessary to maintain invariants that we need to open non-atomically.
Clearly, for this mechanism to be sound we need something that prevents us from opening the same invariant twice, something like the masks that avoid reentrancy on the ``normal'', atomic invariants.
The idea is to use tokens\footnote{Very much like the tokens that are used to encode ``normal'', atomic invariants} that guard access to non-atomic invariants.
Having the token $\NaTokE\pid\mask$ indicates that we can open all invariants in $\mask$.
The $\pid$ here is the name of the \emph{invariant pool}.
This mechanism allows us to have multiple, independent pools of invariants that all have their own namespaces.

One way to think about non-atomic invariants is as ``thread-local invariants'',
where every pool is a thread.
Every thread thus has its own, independent set of invariants.
Every thread threads through all the tokens for its own pool, so that each invariant can only be opened in the thread it belongs to.
As a consequence, they can be kept open around any sequence of expressions (\ie there is no restriction to atomic expressions) -- after all, there cannot be any races with other threads.

Concretely, this is the monoid structure we need:
\begin{align*}
\textdom{PId} \eqdef{}& \GName \\
\textmon{NaTok} \eqdef{}& \finpset{\InvName} \times \pset{\InvName}
\end{align*}
For every pool, there is a set of tokens designating which invariants are \emph{enabled} (closed).
This corresponds to the mask of ``normal'' invariants.
We re-use the structure given by namespaces for non-atomic invariants.
Furthermore, there is a \emph{finite} set of invariants that is \emph{disabled} (open).

Owning tokens is defined as follows:
\begin{align*}
\NaTokE\pid\mask \eqdef{}& \ownGhost{\pid}{ (\emptyset, \mask) } \\
\NaTok\pid \eqdef{}& \NaTokE\pid\top
\end{align*}

Next, we define non-atomic invariants.
To simplify this construction,we piggy-back into ``normal'' invariants.
\begin{align*}
  \NaInv\pid\namesp\prop \eqdef{}& \Exists \iname\in\namesp. \knowInv\namesp{\prop * \ownGhost\pid{(\set{\iname},\emptyset)} \lor \NaTokE\pid{\set{\iname}}}
\end{align*}

We easily obtain:
\begin{mathpar}
  \axiomH{NAInv-new-pool}
  {\TRUE \vs[\bot] \Exists\pid. \NaTok\pid}

  \axiomH{NAInv-tok-split}
  {\NaTokE\pid{\mask_1 \uplus \mask_2} \Lra \NaTokE\pid{\mask_1} * \NaTokE\pid{\mask_2}}

  \axiomH{NAInv-new-inv}
  {\later\prop  \vs[\namesp] \always\NaInv\pid\namesp\prop}

  \axiomH{NAInv-acc}
  {\NaInv\pid\namesp\prop \proves \Acc[\namesp]{\NaTokE\pid\namesp}{\later\prop}}
\end{mathpar}
from which we can derive
\begin{mathpar}
  \infer
  {\namesp \subseteq \mask}
  {\NaInv\pid\namesp\prop \proves \Acc[\namesp]{\NaTokE\pid\mask}{\later\prop * \NaTokE\pid{\mask \setminus \namesp}}}
\end{mathpar}

\subsection{Boxes}

The idea behind the \emph{boxes} is to have an proposition $\prop$ that is actually split into a number of pieces, each of which can be taken out and back in separately.
In some sense, this is a replacement for having an ``authoritative PCM of Iris propositions itself''.
It is similar to the pattern involving saved propositions that was used for the barrier~\cite{iris2}, but more complicated because there are some operations that we want to perform without a later.

Roughly, the idea is that a \emph{box} is a container for an proposition $\prop$.
A box consists of a bunch of \emph{slices} which decompose $\prop$ into a separating conjunction of the propositions $\propB_\sname$ governed by the individual slices.
Each slice is either \emph{full} (it right now contains $\propB_\sname$), or \emph{empty} (it does not contain anything currently).
The proposition governing the box keeps track of the state of all the slices that make up the box.
The crux is that opening and closing of a slice can be done even if we only have ownership of the boxes ``later'' ($\later$).

The interface for boxes is as follows:
The two core propositions are: $\BoxSlice\namesp\prop\sname$, saying that there is a slice in namespace $\namesp$ with name $\sname$  and content $\prop$; and $\ABox\namesp\prop{f}$, saying that $f$ describes the slices of a box in namespace $\namesp$, such that all the slices together contain $\prop$. Here, $f$ is of type $\nat \fpfn \BoxState$ mapping names to states, where $\BoxState \eqdef \set{\BoxFull, \BoxEmp}$.
\begin{mathpar}
  \inferH{Box-create}{}
  {\TRUE \vs[\namesp] \ABox\namesp\TRUE\emptyset}

  \inferH{Slice-insert-empty}{}
  {\lateropt b\ABox\namesp\prop{f} \vs[\namesp] \Exists\sname \notin \dom(f). \always\BoxSlice\namesp\propB\sname * \lateropt b\ABox\namesp{\prop * \propB}{\mapinsert\sname\BoxEmp{f}}}

  \inferH{Slice-delete-empty}
  {f(\sname) = \BoxEmp}
  {\BoxSlice\namesp\propB\sname \proves \lateropt b\ABox\namesp\prop{f} \vs[\namesp] \Exists \prop'. \lateropt b(\later(\prop = \prop' * \propB) * \ABox\namesp{\prop'}{\mapinsert\sname\bot{f}})}

  \inferH{Slice-fill}
  {f(\sname) = \BoxEmp}
  {\BoxSlice\namesp\propB\sname \proves \lateropt b\propB * \later\ABox\namesp\prop{f} \vs[\namesp] \lateropt b\ABox\namesp\prop{\mapinsert\sname\BoxFull{f}}}

  \inferH{Slice-empty}
  {f(\sname) = \BoxFull}
  {\BoxSlice\namesp\propB\sname \proves \lateropt b\ABox\namesp\prop{f} \vs[\namesp] \later\propB * \lateropt b\ABox\namesp\prop{\mapinsert\sname\BoxEmp{f}}}

  \inferH{Box-fill}
  {\All\sname\in\dom(f). f(\sname) = \BoxEmp}
  {\later\prop * \ABox\namesp\prop{f} \vs[\namesp] \ABox\namesp\prop{\mapinsertComp\sname\BoxFull{\sname\in\dom(f)}{f}}}

  \inferH{Box-empty}
  {\All\sname\in\dom(f). f(\sname) = \BoxFull}
  {\ABox\namesp\prop{f} \vs[\namesp] \later\prop * \ABox\namesp\prop{\mapinsertComp\sname\BoxEmp{\sname\in\dom(f)}{f}}}
\end{mathpar}
Above, $\lateropt b \prop$ is syntactic sugar for $\later\prop$ (if $b$ is $1$) or $\prop$ (if $b$ is $0$).
This is essentially an \emph{optional later}, indicating that the lemmas can be applied with \textlog{Box} being owned now or later, and that ownership is returned the same way.

\begingroup
\paragraph{Model.}
\newcommand\BoxM{\textmon{Box}}
\newcommand\SliceInv{\textlog{SliceInv}}

The above rules are validated by the following model.
We need a camera as follows:
\begin{align*}
  \BoxState \eqdef{}& \BoxFull + \BoxEmp \\
  \BoxM \eqdef{}& \authm(\maybe{\exm(\BoxState)}) \times \maybe{\agm(\latert \iProp)}
\end{align*}

Now we can define the propositions:
\begin{align*}
  \SliceInv(\sname, \prop) \eqdef{}& \Exists b. \ownGhost\sname{(\authfull b, \munit)} * ((b = \BoxFull) \Ra \prop) \\
  \BoxSlice\namesp\prop\sname \eqdef{}& \ownGhost\sname{(\munit, \prop)} * \knowInv\namesp{\SliceInv(\sname,\prop)} \\
  \ABox\namesp\prop{f} \eqdef{}& \Exists \propB : \nat \to \Prop. \later\left( \prop = \Sep_{\sname \in \dom(f)} \propB(\sname) \right ) * {}\\
  & \Sep_{\sname \in \dom(f)} \ownGhost\sname{(\authfrag f(\sname), \propB(\sname))} * \knowInv\namesp{\SliceInv(\sname,\propB(\sname))}
\end{align*}
\endgroup % Model paragraph

\paragraph{Derived rules.}
Here are some derived rules:
\begin{mathpar}
  \inferH{Slice-insert-full}{}
  {\later\propB * \lateropt b\ABox\namesp\prop{f} \vs[\namesp] \Exists\sname \notin \dom(f). \always\BoxSlice\namesp\propB\sname * \lateropt b\ABox\namesp{\prop * \propB}{\mapinsert\sname\BoxFull{f}}}

  \inferH{Slice-delete-full}
  {f(\sname) = \BoxFull}
  {\BoxSlice\namesp\propB\sname \proves \lateropt b \ABox\namesp\prop{f} \vs[\namesp] \later\propB * \Exists \prop'. \lateropt b (\later(\prop = \prop' * \propB) * \ABox\namesp{\prop'}{\mapinsert\sname\bot{f}})}

  \inferH{Slice-split}
  {f(\sname) = s}
  {\kern-4ex\BoxSlice\namesp{\propB_1 * \propB_2}\sname \proves \lateropt b \ABox\namesp\prop{f} \vs[\namesp] \Exists \sname_1 \notin \dom(f), \sname_2 \notin \dom(f). \sname_1 \neq \sname_2 \land {}\\\kern5ex \always\BoxSlice\namesp{\propB_1}{\sname_1} * \always\BoxSlice\namesp{\propB_2}{\sname_2} * \lateropt b \ABox\namesp\prop{\mapinsert{\sname_2}{s}{\mapinsert{\sname_1}{s}{\mapinsert\sname\bot{f}}}}}

  \inferH{Slice-merge}
  {\sname_1 \neq \sname_2 \and f(\sname_1) = f(\sname_2) = s}
  {\BoxSlice\namesp{\propB_1}{\sname_1}, \BoxSlice\namesp{\propB_2}{\sname_2} \proves \lateropt b \ABox\namesp\prop{f} \vs[\namesp] \Exists \sname \notin \dom(f) \setminus \set{\sname_1, \sname_2}. {}\\\kern5ex \always\BoxSlice\namesp{\propB_1 * \propB_2}\sname * \lateropt b \ABox\namesp\prop{\mapinsert\sname{s}{\mapinsert{\sname_2}{\bot}{\mapinsert{\sname_1}{\bot}{f}}}}}
\end{mathpar}

% TODO: These need syncing with Coq
% \subsection{STSs with interpretation}\label{sec:stsinterp}

% Building on \Sref{sec:stsmon}, after constructing the monoid $\STSMon{\STSS}$ for a particular STS, we can use an invariant to tie an interpretation, $\pred : \STSS \to \Prop$, to the STS's current state, recovering CaReSL-style reasoning~\cite{caresl}.

% An STS invariant asserts authoritative ownership of an STS's current state and that state's interpretation:
% \begin{align*}
%   \STSInv(\STSS, \pred, \gname) \eqdef{}& \Exists s \in \STSS. \ownGhost{\gname}{(s, \STSS, \emptyset):\STSMon{\STSS}} * \pred(s) \\
%   \STS(\STSS, \pred, \gname, \iname) \eqdef{}& \knowInv{\iname}{\STSInv(\STSS, \pred, \gname)}
% \end{align*}

% We can specialize \ruleref{NewInv}, \ruleref{InvOpen}, and \ruleref{InvClose} to STS invariants:
% \begin{mathpar}
%  \inferH{NewSts}
%   {\infinite(\mask)}
%   {\later\pred(s) \vs[\mask] \Exists \iname \in \mask, \gname.   \STS(\STSS, \pred, \gname, \iname) * \ownGhost{\gname}{(s, \STST \setminus \STSL(s)) : \STSMon{\STSS}}}
%  \and
%  \axiomH{StsOpen}
%   {  \STS(\STSS, \pred, \gname, \iname) \vdash \ownGhost{\gname}{(s_0, T) : \STSMon{\STSS}} \vsE[\{\iname\}][\emptyset] \Exists s\in \upclose(\{s_0\}, T). \later\pred(s) * \ownGhost{\gname}{(s, \upclose(\{s_0\}, T), T):\STSMon{\STSS}}}
%  \and
%  \axiomH{StsClose}
%   {  \STS(\STSS, \pred, \gname, \iname), (s, T) \ststrans (s', T')  \proves \later\pred(s') * \ownGhost{\gname}{(s, S, T):\STSMon{\STSS}} \vs[\emptyset][\{\iname\}] \ownGhost{\gname}{(s', T') : \STSMon{\STSS}} }
% \end{mathpar}
% \begin{proof}
% \ruleref{NewSts} uses \ruleref{NewGhost} to allocate $\ownGhost{\gname}{(s, \upclose(s, T), T) : \STSMon{\STSS}}$ where $T \eqdef \STST \setminus \STSL(s)$, and \ruleref{NewInv}.

% \ruleref{StsOpen} just uses \ruleref{InvOpen} and \ruleref{InvClose} on $\iname$, and the monoid equality $(s, \upclose(\{s_0\}, T), T) = (s, \STSS, \emptyset) \mtimes (\munit, \upclose(\{s_0\}, T), T)$.

% \ruleref{StsClose} applies \ruleref{StsStep} and \ruleref{InvClose}.
% \end{proof}

% Using these view shifts, we can prove STS variants of the invariant rules \ruleref{Inv} and \ruleref{VSInv}~(compare the former to CaReSL's island update rule~\cite{caresl}):
% \begin{mathpar}
%  \inferH{Sts}
%   {\All s \in \upclose(\{s_0\}, T). \hoare{\later\pred(s) * P}{\expr}{\Ret \val. \Exists s', T'. (s, T) \ststrans (s', T') * \later\pred(s') * Q}[\mask]
%    \and \physatomic{\expr}}
%   {  \STS(\STSS, \pred, \gname, \iname) \vdash \hoare{\ownGhost{\gname}{(s_0, T):\STSMon{\STSS}} * P}{\expr}{\Ret \val. \Exists s', T'. \ownGhost{\gname}{(s', T'):\STSMon{\STSS}} * Q}[\mask \uplus \{\iname\}]}
%  \and
%  \inferH{VSSts}
%   {\forall s \in \upclose(\{s_0\}, T).\; \later\pred(s) * P \vs[\mask_1][\mask_2] \exists s', T'.\; (s, T) \ststrans (s', T') * \later\pred(s') * Q}
%   {  \STS(\STSS, \pred, \gname, \iname) \vdash \ownGhost{\gname}{(s_0, T):\STSMon{\STSS}} * P \vs[\mask_1 \uplus \{\iname\}][\mask_2 \uplus \{\iname\}] \Exists s', T'. \ownGhost{\gname}{(s', T'):\STSMon{\STSS}} * Q}
% \end{mathpar}

% \begin{proof}[Proof of \ruleref{Sts}]\label{pf:sts}
%  We have to show
%  \[\hoare{\ownGhost{\gname}{(s_0, T):\STSMon{\STSS}} * P}{\expr}{\Ret \val. \Exists s', T'. \ownGhost{\gname}{(s', T'):\STSMon{\STSS}} * Q}[\mask \uplus \{\iname\}]\]
%  where $\val$, $s'$, $T'$ are free in $Q$.

%  First, by \ruleref{ACsq} with \ruleref{StsOpen} and \ruleref{StsClose} (after moving $(s, T) \ststrans (s', T')$ into the view shift using \ruleref{VSBoxOut}), it suffices to show
%  \[\hoareV{\Exists s\in \upclose(\{s_0\}, T). \later\pred(s) * \ownGhost{\gname}{(s, \upclose(\{s_0\}, T), T)} * P}{\expr}{\Ret \val. \Exists s, T, S, s', T'. (s, T) \ststrans (s', T') * \later\pred(s') * \ownGhost{\gname}{(s, S, T):\STSMon{\STSS}} * Q(\val, s', T')}[\mask]\]

%  Now, use \ruleref{Exist} to move the $s$ from the precondition into the context and use \ruleref{Csq} to (i)~fix the $s$ and $T$ in the postcondition to be the same as in the precondition, and (ii)~fix $S \eqdef \upclose(\{s_0\}, T)$.
%  It remains to show:
%  \[\hoareV{s\in \upclose(\{s_0\}, T) * \later\pred(s) * \ownGhost{\gname}{(s, \upclose(\{s_0\}, T), T)} * P}{\expr}{\Ret \val. \Exists s', T'. (s, T) \ststrans (s', T') * \later\pred(s') * \ownGhost{\gname}{(s, \upclose(\{s_0\}, T), T)} * Q(\val, s', T')}[\mask]\]

%  Finally, use \ruleref{BoxOut} to move $s\in \upclose(\{s_0\}, T)$ into the context, and \ruleref{Frame} on $\ownGhost{\gname}{(s, \upclose(\{s_0\}, T), T)}$:
%  \[s\in \upclose(\{s_0\}, T) \vdash \hoare{\later\pred(s) * P}{\expr}{\Ret \val. \Exists s', T'. (s, T) \ststrans (s', T') * \later\pred(s') * Q(\val, s', T')}[\mask]\]

%  This holds by our premise.
% \end{proof}

% % \begin{proof}[Proof of \ruleref{VSSts}]
% % This is similar to above, so we only give the proof in short notation:

% % \hproof{%
% % 	Context: $\knowInv\iname{\STSInv(\STSS, \pred, \gname)}$ \\
% % 	\pline[\mask_1 \uplus \{\iname\}]{
% % 		\ownGhost\gname{(s_0, T)} * P
% % 	} \\
% % 	\pline[\mask_1]{%
% % 		\Exists s. \later\pred(s) * \ownGhost\gname{(s, S, T)} * P
% % 	} \qquad by \ruleref{StsOpen} \\
% % 	Context: $s \in S \eqdef \upclose(\{s_0\}, T)$ \\
% % 	\pline[\mask_2]{%
% % 		 \Exists s', T'. \later\pred(s') * Q(s', T') * \ownGhost\gname{(s, S, T)}
% % 	} \qquad by premiss \\
% % 	Context: $(s, T) \ststrans (s', T')$ \\
% % 	\pline[\mask_2 \uplus \{\iname\}]{
% % 		\ownGhost\gname{(s', T')} * Q(s', T')
% % 	} \qquad by \ruleref{StsClose}
% % }
% % \end{proof}

% \subsection{Authoritative monoids with interpretation}\label{sec:authinterp}

% Building on \Sref{sec:auth}, after constructing the monoid $\auth{M}$ for a cancellative monoid $M$, we can tie an interpretation, $\pred : \mcarp{M} \to \Prop$, to the authoritative element of $M$, recovering reasoning that is close to the sharing rule in~\cite{krishnaswami+:icfp12}.

% Let $\pred_\bot$ be the extension of $\pred$ to $\mcar{M}$ with $\pred_\bot(\mzero) = \FALSE$.
% Now define
% \begin{align*}
%   \AuthInv(M, \pred, \gname) \eqdef{}& \exists \melt \in \mcar{M}.\; \ownGhost{\gname}{\authfull \melt:\auth{M}} * \pred_\bot(\melt) \\
%   \Auth(M, \pred, \gname, \iname) \eqdef{}& M~\textlog{cancellative} \land \knowInv{\iname}{\AuthInv(M, \pred, \gname)}
% \end{align*}

% The frame-preserving updates for $\auth{M}$ gives rise to the following view shifts:
% \begin{mathpar}
%  \inferH{NewAuth}
%   {\infinite(\mask) \and M~\textlog{cancellative}}
%   {\later\pred_\bot(a) \vs[\mask] \exists \iname \in \mask, \gname.\; \Auth(M, \pred, \gname, \iname) * \ownGhost{\gname}{\authfrag a : \auth{M}}}
%  \and
%  \axiomH{AuthOpen}
%   {\Auth(M, \pred, \gname, \iname) \vdash \ownGhost{\gname}{\authfrag \melt : \auth{M}} \vsE[\{\iname\}][\emptyset] \exists \melt_\f.\; \later\pred_\bot(\melt \mtimes \melt_\f) * \ownGhost{\gname}{\authfull \melt \mtimes \melt_\f, \authfrag a:\auth{M}}}
%  \and
%  \axiomH{AuthClose}
%   {\Auth(M, \pred, \gname, \iname) \vdash \later\pred_\bot(\meltB \mtimes \melt_\f) * \ownGhost{\gname}{\authfull a \mtimes \melt_\f, \authfrag a:\auth{M}} \vs[\emptyset][\{\iname\}] \ownGhost{\gname}{\authfrag \meltB : \auth{M}} }
% \end{mathpar}

% These view shifts in turn can be used to prove variants of the invariant rules:
% \begin{mathpar}
%  \inferH{Auth}
%   {\forall \melt_\f.\; \hoare{\later\pred_\bot(a \mtimes \melt_\f) * P}{\expr}{\Ret\val. \exists \meltB.\; \later\pred_\bot(\meltB\mtimes \melt_\f) * Q}[\mask]
%    \and \physatomic{\expr}}
%   {\Auth(M, \pred, \gname, \iname) \vdash \hoare{\ownGhost{\gname}{\authfrag a:\auth{M}} * P}{\expr}{\Ret\val. \exists \meltB.\; \ownGhost{\gname}{\authfrag \meltB:\auth{M}} * Q}[\mask \uplus \{\iname\}]}
%  \and
%  \inferH{VSAuth}
%   {\forall \melt_\f.\; \later\pred_\bot(a \mtimes \melt_\f) * P \vs[\mask_1][\mask_2] \exists \meltB.\; \later\pred_\bot(\meltB \mtimes \melt_\f) * Q(\meltB)}
%   {\Auth(M, \pred, \gname, \iname) \vdash
%    \ownGhost{\gname}{\authfrag a:\auth{M}} * P \vs[\mask_1 \uplus \{\iname\}][\mask_2 \uplus \{\iname\}]
%    \exists \meltB.\; \ownGhost{\gname}{\authfrag \meltB:\auth{M}} * Q(\meltB)}
% \end{mathpar}

% \subsection{Ghost heap}
% \label{sec:ghostheap}%
% FIXME use the finmap provided by the global ghost ownership, instead of adding our own
% We define a simple ghost heap with fractional permissions.
% Some modules require a few ghost names per module instance to properly manage ghost state, but would like to expose to clients a single logical name (avoiding clutter).
% In such cases we use these ghost heaps.

% We seek to implement the following interface:
% \newcommand{\GRefspecmaps}{\textsf{GMapsTo}}%
% \begin{align*}
%  \exists& {\fgmapsto[]} : \textsort{Val} \times \mathbb{Q}_{>} \times \textsort{Val} \ra \textsort{Prop}.\;\\
%   & \All x, q, v. x \fgmapsto[q] v \Ra x \fgmapsto[q] v \land q \in (0, 1] \\
%   &\forall x, q_1, q_2, v, w.\; x \fgmapsto[q_1] v * x \fgmapsto[q_2] w \Leftrightarrow x \fgmapsto[q_1 + q_2] v * v = w\\
%   & \forall v.\; \TRUE \vs[\emptyset] \exists x.\; x \fgmapsto[1] v \\
%   & \forall x, v, w.\; x \fgmapsto[1] v \vs[\emptyset] x \fgmapsto[1] w
% \end{align*}
% We write $x \fgmapsto v$ for $\exists q.\; x \fgmapsto[q] v$ and $x \gmapsto v$ for $x \fgmapsto[1] v$.
% Note that $x \fgmapsto v$ is duplicable but cannot be boxed (as it depends on resources); \ie we have $x \fgmapsto v \Lra x \fgmapsto v * x \fgmapsto v$ but not $x \fgmapsto v \Ra \always x \fgmapsto v$.

% To implement this interface, allocate an instance $\gname_G$ of $\FHeap(\Val)$ and define
% \[
% 	x \fgmapsto[q] v \eqdef
% 	  \begin{cases}
%     	\ownGhost{\gname_G}{x \mapsto (q, v)} & \text{if $q \in (0, 1]$} \\
%     	\FALSE & \text{otherwise}
%     \end{cases}
% \]
% The view shifts in the specification follow immediately from \ruleref{GhostUpd} and the frame-preserving updates in~\Sref{sec:fheapm}.
% The first implication is immediate from the definition.
% The second implication follows by case distinction on $q_1 + q_2 \in (0, 1]$.

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "iris"
%%% End:


\documentclass[Thesis.tex]{subfiles}
\begin{document}
\chapter{Appendices}
\renewcommand{\thesection}{\Alph{section}}
\renewcommand{\thesubsection}{\Alph{section}.\Roman{subsection}}
\crefalias{section}{appsec}

\glsresetall

\section{Notation Reference}
\label{app:notation-reference}

This thesis strives to use a consistent set of rules for notation throughout.
Where possible, standard notation choices have been made so as to be easily
comparable to other works. Sometimes, however, we cannot all agree on how things
should be written, and this thesis inevitably diverges from some part of the
readers preferences. In an attempt to soften the inevitable rage of notation
disagreements, this section serves as a reference for all standard
notation used in this thesis, such that the meaning of every expression should
be unambiguous and clear.

\subsection{Symbols}l
\begin{center}
\begin{tabular}{cl}
  Symbol & Reads as\\
  \hline\\
  $=$ & is equal to\\
  $\defeq$ & is defied as\\
  $\equiv$ & is equivalent to\\
  $\disteq$ & is distributed equal to
\end{tabular}
\end{center}

\subsection{Scalars, Vectors and Matrices}

\begin{description}
\item[Scalars:] $x$\hfill\\
  Use lowercase symbols.
\item[Vectors:] $\vx$ \hfill\\
  All vectors are column vectors, and use lowercase, bold-face symbols.
\item[Matrices:] $\mat X$ \hfill \\
  Use uppercase, bold-face symbols.
\end{description}

Example: The matrix $\mat X\in\mathbb{R}^{m\times n}$ is defined by its column
vectors $\{\vx_i\}_{i=1}^n$ (with $\vx_i\in\mathbb{R}^{m}$) such that $ \mat X =
(\vx_1\ \vx_2\ \dots\ \vx_n)$ column vectors, such that the scalar $X_{ij}$ is
the $i$'th component of $\vx_j$.\\

In particular, $\mat X$ is often used throughout this thesis. If not explicitly
defined otherwise, $\mat X$ denotes a matrix of particle coordinates, $\mat X
\defeq (\vb x_1\ \vb x_2\ \dots\ \vb x_N)^T\in \mathbb{R}^{N\times D}$ for $N$
particles in $D$ dimensions. In three dimensions that is:

\begin{align}
  \mat X &\defeq \mqty(\vx_1\\\vx_2\\\vdots\\\vx_N) \defeq \mqty(x_1&y_1&z_1\\x_2&y_2&z_2\\\vdots&\vdots&\vdots\\x_N&y_N&z_N).
\end{align}

\subsection{Indices}

Some indices are meant to be summed over, while others remain fixed throughout a
calculation. To help make the distinction between the two, the following
sequences of indices are used for each class, in decreasing order of
precedence:

\begin{description}
\item[Summation indices:] $i, j, a, b, c, d, e, f$
\item[Fixed indices:] $k, l$
\end{description}

\subsection{Summation}

\subsubsection{Scope}

The summation symbol, $\sum$, effects only the term imediately after it. That
is,
\begin{align}
  \sum_{i=1}^3 i + 1 = \qty(\sum_{i=1}^3 i) + 1 = 7, \qq{not} \cancel{\sum_{i=1}^3i + 1 = \sum_{i=1}^3(i + 1) = 9}
\end{align}

\subsubsection{Implied Summations}

For notational brevity (and to avoid visual clutter), summations are not always
stated explicitly as in the above example. In these cases the limits of the
summation are determined by their context.

\begin{description}
\item[Explicit limits:] \hfill\\
  In $\sum_{i=1}^n$, the sum goes from 1 to n, inclusively.
\item[Implicit limits:]\hfill\\
  When limits are clearly defied by their context, the following is equivalent:
  $\sum_{i=1}^n \equiv \sum_{i}^n\equiv \sum_i$.
\item[Implicit summation symbols:]\hfill\\
  We make heavy use of the Einstein summation convention when this is
  appropriate. Any summation index (see above) which appears more than once \emph{within
  a single term} is implicitly summed over all its possible values.
  Superscripts in parenthesis are excluded from this rule, i.e. $a^{(k)}b^{(k)}$
  does not have an implied sum.
\end{description}

Example: Consider the matrix equation $\vb{x} = \mat{A}\vb{b}$, for
$\mat{A}\in\mathbb{R}^{m\times n}$ and $\vx, \vb{b} \in \mathbb{R}^n$. Written
explicitly, all of the following statements about the elements of $\vx$ are equivalent:
\begin{align}
  \begin{split}
  x_k &= \sum_{i=1}^n A_{ki}b_i,\qq{ } x_k = \sum_{i}^n A_{ki}b_i,\\
  x_k &= \sum_{i} A_{ki}b_i,\qq{ } x_k = A_{ki}b_i
  \end{split}
\end{align}

\subsection{Statistics}

Common statistical quantities use the following notation:
\begin{center}
\begin{tabular}{lr}
  Quantity & Notation\\
  \hline\\
  Expectation value & $\expval{\cdot}$ \\
  Standard deviation & $\Std[\cdot]$\\
  Variance & $\Var[\cdot]$\\
  Covariance & $\Cov[\cdot]$\\
  \Gls{sem} & $\SE[\cdot]$\\
\end{tabular}
\end{center}

\section{Symmetry Metric}
\label{app:symmetry-metric}

In the context of our \gls{vmc} framework, we should in general
take care that the ansatz we make for the functional form of $\Psi$ is such
that it obeys \autoref{theorem:spin-statistic}. Not all proposed wavefunctions
will necessary \emph{guarantee} this property, however, and optimization might
find a minimum in which this is not strictly true. A such, we shall define a metric to
measure the \emph{symmetry-ness} of a wavefunction.

Before giving a definition, there are a couple of desired properties such a
metric should have.

\begin{enumerate}
    \item Fully symmetric functions should yield a distinct, finite value.
    \item Fully anti-symmetric functions should yield a distinct, finite value,
        which must be different from fully symmetric functions.
    \item Scale invariant, i.e. scaling the function by
        some constant factor does not change its symmetry metric.
    \item Computationally feasible to evaluate.
\end{enumerate}

\begin{definition}{Permutation Operator.}

    Let $\mathcal{P}_n$ denote the set of all permutations of the first $n$
    natural numbers, $\{1, 2, \dots, n\}$, and let $\vec\alpha\in \mathcal{P}_n$ be
    one of these. Given a function $\Psi(\vec x_1, \vec x_2,\dots,\vec x_n)$ of $n$
    vectors $\vec x_i\in \mathbb{R}^d$, we let $P_{\vec\alpha}$ be an operator with
    the following property:

    \begin{align}
        P_{\vec\alpha}\Psi(\vec x_1,\vec x_2,\dots,\vec x_n)
        \defeq
        \Psi(\vec x_{\alpha_1},\vec x_{\alpha_2},\dots,\vec x_{\alpha_n}).
    \end{align}
\end{definition}

\begin{definition}{Symmetry Metric.}

    Given a function $\Psi(\vec x_1, \vec x_2,\dots,\vec x_n)$ of $n$ vectors $\vec
    x_i\in \mathbb{R}^d$. We use the notation $\dd{\vec X}\defeq \dd{\vec x_1}\dots\dd{\vec x_n}$.
    The Symmetry Metric of $\Psi$ is then defined as the following:

    \begin{align}\label{eq:symmetry-metric-def}
        S(\Psi) &\defeq  \ddfrac{\intfy \dd{\vec X}\abs{\frac{1}{n!}
        \sum_{\vec\alpha\in \mathcal{P}_n} P_{\vec\alpha}\Psi}^2}{\intfy\dd{\vec X}
        \max_{\vec\alpha\in \mathcal{P}} \abs{P_{\vec\alpha}\Psi}^2}
    \end{align}
\end{definition}
\begin{corollary}
    The symmetry metric is bounded to the interval $[0, 1]$ for all functions where the integrals are defined.
\end{corollary}
\begin{proof}
    Both the numerator and denominator of \autoref{eq:symmetry-metric-def} are
    integrals of absolute values. Hence they cannot be negative, which proves
    the lower bound $S(\Psi) \geq 0$ for all $\Psi$ where the integrals are defined. Further, the
    absolute value of the average of a set must be less than or equal to the maximum
    absolute value of the set, and equal iff. all values are equal. That is,
    \begin{align}
        \abs{\frac{1}{n!} \sum_{\vec\alpha\in \mathcal{P}_n} P_{\vec\alpha}\Psi}^2
        \leq \max_{\vec\alpha\in \mathcal{P}} \abs{P_{\vec\alpha}\Psi}^2.
    \end{align}
    From this it follows that $S(\Psi) \leq 1$.
\end{proof}
\begin{corollary}
   The symmetry metric is scale invariant, i.e.
    \begin{align}
        S(c\Psi) = S(\Psi),
    \end{align}
    for any scalar $c\in \mathbb{C}$.
\end{corollary}
\begin{proof}
   Obvious.
\end{proof}
\begin{corollary}
    For a symmetric function $\Psi$ we have

    \begin{align}
        S(\Psi) &= 1.
    \end{align}
\end{corollary}
\begin{proof}
    For a symmetric function we have $P_{\vec\alpha}\Psi=\Psi$ for all
    $\vec\alpha\in\mathcal{P}_n$ by definition. The result then follows directly.\end{proof}
\begin{corollary}
    For a anti-symmetric function $\overline\Psi$ we have
    \begin{align}
        S(\overline\Psi)&=0.
    \end{align}
\end{corollary}
\begin{proof}
   Of the $n!$ possible permutations, half can be written as an even number of
    pairwise exchanges, and half as an odd number. This implies
    \begin{align}
        \sum_{\vec\alpha\in \mathcal{P}_n} P_{\vec\alpha}\Psi = 0,
    \end{align}
    and the result follows directly.
\end{proof}

This definition of the symmetry metric has all the attributes we wanted, except
the computational cost. The asymptotic complexity of $S$ is $\mathcal{O}(n!)$,
which is about as bad as asymptotic complexities get. In addition, the integrals
are many-dimensional and intractable for any non-trivial $n$. In practice we
will therefore approximate $S$ by only considering a random subset of all the
permutations, and of course approximating the integrals with \gls{mci} as
before. In cases where $n$ is small we may compute the full set.

This now provides a consistent metric for comparing potential wavefunctions in
terms of their symmetry. This could be helpful when considering trail
wave functions whose functional form does not guarantee symmetry, and to observe
to what extent optimizing them changes the symmetry metric favorably.

\end{document}


\documentclass[letterpaper,10pt]{article}

\usepackage[margin=1in]{geometry}

\usepackage{amsthm,amssymb,amsmath,graphicx}
%% https://tex.stackexchange.com/a/396829/32270
\allowdisplaybreaks
%% H/T: https://tex.stackexchange.com/a/202168/32270
\usepackage{textcomp}
%% H/T: https://tex.stackexchange.com/a/56877/32270
\usepackage{algorithm}
\usepackage{algpseudocode}
%% H/T: https://tex.stackexchange.com/a/33869/32270
\makeatletter
\newenvironment{breakablealgorithm}
  {% \begin{breakablealgorithm}
   \begin{center}
     \refstepcounter{algorithm}% New algorithm
     \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
     \renewcommand{\caption}[2][\relax]{% Make a new \caption
       {\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
       \ifx\relax##1\relax % #1 is \relax
         \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
       \else % #1 is not \relax
         \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
       \fi
       \kern2pt\hrule\kern2pt
     }
  }{% \end{breakablealgorithm}
     \kern2pt\hrule\relax% \@fs@post for \@fs@ruled
   \end{center}
  }
\makeatother
%% H/T: https://tex.stackexchange.com/a/28334/32270
\usepackage{chngcntr}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\counterwithin{equation}{section}
\counterwithin{algorithm}{section}
%% H/T: https://tex.stackexchange.com/a/202047/32270
%%      https://tex.stackexchange.com/a/32463/32270
\usepackage[labelfont=bf]{caption}
%% H/T: https://tex.stackexchange.com/a/71153/32270
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{mathtools}
%% H/T: https://www.sharelatex.com/learn/Typesetting_quotations
\usepackage{csquotes}

\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]

\usepackage[usenames, dvipsnames]{color}
\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  urlcolor=blue,
  linkcolor=MidnightBlue,
  citecolor=ForestGreen,
  pdfinfo={
    CreationDate={D:20180508114800},
    ModDate={D:20180508114800},
  },
}

\usepackage{embedfile}
\embedfile{\jobname.tex}

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{A Curious Case of Curbed Condition}
\rhead{Danny Hermes}

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\qed}{\(\blacksquare\)}
\newcommand{\cond}[1]{\operatorname{cond}\left(#1\right)}
\newcommand{\fl}[1]{\operatorname{fl}\left(#1\right)}
\newcommand{\bigO}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\mach}{\mathbf{u}}

\begin{document}

\begin{abstract}
\noindent  In computer aided geometric design a polynomial is usually
represented in Bernstein form. The de Casteljau algorithm is the most
well-known algorithm for evaluating a polynomial in this form. Evaluation
via the de Casteljau algorithm has relative forward error proportional to
the condition number of evaluation. However, for a particular family of
polynomials, a curious phenomenon occurs: the observed error is much smaller
than the expected error bound. We examine this family and prove a much
stronger error bound than the one that applies to the general case. Then
we provide a few examples to demonstrate the difference in rounding.
\\ \\
\noindent \textit{Keywords}: Polynomial evaluation, Floating-point
arithmetic, Bernstein polynomial, Round-off error, Condition number
\end{abstract}

\tableofcontents

\section{Introduction}

In computer aided geometric design, polynomials are usually expressed in
Bernstein form. Polynomials in this form are usually evaluated by the
de Casteljau algorithm. This algorithm has a round-off error bound
which grows only linearly with degree, even though the number of
arithmetic operations grows quadratically. The Bernstein basis is
optimally suited (\cite{Farouki1987, Delgado2015, Mainar2005})
for polynomial evaluation. Nevertheless the de Casteljau
algorithm returns results arbitrarily less accurate than the working
precision \(\mach\) when evaluating \(p(s)\) is ill-conditioned.
The relative accuracy of the computed
evaluation with the de Casteljau algorithm (\texttt{DeCasteljau}) satisfies
(\cite{Mainar1999}) the following a priori bound:
\begin{equation}\label{de-casteljau-error}
  \frac{\left|p(s) - \mathtt{DeCasteljau}(p, s)\right|}{\left|p(s)\right|} \leq
  \cond{p, s} \times \bigO{\mach}.
\end{equation}

\begin{figure}
  \includegraphics[width=0.75\textwidth]{against_a_priori.pdf}
  \centering
  \captionsetup{width=.75\linewidth}
  \caption{Comparing relative forward error to a priori bound for
    \(u(s) = (1 - 4s)^5, v(s) = (1 - 5s)^5\) and \(w(s) = (1 - 6s)^5\)}
  \label{fig:against-a-priori}
\end{figure}

For example, consider \(u(s) = (1 - 4s)^5, v(s) = (1 - 5s)^5\) and
\(w(s) = (1 - 6s)^5\). For points of the form
\begin{equation}
s_u = \frac{1}{4} + \frac{6}{16N}, \quad
s_v = \frac{1}{5} + \frac{8}{25N}, \quad
s_w = \frac{1}{6} + \frac{10}{36N}
\end{equation}
which are near the multiple roots, the condition numbers of evaluation are:
\begin{equation}
\cond{u, s_u} = \cond{v, s_v} = \cond{w, s_w} =
  \left|N\right|^5 + \bigO{N^4}.
\end{equation}
As we can see in Figure~\ref{fig:against-a-priori}, one of these is not
like the others. Evaluation of both \(u(s)\) and \(w(s)\) produces
relative forward error very close to the a prior bound\footnote{There
are actually three different error bounds, but the \(\left|N\right|^5\)
term dominates so much that they are not visually discernible.}. However,
the observed relative error when evaluating \(v(s)\) is significantly
lower than expected.

As we'll explore in Section~\ref{sec:improved-bound}, \(v(s)\) belongs
to a family of polynomials that the de Casteljau method can evaluate with
a significantly higher level of accuracy than expected. Notice that
\begin{equation}
v(s) = (1 - 5s)^5 = \left[(1 - s) - 4s\right]^5 =
  B_{0, 5}(s) - 4 B_{1, 5}(s) +
  16 B_{2, 5}(s) + \cdots;
\end{equation}
in particular, the Bernstein coefficients are powers of \(2\) (up to sign).
The aforementioned family of polynomials contains any of the form
\begin{equation}
b_0 \left[(1 - s) - 2^t s\right]^n =
  b_0 B_{0, n}(s) - \left(b_0 2^t\right) B_{1, n}(s) +
  \left(b_0 2^{2t}\right) B_{2, n}(s) + \cdots.
\end{equation}
Polynomials in this family have coefficients that can be represented
exactly (i.e. with no round-off).

The paper is organized as follows. Section~\ref{sec:notation} establishes
notation for error analysis with floating point operations and reviews the
de Casteljau algorithm. In
Section~\ref{sec:improved-bound}, the lowered error bound is proved
for polynomials in the special family and numerical experiments compare
observed relative error to the newly improved bound.
Finally, in Section~\ref{sec:implications} we comment on the impact
that this lowered bound makes on comparisons between the de Casteljau
algorithm and the VS algorithm.

\section{Basic notation and results}\label{sec:notation}

\subsection{Floating Point and Forward Error Analysis}

We assume all floating point operations obey
\begin{equation}
  a \star b = \fl{a \circ b} = (a \circ b)(1 + \delta_1) =
  (a \circ b) / (1 + \delta_2)
\end{equation}
where \(\star \in \left\{\oplus, \ominus, \otimes, \oslash\right\}\), \(\circ
\in \left\{+, -, \times, \div\right\}\) and \(\left|\delta_1\right|,
\left|\delta_2\right| \leq \mach\). The symbol \(\mach\) is the unit round-off
and \(\star\) is a floating point operation, e.g.
\(a \oplus b = \fl{a + b}\). (For IEEE-754 floating point double precision,
\(\mach = 2^{-53}\).) We denote the computed result of
\(\alpha \in \mathbf{R}\) in floating point arithmetic by
\(\widehat{\alpha}\) or \(\fl{\alpha}\) and use \(\mathbf{F}\) as the set of
all floating point numbers (see \cite{Higham2002} for more details).
Following \cite{Higham2002}, we will use the following classic properties in
error analysis.

\begin{enumerate}
  \item If \(\delta_i \leq \mach\), \(\rho_i = \pm 1\), then
      \(\prod_{i = 1}^n (1 + \delta_i)^{\rho_i} = 1 + \theta_n\),
  \item \(\left|\theta_n\right| \leq \gamma_n \coloneqq
      n \mach / (1 - n \mach)\),
  \item \((1 + \theta_k)(1 + \theta_j) = 1 + \theta_{k + j}\),
  \item \(\gamma_k + \gamma_j + \gamma_k \gamma_j \leq \gamma_{k + j}
    \Longleftrightarrow (1 + \gamma_k)(1 + \gamma_j) \leq 1 + \gamma_{k + j}\),
  \item \((1 + \mach)^j \leq 1 / (1 - j \mach) \Longleftrightarrow
  (1 + \mach)^j - 1 \leq \gamma_j\).
\end{enumerate}

\begin{theorem}\label{thm:floating-point-exact}
In the absence of overflow or underflow, for \(a, b, -2^t \in \mathbf{F}\)
\begin{align}
\left(-2^t a\right) \otimes b &= -2^t \left(a \otimes b\right) \\
\left(-2^t a\right) \oplus \left(-2^t b\right) &= -2^t \left(a \oplus b\right).
\end{align}
\end{theorem}

\subsection{Bernstein Basis and de Casteljau Algorithm}

A polynomial written in the Bernstein basis is of the form
\begin{equation}
p(s) = \sum_{j = 0}^n b_j B_{j, n}(s)
\end{equation}
where \(B_{j, n}(s) = \binom{n}{j} (1 - s)^{n - j} s^j\). When
\(s \in \left[0, 1\right]\), the Bernstein basis functions are
non-negative. We refer to \(\widetilde{b}_j \coloneqq \binom{n}{j} b_j\)
as the \textit{scaled Bernstein coefficients}.
The condition number of evaluation for \(p(s)\) is
\begin{equation}
\cond{p, s} = \frac{\widetilde{p}(s)}{\left|p(s)\right|}
\end{equation}
where
\(\widetilde{p}(s) \coloneqq \sum_{j = 0}^n \left|b_j\right| B_{j, n}(s)\).

\begin{breakablealgorithm}
  \caption{\textit{de Casteljau algorithm for polynomial evaluation.}}
  \label{alg:de-casteljau}

  \begin{algorithmic}
    \Function{\(\mathtt{result} = \mathtt{DeCasteljau}\)}{$b, s$}
      \State \(n = \texttt{length}(b) - 1\)
      \State \(\widehat{r} = 1 \ominus s\)
      \\
      \For{\(j = 0, \ldots, n\)}
        \State \(\widehat{b}_j^{(n)} = b_j\)
      \EndFor
      \\
      \For{\(k = n - 1, \ldots, 0\)}
        \For{\(j = 0, \ldots, k\)}
          \State \(\widehat{b}_j^{(k)} = \left(
              \widehat{r} \otimes \widehat{b}_j^{(k + 1)}\right) \oplus
              \left(s \otimes \widehat{b}_{j + 1}^{(k + 1)}\right)\)
        \EndFor
      \EndFor
      \\
      \State \(\mathtt{result} = \widehat{b}_0^{(0)}\)
    \EndFunction
  \end{algorithmic}
\end{breakablealgorithm}

\begin{theorem}\label{thm:de-casteljau-bound}
The de Casteljau algorithm (Algorithm~\ref{alg:de-casteljau}) satisfies
\begin{equation}
\left|p(s) - \mathtt{DeCasteljau}(p, s)\right| \leq \gamma_{3n}
  \widetilde{p}(s).
\end{equation}
\end{theorem}

\begin{proof}
See Appendix~\ref{sec:appendix-proof-details}.
\end{proof}

\section{Improved Bound}\label{sec:improved-bound}

We seek to analyze our family of polynomials of the form:
\begin{equation}
p(s) = b_0 \left[(1 - s) - 2^t s\right]^n.
\end{equation}
When written in the Bernstein basis, \(p(s)\) has coefficients that satisfy
\begin{equation}\label{exact-ratio}
b_{j + 1} = -2^t b_j.
\end{equation}
In a finite precision binary arithmetic, \eqref{exact-ratio} will hold
exactly (i.e. with no round-off) until overflow or underflow makes it
impossible to represent
\(b_j\) in the given arithmetic (the mantissa will always be the same but
the sign and exponent will change). This useful property remains
true for the intermediate terms computed by the de Casteljau method:
\begin{equation}
b_{j + 1}^{(k)} = (1 - s) b_{j + 1}^{(k + 1)} + s b_{j + 2}^{(k + 1)} =
  -2^t\left[(1 - s) b_j^{(k + 1)} + s b_{j + 1}^{(k + 1)}\right] =
  -2^t b_j^{(k)}.
\end{equation}
Remarkably, this also holds true for the \textbf{computed} values:
\(\widehat{b}_{j + 1}^{(k)} =
-2^t \widehat{b}_j^{(k)}\). Following Theorem~\ref{thm:floating-point-exact}
we have
\begin{align}
\widehat{b}_{j + 1}^{(k)} &= \left[\widehat{r} \otimes
  \widehat{b}_{j + 1}^{(k + 1)}\right] \oplus
  \left[s \otimes \widehat{b}_{j + 2}^{(k + 1)}\right] \\
&= \left[-2^t \left(\widehat{r} \otimes
  \widehat{b}_j^{(k + 1)}\right)\right] \oplus
  \left[-2^t\left(s \otimes \widehat{b}_{j + 1}^{(k + 1)}\right)\right] \\
&= -2^t\left(\left[\widehat{r} \otimes
  \widehat{b}_j^{(k + 1)}\right] \oplus
  \left[s \otimes \widehat{b}_{j + 1}^{(k + 1)}\right]\right) \\
&= -2^t \widehat{b}_j^{(k)}.
\end{align}
Thus, for such \(p(s)\), we only need compute
\(\widehat{b}_0^{(k)}\):
\begin{equation}
\widehat{b}_0^{(k)} = \left[\widehat{r} \otimes
  \widehat{b}_0^{(k + 1)}\right] \oplus \left[s \otimes
  \widehat{b}_1^{(k + 1)}\right] = \left[\widehat{r} \otimes
  \widehat{b}_0^{(k + 1)}\right] \oplus \left[\left(-2^t\right) \left(s \otimes
  \widehat{b}_0^{(k + 1)}\right)\right].
\end{equation}

\begin{theorem}\label{thm:better-error}
For a polynomial of the form
\begin{equation}
p(s) = b_0 \left[(1 - s) - 2^t s\right]^n
\end{equation}
the relative accuracy of the computed
evaluation with the de Casteljau algorithm satisfies
the following a priori bound:
\begin{equation}\label{better-de-casteljau-error}
\frac{\left|p(s) - \mathtt{DeCasteljau}(p, s)\right|}{\left|p(s)\right|}
  \leq \left(1 + \left|\phi\right| \gamma_3\right)^n - 1
\end{equation}
where
\begin{equation}
\phi \coloneqq \frac{(1 - s) + 2^t s}{(1 - s) - 2^t s} =
  \frac{1 + \left(2^t - 1\right) s}{1 - \left(2^t + 1\right) s}.
\end{equation}
\end{theorem}

\begin{proof}
Let \(r = 1 - s\) and \(\widehat{r} = 1 \ominus s\).
For \(k < n\),
\begin{equation}
\widehat{b}_0^{(k)} = \left[\widehat{r} \otimes
  \widehat{b}_0^{(k + 1)}\right] \oplus \left[\left(-2^t\right)
  \left(s \otimes \widehat{b}_0^{(k + 1)}\right)\right] =
  \widehat{b}_0^{(k + 1)} \left[r(1 + \theta_3) - 2^t s(1 + \theta_2)\right].
\end{equation}
Note that this can be written as \(\widehat{b}_0^{(k + 1)}
\left[\left(r - 2^t s\right) + E\right]\) where the round-off term
satisfies \(\left|E\right| \leq \left(r + 2^t s\right) \gamma_3\) for
\(s \in \left[0, 1\right]\). Hence we write
\(\widehat{b}_0^{(k)} = \widehat{b}_0^{(k + 1)} \left[\left(r - 2^t s\right) +
  \left(r + 2^t s\right)\theta_3\right]\).
Since \(\widehat{b}_0^{(n)} = b_0\), we have
\begin{equation}
\widehat{b}_0^{(0)} = b_0 \left[\left(r - 2^t s\right) +
  \left(r + 2^t s\right)\theta_3\right]^n.
\end{equation}
Dividing this by \(b_0^{(0)} = b_0 \left(r - 2^t s\right)^n\) we have
\begin{equation}
\widehat{b}_0^{(0)} = b_0^{(0)} \left(1 + \phi \cdot \theta_3\right)^n.
\end{equation}
Hence our relative error can be bound by
\begin{equation}
\left|\left(1 + \phi \cdot \theta_3\right)^n - 1\right| \leq
\left(1 + \left|\phi\right| \gamma_3\right)^n - 1
\end{equation}
as desired.
\end{proof}

Since
\begin{equation}
\widetilde{p}(s) = \sum_{j = 0}^n \left|b_0 \left(-2^t\right)^j\right|
  B_{j, n}(s) = \left|b_0\right| \left[(1 - s) + 2^t s\right]^n
\end{equation}
we see that \(\cond{p, s} = \widetilde{p}(s) / \left|p(s)\right| =
\left|\phi\right|^n\). So we can compare our improved bound
\(\left(1 + \left|\phi\right| \gamma_3\right)^n - 1\)
to the na\"ive bound \(\gamma_{3n} \left|\phi\right|^n\).

\begin{figure}
  \includegraphics[width=0.75\textwidth]{curbed_condition.pdf}
  \centering
  \captionsetup{width=.75\linewidth}
  \caption{Comparing na\"ive relative error bound to improved bound for
    \(p(s) = (1 - 5s)^{5}\) evaluated at \(s = 1/5 + 8/(25N)\)}
  \label{fig:curbed-condition}
\end{figure}

For example, we'll use \(b_0 = 1, n = 5, t = 2\), i.e. \(p(s) = (1 - 5s)^5\)
for a numerical experiment with. We compare the na\"ive and improved bounds to
the observed relative forward error in Figure~\ref{fig:curbed-condition}.
The figure shows the evaluation of \(p(s)\) at the points
\(\left\{\frac{1}{5} + \frac{8}{25 \cdot 2.1^e}\right\}_{e = 1}^{45}\),
which cause the condition number of evaluation to grow exponentially.
The form \(s = 1/5 + 8/(25N)\) is chosen because it simplifies
\(\phi\):
\begin{equation}
\phi = \frac{1 + 3s}{1 - 5s} = -N - \frac{3}{5}.
\end{equation}
As can be seen in the figure, the observed errors closely match the
improved bound and are significantly smaller than
the na\"ive bound. What's more, the actual error is still useful
(i.e. less than \(\bigO{1}\)) when the condition number becomes
very large.

\section{Implications}\label{sec:implications}

In \cite{Delgado2015}, the de Casteljau algorithm is compared to the VS
algorithm (\cite{Schumaker1986}) along with a few other methods. The VS
algorithm relies on two transformations of \(p(s) =
\sum_{j = 0}^n \widetilde{b}_j (1 - s)^{n - j} s^j\) using
\(\sigma_1 = (1 - s) / s\) and \(\sigma_2 = s / (1 - s)\):
\begin{equation}\label{vs-transform}
p(s) = s^n \left[\widetilde{b}_0 \sigma_1^n + \cdots + \widetilde{b}_n\right]
= (1 - s)^n \left[\widetilde{b}_0 + \cdots + \widetilde{b}_n \sigma_2^n\right].
\end{equation}
See Appendix~\ref{sec:vs-algorithm} for more details on the VS algorithm,
in particular Algorithm~\ref{alg:vs-algorithm} which describes the method and
Theorem~\ref{thm:vs-bound} which provides an error bound.

\begin{figure}
  \includegraphics[width=0.9375\textwidth]{compare_dp15.pdf}
  \centering
  \captionsetup{width=.75\linewidth}
  \caption{Comparing the de Casteljau and VS algorithms.}
  \label{fig:dp15-compare}
\end{figure}

In \cite{Delgado2015}, the authors use\footnote{The coefficients of \(f(s)\)
and \(g(s)\) cannot be represented exactly in IEEE-754 floating point
double precision.}
\begin{equation}
f(s) = \prod_{j = 1}^{20} (s - j/20), \quad
g(s) = \prod_{j = 1}^{20} (s - 2/2^j), \quad
h(s) = (s - 1/2)^{20}
\end{equation}
to compare the relative error of various methods.
Figure~\ref{fig:dp15-compare} reproduces the numerical experiments they
performed by evaluating \(f(s)\) at
\(\left\{\frac{2j - 1}{72}\right\}_{j = 1}^{36}\),
\(g(s)\) at \(\left\{\frac{j}{39}\right\}_{j = 1}^{38}\) and
\(h(s)\) at \(\left\{\frac{4j}{100}\right\}_{j = 1}^{24}\).
In addition, we have included a dotted line marking the
a prior error bound for each point of evaluation.
Viewing the errors for \(f(s)\) and \(g(s)\), there is no qualitative
difference between the de Casteljau algorithm and the VS algorithm, so
the authors use \(h(s)\) as the tiebreaker to conclude
\begin{displayquote}
the algorithm with a good behavior everywhere is the de Casteljau algorithm.
\end{displayquote}
However,
\begin{equation}
h(s) = \left(s - 1/2\right)^{20} = 2^{-20} (2s - 1)^{20}
  = 2^{-20} \left[(1 - s) - s\right]^{20},
\end{equation}
i.e. it is a member of our special family of polynomials with
\(b_0 = 2^{-20}, n = 20, t = 0\). This gives the de Casteljau
algorithm an unfair advantage over the VS algorithm in a
test case that is not representative of general polynomials.

Given the quadratic growth in the number of arithmetic operations
performed in the de Casteljau algorithm, an alternative with
linear growth (i.e. the VS method) should not be discounted if
it produces similar results. The special family of polynomials
explored here explains why the de Casteljau algorithm performs
so much better than the VS method and shows that such polynomials
are not indicative of the accuracy of the two methods
relative to one another.

\section{Acknowledgements}

The author would like to thank W. Kahan the publication
(\cite{Kahan1972}) that motivated the title of this work and
is closely related to the topic at hand.

\bibliography{curious-case}
\bibliographystyle{alpha}

\appendix

\section{Proof Details}\label{sec:appendix-proof-details}

\begin{proof}[Proof of Theorem~\ref{thm:de-casteljau-bound}]
When using the de Casteljau method, we have
\(b_j^{(n)} = \widehat{b}_j^{(n)} = b_j\) and for \(k = n - 1, \ldots, 0\)
and \(j = 0, \ldots, k\):
\begin{align}
b_j^{(k)} &= (1 - s) b_j^{(k + 1)} + s b_{j + 1}^{(k + 1)} \\
\widehat{b}_j^{(k)} &= \left[(1 \ominus s) \otimes
  \widehat{b}_j^{(k + 1)}\right]
  \oplus \left[s \otimes \widehat{b}_{j + 1}^{(k + 1)}\right].
\end{align}
This means that
\begin{equation}
\widehat{b}_j^{(k)} = (1 - s) \widehat{b}_j^{(k + 1)} (1 + \theta_3)
+ s \widehat{b}_{j + 1}^{(k + 1)} (1 + \theta_2)
\end{equation}
so that
\begin{align}
\widehat{b}_0^{(0)} &= (1 - s) \widehat{b}_0^{(1)} (1 + \theta_3)
+ s \widehat{b}_{1}^{(1)} (1 + \theta_2) \\
&= \widehat{b}_0^{(2)} B_{0, 2}(s) (1 + \theta_6) +
\widehat{b}_1^{(2)} B_{1, 2}(s) (1 + \theta_5) +
\widehat{b}_2^{(2)} B_{2, 2}(s) (1 + \theta_4) \\
&= \sum_{j = 0}^n \widehat{b}_j^{(n)} B_{j, n}(s) (1 + \theta_{3n - j}) \\
&= b_0^{(0)} + \sum_{j = 0}^n b_j B_{j, n}(s) \theta_{3n - j}.
\end{align}
Hence we have
\begin{equation}
\left|p(s) - \mathtt{DeCasteljau}(p, s)\right| \leq \gamma_{3n}
  \widetilde{p}(s)
\end{equation}
as desired. Note that this differs from the bound given in
\cite{Mainar1999}, Corollary 3.2 because the authors don't consider the
round-off when computing \(\widehat{r}\).
\end{proof}

\section{VS Algorithm}\label{sec:vs-algorithm}

In \cite{Schumaker1986}, a modified form of Horner's method is
described for evaluating a polynomial in Bernstein form.
Following~\eqref{vs-transform}, the algorithm applies Horner's
method to the scaled Bernstein coefficients with an input
related to \(s\):

\begin{breakablealgorithm}
  \caption{\textit{VS algorithm for polynomial evaluation.}}
  \label{alg:vs-algorithm}

  \begin{algorithmic}
    \Function{\(\mathtt{result} = \mathtt{VS}\)}{$b, s$}
      \State \(n = \texttt{length}(b) - 1\)
      \State \(\widehat{r} = 1 \ominus s\)
      \If{\(s \geq 1/2\)}
        \State \(\widehat{\sigma} = \widehat{r} \oslash s\)
        \State \(m = s\)
        \State \(\left[c_0, \ldots, c_n\right] =
            \left[b_n, \ldots, b_0\right]\)
      \Else
        \State \(\widehat{\sigma} = s \oslash \widehat{r}\)
        \State \(m = \widehat{r}\)
        \State \(\left[c_0, \ldots, c_n\right] =
            \left[b_0, \ldots, b_n\right]\)
      \EndIf
      \\
      \State \(\widehat{p}_n = c_n\)
      \For{\(k = n - 1, \ldots, 0\)}
        \State \(\widehat{p}_k = \left[\widehat{\sigma} \otimes
            \widehat{p}_{k + 1}\right] + \left[
            \binom{n}{k} \otimes c_{k}\right]\)
      \EndFor
      \\
      \State \(\widehat{m}_1 = \widehat{m}\)
      \For{\(k = 2, \ldots, n\)}
        \State \(\widehat{m}_k = \widehat{m}_{k - 1} \otimes \widehat{m}\)
      \EndFor
      \\
      \State \(\mathtt{result} = \widehat{m}_n \otimes \widehat{p}_0\)
    \EndFunction
  \end{algorithmic}
\end{breakablealgorithm}

This has the benefit of using a linear number of floating point operations,
as compared to the de Casteljau method, which uses a quadratic
number of floating point operations.

\begin{theorem}\label{thm:vs-bound}
The value computed by the VS algorithm
(Algorithm~\ref{alg:vs-algorithm}) satisifies\footnote{
The coefficients \(\gamma_{5n}\) and \(\gamma_{6n}\) differ from
\(\gamma_{4n}\) in \cite{Delgado2009} (Theorem 4.2) because the authors
don't account for the multiplication by \(\binom{n}{k}\) in computing the
scaled Bernstein coefficients or the round-off in \(1 \ominus s\) when
computing \((1 - s)^n\).}
\begin{equation}
\left|p(s) - \mathtt{VS}(p, s)\right| \leq
  \begin{cases}
    \gamma_{6n} \widetilde{p}(s) \quad
      \text{when } s \in \left[0, 1/2\right) \\
    \gamma_{5n} \widetilde{p}(s) \quad \text{when } s \in \left[1/2, 1\right].
  \end{cases}
\end{equation}
\end{theorem}

\begin{proof}
Since the algorithm has two branches depending on \(s \geq 1/2\), we
have to make a few distinctions throughout. However, most arguments
apply to both branches of the algorithm. The following analysis
\textbf{assumes}
that there is no round-off introduced by the computation of binomial
coefficients. For \(n \leq 56\), \(\binom{n}{k}\) can be represented exactly
in IEEE-754 floating point double precision for all \(k\) but
\(\binom{57}{25}\) is the
``first'' binomial coefficient that must be rounded.

In either case, computing
\(\widehat{\sigma} = (1 \ominus s) \oslash s\) or
\(\widehat{\sigma} = s \oslash (1 \ominus s)\) requires two floating
point operations, so
\(\widehat{\sigma} = \sigma\left(1 + \theta_2\right)\). This round-off
factor contributes to \(2n\) of the \(5n\) (or \(6n\)) in the coefficient
of \(\widetilde{p}(s)\).

When \(s < 1/2\), we apply Horner's method to the scaled Bernstein
coefficients, however when \(s \geq 1/2\) we reverse the order
before performing Horner's method. As a result, we refer to
\(c_k\) and \(\widetilde{c}_k\) instead of \(b_k\) and
\(\widetilde{b}_k\). In the \(s < 1/2\) case, \(c_k = b_k\) and
in the other \(c_k = b_{n - k}\).
When computing \(p(s)\), we start with \(\widehat{p}_n = c_n\)
and then for \(k = n - 1, \ldots, 0\):
\begin{equation}
\widehat{p}_k = \left[\widehat{\sigma} \otimes \widehat{p}_{k + 1}\right]
  \oplus \left[\binom{n}{k} \otimes c_k\right].
\end{equation}
This means that
\begin{equation}
\widehat{p}_k = \sigma \widehat{p}_{k + 1} (1 + \theta_4)
+ \widetilde{c}_k (1 + \theta_2)
\end{equation}
so that\footnote{We could ignore round-off from the multiplication by
\(\binom{n}{0}\), but we don't.}:
\begin{align}
\widehat{p}_0 &= \sigma \widehat{p}_1 (1 + \theta_4)
+ \widetilde{c}_0 (1 + \theta_2) \\
&= \sigma^2 \widehat{p}_2 (1 + \theta_8) +
  \sigma \widetilde{c}_1 (1 + \theta_6) +
  \widetilde{c}_0 (1 + \theta_2) \\
%% H/T: https://tex.stackexchange.com/a/7651/32270
&\mathrel{\makebox[\widthof{=}]{\vdots}} \nonumber \\
&= \sigma^n \widehat{p}_n (1 + \theta_{4n}) +
  \sum_{j = 0}^{n - 1} \widetilde{c}_j \sigma^j (1 + \theta_{4j + 2}).
\end{align}
Defining \(\widehat{m}_0 = 1, \widehat{m}_1 = m\)
and \(\widehat{m}_{k + 1} = \widehat{m}_k \otimes m\) we'll have
\(\widehat{m}_n = m^n (1 + \theta_{n - 1})\).
Hence, in the final step of the VS algorithm we have
\begin{equation}
\widehat{m}_n \otimes \widehat{p}_0 =
m^n \widehat{p}_0 (1 + \theta_n) = m^n \left[
  \sigma^n \widetilde{c}_n (1 + \theta_{5n}) +
  \sum_{j = 0}^{n - 1} \widetilde{c}_j \sigma^j
  (1 + \theta_{4j + 2 + n})\right].
\end{equation}
When \(s < 1/2\), \(m = \widehat{r} = (1 - s)(1 + \theta_1)\), hence
\(m^n = (1 - s)^n (1 + \theta_n)\), \(\sigma = s/(1 - s)\) and
\begin{align}
\widehat{m}_n \otimes \widehat{p}_0 &= (1 - s)^n \left[
  \sigma^n \widetilde{b}_n (1 + \theta_{6n}) +
  \sum_{j = 0}^{n - 1} \widetilde{b}_j \sigma^j
  (1 + \theta_{4j + 2 + 2n})\right] \\
&= p(s) + (1 - s)^n \left[
  \sigma^n \widetilde{b}_n \theta_{6n} +
  \sum_{j = 0}^{n - 1} \widetilde{b}_j \sigma^j
  \theta_{4j + 2 + 2n}\right] \\
&= p(s) +
  b_n B_{n, n}(s) \theta_{6n} +
  \sum_{j = 0}^{n - 1} b_j B_{n - j, n}(s)
  \theta_{4j + 2 + 2n}
\end{align}
hence
\begin{equation}
\left|p(s) - \mathtt{VS}(p, s)\right| \leq \gamma_{6n}
  \widetilde{p}(s).
\end{equation}

When \(s \geq 1/2\), \(\sigma = (1 - s)/s\). Since \(m = s\), no extra
round-off accumulates in \(m^n\), but the order of the coefficients
is reversed:
\begin{align}
\widehat{m}_n \otimes \widehat{p}_0 &= s^n \left[
  \sigma^n \widetilde{b}_0 (1 + \theta_{5n}) +
  \sum_{j = 0}^{n - 1} \widetilde{b}_{n - j} \sigma^j
  (1 + \theta_{4j + 2 + n})\right] \\
&= p(s) + s^n \left[
  \sigma^n \widetilde{b}_0 \theta_{5n} +
  \sum_{j = 0}^{n - 1} \widetilde{b}_{n - j} \sigma^j
  \theta_{4j + 2 + n}\right] \\
&= p(s) +
  b_0 B_{0, n}(s) \theta_{5n} +
  \sum_{j = 0}^{n - 1} b_{n - j} B_{n - j, n}(s)
  \theta_{4j + 2 + n}
\end{align}
hence
\begin{equation}
\left|p(s) - \mathtt{VS}(p, s)\right| \leq \gamma_{5n}
  \widetilde{p}(s)
\end{equation}
as desired.
\end{proof}

\end{document}


\chapter{Signalizers and Thompson Transitivity}
\section{Thompson Transitivity}
{\bf Motivation for transitivity:}
In ${\cal N}^*(P, q)$, very often maximal elements are conjugate.
$Q \in {\cal N}^*(P, q) \rightarrow P \subseteq N(Q)$.  If
$Q_1, Q_2 \in {\cal N}^*(P, q) \rightarrow \exists c \in C(P): Q_1^c = Q_2$.
In common application, $g \in N(P)$ and $Q, Q^g \in
{\cal N}^*(P, q)$ so $\exists c \in C(P): Q^{gc}=Q$ and thus $N(P)= C(P) (N(P) \cap N(Q))$.
\\
\\
{\bf Theorem 1:}  Suppose  $A$ is an elementary abelian $p$-group such that $r(A) \ge 3$.
If $P, Q$ are $A$-invariant $p'$-groups, $\exists a \in A^{\#}: C_P(a) \ne 1 \ne C_Q(a)$.
\begin{quote}
\emph{Proof:}
Let $V$ be a subgroup of $A$ of type $(p,p)$.  Since $P= \langle C_P(v): v \in v^{\#} \rangle $,
$\exists v \in V^{\#}: C_P(v) \ne 1$.  Let $W \subseteq A$ be a group of type $(p,p)$ and
$W \cap \langle v \rangle = 1$.  $\exists w \in W: C_P(w) \cap C_P(v) \ne 1$ since
$C_P(v)$ is $W$-invariant.  $ \langle v,w \rangle $ is of type $(p,p)$ and acts on $Q$.
$\exists a \in \langle v,w \rangle^{\#}: C_Q(a) \ne 1$.  Since
$C_P(a) \supseteq C_P(w) \cap C_P(v) \ne 1$, we are done.
\end{quote}
{\bf Definition:}
${\cal N}_G(E, \pi)$ is the set of all $E$-invariant $\pi$-subgroups of $G$.
${\cal N}_G^*(E, \pi)$ is the set of all maximal elements of
${\cal N}_G(E, \pi)$.
${\cal SCN}(P)$ is the set of self-centralizing normal subgroups of $P$.
${\cal SCN}_G(p)= {\cal SCN}(P)$ where $P \in S_p(G)$.
$r(P)$ is the rank of the largest elementary abelian subgroup of $P$.
\\
\\
{\bf Theorem 2:}  Let $G$ be $p$-constrained.  If $p=2$ assume further
that the sylow subgroup has class $\le 2$.  Let $E$ be an abelian $p$ subgroup of $G$ with
$r(E) \ge 3$ and $E$ contains every $p$-element of $C= C_G(E)$.  Then
every $E$-invariant $p'$ subgroup $H$ of $G$ satisfies $H \subseteq O_{p'}(G)$.  In other
words, $ \langle {\cal N}(E, p') \rangle \subseteq O_{p'}(G)$.
\begin{quote}
\emph{Proof:}
Let $G$ be a minimal counterexample.
\\
\\
\emph{Step 1:} $O_{p'}(G)= 1$.
\\
If not, set ${\overline G}= G/O_{p'}(G)$.  Since
${\overline {C_G(E))}}= C_{\overline G}({\overline E}))$, ${\overline H} \subseteq O_{p'}({\overline G})=1$ and
$H \subseteq O_{p'}(G)$.
\\
\\
\emph{Step 2:} Set $R= O_p(G)$ and let $Q \ne 1$ be a minimal $E$-invariant $p'$ subgroup
of $G$ then $G= RQE$.
\\
If $RQE \subset G$ then $Q \subseteq O_{p'}(RQE)$ by induction hence
$[R, Q] \subseteq O_{p'}(RQE) \cap R = 1$.  By $p$-constraint, $C_G(R) \subseteq R$ proving the
result.
\\
\\
Let $S$ be a $QE$-invariant $p$ subgroup of $G$ minimal with respect to $[Q, S] \ne 1$, then
$S$ is a special $p$-group.
\\
\\
If $S$ is abelian, $S= C_S(Q) \oplus [S, Q]$.  But $[S, Q]$ is an $E$-invariant $p$ group so
$C_P(E) \cap [S,Q] \ne 1, P \in S_p(G)$.  Thus $E \cap [S,Q] \ne 1$.  But
$[E \cap [S,Q], Q] \subseteq Q \cap S = 1$ which is a contradiction.  So $S$ must be non-abelian.
Further, since $[S, Q] \ne 1$ and $S$ is minimal, $S= \Omega_1(S)$ has exponent $p$.
\\
\\
Suppose $p$ is odd.
Define a new group $T$ whose elements are te elements of $S$ and define the operation as follows:
Every element of $S$ has a square root since $p$ is odd.
Define $x \cdot y = {\sqrt x} y {\sqrt x}$.  Then $T$ is elementary abelian and $QE$ acts
on $T$.  $Fix(S)=Fix(T)$ and this contradicts what we just showed. So $p=2$.
\\
\\
Now $p=2$ and $S$ is non-abelian.  $[E,S] \subseteq  {\mathbb Z}(S)$ since $cl(SE) \le 2$.  So
$[S,E,Q] = 1$, and
$[Q, S,E] \subseteq {\mathbb Z}(S)$.
If $[E, Q] \ne 1$, then
$[E, Q] \subseteq Q$ stabilizes $S \supseteq {\mathbb Z}(S) \supseteq 1$ hence
$[E, Q] \subseteq {\mathbb Z}(S)$. But
$[E,Q]$ is an $E$ invariant subgroup of $Q$ and by minimality, $Q= [E,Q] \subseteq {\mathbb Z}(S)$
which is a contradiction.  So $[E, Q] =1$.
Thus we may assume $[S, E] \subset S$ is $Q$-invariant and the minimality of $S$ gives
$[S,E,Q]= 1$.  We also have $[E,Q,S]=1$ so $[Q,S,E]=[S,E]=1$, so $S \subseteq E$ and
$[S,Q] \subseteq Q \cap S =1$ and this contradiction concludes the proof.
\end{quote}
{\bf Observation:}  If $E \in {\cal SCN}(P), P \in S_p(G)$ and $D \in S_p(C_G(E))$.  If
$Q \in S_p(N_G(E))$ and $D \subseteq Q$, $\exists n \in N_G(E)$: $Q^n=P$ and so
$D^n \subseteq P \cap C_G(E) = E$ so $D=E$.  Hence $D \in S_p(C_G(E)$ and by Burnside,
$C_G(E)= E \times O_{p'}(C_G(E))$.
\\
\\
{\bf Thompson Transitivity Theorem (weakened result):}  Let $G$ be a group in which the
normalizer of every non-trivial $p$-subgroup is $p$-constrained.  If $p=2$ assume further
that the sylow subgroup has class $\le 2$.  Let $E$ be an abelian $p$ subgroup of $G$ with
$r(E) \ge 3$ and $E$ contains every $p$-element of $C= C_G(E)$.  Then
$O_{p'}(C)$ acts transitively on the elements of ${\cal N}^*(E, q)$ where $q \ne p$.
\begin{quote}
\emph{Proof:}
Let $ {\cal S}_1, \ldots , {\cal S}_t$ be $O_{p'}(G)$ orbits of
${\cal N}^*(E,Q)$ and suppose $t > 1$; obviously, ${\cal N}^*(E,Q) \ne \{ 1 \}$.
Let $R \ne 1$ be choosen of minimal order subject to
$R= S_i \cap S_j, S_i \in {\cal S}_i, S_j \in {\cal S}_j, i \ne j$.  WLOG $i=1, j=2$.
$N= N_G(R) \supseteq E$.  Put ${\overline N}= N/R$, $T_i = N \cap S_i \supseteq R$.
${\overline {T_i}}$ is $E$-invariant so $\exists e \in E^{\#} : C_{\overline {T_i}}(e) \ne 1$.
Since
$ C_{\overline {T_i}}(e) = {\overline {C_{T_i}(e)}} $,  $C_G(e) \cap T_i \supseteq R$.
Since $H= C_G(e)$ is $p$-constrained, $E \subseteq C_G(e)$.
\\
\\
Let $P_i= T_i \cap H$.  $R \subset P_i R$ and $P_i \subseteq N(R)$.
$P_i$ is $E$-invariant so by the previous result, $P_i \subseteq O_{p'}(H)$.
Let $L= R(N \cap H)$.  $P_i \subseteq O_{p'}(H) \cap N \subseteq O_{p'}(N \cap H)$ so
$P_i \subseteq O_{p'}(L)$ since $R \lhd L$ and $R$ is a  $p'$ group and thus
$R P_i \subseteq O_{p'}(L)$.
Now let $Q_i \supseteq Q_i R$ be ab $E$-invariant Sylow $q$ subgroup of $O_{p'}(L)$.
$\exists x \in C_G(E) \cap O_{p'}(L): Q_1^x = Q_2$.  Since $ \langle x \rangle $ is an $E$-invariant
$p'$ subgroup of $N_G(E)$ which is $p$-constrained, another application of the previous
result gives $x \in O_{p'}(N_G(E))$ and so $x \in O_{p'}(C_G(E))$.
Let $U \in {\cal N}_G^*(E,q)$ so $U \supseteq Q_1$.  Then
$U \cap S_1 \supseteq Q_1 \cap S_1 \supseteq P_1R \supseteq R$.  But
$U^x \cap S_2 \supseteq Q_1^x \cap S_2 \supseteq P_2R \supseteq R$.
Since $x \in C(E)$, $U^x$ is maximal in ${\cal N}_G(E,q)$ and by the choice of $R$,
$U^x \in {\cal S}_2$ and so
$U \in {\cal S}_2$ and ${\cal S}_1 = {\cal S}_2$.
\end{quote}
\section{Signalizers}
Let $A$ be a non-cyclic elementary abelian $p$ group acting on $G$.  $C_G(a)$ is $A$-invariant for
$a \in A^{\#}$.  By an earlier theorem, if $U$ is an $A$-invariant $p'$ group then
$U= \langle C_G(a) \cap U, a \in A^{\#} \rangle$.
\\
\\
Let $\theta$ be a map from $A^{\#}$ into
$p'$, $A$-invariant subgroups of $G$ contained in $C_G(a)$. Define $\theta(C_G(a)) = \theta(a)$.
\\
\\
Define ${\cal N}_{\theta}(A)$ be the solvable $A$-invariant $p'$ subgroups $U \leq G$ such that
$U \cap \theta(C_G(a)) \subseteq \theta(C_G(a)), \forall a \in A^{\#}$.
\\
\\
If $U \in {\cal N}_{\theta}(A)$, $\langle U \cap \theta(C_G(a)), a \in A^{\#} \rangle = U$.
\\
\\
$\theta$ is solvable if $\theta(C_G(a)) \cap C_G(b) \subseteq \theta(C_G(b)), \forall a, b \in A^{\#}$.
Equivalently, $\theta(C_G(a)) \in {\cal N}_{\theta}(A)$.
\\
\\
$\theta$ is complete if ${\cal N}_{\theta}(A)$ contains a unique maximal element $E$.
Clearly, $E = \langle \theta(C_G(a)), a \in A^{\#} \rangle$ if it exists.  So $\theta$
is complete iff $E \in {\cal N}_{\theta}(A)$.
\\
\\
Note: If $\theta(G)$ exists and $\theta(G) \ne 1$ and $G$ is simple, $M=N_G(\theta(G))$
contains the normalizers of many $p$-subgroups of $G$; this is a uniqueness subgroup.
If $\theta(G) = 1$, $G$ is often of characteristic $p$-type and we can use Thompson
factoring.
\\
\\
{\bf Definition:}
Suppose $r$, prime, $G$ finite and $A$ an abelian $r-$subgroup of $G$. An
$A-$\emph{signalizer} is a map $\theta: A^{\#} \rightarrow
{\cal N}_{\theta}(A)$
where ${\cal N}_{\theta}(A)$ is a
set of $r'$ $A-$invariant subgroups such that $a,b \in A^{\#}$ and $\theta(a) \le C_G (a)$
and $\theta(a) \cap C(b) \le \theta(b)$.  Example: $X \in r'(G)$, $X= \theta(G)$,
$\theta(a)= C_X(a), a \in A^{\#}$.
\\
\\
{\bf Example signalizer:} $X \in r'(G)$, $A \in r(G)$, $A'=1$, $X^A=X$, $\theta(a)=C_X(a), a \in A^{\#}$.
\\
\\
{\bf Note:} If $P \in S_p(G)$, $A \subseteq P$ then $N_G(A)$ permutes
${\cal N}_{G}(A, q)$ and $C_G(A)$ acts transitively so $N(P)$ normalizes some
$Q \in {\cal N}^{*}_{G}(A, q)$.  Pushing up gives $Q \in{\cal N}^{*}_{G}(P, q)$.
\\
\\
{\bf Definition:} A signalizer function is solvable if
$\theta(C_G(a) \cap C_G(b)) \le \theta(C_G(b)), \forall a, b \in A^{\#}$.  It is
\emph{complete} if ${\cal N}_{\theta}(A)$ contains a unique maximal element.
\\
\\
{\bf Motivation for signalizers:}  Suppose $G$ has no solvable normal subgroups, what is
$H= C_G(z), z \in Inv(G)$?  $\theta(G,A)$ is a proper $p'$-group and either (i)
$\theta(G, A) \lhd G$ or (ii) $N_G(\theta(G,A))$ is strongly $p$-embedded.
Below, we show $m(A) \ge 3$ then every $A-$signalizer functor is complete.
If $H$ is strongly $p$-embedded then the representation of $G$ on the right
cosets of $H$ in $G$ has the property that all the $p$-elements of $G$ fixes
exactly $1$ point.  Simple groups with strongly $p$-embedded subgroups were classified
by Bender.
\\
\\
{\bf Theorem 3:}
Let $p$ be a prime and $\theta: a \mapsto O_{p'}(C_G(a))$.
(1) If $C_G(a)$ is
solvable $\forall a \in A^{\#}$ then $\theta$ is a solvable $A$-signalizer
functor on $G$,
(2) Suppose $G$ is solvable then $\theta$ is complete and $\theta(G)= O_{p'}(G)$.
\begin{quote}
\emph{Proof:}
The theorem that if $O_{p'}(G)=1$ and $C_G(O_p(G)) \le O_p(G)$ means that for
$p \in p(G)$, $O_{p'}(N_G(P)) =O_{p'}(G) \cap N_G(P)$ insures the inclusion property
for $\theta$ holds  It also insures that
$O_{p'}(G)= \langle \theta(C_G(a)) : a \in A^{\#} \rangle$.
\end{quote}
{\bf Theorem 4:}
Let $X, Y \in {\cal N}_{\theta}(A)$ and $XY = YX$ and suppose that either
(1) $Y \le N_G(X)$ or (1') $XY$ is solvable, then $XY \in {\cal N}_{\theta}(A)$.
\begin{quote}
\emph{Proof:}
(1) insures $XY$ is an $A$-invariant solvable $p'$-group and so
$C_{XY}(a)= C_X(a) C_Y(a) \le C_a , \forall a \in A^{\#}$.  This proves the result.
\end{quote}
{\bf Theorem 5:}
Let $N$ be an $A$-invariant normal $p'$-subgroup of $G$ and ${\overline G}= G/N$ then
${\overline {\theta}}: a \mapsto {\overline {\theta}}(C_{\overline G}(a))= {\overline C}_a$
is a solvable signalizer functor  of ${\overline G}$ and
${\overline {{\cal N}_{\theta}(A)}} \subseteq {\cal N}_{\overline {\theta}} (A)$.
\begin{quote}
\emph{Proof:}
Let $a, b \in A^{\#}$ and $M= N C_a$ so
$ {\overline M} =
{\overline {\theta}}(C_{\overline G}(a)) $
and $ C_{\overline M}(b) = {\overline {C_M(b)}}$.  It follows that
$C_M(b)= C_N(b) C_{C_a}(b)= C_N(b) (C_a \cap C_{G}(b)) \le
{\overline {\theta}}(C_{\overline G}(a)) $.
Similarly for $U \in {\cal N}_{\theta}(A)$
$C_{\overline U}(a)= {\overline {C_U(a)}}= {\overline {C_a \cap U}}
\le {\overline {\theta}}(C_{\overline G}(a)) $.
So ${\overline U} \in {\cal N}_{\overline {\theta}}(A)$.
\end{quote}
{\bf Theorem 6:}
Assume in the previous result that $N \in
{\cal N}_{\theta}(A)$  then $
{\overline {{\cal N}_{\theta}(A)}} =
{\cal N}_{\overline {\theta}}(A)$.  In particular, $\theta$ is complete iff ${\overline {\theta}}$
is complete.
\begin{quote}
\emph{Proof:}
Let $N \le U < G$ such that
${\overline U} \in {\cal N}_{\overline {\theta}}(A)$.  STS
$U \in {\cal N}_{\theta}(A)$.  For $a \in A^{\#}$,
$ {\overline {C_U(a)}} = C_{\overline U}(a)
\le {\overline {\theta}}(C_{\overline G}(a))= {\overline C}_a= C_a N/N$ and thus
$C_U(a) \le N C_a \cap C_G(a) = C_N(a) C_a \le C_a$  since $N \in
{\cal N}_{\theta}(A) $ so
$U \in {\cal N}_{\theta}(A)$.  Set $\pi(\theta) = \bigcup_{a \in A^{\#}} \pi(C_a)$.
\end{quote}
{\bf Theorem 7:} Let $U \in
{\cal N}_{\theta}(A)$ then $\pi(U) \subseteq \pi(C_a)$.
\begin{quote}
\emph{Proof:}
This is clear.
\end{quote}
{\bf Definition:}
$C_A = \theta(C_G(A))$.
If $p \notin \pi$, $C_a= \theta(C_G(a))$ then $C_a$ contains a unique
maximal $AC_A$-invariant $\pi$-subgroup denoted by $\theta_{\pi}(C_G(a))$.
\\
\\
{\bf Theorem 8:}
The mapping
$\theta_{\pi}: a \mapsto
\theta_{\pi}(C_G(a))$ is a solvable $A$-signalizer functor on $G$ satisfying
$\pi(\theta_{\pi}) \subseteq \pi$ and
$\{ U \in
{\cal N}_{\theta}(A, \pi): U^{C_A} = U \} \subseteq
{\cal N}_{\theta_{\pi}}(A)$.
\begin{quote}
\emph{Proof:}
Let $a, b \in A^{\#}$ then
$\theta_{\pi}(C_G(a)) \cap C_G(b)$ is an $A C_A$-invariant
$\pi$ subgroup of $C_b$  Thus
$\theta_{\pi}(C_G(a)) \cap C_G(b)$ is contained in the unique maximal
$A C_A$-invariant $\pi$-subgroup
$\theta_{\pi}(C_G(b))$,  This shows that $\theta_{\pi}$ is a solvable
$A$-signalizer functor on $G$.
Clearly, $\pi(\theta_{\pi}) \subseteq  \pi$ and the other property
follows from the uniqueness of $\theta_{\pi}(C_G(a))$.
\end{quote}
{\bf Theorem 9:} Let $U \in
{\cal N}_{\theta}(A)$ then $\pi(U) \subseteq \pi(\theta)$.
\begin{quote}
\emph{Proof:}
For every $q \in \pi(U)$, there is an $A$-invariant Sylow $q$-subgroup
$Q$ of $U$.  Moreover, since $A$ is non-cyclic, $\exists a \in A$ such that
$C_Q(a) \ne 1$.  Thus $C_Q(a) \le C_U(a) \le C_a$, we get $q \in \pi(\theta)$.
\end{quote}
{\bf Theorem 10:}
Let $A$ be an elementary abelian $p$-group with $r(A) \ge 3$ that acts on the
group $X$ and let $p \ne q \in \pi(X)$.  Suppose $Q_1$
and $Q_2$ are two $A$-invariant $q$-subgroups of $X$ such that for $D= Q_1 \cap Q_2$
$Q_1 \ne D \ne Q_2$ then $\exists a \in A^{\#}$ such that
$N_G(D) \cap C_{Q_i}(a) \nleq D, i= 1, 2$.
\begin{quote}
\emph{Proof:}
Since $Q_1 \ne D \ne Q_2$, we get $D < N_{Q_i}(D)= N_i , i= 1, 2$ and
$N_i= \langle C_{N_i}(B) \rangle$, $B \le A$ and $r(A/B) \le 1$.  For $i= 1, 2$
there is a maximal subgroup $B_i$ of $A$ such that $C_{N_i}(B_i) \nleq D$.
Because $r(A) \ge 3$, we get $B_1 \cap B_2 \ne 1$.  Now choose $1 \ne a \in B_1 \cap B_2$.
\end{quote}
{\bf Transitivity Theorem:}   Let $\theta$ be a solvable $A$-signalizer functor on $G$,
$q \in \pi(\theta)$ and suppose $r(A) \ge 3$ then the elements in ${\cal N}^{*}_{\theta}(A, q)$
are conjugate in $C_A$.
\begin{quote}
\emph{Proof:}
Assume the assertion is false.  Among all pairs of elements
${\cal N}^*_{\theta}(A, q)$ that are not conjugate under $C_A$,
we choose $Q_1$ and $Q_2$ such that $D = Q_1 \cap Q_2$ is maximal.
Set $N= N_G(D)$ and $N_a = N \cap C_a, a \in A^{\#}$.  There is an
$a \in A^{\#}$, such that
$N_a \cap Q_1 \nleq D$ and
$N_a \cap Q_2 \nleq D$.
$N_a$ is an $A$-invariant $p'$-group, thus $\exists c \in C_{N_a}(A) \le C_A$
such that $E= \langle (N_a \cap Q_1)^c, N_a \cap Q_2 \rangle$ is an
$A$-invariant $q$-subgroup.  Since $D$ and $E$ are in
${\cal N}_{\theta}(A, q)$.  So $\exists Q_3 \in {\cal N}^*_{\theta}(A, q)$
containing $DE$, so
$D < D(N_a \cap Q_1)^c \le Q_1^c \cap Q_3$ and.
$D < D(N_a \cap Q_2) \le Q_2 \cap Q_3$.  The maximal choice of $D$ implies that
$Q_1^c$ and $Q_3$ are conjugate under $C_A$ as well as $Q_2$ and $Q_3$.  But
then also $Q_1$ and $Q_2$ are conjugate under $C_A$, a contradiction.
\end{quote}
{\bf Theorem 11:}
Let $q \in \pi(\theta)$ and
$Q \in {\cal N}^*_{\theta}(A, q)$ and suppose $r(A) \ge 3$ then
(1) $\forall H \in
{\cal N}_{\theta}(A)$  $\exists c \in C_A$ such that $Q^c \cap H$ is an $A$-invariant
Sylow $q$-subgroup of $H$;  and (2)
$C_Q(B)$ is an $A$-invariant Sylow $q$-subgroup of $C_B$ for every $1 \ne B \le A$.
\begin{quote}
\emph{Proof:}
Every $A$-invariant Sylow $q$-subgroup, $Q_1$ of $H$ is in
${\cal N}_{\theta_{\pi}}(A)$ and is thus contained in an element $Q_2 \in
{\cal N}^*_{\theta_{\pi}}(A)$.  So $\exists c \in C_A: Q_2= Q^c$ and
$Q^c \cap H = Q_1$.  Part 2 follows from 1 with $H= C_B$ since $C_A \le C_B$.
\end{quote}
{\bf Theorem 12:}
If $|\pi(\theta)| \le 1$ and $r(A) \ge 3$ then $\theta$ is complete.
\begin{quote}
\emph{Proof:}
The case $\pi(\theta) = \emptyset$ gives $\theta(G) = 1$.
Assume $\pi(\theta)= \{ q \}$.  Then
$ {\cal N}_{\theta}(A) {\cal N}_{\theta}(A, q) $, and
$\exists Q \in {\cal N}^*_{\theta}(A) $
such that $C_A \le Q$ and by the previous result, $Q$ is the only element in
${\cal N}^*_{\theta}(A, q) $.
\end{quote}
{\bf Theorem 13:}
Let $G$ be a solvable $p'$ group and $q \in \pi(G)$.  Suppose $U$ is a $q'$ group of
$G$ such that $[U,C_G(B)]$ is a $q'$ group for every maximal subgroup $B$ of $A$.  Then
$U \leq O_{p'}(G)$.
\begin{quote}
\emph{Proof:} See Stellmacher, p 325.
\end{quote}
{\bf Glauberman's Theorem:} Let $\theta$ be a solvable signalizer functor on $G$
and $r(A) \ge 3$ then $\theta$ is complete.
\begin{quote}
\emph{Proof:} See Stellmacher, p 327.
\end{quote}
\section {Factorizations}
{\bf Theorem 14a:}
Suppose the action of $A$ on $G$ is coprime and $G=XY$ with $X$ and $Y$ $A$-invariant then
$C_G(A)= C_X(A) C_Y(A)$.
\begin{quote}
\emph{Proof:}
Let $g=xy \in G$.  $xy = (xy)^a=x^a y^a$.  So $x^{-1}x^a = yy^{-a} \in X \cap Y$.
$(xU)^a=xU$ and $(Uy)^a=Uy$, so
$\exists c \in C_X(A), x=cu$ and
$\exists d \in C_Y(A), y=wu$.  $cuwd \in C_G(A) \cap X \cap Y$, so $uw \in C_X(A) C_Y(A)$.
\end{quote}
{\bf Theorem 14:}
If $p \in \pi(G)$ and ${\overline G}= G/ O_{p'}(G)$ and suppose ${\overline G}$ is $p$-constrained
then $\forall P \in p(G)$, $O_{p'}(N_G(P)) = O_{p'}(G) \cap N_G(P)$.
\begin{quote}
\emph{Proof:}
$C_G(P) \lhd N_G(P) \rightarrow O_{p'}(N_G(P))= O_{p'}(C_G(P))$ so it STS
$O_{p'}(G) \cap C_G(P) = O_{p'}(C_G(P))$.  Assume $O_{p'}(G)=1$ and put $Q=O_{p'}(C_G(P))$.
$C_G(O_p(G)) \subseteq O_p(G)$ and $[P,Q]=1$ so we can apply Thompson's $p \times q$ lemma
to show $Q$ acts trivially on $C_G(P)$ and $Q \leq C_G(O_p(G)) \leq O_p(G)$ and $Q=1$.
\end{quote}
{\bf Theorem 15:}
Let $P \in p(G)$ and $U \leq O_{p'}(N_G(P))$.  Suppose $U$ and $P$ are contained in some solvable group
$L$.  Then $U \leq O_{p'}(L)$.
\begin{quote}
\emph{Proof:} Todo.
\end{quote}
{\bf Definition:} For $q \in \pi(\theta)$, put $\theta_{q'} = \theta_{\pi(\theta) \setminus Q}$.
$\theta$ is locally complete if $\theta_{N_G(U)}$ is complete for $U \in {\cal N}_{\theta}(A)$ and
$\theta_{q'}$ is complete for all $q \in \pi(\theta)$.
\\
\\
{\bf Theorem 16:}
Let $G$ be a $p'$-group and $X$ and $Y$ be two $A$-invariant subgroups if $G$.  Suppose further,
(1) $C_G(a)= C_X(a)C_Y(a)$ for all $a \in A^{\#}$ and (2) $X$ is $C_G(A)$-invariant then $G=XY$.
\begin{quote}
\emph{Proof:} See Stellbacher, p 312.
\end{quote}
\section{More from Thompson}
{\bf Thompson Transitivity Theorem:}  If $G$ is a group in which
the normalizer of every non-identity $p$-subgroup is $p$-constrained
and if $A \in {\cal SCN}_3(p)$ then $C_G(A)$ permutes all
maximal $A$-invariant $q$ groups of $G$, $q \ne p$.
\begin{quote}
\emph{Proof:}
Generalization of earlier result.
\end{quote}
{\bf Consequence:}
Under the TTT conditions, if $P \in S_p(G), A \in {\cal SCN}_3(P)$ and $\forall q \ne p$,
$P$ normalizes some $A-$invariant $q-$subgroup of $G$; so if $P$ normalizes no
$p'$ subgroup of $G$, neither does $A$.
\\
\\
{\bf Maximal Subgroup Theorem:}
If $P \in S_p(G), {\cal SCN}_3(P) \ne \emptyset, p \ne 2$ and every element of
${\cal N}^*(P)$
is $p-$constrained and $p-$stable and $\exists H, 1 \ne H \lhd P$: $[Q,P]=1$ if $H \in p'(G)$
and $H^P=H$ then ${\cal N}^*(P)$ has a unique maximal element.
\begin{quote}
\emph{Proof:}
Generalization of earlier result.
\end{quote}
{\bf Thompson (from N-group paper):} $G$ is not solvable iff
$\exists x, y, z \in G \setminus \{1\}$
with $(|x|, |y|)=(|y|,|z|)=(|x|,|z|)=1$ such that $xy=z$.  If $G$ is a non-abelian
simple group all of whose $p-$locals are solvable then $G$ is isomorphic to one
of the following: (1) $PSL_2 (q), q > 3$, (2) $Sz(q), q= 2^{2m+1}, m \ge 1$ or (3)
$A_7$, $PSL(2(3)$, $U_3(3)$, or $M_{11}$.
\begin{quote}
\emph{Proof:}
The proof is too long for this paper.
\end{quote}
{\bf Theorem 13:} If $M$ is a maximal subgroup of $G$, $p \in \pi(M)$, $O_{p'}(M) \ne 1$
then all maximal primitive subgroups are conjugate to $M$.
\begin{quote}
\end{quote}
{\bf Thompson Transfer Theorem:} Let $S \in S_2(G)$ and suppose $\exists U \le G$ maximal
and $t \in Inv(S) \rightarrow t^G \cap U = \emptyset$ then $t \notin O^2(G)$.
\begin{quote}
\end{quote}
\section{Bender Uniqueness}
{\bf Observation:} The following uniqueness result is used in the simplification of the
odd order result.
\\
\\
{\bf Bender's Theorem:}
Let $G$ be a minimal subgroup of odd order and $U$ be a elementary abelian subgroup of
order $p^3$ then there is one maximal subgroup of $G$ containing $U$.


\documentclass[twoside]{MATH77}
\usepackage{multicol}
\usepackage[fleqn,reqno,centertags]{amsmath}
\begin{document}
\begmath 11.3 Conversion between Chebyshev and Monomial
\hbox{Representations of a Polynomial}

\silentfootnote{$^\copyright$1997 Calif. Inst. of Technology, \thisyear \ Math \`a la Carte, Inc.}

\subsection{Purpose}

These subroutines convert a polynomial represented in the monomial basis to
a representation in the Chebyshev basis, and vice versa.

\subsection{Usage}

{\bf B.1 Program Prototype, Single Precision}
\begin{description}
\item[INTEGER]  \ {\bf N}

\item[REAL]  {\bf COEFF}(0:$\geq $N)
\end{description}
Assign values to N, and to coefficients in COEFF(). If COEFF(i) contains
coefficients of $T_i(x)$, $i = 0$, 1, ..., N, which are to be converted to
coefficients of $x^i$,
$$
\fbox{{\bf CALL SCONCM(N, COEFF)}}
$$
For the inverse operation,
$$
\fbox{{\bf CALL SCONMC(N, COEFF)}}
$$
\subsubsection{Argument Definitions}
\begin{description}
\item[N]  \ [in] The degree of the polynomial.

\item[COEFF]  \ [inout] When calling SCONCM, COEFF(i) contains the
coefficient of $T_i$, $i=0$, 1, ... N, on input, and contains the
coefficient of $x^i$ on output. When calling SCONMC, COEFF(i) contains the
coefficient of $x^i$, $i=0$, 1, ..., N on input, and the coefficient of $T_i$
on output.
\end{description}
\subsubsection{Modifications for Double Precision}

Change the names SCONCM and SCONMC to DCONCM and DCONMC respectively, and
change the REAL declaration to DOUBLE PRECISION.

\subsection{Examples and Remarks}

The program DRSCON prints out the coefficients of the Chebyshev polynomials
corresponding to $x^k$, $k = 0$, 1, ..., 6, and then prints the coefficients
in the monomial basis corresponding to the Chebyshev polynomials $T_k$, $k =
0$, 1, ..., 6. Results are in the file ODSCON.

If these subroutines are applied to a coefficient array, say P(), obtained
from SPFIT, Chapter~11.1, the zero$^{th}$ order coefficient is in P($3)$ so
the call would be of the form SCONxx(NDEG, P($3))$, where xx is either CM or
MC.

\subsection{Functional Description}

Consider the polynomial $p_n(x)$ of degree $n$,
\begin{equation}
\label{O1}p_n(x)=\sum_{k=0}^na_kx^k\equiv \sum_{k=0}^nc_kT_k(x)
\end{equation}
where $T_k(x)$ is the $k^{th}$ Chebyshev polynomial. This software
converts between the $a_k$'s and the $c_k$'s.

Using the well-known identities,
\begin{equation}
\label{O2}
\begin{split}
xT_k(x)&=\frac 12\left[ T_{k+1}(x)+T_{k-1}(x)\right],\ \ k>1\\
xT_0(x)&=T_1(x)=x,
\end{split}
\end{equation}
we can write $p_n$ in forms intermediate between the extremes represented
in Eq.\,(1). It is these intermediate forms that are used in obtaining the
recurrences. Thus
\begin{align}
\label{O3}
p_n(x) &=\sum_{k=0}^{j-1}a_kx^k+x^j\sum_{k=0}^{n-j}b_{k,j}T_k(x)\\
\label{04}
 &\equiv \sum_{k=0}^ja_kx^k+x^{j+1}\sum_{k=0}^{n-j-1}b_{k,j+1}T_k(x)
\hspace{-1in}
\end{align}
Note that $b_{k,0}\equiv c_k$. Using Eq.\,(2), Eq.\,(4) gives
\begin{multline}
\label{O5}
p_n(x)=\sum_{k=0}^{j}a_kx^k+\frac{x^j}2 \sum_{k=1}^{n-j-1}
b_{k,j+1}\bigl [ T_{k+1}(x)\\
+\ T_{k-1}(x)\bigr ]+x^jb_{0,j+1}T_1(x).
\end{multline}
Collecting like terms in Eqs.\,(3) and (5), we obtain,
\begin{equation}\label{O6}
\hspace{-15pt}\begin{split}
a_j+\frac 12b_{1,j+1} &= b_{0,j}\\
b_{0,j+1}+\frac 12 b_{2,j+1} &=b_{1,j}\\
\frac 12\left[ b_{k-1,j+1}+b_{k+1,j+1}\right] &=
b_{k,j},\ k=2,3,...,n-j-2\\
\frac 12b_{k-1,j+1} &= b_{k,j},\ k\geq n-j-1.
\end{split}
\end{equation}
A more efficient recursion is obtained with $b_{k,j}$ replaced by
$2^jB_{k,j}$. Thus,
\begin{equation}\label{O7}
\hspace{-15pt}\begin{split}
2^{-j}a_j+B_{1,j+1} &= B_{0,j}\\
2 B_{0,j+1}+B_{2,j+1} &= B_{1,j}\\
B_{k-1,j+1}+B_{k+1,j+1} &= B_{k,j},\ k=2,3,...,n-j-2\\
B_{k-1,j+1} &= B_{k,j}, \ k\geq n-j-1.
\end{split}
\end{equation}
In the code, the $B_{k-j,k}$ share space with the original $a_k$ or the
original $c_k$. If one starts with the $a_k$ then one runs $j$ from $n$ down
to~0, and otherwise $j$ runs in the opposite direction. Observe that the
innermost loop requires only a single addition.

\subsection{Error Procedures and Restrictions}

If $n < 0$, a return is made without taking any action.

\subsection{Supporting Information}

The source language is ANSI Fortran~77.
Algorithm and code by F.\ T.\ Krogh, JPL, January 1992.

\begin{tabular}{@{\bf}l@{\hspace{5pt}}l}
\bf Entry & \hspace{.35in} {\bf Required Files}\vspace{2pt} \\
DCONCM & \parbox[t]{2.7in}{\hyphenpenalty10000 \raggedright
\hspace{.35in} DCONCM\rule[-5pt]{0pt}{8pt}}\\
DCONMC & \parbox[t]{2.7in}{\hyphenpenalty10000 \raggedright
\hspace{.35in} DCONMC\rule[-5pt]{0pt}{8pt}}\\
SCONCM & \parbox[t]{2.7in}{\hyphenpenalty10000 \raggedright
\hspace{.35in} SCONCM\rule[-5pt]{0pt}{8pt}}\\
SCONMC & \parbox[t]{2.7in}{\hyphenpenalty10000 \raggedright
\hspace{.35in} SCONMC}\\
\end{tabular}

\begcode

\medskip\
\lstset{language=[77]Fortran,showstringspaces=false} \lstset{xleftmargin=.8in}

\centerline{\bf \large DRSCON}\vspace{10pt}
\lstinputlisting{\codeloc{scon}}
\newpage

\vspace{30pt}\centerline{\bf \large ODSCON}\vspace{10pt}
\lstset{language={}}
\lstinputlisting{\outputloc{scon}}
\end{document}