\chapter{Payment channels, a micropayment network}
\label{chap:paymentChannels}

Payment channels or micropayment channels, as mentioned previously, are one part
of the scalability solution. The idea of payment channels was suggested by
Satoshi in an email to Mike Hearn. Since then, various schemes to construct
such structures have been proposed. To have a better understanding of the
differences between various channel schemes, and to be able to analyze a channel
scheme objectively, a few formal definitions are needed. A list of formal definitions for
payment channel construction is proposed. An analysis of different commonly
exposed payment channel constructions is done following these definitions. The
list does not contain all the payment channel schemes, some of them
might be missing. However, the list contains a fairly good representation of the
different existing constructions.

Schemes can be optimized when a provider has multiple clients through multiple
channels. In this scenario the core feature is to be as cheap as possible for
the provider while being flexible for settlement. This specific case has been
explored through a white paper present in the following appendices. The content
of the white paper is summarized following the analysis.

Channels can be optimized with threshold cryptography. In fact, the amount
economized can be significative according to the cases. An analysis is performed
to define, with and without \gls{segwit}, possible savings for
payment channel transactions.

\minitoc

\newpage

% -----------------------------------------------------------------------------
\section{Formal definitions}

These formal definitions specify the necessary and sufficient conditions for a
payment channel to be qualified as a member of a specific set. They set boundaries or limits that separate
the term from any other term. The following formal definitions qualify
properties that micropayment channels based on a blockchain such as Bitcoin can
have with the view of a particular player. Transactions represent a set of
information with a special meaning for the given blockchain that modify the
channel state. A transaction can be broadcast to the network to effectively
affect the on chain channel state or been kept by the player. Players are users of the
given blockchain and they own funds. Funds are owned by one and only one
player at a time. The meaning of owning an amount of funds in a channel for a given player is defined as holding a transaction not yet broadcast that allows this player to claim this amount of funds.

\begin{definition}[Trustless]
  A channel is trustless for a player $p_i \in \mathcal{P} = \{\mathcal{P}_0,
  \dots, \mathcal{P}_n\}$ if and only if the safety of his funds at each step
  $\mathcal{S}$ of the protocol does not depend on the behavior of players $\mathcal{P}' =
  \mathcal{P} - p_i$.
\end{definition}

\begin{definition}[Optimal]
  A channel is optimal for a player $p_i \in \mathcal{P} = \{\mathcal{P}_0, \dots,
  \mathcal{P}_n\}$ if and only if the number of transactions
  $\mathcal{T}(\mathcal{C})$ needed to claim the funds for a given constraint
  $\mathcal{C}$ is equal to the number of moves $\mathcal{M}(\mathcal{C})$ needed
  to satisfy the constraint at any time.
\end{definition}

For example, for a refund constraint $\mathcal{C}$ in a channel $\mathcal{P}_1 \rightarrow \mathcal{P}_2$,
refunding $\mathcal{P}_1$ requires $\mathcal{M}(\mathcal{C}) = 1$, thus
an optimal scheme requires $\mathcal{T}(\mathcal{C}) = \mathcal{M}(\mathcal{C}) = 1$.

\begin{definition}[Open-ended]
  A channel is open-ended for a player $p_i \in \mathcal{P} = \{\mathcal{P}_0,
  \dots, \mathcal{P}_n\}$ if and only if there is no predetermined channel
  lifetime at the setup.
\end{definition}

A channel that is not open-ended can have a mechanism to refresh the channel
on-chain with a designated transaction before the end of the lifetime.

\begin{definition}[Undelayed]
  A channel is undelayed for a player $p_i \in \mathcal{P} = \{\mathcal{P}_0,
  \dots, \mathcal{P}_n\}$ if and only if this player can broadcast their set of
  transactions at any time.
\end{definition}

\begin{definition}[Non-interactive]
  A channel is non-interactive for a player $p_i \in \mathcal{P} =
  \{\mathcal{P}_0, \dots, \mathcal{P}_n\}$ if and only if this player does not
  have the responsibility to watch the targeted blockchain to react to arbitrary events $\mathcal{E}$ in order to guarantee their safety.
\end{definition}

With these five definitions, it is possible to infer a significant necessary
corollary. If a channel is undelayed for a player this player can broadcast his
latest state without constraint, and if this channel is also optimal for the
same player only one transaction is needed to move the funds. If only one
transaction is needed to move the funds, then the funds are directly available
for this player. If the funds are available instantly, then the channel is
instantaneous for the player.

