\documentclass[a4paper,11pt]{article}

\input{packages.tex}
\input{tikz.tex}
\input{thmstyle.tex}
\input{macros.tex}

% opening
\title{Existence of a lattice of compatibly embedded finite fieds using
Allombert algorithm}
\author{}

\addto{\captionsenglish}{\renewcommand{\abstractname}{Warning}}
\begin{document}

\maketitle

\begin{abstract}
  This document is \emph{not} self-contained. Some facts are probably just
  stated here, and proved in Allombert's original article or in other documents
  written before this one\footnote{See
    \url{https://github.com/erou/compatible-embeddings} to find them.}. Please
    tell me if some of the missing proofs should be here.
\end{abstract}

%\tableofcontents

%\clearpage

\section{Introduction and notations}
\label{sec:intro}

Our goal is to construct a \emph{lattice of compatibly embedded finite fields},
meaning that given a collection of finite fields, we want to be able to compute
embeddings between them that are furthermore \emph{compatible}, \ie the diagrams
involving morphisms between finite fields should be commutative. Let $p$ be a
prime number, we denote by $\mathbb{F}_{p^{\ell}}$ the finite field with
$p^\ell$ elements and we also sometimes use $k=\mathbb{F}_p$. Allombert's algorithm usually asks for an extension of
scalars because some roots of unity may be missing, so we note
\[
  A_n \eqdef \mathbb{F}_{p^n}\otimes\mathbb{F}_{p}(\zeta_n)
\]
where $\zeta_n$ denotes a primitive $n$-th root of unity. We consider all our finite
fields to be embedded in an algebraic closure, so if we have $\ell\,|\,m$ two
integers, we know that
\[
  \mathbb{F}_{p^{\ell}}\emb\mathbb{F}_{p^m}
\]
and we will also consider
\[
  \mathbb{F}_{p^{\ell}}\subset\mathbb{F}_{p^m}
\]
and
\[
  A_{\ell}\subset A_m.
\]
Throughout the document, we consider solutions of equations of the type
\begin{equation}
  \tag{H90}
 (\sigma\otimes1)(x) = (1\otimes\zeta)x
  \label{h90}
\end{equation}
where $\zeta$ is a primitive root of unity. Properties of the solutions of this
equation are given in Allombert's article. For each algebra $A_n$, we note
$\alpha_n$ a solution of \eqref{h90} for the root $\zeta_n$. We also consider
the norm-like maps
\[
\begin{array}{cccc}
  \N_{b/a,\, \bm{n}}: & A_{\bm{n}} & \to &
  A_{\bm{n}} \\
  & \gamma & \mapsto & \prod_{j=0}^{b/a-1} (1 \otimes
  \sigma^{ja})(\gamma)
\end{array}
\]
where $\sigma$ is the Frobenius morphism and the notation. The index $n$ will often be
ignored if it is clear from the context. These maps are multiplicative and
transitive, \ie $\N_{b/a}\circ \N_{c/b} = \N_{c/a}$.

\section{Existence of a compatible lattice}
\label{sec:existence}
We use the same notations as in the previous sections, in particular the
definition of the map $\N$ still holds. In this section we will investigate the
existence of a compatible lattice. We first prove the more general result that
follows.
\begin{prop}
  There exists a family of solutions of \eqref{h90}
  $(\alpha_{p^n-1})_{n\in\mathbb{N}}$, corresponding to the roots of unity
  $(\zeta_{p^n-1})_{n\in\mathbb{N}}$, such that, for each $a,b\in\mathbb{N}$
  such that $a\,|\,b$, we have
  \[
    \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}.
  \]
\end{prop}
\begin{proof}
  We prove the result by induction. First, choose any primitive element
  $\zeta_{p-1}\in\mathbb{F}_p$, and a solution $\alpha_{p-1}\in
  A_{p-1}$ of \eqref{h90} for the root $\zeta_{p-1}$. Then, suppose that we have
  a family of solutions of \eqref{h90} $(\alpha_{p^n-1})_{n\in \left[ d_n
  \right]}$ for the roots
  $(\zeta_{p^n-1})_{n\in \left[ d_n \right]}$, where $\left[ d_n \right]$ is
  the set of all the divisors of some integer $d_n\in\mathbb{N}$, and such that for all $a,
  b\in \left[ d_n \right]$ such that $a\,|\,b$, we have
  \[
    \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}.
  \]
  Let $d_{n+1}\in\mathbb{N}$ such that $d_n\,|\,d_{n+1}$, consider the
  finite field extension $\mathbb{F}_{p^{d_{n+1}}}/\mathbb{F}_{p^{d_n}}$, and
  let $N:\mathbb{F}_{p^{d_{n+1}}}\to\mathbb{F}_{p^{d_n}}$ the corresponding
  norm. Since $N$ is surjective, we note $y\in\mathbb{F}_{p^{d_{n+1}}}$ such
  that
  \[
    N(y) = \zeta_{p^{d_{n}}}.
  \]
  Because $N(y)=y^{\frac{p^{d_{n+1}}-1}{p^{d_n}-1}}$, we have that the order of
  $y$ is $p^{d_{n+1}}-1$, otherwise the order of $N(y)=\zeta_{p^{d_n}}$ could not
  be $p^{d_n}-1$. Hence we can define a new root $\zeta_{p^{d_{n+1}}-1}=y$, and we
  have that
  \[
    N(\zeta_{p^{d_{n+1}}-1})=\zeta_{p^{d_n}-1}.
  \]
  Furthermore, the map $\N_{d_{n+1}/d_n}$ acts on
  $1\otimes\mathbb{F}_{p^{d_{n+1}}}$ exactly as $1\otimes N$, so we also have
  \[
    \N_{d_{n+1}/d_n}(1\otimes\zeta_{p^{d_{n+1}}-1}) =
    1\otimes\zeta_{p^{d_{n}}-1}.
  \]
