2024-06-10 21:08:42 +02:00
|
|
|
class template:
|
|
|
|
'''Template of a p-group cover'''
|
|
|
|
def __init__(self, height, field, group, fcts, gp_action):
|
|
|
|
self.height = height
|
|
|
|
self.group = group
|
|
|
|
self.gp_action = gp_action #action of the generators of the group on z[i]'s
|
|
|
|
self.field = field
|
|
|
|
n = height
|
|
|
|
variable_names = ''
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'z'+str(i)+','
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'f'+str(i)
|
|
|
|
if i!=n-1:
|
|
|
|
variable_names += ','
|
2024-06-10 21:50:09 +02:00
|
|
|
Rzf = PolynomialRing(field, 2*n, variable_names)
|
|
|
|
z = Rzf.gens()[:n]
|
|
|
|
f = Rzf.gens()[n:]
|
|
|
|
self.fct_field = Rzf, z, f
|
|
|
|
self.fcts = [Rzf(ff) for ff in fcts] #RHSs of the Artin-Schreier equations
|
2024-06-10 21:08:42 +02:00
|
|
|
|
|
|
|
def elementary_template(p, n):
|
|
|
|
group = elementary_gp(p, n)
|
|
|
|
field = GF(p)
|
|
|
|
variable_names = ''
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'z'+str(i)+','
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'f'+str(i)
|
|
|
|
if i!=n-1:
|
|
|
|
variable_names += ','
|
|
|
|
R = PolynomialRing(field, 2*n, variable_names)
|
|
|
|
z = R.gens()[:n]
|
|
|
|
f = R.gens()[n:]
|
|
|
|
height = n
|
|
|
|
fcts = [f[i] for i in range(n)]
|
|
|
|
gp_action = [[z[j] + (i == j) for j in range(n)] for i in range(n)]
|
2024-06-10 21:50:09 +02:00
|
|
|
return template(height, field, group, fcts, gp_action)
|
|
|
|
|
|
|
|
def heisenberg_template(p):
|
|
|
|
group = heisenberg(p)
|
|
|
|
field = GF(p)
|
|
|
|
variable_names = ''
|
|
|
|
n = 3
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'z'+str(i)+','
|
|
|
|
for i in range(n):
|
|
|
|
variable_names += 'f'+str(i)
|
|
|
|
if i!=n-1:
|
|
|
|
variable_names += ','
|
|
|
|
R = PolynomialRing(field, 2*n, variable_names)
|
|
|
|
z = R.gens()[:n]
|
|
|
|
f = R.gens()[n:]
|
|
|
|
height = n
|
|
|
|
fcts = [f[i] for i in range(n)]
|
|
|
|
fcts[2] += (z[0] - z[1])*f[1]
|
|
|
|
gp_action = [[z[0] + 1, z[1], z[2] + z[1]], [z[0] + 1, z[1] + 1, z[2]], [z[0], z[1], z[2] - 1]]
|
2024-06-10 21:08:42 +02:00
|
|
|
return template(height, field, group, fcts, gp_action)
|