\begin{corollary}[Instantaneous]
  A channel is instantaneous for a player $p_i \in \mathcal{P} = \{\mathcal{P}_0, \dots,
  \mathcal{P}_n\}$ if and only if the channel is undelayed and optimal for this
  player.
\end{corollary}

\subsection{Types of payment channel}

We can distinguish two type of channels, unidirectional channels that allow
one user to send money to another user and bidirectional
channels that allow two users to send in either direction. Usually, a
bidirectional channel is more optimal than two unidirectional channels but
introduces other constraints.

\subsubsection{Unidirectional}

In a two-player unidirectional channel, there is a payer, later referred to as
player-one or client, and a payee, later referred to as player-two or provider.
It is not possible to transfer money back in the reverse direction in the
channel. These channels are asymmetric, each player benefits from different channel
properties. The analysis must be done in the view of each player $p_i \in
\mathcal{P} = \{\mathcal{P}_0, \dots, \mathcal{P}_n\}$ at a time.

\subsubsection{Bidirectional}

In a two-player bidirectional channel $\mathcal{C}$, the player $A$ and the
player $B$ can send funds in direction $\mathcal{C}_{AB}$ and
$\mathcal{C}_{BA}$. A bidirectional channel can be a specific scheme or a
pairing of existing unidirectional channels. These channels are generaly
symmetric, each player $p_i \in \mathcal{P} = \{\mathcal{P}_0, \dots,
\mathcal{P}_n\}$ benefits from the same channel properties.

\section{Analysis of payment channels}

\subsection{Spilman-style payment channels}

Spilman-style payment channels, proposed by Jeremy Spilman in 2013
\cite{SpilmanStyle}, are the most simple construction of a unidirectional
payment channel. They have a finite lifetime predefined at the setup phase and
the client, i.e., the payer, cannot trigger their refund before the end of the
channel lifetime (but he can receive his funds back if the payee settles the
channel before the end of the lifetime.) The channel is one-time use. When the
payer or the payee get their funds, the channel is closing. Neither the payer nor the
payee need to watch the blockchain to react to events during the lifetime of
the channel because only the payee can broadcast a transaction, so both do not
need to watch the blockchain to be safe. It is worth noting that, without a
proper fix to transaction malleability \cite{SegWitBIP, BIP62,
DBLP:journals/corr/AndrychowiczDMM13, DBLP:journals/corr/DeckerW14}, this scheme
is not secure.

\begin{table}[h]
  \begin{tabularx}{\textwidth}{ | X | l | l | l | l | l |}
  \hline
  Player & Trustless & Optimal & Open-ended & Undelayed & Non-interactive \\ \hline \hline
  Payer & Yes & Yes & No & No & Yes \\ \hline
  Payee & Yes & Yes & No & Yes & Yes \\
  \hline
  \end{tabularx}
  \caption{Summary of Spilman-style payment channel properties}
  \label{fig:summarySpilmanPaymentChannel}
\end{table}

According to the previous definitions, Spilman-style ephemeral payment channels are
instantaneous non-interactive channels for the payee, and optimal non-interactive for
the payer.

\subsection{\texttt{CLTV}-style payment channels}

Introduced in 2015, \texttt{CLTV}-style payment channels are a solution to the malleability
problem in Spilman-style payment channels. With the new \texttt{OP\_CODE} check
locktime verify (\texttt{OP\_CHECKLOCKTIMEVERIFY}), redefining the
\texttt{OP\_NOP2}, it is possible to enforce the non-spending of a transaction
output until some time in the future. With \texttt{OP\_CHECKLOCKTIMEVERIFY} a
transaction output can enforce the spending transaction to have a
\texttt{nLockTime} later or equal to the specified value in the script
\cite{BIP65}.

Instead of creating a funding transaction and a refund transaction vulnerable to
transaction malleability attacks, the client creates the funding transaction
output with a script (Listing~\ref{lst:scriptPubKeyCLTV}) that allows the
provider and the client to spend the funds
with co-operation or after a lock time the client can spend the funds without
the co-operation of the provider.

\begin{listing}
  \begin{minted}[breaklines=true,fontsize=\scriptsize]{text}
IF
    <provider pubkey> CHECKSIGVERIFY