Now let
$\beta\in A_{p^{d_{n+1}}-1}$ be any nonzero solution of \eqref{h90} with the root
$\zeta_{p^{d_{n+1}}-1}$.
Then we get
\begin{align*}
  (\sigma\otimes1)(\N_{d_{n+1}/d_{n}}(\beta)) &= \N_{d_{n+1}/d_{n}}((\sigma\otimes1)(\beta)) \\
  &= \N_{d_{n+1}/d_{n}}(1\otimes\zeta_{p^{d_{n+1}}-1}) \N_{d_{n+1}/d_{n}}(\beta) \\
  &= (1\otimes\zeta_{p^{d_{n}}-1})\N_{d_{n+1}/d_{n}}(\beta),
\end{align*}
meaning that we have
\[
  \N_{d_{n+1}/d_{n}}(\beta)=(1\otimes\lambda)\alpha_{p^{d_{n}}-1},
\]
where $1\otimes\lambda$ is an element in the subfield $1\otimes\mathbb{F}_{p^{d_{n}}}$. Since the map
$\N_{d_{n+1}/d_{n}}$ acts on $1\otimes\mathbb{F}_{p^{d_{n+1}}}$ as the
usual norm $N$, we can use
the surjectivity of the norm to ``correct'' our element $\beta$. In the end we
obtain an element $\alpha_{p^{d_{n+1}}-1}$ such
that
\[
  \N_{d_{n+1}/d_{n}}(\alpha_{p^{d_{n+1}}-1})=
  \alpha_{p^{d_{n}}-1}.
\]
Since our norm-like functions $\N$ are transitive, we have obtained that
\[
  \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}
\]
for any $a,b\in \left[ d_n \right]\cup\left\{ d_{n+1} \right\}$ such that
$a\,|\,b$. Additionnaly, for every divisor $d$ of $d_{n+1}$ that is not already in $\left[
d_n \right]$, we define
\[
  \alpha_{p^d-1}\eqdef\N_{d_{n+1}/d}(\alpha_{p^{d_{n+1}}-1}).
\]
In the end, for any $a, b\in\left[ d_{n+1} \right]$ such that
$a\,|\,b$ we have that
\[
  \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}.
\]
The result follows by considering any sequence $(d_n)_{n\in\mathbb{N}}$ such
that for all $\ell\in\mathbb{N}$, there exists $n_\ell\in\mathbb{N}$ with
$\ell\,|\,d_{n_\ell}$.
\end{proof}

\section{Existence of a compatible lattice (outdated)}
\label{sec:existence-out}
We use the same notations as in the previous sections, in particular the
definition of the map $\N$ still holds.
In this section we will investigate the existence of a compatible lattice. We
first define a tower of algebras: let $(d_n)_{n\in\mathbb{N}}$ the sequence
defined by $d_0=1$, $d_1=2$, $d_2=2^2\cdot 3=12$, and more generally
\[
  d_n = \prod_{j=1}^n p_j^{n+1-j}
\]
for $n\geq1$, with $p_j$ the $j$-th prime number. We also define
$D=\left\{d_n\,|\,n\in\mathbb{N}\right\}$. We have
\[
  d_0\,|\,d_1\,|\,d_2\,|\,\cdots\,|\,d_{n-1}\,|\,d_n\,|\,d_{n+1}\,|\,\cdots,
\]
in other words if $a\leq b$, $d_a\,|\,d_b$. These divisibility properties allow
us to define the tower of algebras
\[
  A_{p-1}\emb A_{p^{2}-1}\emb\cdots\emb A_{p^{d_{n-1}}-1}\emb
  A_{p^{d_n}-1}\emb\cdots.
\]
In particular
\[
  A_{p-1}\eqdef
\mathbb{F}_{p^{p-1}}\otimes\mathbb{F}_{p}(\zeta_{p-1})=\mathbb{F}_{p^{p-1}}\otimes\mathbb{F}_p\cong\mathbb{F}_{p^{p-1}}
\]
and for $n\geq1$
\[
  A_{p^{d_n}-1}=\mathbb{F}_{p^{p^{d_n}-1}}\otimes\mathbb{F}_p(\zeta_{p^{d_n}-1})=\mathbb{F}_{p^{p^{d_n}-1}}\otimes\mathbb{F}_{p^{d_n}}.
\]
We know that $\mathbb{F}_{p^{d_n}}$ contains a primitive $(p^{d_n}-1)$-th root
of unity: any primitive element of $\mathbb{F}_{p^{d_n}}$ is in fact such a
root. That is why we write
$\mathbb{F}_{p^{d_n}}=\mathbb{F}_{p}(\zeta_{p^{d_n}-1})$, but we have not
specified which roots we consider.
We construct the roots of unity in the following way: we first choose any $(p-1)$-th primitive root of unity and we continue by recurrence. Assume we have
chosen a primitive $(p^{d_{n-1}}-1)$-th root of unity
$\zeta_{p^{d_{n-1}}-1}\in\mathbb{F}_{p^{d_{n-1}}}$
for a certain $n\geq1$. By surjectivity of the norm, we can find an element
$y\in\mathbb{F}_{p^{d_n}}$ such that
\begin{align*}
  N_{\mathbb{F}_{p^{d_n}}/\mathbb{F}_{p^{d_{n-1}}}}(y)&=y^{\frac{p^{d_n}-1}{p^{d_{n-1}}-1}}\\
  &=\zeta_{p^{d_{n-1}}-1}.
\end{align*}
Since $\zeta_{p^{d_{n-1}}-1}$ is primitive, $y$ is also primitive, in other
words $y$ is a $(p^{d_n}-1)$-th primitive root of unity, and we define
$\zeta_{p^{d_n}-1}\eqdef y$.

We now construct solutions of \eqref{h90} in each floor of our
tower. We first choose any solution $\alpha_{p-1}\in A_{p-1}$ of Hilbert $90$
associated with the root $\zeta_{p-1}$, and we continue by recurrence. Assume we
have constructed a solution $\alpha_{p^{d_{n-1}}-1}\in A_{p^{d_{n-1}}-1}$ of
Hilbert $90$ associated with the root $\zeta_{p^{d_{n-1}}-1}$ for a certain
$n\geq1$ and let
$\beta\in A_{p^{d_n}-1}$ be any nonzero solution of \eqref{h90} with the root
$\zeta_{p^{d_n}-1}$.
Then we get
\begin{align*}
  (\sigma\otimes1)(\N_{d_n/d_{n-1}}(\beta)) &= \N_{d_n/d_{n-1}}((\sigma\otimes1)(\beta)) \\
  &= \N_{d_n/d_{n-1}}(1\otimes\zeta_{p^{d_n}-1}) \N_{d_n/d_{n-1}}(\beta) \\
  &= (1\otimes\zeta_{p^{d_{n-1}}-1})\N_{d_n/d_{n-1}}(\beta),
