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$
n=693
fn = factor(n)
show(fn)
Also we define these simple functions that we will use later to have a simple overview of the quatity used.
def p(i):
return fn[i-1][0]
def e(i):
return fn[i-1][1]
def pe(i):
return p(i)**e(i)
pe(1)
9
s = len(fn)
S = [ i +1 for i in range(s)]
PS = Subsets(S).list()
PS.remove(Set(S))
PS
[{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}]
nI(I)
evaluate the quantity $n=\prod_{i\in I} p_i^{e_i}$
def nI(I):
ret = 1
for i in I:
ret *= pe(i)
return ret
nI({1,3})
99
Here we define the Cyclotomic Field $\mathbb{Q}(\zeta_n)$ and the variable z
is assigned to $\zeta_n$.
Qn.<z>=CyclotomicField(n)
(Qn)
Cyclotomic Field of order 693 and degree 360
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
G_0 = Qn.galois_group() #loooooong time
G = [ a for a in [1..n//2] if gcd(a,n)==1]
show(G)
def corr(r):
if r not in G:
r = n-r
return r
def power(x,a):
r = power_mod(x,a,n)
return corr(r)
def molt(x,y):
r = mod(x*y,n)
return corr(r)
molt(166,50)
16
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})$
zz = z + z.conjugate()
K = NumberField(zz.minpoly(),'a')
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
def eps(i):
return euler_phi(pe(i))
def g(i):
I = K.ideal(p(i))
return len(I.factor())
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.
def f(i):
return euler_phi(n)/(2*g(i)*eps(i))
So we have that:
def i_b():
i_b=1
for i in S:
i_b *= (eps(i)**(g(i)-1)) * (f(i)**(2*g(i) -1))
return i_b
i = i_b()
i
699840000
show(factor(i))
Here we have another evaluation of $i_\beta$ that compress all the calculation to optimize the result
def i_b_compressed(n):
fn = factor(n)
s = len(fn)
S = [ i +1 for i in range(s)]
K.<z> = CyclotomicField(n)
zz = z + z.conjugate()
K = NumberField(zz.minpoly(),'a')
ibb=1
for j in S:
eps = euler_phi(fn[j-1][0]**fn[j-1][1])
g = len(K.ideal(fn[j-1][0]).factor())
f = euler_phi(n)/(2*g*eps)
ibb *= (eps**(g-1)) * (f**(2*g-1))
return ibb
show(factor(i_b_compressed(3*5*49)))
Now with several steps we proceed in the costruction of the generators, starting with the definition of $\beta$
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
def frob(i):
zi = z^pe(i)
for f in G:
if zi^f==zi^p(i):
return f
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
def frobhom(i):
zi = z^pe(i)
for f in G:
if zi^f==zi^p(i):
return Qn.hom([z**f])
(frobhom(2))
Ring endomorphism of Cyclotomic Field of order 693 and degree 360 Defn: z |--> z^106
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
def ford(i):
Qi.<zi>=CyclotomicField(n/pe(i))
f = Qi.hom([zi^p(i)])
o = 1
zz=zi+zi.conjugate()
while (not (f**o)(zz)==zz) :
o += 1
return o
We can see that the two results are indeed equivalent
[ford(i)==f(i) for i in S]
[True, True, True]
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
def beta0(i : int):
fi = frobhom(i)
return [ fi**j for j in range(f(i))]
We anticipate the valutations on the singletons to save computational time later
vbeta = [beta0(i) for i in S]
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$
def valbeta0(base,i):
v = 1
for vf in vbeta[i-1]:
v *= vf(base)
return v
def valbeta(base,I):
if I.is_empty():
return base
for i in I:
base = valbeta0(base,i)
return base
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}$
def zbeta():
ret = 1
for I in PS:
zI= 1 - z**nI(I)
ret *= valbeta(zI,I)
return ret
We store it in the memory to save computational time later, also we can see that this is a very long and complicate element
zb = zbeta()
zb
-24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^359 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^358 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^357 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^355 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^354 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^353 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^344 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^343 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^338 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^337 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^336 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^334 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^326 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^325 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^324 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^323 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^322 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^321 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^320 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^319 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^312 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^310 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^305 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^304 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^303 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^301 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^296 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^295 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^294 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^292 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^291 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^289 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^287 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^286 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^281 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^280 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^279 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^278 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^276 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^275 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^274 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^273 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^271 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^263 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^262 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^261 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^259 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^257 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^256 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^255 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^254 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^253 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^249 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^247 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^245 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^244 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^243 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^242 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^241 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^240 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^239 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^237 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^235 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^233 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^232 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^231 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^229 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^228 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^227 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^225 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^224 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^223 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^222 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^221 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^220 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^218 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^217 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^216 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^215 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^213 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^212 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^211 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^210 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^208 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^206 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^205 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^204 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^202 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^200 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^199 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^198 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^196 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^194 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^193 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^192 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^190 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^186 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^184 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^182 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^181 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^180 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^178 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^174 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^172 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^170 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^169 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^168 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^166 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^165 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^164 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^162 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^160 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^158 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^157 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^156 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^155 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^154 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^153 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^152 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^150 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^149 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^148 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^147 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^146 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^144 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^143 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^142 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^141 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^140 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^138 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^137 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^136 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^135 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^133 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^131 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^130 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^129 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^127 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^125 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^124 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^123 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^121 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^119 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^118 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^117 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^115 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^111 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^110 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^109 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^107 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^106 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^105 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^103 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^102 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^101 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^99 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^97 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^89 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^88 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^87 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^86 - 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^85 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^84 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^83 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^78 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^77 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^75 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^73 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^68 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^67 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^66 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^64 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^59 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^58 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^57 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^56 + 49311759839519448199957114068001625345689561276494519522958613378202017560019436550985902952659377068707107799781524932027341895352002*z^55 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^54 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^52 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^45 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^43 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^42 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^41 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^38 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^37 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^36 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^34 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^26 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^25 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^24 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^22 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^21 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^20 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^12 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^10 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^5 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^4 - 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z^3 + 24655879919759724099978557034000812672844780638247259761479306689101008780009718275492951476329688534353553899890762466013670947676001*z
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}
def zdbeta(a,I):
d = (1-a)*nI(I)/2
valbeta(z^d,I)
def zdbeta(a):
ret = 1
d= (1-a)/2
for I in PS:
ret *= valbeta(z^(d*nI(I)),I)
return ret
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}
def xibeta(a):
sa = Qn.hom([z**a])
return zdbeta(a)*sa(zb)/zb
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
a = G[42]
xi = xibeta(a)
show(xi)
xi.conjugate()==xi
True
Without looking to the the monomials we can also direclty look for coefficents not in $\mathbb{Z}$
[i for i in range(euler_phi(n)) if not (xi[i] in ZZ) ]
[]
Infact the list is empty