ELSE
    <expiry time> CHECKLOCKTIMEVERIFY DROP
ENDIF
<client pubkey> CHECKSIG
  \end{minted}
	\caption{Locking script (scriptPubKey) with \texttt{CHECKLOCKTIMEVERIFY}}
	\label{lst:scriptPubKeyCLTV}
\end{listing}

\texttt{CLTV}-style payment channels have the same properties as Spilman-style payment
channels following the previous definitions but are not subject to transaction
malleability attacks.

\subsection{Decker-Wattenhofer duplex payment channels}

Decker-Wattenhofer duplex payment channels \cite{Decker2015fast}, also called
\gls{dmc}, proposed in 2015, are bidirectional channels based on pairs of
Spilman-style unidirectional channels. The construction has a finite lifetime
predefined at the setup phase but can be refreshed on-chain to keep the channel
open with an updated state. During the refresh process, it is possible to refill
the channel, and the scheme allows payment routing with \gls{htlc}.

\gls{dmc} payment channels are not optimal. Uncooperative closing of the channel
requires $d + 2$ transactions (where $d$ is equal to the revocation tree depth).
They are not undelayed, without other players cooperation the funds are
recovered after \texttt{nLockTime} values. \gls{dmc} are not open-ended, a
dedicated transaction needs to be broadcast before the end of the
\texttt{nLockTime}.

\begin{table}[h]
  \begin{tabularx}{\textwidth}{ | X | l | l | l | X |}
  \hline
  Trustless & Optimal & Open-ended & Undelayed & Non-interactive \\ \hline \hline
  Yes & No & (Yes) & No & No \\
  \hline
  \end{tabularx}
  \caption{Summary of Decker-Wattenhofer duplex payment channel properties}
  \label{fig:summaryDeckerWattenhoferPaymentChannel}
\end{table}

\subsection{Poon-Dryja payment channels}

Poon-Dryja payment channels, also called Lightning Network, is a proposed
implementation of \gls{htlc} with bidirectional payment channels which allow
payments to be securely routed across multiple peer-to-peer payment channels
\cite{poon2016bitcoin}.

\begin{table}[h]
  \begin{tabularx}{\textwidth}{ | X | l | l | l | X |}
  \hline
  Trustless & Optimal & Open-ended & Undelayed & Non-interactive \\ \hline \hline
  Yes & No & Yes & Yes & No \\
  \hline
  \end{tabularx}
  \caption{Summary of Poon-Dryja payment channel properties}
  \label{fig:summaryPoonDryjaPaymentChannel}
\end{table}

Their scheme is trustless (assuming that \gls{segwit} has been implemented),
open-ended, and undelayed but not optimal when the channel closes without
co-operation nor non-interactive.

\subsection{Summary}

\begin{table}[h]
  \begin{tabularx}{\textwidth}{ | X | l | l | l | l | l |}
  \hline
  Channel & Type & Optimal & Open-ended & Undelayed & Non-inter. \\ \hline \hline
  Spilman-style & Uni & Yes/Yes & No/No & No/Yes & Yes/Yes \\ \hline
  CLTV-style & Uni & Yes/Yes & No/No & No/Yes & Yes/Yes \\ \hline
  Decker-Wattenhofer \gls{dmc} & Bi & No & (Yes) & No & No \\ \hline
  Poon-Dryja & Bi & No & Yes & Yes & No \\ \hline
  Shababi-Gugger-Lebrecht & Uni & No/Yes & Yes/Yes & No/Yes & Yes/No \\
  \hline
  \end{tabularx}
  \caption{Summary of different payment channels}
  \label{fig:summaryPaymentChannel}
\end{table}

This table summarizes the different properties of the proposed definitions of
common channel schemes. The last row refers to the next presented scheme.

% -----------------------------------------------------------------------------
\section{One-way channel (Shababi-Gugger-Lebrecht)}

Our one-way payment channel for Bitcoin is a modified version of other layer-two
applications, such as \say{Yours Lightning Protocol} or Lightning Network
\cite{poon2016bitcoin, YoursLightningProtocol}. The scheme is specially designed
for a client to provider scenario, where the provider has multiple clients
through multiple channels. The core design aims to be as cheap as possible for
the provider while being flexible for settlement. The white paper \say{Partially
Non-Interactive and Instantaneous One-way Payment Channel for Bitcoin} inserted
after the appendices, describes the core design and the incentives.