\end{align*}
meaning that we have
\[
  \N_{d_n/d_{n-1}}(\beta)=(1\otimes\lambda)\alpha_{p^{d_{n-1}}-1},
\]
where $1\otimes\lambda$ is an element in the subfield $1\otimes\mathbb{F}_{p^{d_{n-1}}}$. Since the map
$\N_{d_n/d_{n-1}}$ acts on $1\otimes\mathbb{F}_{p^{d_n}}$ as the
usual norm $N_{\mathbb{F}_{p^{d_n}}/\mathbb{F}_{p^{d_{n-1}}}}$, we can use
the surjectivity of the norm to ``correct'' our element $\beta$. In the end we
obtain an element $\alpha_{p^{d_n}-1}$ such
that
\[
  \N_{d_n/d_{n-1}}(\alpha_{p^{d_n}-1})=
  \alpha_{p^{d_{n-1}}-1}.
\]
Since our norm-like functions $\N$ are transitive, we have obtained that
\[
  \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}
\]
for any $a,b\in D$ such that $a<b$. But we have only constructed algebras of the form
$A_{p^d-1}$ with $d\in D$, so our lattice has a lot of holes. We can first plug
the holes of the form $A_{p^{n}-1}$ for any $n\in\mathbb{N}$ (not just $n\in
D$), by defining
\[
  f_n \eqdef \min\left\{ d\in D\,,\,n\,|\,d \right\}
\]
and
\begin{align*}
  \zeta_{p^n-1}&\eqdef  \N_{f_n/n}(\zeta_{p^{f_n}-1})\\
  \alpha_{p^n-1}&\eqdef
  \N_{f_n/n}(\alpha_{p^{f_n}-1}).
\end{align*}
Here again, by transitivity of the norms, we obtain that
\[
  \N_{b/a}(\alpha_{p^b-1})=\alpha_{p^a-1}
\]
for any $a,b\in\mathbb{N}$ such that $a\,|\,b$.

\section{From $p^n-1$ to any integers $\ell$ and $m$}
Let us now deal with the general case of two integers $\ell\,|\,m$. We define
$a=\omega_{\mathbb{Z}/\ell\mathbb{Z}}(p)$ (respectively
$b=\omega_{\mathbb{Z}/m\mathbb{Z}}(p)$) the multiplicative order of $p$ in
$\mathbb{Z}/\ell\mathbb{Z}$ (resp. in $\mathbb{Z}/m\mathbb{Z}$). We thus define
\[
  \alpha_\ell\eqdef(\alpha_{p^a-1})^{\frac{p^a-1}{\ell}}\in A_{\ell}=\mathbb{F}_{p^\ell}\otimes \mathbb{F}_{p^a}
\]
and
\[
  \alpha_m\eqdef(\alpha_{p^b-1})^{\frac{p^{b}-1}{m}}\in A_m=\mathbb{F}_{p^m}\otimes \mathbb{F}_{p^b}.
\]
If $a=b$ then we have
\[
  \alpha_{\ell}=(\alpha_m)^{m/\ell},
\]
but if $a<b$, we need to take additionnal care of the right part of the tensor,
the ``scalar'' part. In that case we have
\[
  \alpha_\ell=\N_{b/a}(\alpha_{p^b-1})^{\frac{p^a-1}{\ell}}.
\]

We see that we have an equality linking $\alpha_\ell$ and
$\alpha_{p^b-1}$, though the natural thing would be an
equality linking $\alpha_\ell$ and $\alpha_m$. Unfortunately the map
$\N_{b/a}$ sends $\zeta_{m}$ to
$(\zeta_{m})^{\mu}$, with $\mu\eqdef\frac{p^b-1}{p^a-1}$,
and this is not necessarily an $\ell$-th primitive root of unity.
In fact, we do not have to go \emph{that high} in the tower, but we will risk to
obtain an other primitive $\ell$-th root of unity and we will have to apply
corrections. Let us write
\[
  \ell=\prod_{j\in\mathcal P_\ell}q_j^{u_j}
\]
the prime decomposition of $\ell$, where $\mathcal P_\ell$ is the set of indices
such that the $u_j$ are nonzero and the $q_j$'s are primes. We also write
\[
  m=\prod_{j\in\mathcal P_m}q_j^{v_j}\phantom{and}
  \mu=\prod_{j\in\mathcal P_\mu}q_j^{w_j}
\]
with the sets $\mathcal P_m$ and $\mathcal P_\mu$ defined in the same fashion as
$\mathcal P_\ell$. It follows that $\mathcal P_\ell\subset\mathcal P_m$ and that for all
$j$, $u_j\leq v_j$. The set $\mathcal P_\ell$ is not
necessarily included in $\mathcal P_\mu$. Our problem happens when, for $j\in\mathcal
P_\ell$,
\[
  w_j\neq v_j-u_j
\]
because it eliminates too much (or too little) of the $q_j$ part of the root $\zeta_\ell$. That
is why we can consider to go only as high as
\[
  \eta=\prod_{j\in\mathcal
  P_\ell}q_j^{u_j+m_j}\times\prod_{j\in\mathcal P_m\setminus \mathcal
  P_\ell}q_j^{v_j},
\]
where $ m_j = \max(w_j, v_j-u_j)$.
Indeed, with that choice we have that $m\,|\,\eta\,|\,p^b-1$ and, noting
\[
  T = \prod_{j\in\mathcal P_m}q_j^{t_j}
\]
with $t_j = m_j-w_j = \max(0, (v_j-u_j)-w_j)$, it follows that
\[
  \forall j\in\mathcal P_\ell,\, \nu_{j}(\frac{\mu\ell T}{\eta}) = w_j + u_j +
  t_j - (u_j + m_j) = 0
\]
where $\nu_j$ is the $q_j$-adic valuation, and
\[
  \forall j\notin \mathcal P_\ell,\,\nu_j(\frac{\mu\ell T}{\eta}) = w_j + 0 +
  t_j - v_j = \max(w_j-v_j, 0).
\]
The integer $\frac{\mu\ell T}{\eta}$ is thus coprime with $\ell$, we denote
by $\iota$ its inverse modulo $\ell$, and we note $e=T\iota$. It follows that
\begin{align*}
  \N_{b/a}(\alpha_\eta^e) &= \N_{b/a}((\alpha_{p^b-1})^{\frac{p^b-1}{\eta}e})\\
  &= (\alpha_{p^a-1})^{\frac{p^b-1}{\eta}e}\\
  &= (\alpha_{p^a-1})^{\frac{(p^a-1)(p^b-1)\ell e}{\ell(p^a-1)\eta}}\\
  &= (\alpha_\ell)^{\frac{\mu\ell e}{\eta}}\\
  &= (\alpha_\ell)^{\kappa\ell+1}\\
  &= (a_\ell)^\kappa\alpha_\ell
