Greither unit index, a Sagemath implementation

Here we will implement some of the calculation from the article of Cornelius Greither: “Improving Ramachandra’s and Levesque’s unit index”.
In particular we will evaluate the index $i_\beta$ in a very efficient way and the generators $\xi_a(\beta)$ of the group $C_\beta$

Definition of $n$ end its factorization

Also we define these simple functions that we will use later to have a simple overview of the quatity used.

Definition of the Power set $P_S$

nI(I) evaluate the quantity $n=\prod_{i\in I} p_i^{e_i}$

Definition of $\zeta$ and the group $G$

Here we define the Cyclotomic Field $\mathbb{Q}(\zeta_n)$ and the variable z is assigned to $\zeta_n$.

We could directly evaluate the group $G_0$ as the Galois group of the Field, but it uses a long computational time, so we will follows a different approach: defining $G$ directly from its elements.
Also I have done some functions to do some operations in $G$, but in the end I have not used them

Calculation of the index

First we define the number field $K$ as the Maximal Real subfield of $\mathbb{Q}(\zeta_n)$, using that is equal to $\mathbb{Q}(\zeta_n + \zeta_n^{-1})$

We define $\epsilon_i$ knowing that is equal to $\phi(p_i^{e_i})$ and $g_i$ using its definition: we embed the the prime $p_i$ in $O_K$ and we factor it

For $f_i$ we use the equality $[K:\mathbb{Q}] = \epsilon_i g_i f_i $ since we know the other three elements.
Memo: $[K:\mathbb{Q}] = \phi(n)/2 $
Later we will see another possible evaluation (a bit slower) using the Frobenious morphism.

So we have that:

Here we have another evaluation of $i_\beta$ that compress all the calculation to optimize the result

Generators construction

Now with several steps we proceed in the costruction of the generators, starting with the definition of $\beta$

Definition the Frobenious morphism

Given $i \in S$ we want to find a lift in $G_0$ of the frobenious morphism:

\begin{alignat*}{2} F_i : \mathbb{Q}(\zeta_{n/p_i^{e_i}})^+ &\longrightarrow \: \mathbb{Q}(\zeta_{n/p_i^{e_i}})^+ \\ \zeta_{n/p_i^{e_i}} &\longmapsto \: \zeta_{n/p_i^{e_i}} ^ {p_i} \end{alignat*}

So we need an element $f$ that sends $\zeta_{n/p_i^{e_i}} \simeq \zeta _n^{p_i^{e_i}}$ in $\zeta _n^{p_i^{e_i+1}}= \zeta _n^{p_i^{e_i} p_i}$

First we can see it as an integer in the list G

But also we can give the result directly as an automorphism of $\mathbb{Q}(\zeta_{n})$ (so an element in $G_0$).
Remark: With this costruction we directly considerate a lifting of the function without defining it on the field $\mathbb{Q}(\zeta_{n/p_i^{e_i}})^+$.
Memo: We have seen that the final results does not depends on the particular lifting

Now to find the trace elements we need to have the order of the element $f$ in $G_i$.
We already know that this is the inertia degree of the prime $p_i$, but now we will follow a different approach. Also here we define the morphism on $\mathbb{Q}(\zeta_{n/p_i^{e_i}})$ and we check when its generator (zz) is fixed.
Remark: is not the same of checking when $\zeta$ is fixed

We can see that the two results are indeed equivalent

Definition of $\beta$ and its evaluation

We start defining its value on the singletons $\{i\}$. Also to have an elements in $\mathbb{Z}[G_0]$ we simply use a list of elements in $G_0$, since we only need to evalutate them and we can simply use a recursive evalutation.
Remark: we use f(i) instead of ford(i) because it is faster

We anticipate the valutations on the singletons to save computational time later

For our costruction the only thing we need is $\zeta ^{ \beta(I)}$ (valbeta(base,I)), that we can evaluate starting from $\zeta ^{ \beta(i)}$ (valbeta0(base,i)) using that $\beta(I) = \prod_{i \in S} \beta(i)$ and $\zeta^{\gamma \delta} = (\zeta^\gamma )^\delta$

Calculation of the generators

We proceed now with the evalutation of $$ z(\beta ):= \prod_{I \in P_S } z_I ^{\beta(I)} $$ where $ z_I := 1 - \zeta ^{n_I}$

We store it in the memory to save computational time later, also we can see that this is a very long and complicate element

An interesting wall of numbers, however now we can use it to evaluate the elements $$ \zeta ^{\frac{(1-a)}{2} n_I \beta (I)} $$ and \begin{equation} \zeta ^{(1-a)\frac{t}{2}} \text{ with } t = \sum_{I \in P_S} n_I \beta(I) \end{equation}

And finally we can evaluate \begin{equation} \xi_a (\beta) := \zeta ^{d_a (\beta)} \frac{\sigma_a (z(\beta))}{z(\beta)} \text{ with } d_a(\beta)= (1-a)\frac{t}{2} \end{equation}

Consider a particulare case, we can easly see that the result is in the ring of integer $\mathbb{Z}[\zeta]$ and that it is real comparing itself with the conjugate

Without looking to the the monomials we can also direclty look for coefficents not in $\mathbb{Z}$

Infact the list is empty