\begin{table}[h]
  \begin{tabularx}{\textwidth}{ | X | l | l | l | l | l |}
  \hline
  Player & Trustless & Optimal & Open-ended & Undelayed & Non-interactive \\ \hline \hline
  Payer & Yes & No & Yes & No & Yes \\ \hline
  Payee & Yes & Yes & Yes & Yes & No \\
  \hline
  \end{tabularx}
  \caption{Summary of Shababi-Gugger-Lebrecht payment channel properties}
  \label{fig:summaryShababiGuggerLebrechtPaymentChannel}
\end{table}

A part of this thesis was devoted to writing the white paper describing our
channel scheme while working on the scheme itself. During this work we found a
possible attack described in the white paper which we fixed.

The next step has been to analyze how it is possible to optimize the channel
with threshold cryptography. As it is possible to see, every channel
construction depends on a funding transaction that locks funds in a 2-out-of-2
multi-signature script. This funding transaction is always on-chain, so if it is
possible to replace this \gls{p2sh} with a standard \gls{p2pkh} output the savings
should be attractive.

% -----------------------------------------------------------------------------
\section{Optimizing payment channels}

Three transactions are compared with \gls{segwit}\footnote{ The transaction size
is calculated with nested-\gls{segwit} and not with native mode.} and without.
Optimization is expressed in percentage of size or virtual-size economized. The
Script Hash (SH) consumes a multi-signature script, and the Public Key Hash
(PKH) consumes a standard public key. Note that size can vary by a few bytes with
\gls{segwit}.

% ** P2SH
% |               | segwit | segwit | non-segwit | non-segwit |
% |               |   size |  vsize |       size |      vsize |
% |---------------+--------+--------+------------+------------|
% | first refund  |    340 |    174 |        302 |        302 |
% | refund normal |    372 |    207 |        335 |        335 |
% | settlement    |    372 |    207 |        335 |        335 |
%
% ** PKH
% |               | segwit | segwit | non-segwit | non-segwit | native segwit | native segwit |
% |               |   size |  vsize |       size |      vsize |          size |         vsize |
% |---------------+--------+--------+------------+------------+---------------+---------------|
% | first refund  |    216 |    134 |        191 |        191 |           192 |           110 |
% | refund normal |    246 |    165 |        226 |        226 |           224 |           142 |
% | settlement    |    246 |    165 |        226 |        226 |           224 |           142 |

\newcolumntype{S}{>{\hsize=.5\hsize}C}
\begin{table}[h]
  \begin{tabularx}{\textwidth}{| X | S | S | S | S | S | S |}
  \cline{3-7}
  \multicolumn{2}{l|}{ } & \multicolumn{2}{c|}{Non-\gls{segwit}} & \multicolumn{3}{c|}{\gls{segwit}} \\ \hhline{~~-----}
  \multicolumn{2}{l|}{ } & R-Size & O & \cellcolor[gray]{0.9} R-Size & V-Size & O \\ \hhline{--=====}
  \multirow{2}{*}{First Refund}  & SH   & 302  & \multirow{2}{*}{36.75\%} & \cellcolor[gray]{0.9} 340 & 174  & \multirow{2}{*}{22.99\%} \\ \hhline{~--~--~}
                                 & PKH  & 191  &                          & \cellcolor[gray]{0.9} 216 & 134  &                          \\ \hhline{-------}
  \multirow{2}{*}{Refund Normal} & SH   & 335  & \multirow{2}{*}{32.54\%} & \cellcolor[gray]{0.9} 372 & 207  & \multirow{2}{*}{20.29\%} \\ \hhline{~--~--~}
                                 & PKH  & 226  &                          & \cellcolor[gray]{0.9} 246 & 165  &                          \\ \hhline{-------}
  \multirow{2}{*}{Settlement}    & SH   & 335  & \multirow{2}{*}{32.54\%} & \cellcolor[gray]{0.9} 372 & 207  & \multirow{2}{*}{20.29\%} \\ \hhline{~--~--~}
                                 & PKH  & 226  &                          & \cellcolor[gray]{0.9} 246 & 165  &                          \\ \hhline{-------}
  \end{tabularx}
  \caption{Summary of transaction size optimization}
  \label{fig:summaryTransactionSizeOpti}
\end{table}