\end{align*}
where $a_\ell\eqdef(\alpha_{\ell})^\ell\in\mathbb{F}_{p^a}$ and $\kappa$ is the
quotient of the Euclidean division of $\frac{\mu\ell e}{\eta}$ by $\ell$.

\section{Compatibility conditions: how to climb a lattice?}
\label{sec:climb}

We use the same notations as in Sections \ref{sec:intro} and
\ref{sec:existence}. Assume we have two integers $\ell, m\in\mathbb{N}$,
debote by $d$ their $\gcd$ and $n\in\mathbb{N}$ an other integer such that
$\ell\,|\,n$ and $m\,|\,n$. In this section we imagine that we have a set of solutions of
\eqref{h90} $\alpha_{p^\ell-1}$ and $\alpha_{p^m-1}$ that we have already computed, and we wonder if they have been
well-chosen, \ie if we can find an other solution $\alpha_{p^n-1}$ in a bigger algebra that is
sent via the norm to these solutions. We first need a lemma.

\begin{lm}
  \label{lm:norms}
  Let $x\in (\mathbb{F}_{p^\ell})^\times$ and $y\in(\mathbb{F}_{p^m})^\times$ such that
  \[
    N_{\mathbb{F}_{p^\ell}/\mathbb{F}_{p^d}}(x)=N_{\mathbb{F}_{p^m}/\mathbb{F}_{p^d}}(y).
  \]
  Then there exists $z\in(\mathbb{F}_{p^n})^\times$ such that
  \[
    N_{\mathbb{F}_{p^n}/\mathbb{F}_{p^\ell}}(z)=x
  \]
  and
  \[
    N_{\mathbb{F}_{p^n}/\mathbb{F}_{p^m}}(z)=y.
  \]
\end{lm}
\begin{proof}
  We denote by $f$ the function:
\[
\begin{array}{cccc}
  f: & (\mathbb{F}_{p^n})^\times & \to &
  (\mathbb{F}_{p^\ell})^\times\times(\mathbb{F}_{p^m})^\times\\
  & z & \mapsto & (\mathbb{N}_{\mathbb{F}_{p^n}/\mathbb{F}_{p^\ell}}(z),
  N_{\mathbb{F}_{p^n}/\mathbb{F}_{p^m}}(z))
\end{array}
\]
and we define the set
\[
  \mathcal E = \left\{ (x, y)\in
    (\mathbb{F}_{p^\ell})^\times\times(\mathbb{F}_{p^m})^\times\,|\,N_{\mathbb{F}_{p^\ell}/\mathbb{F}_{p^d}}(x)=N_{\mathbb{F}_{p^m}/\mathbb{F}_{p^d}}(y)\right\}.
\]
We will prove that $\Img(f)=\mathcal E$, which is exactly a translation of the
lemma.

Assume we have an element $(x,y)\in\Img(f)$, then by transitivity of the norm we
also have $(x,y)\in\mathcal E$, so
\[
  \Img(f)\subset\mathcal E.
\]
We finish the proof by a cardinality argument. The function $f$ is a group
morphism, so we have
\[
  \Card\Img(f)=\frac{p^{n}-1}{\Card\Ker(f)}.
\]
Moreover the elements in $\Ker(f)$ are those that are in the kernel of both
norms. The kernel of $\mathbb{N}_{\mathbb{F}_{p^n}/\mathbb{F}_{p^\ell}}$ is a
subgroup of $(\mathbb{F}_{p^n})^\times$ of index $p^{\ell}-1$, and the kernel of
$\mathbb{N}_{\mathbb{F}_{p^n}/\mathbb{F}_{p^m}}$ is a
subgroup of $(\mathbb{F}_{p^n})^\times$ of index $p^{m}-1$. The intersection of
these subgroups is a subgroup of index $\lcm(p^{\ell}-1, p^m-1)$. In the end we
obtain that
\[
  \Card\Img(f) = \lcm(p^\ell-1, p^m-1).
\]
We also have
\begin{align*}
  \Card\mathcal E &= (p^{d}-1)\frac{p^\ell-1}{p^d-1}\frac{p^m-1}{p^d-1}\\
  &= \frac{(p^\ell-1)(p^m-1)}{p^d-1}\\
  &= \lcm(p^\ell-1, p^m-1)
\end{align*}
because $\gcd(p^\ell-1, p^m-1)=p^d-1$. In the end, we have
\[
  \Card\Img(f)=\Card\mathcal E,
\]
so
\[
  \Img f = \mathcal E
\]
and this concludes the proof.
\end{proof}

