2022-11-18 15:00:34 +01:00
|
|
|
class as_function:
|
|
|
|
def __init__(self, C, g):
|
|
|
|
self.curve = C
|
|
|
|
F = C.base_ring
|
|
|
|
n = C.height
|
2024-06-11 13:29:05 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
2022-11-18 15:00:34 +01:00
|
|
|
self.function = RxyzQ(g)
|
|
|
|
#self.function = as_reduction(AS, RxyzQ(g))
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return str(self.function)
|
2024-01-13 21:18:03 +01:00
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
AS = self.curve
|
|
|
|
RxyzQ, Rxyz, x, y, z = AS.fct_field
|
|
|
|
aux = self - other
|
|
|
|
aux = RxyzQ(aux.function)
|
|
|
|
aux = aux.numerator()
|
|
|
|
aux = as_function(AS, aux)
|
|
|
|
aux = aux.expansion_at_infty()
|
2024-06-12 18:13:49 +02:00
|
|
|
F = AS.base_ring
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=AS.prec)
|
|
|
|
if Rt(aux).valuation() >= 1:
|
2024-01-13 21:18:03 +01:00
|
|
|
return True
|
|
|
|
return False
|
2022-11-18 15:00:34 +01:00
|
|
|
|
|
|
|
def __add__(self, other):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
g2 = other.function
|
|
|
|
return as_function(C, g1 + g2)
|
|
|
|
|
|
|
|
def __sub__(self, other):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
g2 = other.function
|
|
|
|
return as_function(C, g1 - g2)
|
|
|
|
|
|
|
|
def __rmul__(self, constant):
|
|
|
|
C = self.curve
|
|
|
|
g = self.function
|
|
|
|
return as_function(C, constant*g)
|
|
|
|
|
2024-01-13 21:18:03 +01:00
|
|
|
def __neg__(self):
|
2023-11-29 09:50:29 +01:00
|
|
|
C = self.curve
|
|
|
|
g = self.function
|
|
|
|
return as_function(C, -g)
|
|
|
|
|
2022-11-18 15:00:34 +01:00
|
|
|
def __mul__(self, other):
|
2022-12-19 14:37:14 +01:00
|
|
|
if isinstance(other, as_function):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
g2 = other.function
|
|
|
|
return as_function(C, g1*g2)
|
|
|
|
if isinstance(other, as_form):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
g2 = other.form
|
|
|
|
return as_form(C, g1*g2)
|
2022-11-24 18:59:07 +01:00
|
|
|
|
|
|
|
def __truediv__(self, other):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
g2 = other.function
|
|
|
|
return as_function(C, g1/g2)
|
|
|
|
|
|
|
|
def __pow__(self, exponent):
|
|
|
|
C = self.curve
|
|
|
|
g1 = self.function
|
|
|
|
return as_function(C, g1^(exponent))
|
|
|
|
|
2023-09-22 08:45:48 +02:00
|
|
|
def expansion_at_infty(self, place = 0):
|
2022-11-18 15:00:34 +01:00
|
|
|
C = self.curve
|
|
|
|
delta = C.nb_of_pts_at_infty
|
|
|
|
F = C.base_ring
|
2023-09-22 08:45:48 +02:00
|
|
|
x_series = C.x_series[place]
|
|
|
|
y_series = C.y_series[place]
|
|
|
|
z_series = C.z_series[place]
|
2022-11-18 15:00:34 +01:00
|
|
|
n = C.height
|
2024-06-11 13:29:05 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
2022-11-18 15:00:34 +01:00
|
|
|
prec = C.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
g = self.function
|
|
|
|
g = RxyzQ(g)
|
|
|
|
sub_list = {x : x_series, y : y_series} | {z[j] : z_series[j] for j in range(n)}
|
|
|
|
return g.substitute(sub_list)
|
2023-03-08 14:54:07 +01:00
|
|
|
|
|
|
|
def expansion(self, pt = 0):
|
|
|
|
C = self.curve
|
|
|
|
delta = C.nb_of_pts_at_infty
|
|
|
|
F = C.base_ring
|
|
|
|
x_series = C.x_series[pt]
|
|
|
|
y_series = C.y_series[pt]
|
|
|
|
z_series = C.z_series[pt]
|
|
|
|
n = C.height
|
2024-06-11 13:29:05 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
2023-03-08 14:54:07 +01:00
|
|
|
prec = C.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
g = self.function
|
|
|
|
g = RxyzQ(g)
|
|
|
|
sub_list = {x : x_series, y : y_series} | {z[j] : z_series[j] for j in range(n)}
|
|
|
|
return g.substitute(sub_list)
|
2022-11-18 15:00:34 +01:00
|
|
|
|
2024-06-11 13:29:05 +02:00
|
|
|
def group_action(self, elt):
|
2022-11-18 15:00:34 +01:00
|
|
|
C = self.curve
|
2024-06-11 13:29:05 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
2024-09-27 15:18:38 +02:00
|
|
|
Rzf, zgen, fgen, xgen, ygen = C.cover_template.fct_field
|
2024-06-11 13:29:05 +02:00
|
|
|
if isinstance(elt, group_elt):
|
|
|
|
elt = elt.as_tuple
|
|
|
|
AS = self.curve
|
|
|
|
n = AS.height
|
|
|
|
G = AS.group
|
|
|
|
|
|
|
|
if elt in G.gens:
|
|
|
|
ind = G.gens.index(elt)
|
|
|
|
gp_action_list = C.cover_template.gp_action[ind]
|
2024-09-27 15:18:38 +02:00
|
|
|
sub_list_gen = {zgen[i] : RxyzQ(z[i]) for i in range(n)}|{fgen[i] : RxyzQ(AS.functions[i].function) for i in range(n)}|{xgen:x}|{ygen:y}
|
|
|
|
sub_list = {x : RxyzQ(gp_action_list[-2]), y : RxyzQ(gp_action_list[-1])} | {z[j] : RxyzQ(gp_action_list[j].subs(sub_list_gen)) for j in range(n)}
|
2024-06-11 13:29:05 +02:00
|
|
|
g = self.function
|
|
|
|
return as_function(C, g.substitute(sub_list))
|
|
|
|
result = self
|
2024-06-11 19:48:37 +02:00
|
|
|
for i in range(len(G.gens)):
|
2024-06-12 13:23:24 +02:00
|
|
|
if isinstance(elt, list) or isinstance(elt, tuple): #elt can be a tuple...
|
2024-06-11 19:48:37 +02:00
|
|
|
range_limit = elt[i]
|
|
|
|
else: # ... or an integer.
|
|
|
|
range_limit = elt
|
|
|
|
for j in range(range_limit):
|
2024-06-11 13:29:05 +02:00
|
|
|
result = result.group_action(G.gens[i])
|
|
|
|
return result
|
|
|
|
|
2022-11-18 15:00:34 +01:00
|
|
|
|
2024-06-10 19:55:49 +02:00
|
|
|
def reduce(self):
|
|
|
|
aux = as_reduction(self.curve, self.function)
|
|
|
|
return as_function(self.curve, aux)
|
|
|
|
|
2024-06-25 11:27:31 +02:00
|
|
|
def trace(self, super=True, subgp = 0):
|
2022-11-18 15:00:34 +01:00
|
|
|
C = self.curve
|
|
|
|
C_super = C.quotient
|
|
|
|
n = C.height
|
|
|
|
F = C.base_ring
|
2024-06-25 11:27:31 +02:00
|
|
|
if isinstance(subgp, Integer) or isinstance(subgp, int):
|
|
|
|
subgp = C.group.elts
|
|
|
|
else:
|
|
|
|
super = False
|
2024-06-11 13:29:05 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
2022-11-18 15:00:34 +01:00
|
|
|
result = as_function(C, 0)
|
2024-06-25 11:27:31 +02:00
|
|
|
for a in subgp:
|
2022-11-24 18:59:07 +01:00
|
|
|
result += self.group_action(a)
|
2022-11-18 15:00:34 +01:00
|
|
|
result = result.function
|
|
|
|
Rxy.<x, y> = PolynomialRing(F, 2)
|
|
|
|
Qxy = FractionField(Rxy)
|
2024-06-10 19:55:49 +02:00
|
|
|
result = as_reduction(C, result)
|
2024-06-11 13:29:05 +02:00
|
|
|
if super:
|
|
|
|
return superelliptic_function(C_super, Qxy(result))
|
2024-06-25 11:27:31 +02:00
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
|
|
|
return as_function(C, RxyzQ(result))
|
|
|
|
|
2023-09-22 08:45:48 +02:00
|
|
|
def coordinates(self, prec = 100, basis = 0):
|
|
|
|
"Return coordinates in H^1(X, OX)."
|
|
|
|
AS = self.curve
|
|
|
|
if basis == 0:
|
|
|
|
basis = [AS.holomorphic_differentials_basis(), AS.cohomology_of_structure_sheaf_basis()]
|
|
|
|
holo_diffs = basis[0]
|
|
|
|
coh_basis = basis[1]
|
|
|
|
f_products = []
|
|
|
|
for f in coh_basis:
|
|
|
|
f_products += [[omega.serre_duality_pairing(f) for omega in holo_diffs]]
|
|
|
|
product_of_fct_and_omegas = []
|
|
|
|
product_of_fct_and_omegas = [omega.serre_duality_pairing(self) for omega in holo_diffs]
|
|
|
|
|
|
|
|
V = (F^(AS.genus())).span_of_basis([vector(a) for a in f_products])
|
|
|
|
coh_coordinates = V.coordinates(product_of_fct_and_omegas)
|
|
|
|
return coh_coordinates
|
2022-11-24 18:59:07 +01:00
|
|
|
|
2022-12-19 14:37:14 +01:00
|
|
|
def diffn(self):
|
|
|
|
C = self.curve
|
|
|
|
C_super = C.quotient
|
|
|
|
n = C.height
|
|
|
|
RxyzQ, Rxyz, x, y, z = C.fct_field
|
|
|
|
f = self.function
|
|
|
|
y_super = superelliptic_function(C_super, y)
|
|
|
|
dy_super = y_super.diffn().form
|
2024-06-11 13:29:05 +02:00
|
|
|
dz = C.dz
|
2022-12-19 14:37:14 +01:00
|
|
|
result = f.derivative(x)
|
|
|
|
result += f.derivative(y)*dy_super
|
|
|
|
for i in range(n):
|
|
|
|
result += f.derivative(z[i])*dz[i]
|
|
|
|
return as_form(C, result)
|
|
|
|
|
2023-09-22 08:45:48 +02:00
|
|
|
def valuation(self, place = 0):
|
2022-11-24 18:59:07 +01:00
|
|
|
'''Return valuation at i-th place at infinity.'''
|
2022-12-19 14:37:14 +01:00
|
|
|
C = self.curve
|
|
|
|
F = C.base_ring
|
|
|
|
Rt.<t> = LaurentSeriesRing(F)
|
2023-09-22 08:45:48 +02:00
|
|
|
return Rt(self.expansion_at_infty(place = place)).valuation()
|