The average fee per virtual byte in the last three months was around 292 Satoshis. This
optimization allows savings of up to 32,412 Satoshis for the first refund
transaction without \gls{segwit}, and 12,264 Satoshis for a refund or a
settlement transaction with \gls{segwit}. At the current price, these savings
represent between USD \$1.31 and USD \$3.47\footnote{ Average price of Bitcoin
in the last 3 months, around \$10,700 USD}. If the channel is
used for micropayments such as a couple of cents each time, this optimization
makes a difference and lowers the required threshold for feasibility. The first
refund transaction being less expensive also makes the clients commitment
easier. The Table~\ref{fig:summaryTransactionSizeOpti} exhibits transaction
utilizing only one input, and it is worth noting that the number of input has a
supralinear influence to the savings.

Requirements need to be defined to be able to substitute the multi-signature script
with a threshold scheme. Analysis of the protocol and the signing process for a
multi-signature script allows one to define these requirements. A 2-out-of-2 multi-signature
script can be unlocked with two different public keys and their signature. The
signing order only matters in that it is determined at the time of creating a
multisig address. Some standards such as \gls{bip}45 address the need to
predefine or communicate the ordering of the keys (and therefore the signatures)
by always ordering the keys lexicographically, and always ordering the
signatures in order of the keys \cite{BIP45}.
The protocol takes advantage of this fact. A transaction is usually held fully signed
only by one player. The threshold scheme must follow these requirements (i) 2
players need to co-operate to generate a valid signature, (ii) both must be able
to start the signing process, and (iii) only one player must be able to retrieve
the signature at the end of the process. If both need the signature it is
always feasible to share, meaning the current protocol is not better in this case.