\begin{prop}
  Let $\alpha_{p^\ell-1}\in A_{p^\ell-1}$ and $\alpha_{p^m-1}\in A_{p^m-1}$ be
  two solutions of \eqref{h90}, respectively for the roots $\zeta_{p^\ell-1}$ and
  $\zeta_{p^m-1}$, such that
  \[
    N_{p^\ell-1/p^d-1}(\alpha_{p^\ell-1})=N_{p^m-1/p^d-1}(\alpha_{p^m-1}).
  \]
  Given an algebra $A_{p^n-1}$ with a root $\zeta_{p^n-1}$ such that
  \[
    N_{p^n-1/p^\ell-1}(1\otimes\zeta_{p^n-1})=1\otimes\zeta_{p^\ell-1}
  \]
  and
  \[
    N_{p^n-1/p^m-1}(1\otimes\zeta_{p^n-1})=1\otimes\zeta_{p^m-1},
  \]
  there exists a solution $\alpha_{p^n-1}$ of \eqref{h90} for the root $\zeta_{p^n-1}$ such that
  \[
    N_{p^n-1/p^\ell-1}(\alpha_{p^n-1})=\alpha_{p^\ell-1}
  \]
  and
  \[
    N_{p^n-1/p^m-1}(\alpha_{p^n-1})=\alpha_{p^m-1}.
  \]
\end{prop}
\begin{proof}
  Let $\beta$ be any nonzero solution of \eqref{h90} for the root
  $\zeta_{p^n-1}$, then we have that
  \[
    N_{p^n-1/p^\ell-1}(\beta)=(1\otimes c_\ell)\alpha_{p^\ell-1}
  \]
  and
  \[
    N_{p^n-1/p^m-1}(\beta)=(1\otimes c_m)\alpha_{p^m-1}.
  \]
  It follows that
  \[
    N_{F_{p^\ell}/\mathbb{F}_{p^d}}(c_\ell)=N_{\mathbb{F}_{p^m}/\mathbb{F}_{p^d}}(c_m),
  \]
  and by the Lemma~\ref{lm:norms}, we can find an element $c_n$ such that
  \[
    N_{\mathbb{F}_{p^n}/\mathbb{F}_{p^\ell}}(c_n) = c_\ell
  \]
  and
  \[
    N_{\mathbb{F}_{p^n}/\mathbb{F}_{p^m}}(c_n)=c_m.
  \]
 We then define
 \[
   \alpha_{p^n-1}=(c_n)^{-1}\beta
 \]
 and the proposition follows.

\end{proof}

\section{Compatibility in practice}
\label{sec:practice}

In Section~\ref{sec:existence} we have seen that we can construct a compatible
lattice by choising a solution of~\eqref{h90} in an algebra of high order and
deducting the solutions in all the sub-algebras. The cost of this mode of
operation is too high to use it in practice. Instead, we see how we can
increment our lattice (\ie add embeddings and solutions of~\eqref{h90}) in a compatible way.
Essentially, we have to find a way of telling which solutions of~\eqref{h90} are
coming from a solution in a bigger\footnote{Should we introduce the notion of
\emph{complete} algebra?} algebra. We need a lemma to help us in this task:
\begin{lm}
  \label{lm:formula}
  Let $n\in\mathbb{N}$ be an integer, $\zeta_{p^n-1}\in\mathbb{F}_{p^n}$ a
  primitive element in $\mathbb{F}_{p^n}$ (\ie a $(p^n-1)$-th primitive root of
  unity), and
  \[
    A_{p^n-1} = \mathbb{F}_{p^{p^n-1}}\otimes\mathbb{F}_{p^n}.
  \]
  Denote by $\alpha_{p^n-1}\in A_{p^{n}-1}$ a solution of~\eqref{h90} for the
  root $\zeta_{p^n-1}$, then we have that
  \[
    a_{p^n-1} = (\alpha_{p^n-1})^{p^n-1} = (1\otimes\zeta_{p^n-1})^n.
  \]
\end{lm}
\begin{proof}
  Since $\alpha_{p^n-1}$ is a solution of~\eqref{h90} for the root
  $\zeta_{p^n-1}$, we have that
  \[
    (\sigma\otimes 1)(\alpha_{p^n-1}) =
    (1\otimes\zeta_{p^n-1})\alpha_{p^n-1}.
  \]
  It follows that
  \begin{align*}
    (1\otimes\zeta_{p^n-1})^n \alpha_{p^n-1} &= (\sigma^n\otimes1)(\alpha_{p^n-1})\\
    &= (\sigma^n\otimes\sigma^n)(\alpha_{p^n-1})\\
    &= (\alpha_{p^n-1})^{p^n}\\
    &= a_{p^n-1}\cdot\alpha_{p^n-1}.
  \end{align*}
  Therefore, we have the equality
  \[
    ( (1\otimes\zeta_{p^n-1})^n - a_{p^n-1})\alpha_{p^n-1} = 0,
  \]
  and since $1\otimes\zeta_{p^n-1}$ and $a_{p^n-1}$ are both elements of the
  subfield $1\otimes\mathbb{F}_{p^n}$, we conclude that
  \[
    a_{p^n-1} = (1\otimes\zeta_{p^n-1})^n.
  \]
\end{proof}
Lemma~\ref{lm:formula} gives a necessary condition for solutions of~\eqref{h90}
to be derived from a solution in a bigger algebra. We can see that this condition is in fact
also sufficient. Thus, in the following, for some given integer
$\ell\in\mathbb{N}$ and $A_\ell =
\mathbb{F}_{p^\ell}\otimes\mathbb{F}_{p}(\zeta_\ell) =
\mathbb{F}_{p^\ell}\otimes\mathbb{F}_{p^a}$, we shall consider solutions of the
equation
\begin{equation}
  \tag{H90$^\star$}
  (\sigma\otimes1)(x) = (1\otimes\zeta_\ell)x,\,x^\ell =
  (1\otimes\zeta_{p^a-1})^a
  \label{h90s}
\end{equation}
with $\zeta_\ell=(\zeta_{p^a-1})^{\frac{p^a-1}{\ell}}$.

The solutions of~\eqref{h90s} are defined up to a $\ell$-th root of unity, if
\[
  \alpha_\ell = \sum_{j=0}^{a-1} x_j\otimes \zeta_\ell^j
\]
is a solution, the other solutions are then given by
\[
  (1\otimes\zeta_\ell)^u\alpha_\ell = \sum_{j=0}^{a-1} \sigma^u(x_j)\otimes
  \zeta_{\ell}^j
\]
for some integer $u$. Thus we see that taking the first coordinate of a solution
of~\eqref{h90s} for the root $\zeta_\ell$ in the basis $(1\otimes\zeta_\ell^j)_j$ (as done in Allombert's
algorithm) defines the same element (up to isomorphism) in
$\mathbb{F}_{p^\ell}$.

