28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
|
def heisenberg_dual_elt(AS, zmag):
|
||
|
'''Find the trace dual of a given elt zmag in the function field of an Artin-Schreier cover AS.'''
|
||
|
p = AS.characteristic
|
||
|
n = 3
|
||
|
G = AS.group
|
||
|
variable_names = 'x, y'
|
||
|
for i in range(n):
|
||
|
variable_names += ', z' + str(i)
|
||
|
Rxyz = PolynomialRing(F, n+2, variable_names)
|
||
|
x, y = Rxyz.gens()[:2]
|
||
|
z = Rxyz.gens()[2:]
|
||
|
RxyzQ = FractionField(Rxyz)
|
||
|
M = matrix(RxyzQ, p^n, p^n)
|
||
|
for i in range(p^n):
|
||
|
for j in range(p^n):
|
||
|
print('creating matrix', i, j)
|
||
|
elt = tr2((zmag.group_action(G[i])*zmag.group_action(G[j]))).function
|
||
|
elt = Rxyz(elt.numerator())/Rxyz(elt.denominator())
|
||
|
M[i, j] = RxyzQ(elt)
|
||
|
main_det = -1 #M.determinant()
|
||
|
zvee = as_function(AS, 0)
|
||
|
for i in range(p^n):
|
||
|
print(i)
|
||
|
Mprim = matrix(RxyzQ, M)
|
||
|
Mprim[:, i] = vector([(j == 0) for j in range(p^n)])
|
||
|
fi = Mprim.determinant()/main_det
|
||
|
zvee += heisenberg_function(AS, fi*(zmag.group_action(G[i]).function))
|
||
|
return zvee
|