\chapter{CN groups}
\section {Basic Results}
{\bf Definition:} $G$ is a $CN$-group if $1 \ne x \in G$ then $C_G(x)$ is nilpotent.
\\
\\
{\bf Theorem:} If $H$ is a non trivial $CN$-group then $H>g$ is a $CN$-group and $C_G(H)$ is nilpotent.
\begin{quote}
\emph{Proof:} Subgroups of nilpotent groups are nilpotent.
\end{quote}
{\bf Theorem:}
If $G$ is a $CN$-group and
$P \in S_p(G)$ and
$Q \in S_q(G)$, $p \ne q$.  If
$x \in P^{\#}$ and $y \in Q^{\#}$ and $[x,y]=1$ then $[P,Q]=1$.
\begin{quote}
\emph{Proof:}  If $H$ is nilpotent and $a, b$ are $p$ and $q$ elements with $p \neq q$ then $[a,b] =1$.
$\langle y, {\mathbb Z}(P) \rangle \subseteq C(x)$.  Since $C(x)$ is nilpotent, $[y, {\mathbb Z}(P)] =1$.
Let $t \in {\mathbb Z}(P)^{\#}$. $\langle y, P \rangle \subseteq C(t)$ so $[P,y]=1$.  Analogously,
$[Q,x]=1$.  Now, let $u \in {\mathbb Z}(Q)^{\#}$, $\langle y, Q \rangle \subseteq C(u)$ so $[y, Q] = 1$.
Thus $\langle P, Q \rangle \subseteq C(y)$ and $[P, Q]=1$.
\end{quote}
{\bf Theorem:}
If $G$ is a $CN$-group and $H \lhd G$ is solvable then $G/H$ is a $CN$-group.
\begin{quote}
\emph{Proof:} First, prove it for $H$ elementary abelian.  If $L$ is a characteristically simple subgroup
of $H$, $L$ is elementary abelian since $H$ is solvable.  $G/L$ is nilpotent by the previous result.
$(G/L)/(H/L) = G/H$ and the result holds by induction.
\end{quote}
{\bf Definition:} $G$ is a $3$-step group with respect to $p$ provided:\\
(1) $O_{p, p'}(G)$ is Frobenius with kernel $O_p(G)$ and a cyclic complement;\\
(2) $G= O_{p,p',p}(G)$ \\
(3) $G/O_p(G)$ is Frobenius.
\\
\\
{\bf Theorem:}  A $3$-step group is a solvable $CN$-group.
\begin{quote}
\emph{Proof:}
$H=O_p(G)$, $O_{p,p'}(g)=HA$.  $G/HA$ is a $p$-group.
\end{quote}
{\bf Theorem:} If $G$ is a solvable $CN$-group then one of the following holds:
(1) $G$ is nilpotent;
(2) $G$ is Frobenius whose complement is either cyclic or a direct product of a cyclic group of
odd order and a generalized quaternion group;
(3) $G$ is a $3$-step group.
\begin{quote}
\emph{Proof:}
$F=F(G)$ so $C_G(F) \subseteq F$.
\end{quote}
{\bf Theorem:}
If $G$ is a $CN$-group and $O_p(G) \ne 1$ then either $O_p(G)$ is an $S_p$ group
of $G$ or $G$ is a $3$-step group.
\begin{quote}
\emph{Proof:}
\end{quote}
{\bf Theorem:} If $G$ is a non-solvable $CN$-group of
minimal order, then $G$ is simple and all its proper subgroups are solvable.
\begin{quote}
\emph{Proof:}
By induction.  If $H \lhd G$ and $M/H$ is maximal so $G/H$ is solvable.  If $M=1$ then $|G|=p$ so
$M \ne 1$ and let $P \in S_p(M)$, $N= N_G(P)$.  $M \subseteq N$ so $M=N$ and $P \in S_p(G)$.
Similarly, $M = N_G({\mathbb Z}(J(P)))$, so $M=O^p(M)P, \forall p$.  Put $\bigcap_p O^p(M)$.
$K \lhd G$ and $G = PO^p(M)$ with $O^p(M) \cap P = 1$ so $K$ contains all $p'$ elements
so $G=KM$ and $K \cap M =1$.  If $K$ is nilpotent, were done. Choose $x \in {\mathbb Z}(P)$.
$M \subseteq C_G(x)$ so $C=M$ and $x$ centralizes np $p'$-element and $x$ induces by conjugation
a fixed point free automorphism and $G$ is nilpotent by Thompson.
\end{quote}
{\bf Theorem:} If $G$ is a non-solvable $CN$-group of minimal odd order
then no proper subgroup of $G$ is a $3$-step group.
\begin{quote}
\end{quote}
{\bf Theorem:} If $G$ is a non-solvable $CN$-group of minimal odd order then no proper
subgroup of $G$ is a $3$-step group.
\begin{quote}
\end{quote}
{\bf Definition:}  Let $G$ be a $CN$-group ${\cal H}$ is the set of subgroups $H < G$ which are
maximal with respect to being nilpotent.
\\
\\
{\bf Theorem:}
Let $G$ be a minimal simple $CN$-group of odd order, $H \in {\cal H}$, then (1)
$H$ is a Hall group of $G$ and is disjoint from its conjugates, (2) $N_G(H)$ is Frobenius with
kernel $H$ and is maximal.  Conversely, every maximal subgroup of $G$ is a Frobenius whose
kernel is in ${\cal H}$.
\begin{quote}
\end{quote}
{\bf Theorem:} Let $G$ be a minimal simple $CN$-group of odd order, $H,_1, H_2 \in {\cal H}$ then
$(|H_1|, |H_2|) = 1$.
\begin{quote}
\end{quote}
{\bf Definition:}
Let $G$ be a minimal simple $CN$-group of odd order.
$p~q$ if $\exists x \in p(G), y \in q(g): [x,y] = 1$.
\\
\\
{\bf Theorem:} Let $G$ be a minimal simple $CN$-group of odd order
then (a) $~$ is an
equivalence relation, (b) if $\pi_i$ is an equivalence class under $~$ then $G$ possesses
nilpotent $S_{\pi_i}$ subgroups $H_i$, $H_i \in {\cal H}$ which is disjoint from its conjugates,
(c) every maximal subgroup of $G$ is conjugate to $N_G(H_i)$ for some $i$,
(d) every element of $G$ lies in a conjugate of $H_i$ for some $1 \leq i \leq r$.
\begin{quote}
\end{quote}
{\bf Theorem:} Let $G$ be a minimal simple $CN$-group of odd order and $H \in {\cal H}$
then
(1) $H$ is a Hall group of $G$;
(2) If $|H|$ is not a of prime power order then $H$ is disjoint from its conjugates;
(3) If $H$ is disjoint from its conjugates then $C_G(x) \subseteq H, \forall x \in H^{\#}$;
(4) If $H$ is disjoint from its conjugates and $H$ has even order then
$C_G(x) \subseteq H, \forall x \in H^{\#}$.
\begin{quote}
\end{quote}
{\bf Theorem:}
Let $G$ be a minimal simple $CN$-group of odd order, $H_i$ are representatives of
the conjugacy classes of the elements of ${\cal H}$.  Put $h_i= |H_i|$ and
$|N(H_i)|=n_i h_i$. Then (1) $n_i > 1$, $n_i \mid (h_i - 1)$, $n_ih_i \mid |G|$, $(h_i, h_j)=1$
if $i \ne j$, and (2) $\sum_{i=1}^{r} {\frac {h_i - 1} {h_i n_i}} = 1 - {\frac 1 {|G|}}$.
\begin{quote}
\end{quote}
{\bf Hall-Feit-Thompson:} $CN$-groups of odd order are solvable.
\begin{quote}
\emph{Proof:}
By induction. Let $G$ be a minimal simple $CN$-group of odd order.
Set $M_i = N_G(H_i), 1 \leq i \leq r$.  We derive properties of the irreducible characters of
the $M_i$.
These properties show that $|G|=p^a q^b$ and so $G$ is solvable by Burnside's theorem.
\end{quote}
\section {More on $SL_2(p)$}
{\bf Lemma:}
$|SL_2(5)|= 2^3 3 5$,
$|SL_2(7)|= 2^4 3 7$,
$|SL_2(17)|= 2^5 3^2 17$.  In $SL_2(17)$, let
$u= \left(
\begin{array}{cc}
1 &  1 \\
0 &  1\\
\end{array}
\right)$,
$v= \left(
\begin{array}{cc}
3 &  0 \\
0 &  6\\
\end{array}
\right)$,
$w= \left(
\begin{array}{cc}
1 &  1 \\
5 &  6\\
\end{array}
\right)$. Then $|u|=17$, $|v|=16$ and $|w|= 3^2$.
$
\left(
\begin{array}{cc}
14 &  0 \\
0 &  11\\
\end{array}
\right)^{16} =
\left(
\begin{array}{cc}
3 &  0 \\
0 &  6\\
\end{array}
\right)^{16} =
\left(
\begin{array}{cc}
5 &  0 \\
0 &  7\\
\end{array}
\right)^{16} = 1$
\section {Role in classification}
The induction step in a classification (in particular the odd order theorem) for $G$ can use the following (1) minimal normal subgroups of a maximal
subgroup of $G$ are $p$-groups so (2) every proper subgroup is a $p$-local.  Thus maximal subgroups are actually maximal
$p$-locals and we can use ``local methods" to push up to a maximal subgroup.  Then we can study the embedding of the maximal subgroups
(often using Thompson transitivity) to get a contradiction.  The maximal subgroups usually have a Bruhat structure fixed by character
theory.  The final contradiction can often be obtained from generators and relations.
\\
\\
Sometimes important subgroups are Frobenius and we can use the following:
{\bf Frobenius:} $G$ has Frobenius kernel, $K$, consisting of fixed point free automorphisms.  $A$ is the Frobenius complement
and $|A| \mid (|K|-1)$.  $K$ is nilpotent.  Frobenius groups allow an action on congugates od $A$ since $A \cap A^g=1$ if $g \in G \setminus A$.
In fact, $G$ is Frobenius if $G$ act transitively on $\Omega$, $G_{\alpha} \neq 1$ but $G_{\alpha} \cap G_{\beta} = 1$ for
$\alpha \neq \beta$, $A = G_{\alpha}$ and $|\Omega| = |K| = |G:A| =1 \jmod{|H|}$.
\\
\\
{\bf Bruhat structure:} $P \in S_p(G)$ and $B = N_G(P)$ (This is the Borel group.)  Let $H$ be a complement of $P$ in $B$.
$B \cap N =H \lhd N$ and $W = N/H$ is generated by reflections ($W$ is the Weyl group).  $G =BNB$.  We often construct a
strongly embedded subgroup $M$ of $G$ and can determine the structure of the $p$-locals of $M$ and use this to determine the
Bruhat structure of $M$.
\\
\\
{\bf Example:} Put $G=GL_2(5)$, $|G|= 2^5 \cdot 3 \cdot 5$.  $P = \{
\left(
\begin{array}{cc}
1 &  x \\
0 &  1\\
\end{array}
\right)
 : x \in F_5 \}$.
$N(P) = \{
\left(
\begin{array}{cc}
a &  x \\
0 &  b\\
\end{array}
\right) : x \in F_5, a, b \in {F_5}^* \}$.
$|N(P)| = 5 \cdot 16$. $O_5(N(P))=P$.
$H = \{
\left(
\begin{array}{cc}
a &  0 \\
0 &  b\\
\end{array}
\right) : a, b \in {F_5}^* \}$, $|H|=16$.  $N(P)=HP$.  $G$ has other $2$-elements like
$
\left(
\begin{array}{cc}
0 &  1 \\
1 &  0\\
\end{array}
\right)
$ and a $3$-element,
$g=
\left(
\begin{array}{cc}
1 &  2 \\
1 &  3\\
\end{array}
\right)
$.


\subsubsection{Spline form}
\label{sec:twobodyjastrowspline}

The two-body spline Jastrow function is the most commonly used two-body Jastrow for solids. This form
was first described and used in \cite{EslerKimCeperleyShulenburger2012}.
Here $u_{ab}$ is an interpolating 1D Bspline (tricublc spline on a linear grid) between
zero distance and $r_{cut}$. In 3D periodic systems
the default cutoff distance is the Wigner Seitz cell radius. For other periodicities including isolated
molecules the $r_{cut}$ must be specified.  $r_i$ and $r_j$ are typically electron positions.  The cusp
condition as $r_i$ approaches $r_j$ is set by the relative spin of the electrons.

\FloatBarrier
\paragraph{Input Specification}

\FloatBarrier
\begin{table}[h!]
\begin{center}
\begin{tabular}{l c c c l }
\hline
\multicolumn{5}{l}{Correlation element} \\
\hline
\bfseries name & \bfseries datatype & \bfseries values & \bfseries defaults & \bfseries description \\
\hline
speciesA & text & u or d & (required) & Quantum species target \\
speciesB & text & u or d & (required) & Quantum species target \\
size & integer & $> 0$ & (required) & number of coefficients \\
rcut & real & $> 0$ & see below & distance at which the correlation goes to 0 \\
spin & text & yes or no & no & spin dependent jastrow factor \\
\hline
\multicolumn{5}{l}{elements}\\ \hline
& Coefficients & & & \\ \hline
\multicolumn{5}{l}{Contents}\\ \hline
& (None)  & & &  \\ \hline
\end{tabular}
%\end{tabular*}
\end{center}
\end{table}

\FloatBarrier

Additional information:
\begin{itemize}
\item \texttt{speciesA, speciesB} The scale function u(r) is defined for species pairs uu and ud.
There is no need to define ud or dd since uu=dd and ud=du.  The cusp condition is computed internally
based on the charge of the quantum particles.
\end{itemize}

\begin{table}[h]
\begin{center}
\begin{tabular}{l c c c l }
\hline
\multicolumn{5}{l}{Coefficients element} \\
\hline
\bfseries name & \bfseries datatype & \bfseries values & \bfseries defaults & \bfseries description \\
\hline
id & text & & (required) & Unique identifier \\
type & text & Array & (required) & \\
optimize & text & yes or no & yes & if no, values are fixed in optimizations \\
\hline
\multicolumn{5}{l}{elements}\\ \hline
(None) & & & \\ \hline
\multicolumn{5}{l}{Contents}\\ \hline
 (no name) & real array & & zeros & Jastrow coefficients \\ \hline
\end{tabular}
%\end{tabular*}
\end{center}
\end{table}

\paragraph{Example use cases}
\label{sec:2bjsplineexamples}

Specify a spin-dependent function with 4 parameters for each channel.  In this case, the cusp is set at
a radius of 4.0 bohr (rather than to the default of the Wigner Seitz cell radius).  Also, in this example,
the coefficients are set to not be optimized during an optimization step.

\begin{lstlisting}[style=XML]
<jastrow name="J2" type="Two-Body" function="Bspline" print="yes">
  <correlation speciesA="u" speciesB="u" size="8" rcut="4.0">
    <coefficients id="uu" type="Array" optimize="no"> 0.2309049836 0.1312646071 0.05464141356 0.01306231516</coefficients>
  </correlation>
  <correlation speciesA="u" speciesB="d" size="8" rcut="4.0">
    <coefficients id="ud" type="Array" optimize="no"> 0.4351561096 0.2377951747 0.1129144262 0.0356789236</coefficients>
  </correlation>
</jastrow>
\end{lstlisting}