Let us investigate the easiest case of compatibility first. Let
$\ell\,|\,m\,|\,n$ be three integers such that
\[
 a \eqdef \omega_{(\mathbb{Z}/\ell\mathbb{Z})^\times}(p) =
  \omega_{(\mathbb{Z}/m\mathbb{Z})^\times}(p) =
  \omega_{(\mathbb{Z}/n\mathbb{Z})^\times}(p).
\]
In other words, the right part of the tensor algebras $A_\ell$, $A_m$ and $A_n$
is $\mathbb{F}_{p^a}$ in the three cases. We assume that we already have a
primitive element $\zeta_{p^a-1}\in\mathbb{F}_{p^a}$ and we define $\zeta_\ell$
(resp. $\zeta_m$, $\zeta_n$) by
\[
  \zeta_\ell = (\zeta_{p^a-1})^\frac{p^a-1}{\ell}\text{ (resp. }\zeta_m =
  (\zeta_{p^a-1})^\frac{p^a-1}{m},\,\zeta_n =
  (\zeta_{p^a-1})^\frac{p^a-1}{n}  \text{)}.
\]
We then also define $\alpha_\ell\in A_\ell$ (resp. $\alpha_m\in A_m$,
$\alpha_n\in A_n$) a solution
of~\eqref{h90s} for the root $\zeta_\ell$ (resp. $\zeta_m$, $\zeta_n$).
We finally define
\[
\begin{array}{cccc}
  f: & \mathbb{F}_{p^\ell} & \to &\mathbb{F}_{p^m} \\
  & \lfloor \alpha_{\ell}\rfloor_\ell & \mapsto & \lfloor
(\alpha_{m})^{m/\ell}\rfloor_\ell
\end{array}
\]
with $\lfloor x \rfloor_\ell$ denoting the first coordinate of $x$ in the basis
$(1\otimes\zeta_{\ell}^j)_j$, and we similarly define
\[
\begin{array}{cccc}
  g: & \mathbb{F}_{p^m} & \to &\mathbb{F}_{p^n} \\
  & \lfloor \alpha_{m}\rfloor_m & \mapsto & \lfloor
(\alpha_{n})^{n/m}\rfloor_m
\end{array}
\]
and
\[
\begin{array}{cccc}
  h: & \mathbb{F}_{p^\ell} & \to &\mathbb{F}_{p^n} \\
  & \lfloor \alpha_{\ell}\rfloor_\ell & \mapsto & \lfloor
(\alpha_{m})^{n/\ell}\rfloor_\ell.
\end{array}
\]
\begin{prop}
  The maps $f$, $g$, and $h$ define embeddings and are compatible, \ie
  \[
    g\circ f = h.
  \]
\end{prop}
\begin{proof}
  Let $\Phi_{A_\ell\emb A_m}' =
\phi_{\mathbb{F}_{p^\ell}\emb\mathbb{F}_{p^m}}'\otimes\embed{\mathbb{F}_{p}(\zeta_\ell)}{\mathbb{F}_{p}(\zeta_m)}$
be a morphism of algebra, with $\phi_{\mathbb{F}_{p^\ell}\emb\mathbb{F}_{p^m}}'$
an unknown morphism and
$\embed{\mathbb{F}_{p}(\zeta_\ell)}{\mathbb{F}_{p}(\zeta_m)}$ the morphism
sending $\zeta_\ell$ to $(\zeta_m)^{m/\ell}$. We know that
\[
  (\alpha_m)^{m/\ell} = (1\otimes\lambda)\Phi_{A_\ell\emb A_m}'(\alpha_\ell)
\]
for some $\lambda\in\mathbb{F}_{p^a}$. Moreover we also have
\[
  a_m = \Phi_{A_\ell\emb A_m}'(a_l)
\]
so $\lambda^\ell = 1$, and finally we get that
\begin{align*}
  (\alpha_m)^{m/\ell} &= \Phi_{A_\ell\emb
  A_m}'((1\otimes\zeta_\ell^u)\alpha_\ell) \\
  &= \Phi_{A_\ell\emb
  A_m}'((\sigma^u\otimes 1)(\alpha_\ell)) \\
  &= \Phi_{A_\ell\emb A_m}(\alpha_\ell)
\end{align*}
for some integer $u$, and with
\begin{align*}
 \Phi_{A_\ell\emb A_m} &=
(\phi_{\mathbb{F}_{p^\ell}\emb\mathbb{F}_{p^m}}'\circ\sigma^u)\otimes\embed{\mathbb{F}_{p}(\zeta_\ell)}{\mathbb{F}_{p}(\zeta_m)}\\
&\eqdef
\phi_{\mathbb{F}_{p^\ell}\emb\mathbb{F}_{p^m}}\otimes\embed{\mathbb{F}_{p}(\zeta_\ell)}{\mathbb{F}_{p}(\zeta_m)}.
\end{align*}
We similarly define
\[
  \Phi_{A_m\emb
  A_n}\eqdef\phi_{\mathbb{F}_{p^m}\emb\mathbb{F}_{p^n}}\otimes\embed{\mathbb{F}_{p}(\zeta_m)}{\mathbb{F}_{p}(\zeta_n)}
\]
and
\[
  \Phi_{A_\ell\emb
  A_n}\eqdef\phi_{\mathbb{F}_{p^\ell}\emb\mathbb{F}_{p^n}}\otimes\embed{\mathbb{F}_{p}(\zeta_\ell)}{\mathbb{F}_{p}(\zeta_n)}.
\]
We finally note that $f = \embed{\mathbb{F}_{p^\ell}}{\mathbb{F}_{p^m}}$,
$g = \embed{\mathbb{F}_{p^m}}{\mathbb{F}_{p^n}}$,
$h = \embed{\mathbb{F}_{p^\ell}}{\mathbb{F}_{p^n}}$ and
\[
(\Phi_{A_m\emb A_n}\circ\Phi_{A_\ell\emb A_m})(\alpha_\ell) = \Phi_{A_\ell\emb
A_n}(\alpha_\ell),
\]
therefore it follows that
\[
  g\circ f = h.
\]
\end{proof}

\end{document}


\documentclass[a4paper,11pt]{book}
\usepackage{import}
\usepackage{preamb}
\makeindex

\begin{document}

\input{head}
\newpage
\input{Title}
% \section{Blocks and Community structure}

\begin{subbox}{subbox}{}
\centering
\Large{\textbf{Nodes and Edges structural indices, Centrality, node similarity}}
\end{subbox}

\begin{textbox}{Node Structural indices}

Node structural indices, often called \textit{Node centrality}, reflect how a node is characteristic of a given structural property. This is often summarized as \textit{a measure of the node importance}, however \textit{importance} and \textit{centrality} are subjective/qualitative notions. Thus a centrality, despite its name, do not necessarily measure how \textit{central} a node is, but rather how its position in the graph is typical of the property captured by this index.

\end{textbox}

\begin{textbox}{Degree Centrality}

Degree centrality is the most straighforward centrality. It can be interpreted as a measure of importance, of popularity, e.g., the more friends I have in a social network, the more \textit{important} I am in this network.

\end{textbox}

\begin{textbox}{Farness - Closeness}
The closeness of a node measures how close a node is from all other nodes, in term of shortest paths. To interpret it, we can make a parallel with a circle: the point which has the shortest average distance to all other points of the circle is its center. The node of highest closeness is the equivalent of the center of the circle for this graph. Its formulation is easily understood as the inverse of the farness.

\noindent\rule{4cm}{0.1pt}

\textbf{Farness:} Average distance to all other nodes in the graph
\[\text{Farness}(u)=\frac{1}{N-1}\sum_{v \in V \setminus u}\ell_{u,v} \]

\textbf{Closeness:} Inverse of the farness, i.e., how close the node is to all other nodes in term of shortest paths.
\[\text{Closeness}(u)=\frac{N-1}{\sum_{v \in V \setminus u}\ell_{u,v}} \]

\end{textbox}

\begin{textbox}{Harmonic Centrality}
\textbf{Harmonic centrality:} is a variant of the closeness defined as the average of the inverse of distance to all other nodes (Harmonic mean). Well defined on disconnected networks with $\frac{1}{\infty}=0$. Its interpretation is the same as the closeness.

\[\text{Harmonic}(u)=\frac{1}{N-1} \sum_{v \in V \setminus u} \frac{1}{\ell_{u,v}} \]

\end{textbox}

\begin{textbox}{Clustering Coefficient}

This score (previously defined), measures the \textit{triadic closure} of a node. A high score is often interpreted as being well embedded in a particular community (friends of my friends are my friends because we all belong to the same group), a low score can be typical of a \textit{bridge} node, e.g., few connections between my friends because they belong to different social circles.
\end{textbox}

\begin{textbox}{Centrality - Examples - 1}

\begin{figure}[H]

\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleDegree.pdf}
    \caption{Degree}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleCC.pdf}
    \caption{Clustering Coefficent}
\end{subfigure}

\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleCloseness.pdf}
    \caption{Closeness}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleHarmonic.pdf}
    \caption{Harmonic Centrality}
\end{subfigure}

\end{figure}

\end{textbox}

\begin{textbox}{Centrality - Examples - 2}

\begin{figure}[H]

\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/examplebetweenness.pdf}
    \caption{Btwnness Centrality}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleKatz.pdf}
    \caption{Katz Centrality}
\end{subfigure}

\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/exampleEigenvector.pdf}
    \caption{Eigenvector Centrality}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\includegraphics[width=\textwidth]{pics/examplepagerank.pdf}
    \caption{PageRank}
\end{subfigure}

\end{figure}

\end{textbox}

\begin{textbox}{Betweenness centrality}
The betweenness centrality measures how much the node plays the role of a bridge. The highest the betweenness, the more the node is essential to move quickly in the graph. More formally, the betweenness of $u$ is defined as the fraction of the shortest paths between all pairs of nodes in the graph (but $u$) that go through $u$. As a consequence, if we remove a node of high betweenness, many shortest paths will become longer, and the graph harder to navigate. The extreme situation is a node on the only path between otherwise disconnected components: if we remove this node, some nodes becomes unreachable from others. Those nodes thus tend to have high betweenness. It is defined as:

\[ C_{B}(v)=\sum _{s\neq v\neq t\in V}{\frac {\sigma _{st}(v)}{\sigma _{st}}}\]

with $\sigma _{st}$ the number of shortest paths between nodes $s$ and $t$ and $\sigma _{st}(v)$ the number of those paths passing through $v$.

The betweenness tends to grow with the network size. A normalized version can be obtained by dividing by the number of pairs of nodes, i.e., for a directed graph: $C_{B}^{\text{norm}}(v)=\frac{C_{B}(v)}{(N-1)(N-2)}$.

\end{textbox}

\begin{textbox}{Eigenvector centrality}
Eigenvector centrality is a recursive definition of importance: a node is important if it is connected to other important nodes. In practice, it is defined in the following way: the eigenvector centrality $C_u$ for every node $u$ of the graph is such that if each node \textit{sends} its centrality score to its neighbors, then the sum of scores received by each node will be equal to $\lambda C_u$ (with $\lambda$ a normalization constant). More formally,

\begin{equation}
    \centering
C^{t+1}_u = \frac{1}{\lambda}\sum_{v\in N^{in}_u}C^t_v
\label{eqpow}
\end{equation}
This recursive definition can be interpreted in term of eigenvectors and eigenvalues, which is defined as $Ax=\lambda x$, with $x$ an eigenvector, $\lambda$ the corresponding eigeinvalue. The eigenvector centrality is defined as the leading invector, i.e., the eigenvector associated with the highest eigenvalue, the only solution for which all centrality values are positive.

A simple way to compute this eigenvalue is called the power method: one starts with random values on nodes, and iterate equation \ref{eqpow}. After some time, it can be proven that the values converge to the eigenvector centrality.

\noindent\rule{4cm}{0.1pt}

Eigenvector centrality cannot in general be computed on directed networks, because of source nodes, i.e., $k^{in}=0$. Those nodes have by definition an eigenvector centrality of 0 at t+1, and thus \textit{send} a value of 0 at t+2, which might in turn result in a score of 0 for its successors, and so on and so forth.

\end{textbox}

\begin{textbox}{Katz centrality}
Katz centrality \footcite{katz1953new} is said to be a measure of the influence potential of a node. For a node $u$, it is defined as the sum, for all path length distance $\ell$, of the number of nodes located at distance exactly $\ell$ of $u$, discounted of a factor decreasing as $\ell$ increases. The intuition is that, the more nodes can be accessed in few steps, the higher the value. More formally, it is expressed as
\[
 C_{\mathrm {Katz} }(u)=\sum _{\ell=1}^{\infty }\sum _{v=1}^{N}\alpha ^{\ell}(A^{\ell})_{vu}
\]
in which $(A^{\ell})_{vu}$ means the number of paths of length $\ell$ from $v$ to $u$, and $0< \alpha < \frac{1}{\lambda_{\max}}$ an attenuation parameter smaller than the reciprocal of the largest eigenvalue of $A$, to allow computation in matrix form.
%allowing to compute with matrix form:
%\[
% C_{\mathrm {Katz} }(u)=((I- \alpha A^T)^{-1}-I)\overrightarrow{I}
%\]

\vspace{0.25cm}

Note that in a directed network, Katz centrality as presented here represents a \textit{vote} mechanism: a higher centrality of $u$ means that more nodes can reach $u$ quickly, and not that $u$ can reach many nodes quickly. We can inverse it by using $(A^{\ell})_{uv}$ instead of $(A^{\ell})_{vu}$
\end{textbox}

\begin{textbox}{Katz centrality and Eigenvector centrality}
Katz centrality can also be understood \footcite{newman2018networks} as a generalization of the eigenvector centrality, with a recursive definition, such as:
\[
C_{\mathrm {Katz} }(u) = \alpha \sum_{v\in N^{in}_u} C_{\mathrm {Katz} }(v) + \beta
\]
with $\beta=1$. We can see that with $\beta=0$ and $\alpha = 1/\lambda_{\max}$ Katz centrality is equivalent to the eigenvector centrality.

\end{textbox}

\begin{textbox}{Pagerank centrality}
Pagerank centrality is famous for being the method originally used by google to rank web-pages: all pages containing the researched words are ordered according to their Pagerank score in the graph of the WWW, in which nodes are webpages and edges are hyperlinks.

It is a variant of the Eigenvector centrality, solving the problem of source nodes.

Pagerank introduces two improvements: 1) at each step $t$, each node gain a small constant value. 2) The values \textit{sent} are divided equally among successors (normalization by degree). Equation \ref{eqpow} thus becomes:
\begin{equation}
    \centering
C^{t+1}_u = \alpha \sum_{v\in N^{in}_u} \frac{C^t_v}{k^{out}_v} + \beta
\end{equation}

with, by convention, $\beta=1$,$\alpha \in [0,1]$ a parameter.

Pagerank centrality can also be expressed as the leading eigenvector of the so-called \textit{Google matrix} $G$, defined as $G_{ij} = \alpha S_{ij} + (1- \alpha)/n$, with $S_{ij}$ the adjacency matrix normalized by column.

\end{textbox}

\begin{textbox}{Pagerank \& Random Walk}
Pagerank can be interpreted in term of \textbf{random walks}. If you consider a random walker moving from nodes to nodes following randomly chosen out-going links, which starts on a random node and moves an infinite number of times. Consider that at each step, this random walker can \textit{teleport} to any other node with a probability $\alpha$ instead of following an outgoing edge. Then, the probability for this random walker to be on each particular node corresponds to its Pagerank score.

We can note that the average length of a walk before restart is $\frac{\alpha}{1-\alpha}$. The \textit{typical} value $\alpha=0.85$ thus means that random walkers move in average 5.7 times before restart, a typical value of average distance in real graphs.
\end{textbox}

\begin{textbox}{Edge Structural indices}

Edges structural positions in the network can also be described using structural properties, most of them being similar to node centralities.
\end{textbox}

\begin{textbox}{Edge Clustering}

\textbf{Edge Clustering} $C^e$ of an edge $(u,v)$ is the fraction of the neighbors of at least one of the two nodes which are neighbors of both of them, i.e.,
\[
C^e(u,v)=\frac{|N_u \cap N_v|}{|N_u \cup N_v|-2}
\]
High clustering edges are said \textit{Integrative}, low values edges are said \textit{Dispersive}.
\end{textbox}

\begin{textbox}{Edge Betweenness}

\textbf{Edge betweenness} Is defined exactly as node betweenness, but counting shortest paths going through each edge instead of each node, i.e.,
\[ C_{B}(u,v)=\sum _{s\neq t\in V}{\frac {\sigma _{st}(u,v)}{\sigma _{st}}}\]

with $\sigma _{st}$ the number of shortest paths between nodes $s$ and $t$ and $\sigma _{st}(u,v)$ the number of those paths passing through edge $(u,v)$.

\end{textbox}

\input{parts/node_similarity}

\begin{textbox}{Going further}
Books on network science (see first CheatSheet) always introduce centralities.

Survey on the topic:
\begin{itemize}
    \item \cite{rodrigues2019network}
\end{itemize}
\end{textbox}

\input{tail}

\end{document}


\section{User Guide}
This section contains conceptual overviews of the code and clear examples for the prospective user.

\subsection{Module Setup}
The interface module is created in python using:
\begin{verbatim}
testModule = rwVoltageInterface.RWVoltageInterface()
testModule.ModelTag = "rwVoltageInterface"
\end{verbatim}
The only parameter that must be set is the voltage to torque conversion gain $\gamma$.  This is done using
\begin{verbatim}
testModule.voltage2TorqueGain =[ 1.32, 0.99, 1.31]        # [Nm/V] conversion gain
testModule.scaleFactor =[ 1.01, 1.00, 1.02] #[unitless] scale factor
testModule.bias =[0.01, 0.02, 0.04]	# [Nm] bias
\end{verbatim}