template - matrix for holo works

This commit is contained in:
jgarnek 2024-06-11 17:48:37 +00:00
parent 9aeee4993d
commit 0300d463ed
6 changed files with 129 additions and 93 deletions

View File

@ -39,12 +39,10 @@ class as_cover:
list_of_power_series = [g.expansion(pt=pt, prec=prec) for g in list_of_fcts] list_of_power_series = [g.expansion(pt=pt, prec=prec) for g in list_of_fcts]
for j in range(n): for j in range(n):
#### ####
#TUTAJ WSTAWIĆ ZMIANĘ #
print(cover_template.fcts[j], {zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)}) print(cover_template.fcts[j], {zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)})
power_series = Rzf(cover_template.fcts[j]).subs({zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)}) power_series = Rzf(cover_template.fcts[j]).subs({zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)})
#### ####
#power_series = list_of_power_series[j]
jump, correction, t_old, z = artin_schreier_transform(power_series, prec = prec) jump, correction, t_old, z = artin_schreier_transform(power_series, prec = prec)
x_series = x_series(t = t_old) x_series = x_series(t = t_old)
y_series = y_series(t = t_old) y_series = y_series(t = t_old)
@ -467,3 +465,23 @@ class as_cover:
result += [as_cech(self, omega, f)] result += [as_cech(self, omega, f)]
return result return result
def group_action_matrices_holo(AS, basis=0, threshold=10):
n = AS.height
if basis == 0:
basis = AS.holomorphic_differentials_basis(threshold=threshold)
F = AS.base_ring
return as_group_action_matrices(F, basis, AS.group.gens, basis = basis)
def group_action_matrices_dR(AS, basis = 0, threshold=8):
n = AS.height
if basis == 0:
holo_basis = AS.holomorphic_differentials_basis(threshold = threshold)
str_basis = AS.cohomology_of_structure_sheaf_basis(holo_basis = holo_basis, threshold = threshold)
dr_basis = AS.de_rham_basis(holo_basis = holo_basis, cohomology_basis = str_basis, threshold=threshold)
basis = [holo_basis, str_basis, dr_basis]
return as_group_action_matrices(F, basis[2], AS.group.gens, basis = basis)
def group_action_matrices_log_holo(AS):
n = AS.height
F = AS.base_ring
return as_group_action_matrices(F, AS.at_most_poles_forms(1), AS.group.gens, basis = AS.at_most_poles_forms(1))

View File

@ -3,13 +3,7 @@ class as_form:
self.curve = C self.curve = C
n = C.height n = C.height
F = C.base_ring F = C.base_ring
variable_names = 'x, y' RxyzQ, Rxyz, x, y, z = C.fct_field
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)
self.form = RxyzQ(g) self.form = RxyzQ(g)
def __repr__(self): def __repr__(self):
@ -27,13 +21,7 @@ class as_form:
z_series = C.z_series[place] z_series = C.z_series[place]
dx_series = C.dx_series[place] dx_series = C.dx_series[place]
n = C.height n = C.height
variable_names = 'x, y' RxyzQ, Rxyz, x, y, z = C.fct_field
for j in range(n):
variable_names += ', z' + str(j)
Rxyz = PolynomialRing(F, n+2, variable_names)
x, y = Rxyz.gens()[:2]
z = Rxyz.gens()[2:]
RxyzQ = FractionField(Rxyz)
prec = C.prec prec = C.prec
Rt.<t> = LaurentSeriesRing(F, default_prec=prec) Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
g = self.form g = self.form
@ -49,13 +37,7 @@ class as_form:
z_series = C.z_series[pt] z_series = C.z_series[pt]
dx_series = C.dx_series[pt] dx_series = C.dx_series[pt]
n = C.height n = C.height
variable_names = 'x, y' RxyzQ, Rxyz, x, y, z = C.fct_field
for j in range(n):
variable_names += ', z' + str(j)
Rxyz = PolynomialRing(F, n+2, variable_names)
x, y = Rxyz.gens()[:2]
z = Rxyz.gens()[2:]
RxyzQ = FractionField(Rxyz)
prec = C.prec prec = C.prec
Rt.<t> = LaurentSeriesRing(F, default_prec=prec) Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
g = self.form g = self.form
@ -85,19 +67,21 @@ class as_form:
return as_form(C, constant*omega) return as_form(C, constant*omega)
def reduce(self): def reduce(self):
aux = as_reduction(self.curve, self.form) RxyzQ, Rxyz, x, y, z = self.curve.fct_field
aux = as_reduction(self.curve, RxyzQ(self.form))
return as_form(self.curve, aux) return as_form(self.curve, aux)
def group_action(self, ZN_tuple): def group_action(self, elt):
C = self.curve C = self.curve
n = C.height n = C.height
RxyzQ, Rxyz, x, y, z = C.fct_field aux = as_function(C, self.form)
sub_list = {x : x, y : y} | {z[j] : z[j]+ZN_tuple[j] for j in range(n)} aux = aux.group_action(elt)
g = self.form return as_form(C, aux.function)
return as_form(C, g.substitute(sub_list))
def coordinates(self, basis = 0): def coordinates(self, basis = 0):
"""Find coordinates of the given holomorphic form self in terms of the basis forms in a list holo.""" """Find coordinates of the given holomorphic form self in terms of the basis forms in a list holo."""
print(self)
self = self.reduce()
C = self.curve C = self.curve
if basis == 0: if basis == 0:
basis = C.holomorphic_differentials_basis() basis = C.holomorphic_differentials_basis()
@ -109,27 +93,23 @@ class as_form:
self_with_no_denominator = denom*self self_with_no_denominator = denom*self
return linear_representation_polynomials(Rxyz(self_with_no_denominator.form), [Rxyz(omega.form) for omega in basis]) return linear_representation_polynomials(Rxyz(self_with_no_denominator.form), [Rxyz(omega.form) for omega in basis])
def trace(self): def trace(self, super=True):
C = self.curve C = self.curve
C_super = C.quotient C_super = C.quotient
n = C.height n = C.height
F = C.base_ring F = C.base_ring
variable_names = 'x, y' RxyzQ, Rxyz, x, y, z = C.fct_field
for j in range(n):
variable_names += ', z' + str(j)
Rxyz = PolynomialRing(F, n+2, variable_names)
x, y = Rxyz.gens()[:2]
z = Rxyz.gens()[2:]
RxyzQ = FractionField(Rxyz)
result = as_form(C, 0) result = as_form(C, 0)
G = C.group G = C.group.elts
for a in G: for a in G:
result += self.group_action(a) result += self.group_action(a)
result = result.form result = result.form
Rxy.<x, y> = PolynomialRing(F, 2) Rxy.<x, y> = PolynomialRing(F, 2)
Qxy = FractionField(Rxy) Qxy = FractionField(Rxy)
result = as_reduction(C, result) result = as_reduction(C, result)
return superelliptic_form(C_super, Qxy(result)) if super:
return superelliptic_form(C_super, Qxy(result))
return as_form(C, Qxy(result))
def residue(self, place=0): def residue(self, place=0):
return self.expansion_at_infty(place = place).residue() return self.expansion_at_infty(place = place).residue()
@ -188,10 +168,7 @@ def are_forms_linearly_dependent(set_of_forms):
C = set_of_forms[0].curve C = set_of_forms[0].curve
F = C.base_ring F = C.base_ring
n = C.height n = C.height
variable_names = 'x, y' RxyzQ, Rxyz, x, y, z = C.fct_field
for i in range(n):
variable_names += ', z' + str(i)
Rxyz = PolynomialRing(F, n+2, variable_names)
denominators = prod(denominator(omega.form) for omega in set_of_forms) denominators = prod(denominator(omega.form) for omega in set_of_forms)
return is_linearly_dependent([Rxyz(denominators*omega.form) for omega in set_of_forms]) return is_linearly_dependent([Rxyz(denominators*omega.form) for omega in set_of_forms])

View File

@ -116,8 +116,13 @@ class as_function:
g = self.function g = self.function
return as_function(C, g.substitute(sub_list)) return as_function(C, g.substitute(sub_list))
result = self result = self
for i in range(n): for i in range(len(G.gens)):
for j in range(elt[i]): if isinstance(elt, list): #elt can be a tuple...
range_limit = elt[i]
else: # ... or an integer.
range_limit = elt
for j in range(range_limit):
print(G.gens[i])
result = result.group_action(G.gens[i]) result = result.group_action(G.gens[i])
return result return result
@ -133,7 +138,7 @@ class as_function:
F = C.base_ring F = C.base_ring
RxyzQ, Rxyz, x, y, z = C.fct_field RxyzQ, Rxyz, x, y, z = C.fct_field
result = as_function(C, 0) result = as_function(C, 0)
G = C.group G = C.group.elts
for a in G: for a in G:
result += self.group_action(a) result += self.group_action(a)
result = result.function result = result.function

View File

@ -1,5 +1,6 @@
def as_reduction(AS, fct): def as_reduction(AS, fct):
'''Simplify rational function fct as a function in the function field of AS, so that z[i] appear in powers <p and only in numerator''' '''Simplify rational function fct as a function in the function field of AS, so that z[i] appear in powers <p and only in numerator'''
print(fct, fct.parent())
n = AS.height n = AS.height
F = AS.base_ring F = AS.base_ring
RxyzQ, Rxyz, x, y, z = AS.fct_field RxyzQ, Rxyz, x, y, z = AS.fct_field
@ -10,7 +11,7 @@ def as_reduction(AS, fct):
fct1 = numerator(fct) fct1 = numerator(fct)
fct2 = denominator(fct) fct2 = denominator(fct)
denom = as_function(AS, fct2) denom = as_function(AS, fct2)
denom_norm = prod(as_function(AS, fct2).group_action(g) for g in AS.group if list(g) != n*[0]) denom_norm = prod(as_function(AS, fct2).group_action(g) for g in AS.group.elts if g != AS.group.one)
fct1 = Rxyz(fct1*denom_norm.function) fct1 = Rxyz(fct1*denom_norm.function)
fct2 = Rxyz(fct2*denom_norm.function) fct2 = Rxyz(fct2*denom_norm.function)
if fct2 != 1: if fct2 != 1:
@ -24,7 +25,7 @@ def as_reduction(AS, fct):
if d_div != n*[0]: if d_div != n*[0]:
change = 1 change = 1
d_rem = [a.degree(z[i])%p for i in range(n)] d_rem = [a.degree(z[i])%p for i in range(n)]
monomial = fct1.monomial_coefficient(a)*x^(a.degree(x))*y^(a.degree(y))*prod(z[i]^(d_rem[i]) for i in range(n))*prod((z[i] + ff[i])^(d_div[i]) for i in range(n)) monomial = fct1.monomial_coefficient(a)*x^(a.degree(x))*y^(a.degree(y))*prod(z[i]^(d_rem[i]) for i in range(n))*prod((AS.rhs[i])^(d_div[i]) for i in range(n))
result += RxyzQ(monomial) result += RxyzQ(monomial)
if change == 0: if change == 0:

View File

@ -8,46 +8,3 @@ def as_group_action_matrices(F, space, list_of_group_elements, basis):
v1 = omega1.coordinates(basis = basis) v1 = omega1.coordinates(basis = basis)
A[i][:, j] = vector(v1) A[i][:, j] = vector(v1)
return A return A
def as_group_action_matrices_holo(AS, basis=0, threshold=10):
n = AS.height
generators = []
for i in range(n):
ei = n*[0]
ei[i] = 1
generators += [ei]
if basis == 0:
basis = AS.holomorphic_differentials_basis(threshold=threshold)
F = AS.base_ring
return as_group_action_matrices(F, basis, generators, basis = basis)
as_cover.group_action_matrices_holo = as_group_action_matrices_holo
def as_group_action_matrices_dR(AS, basis = 0, threshold=8):
n = AS.height
generators = []
F = AS.base_ring
for i in range(n):
ei = n*[0]
ei[i] = 1
generators += [ei]
if basis == 0:
holo_basis = AS.holomorphic_differentials_basis(threshold = threshold)
str_basis = AS.cohomology_of_structure_sheaf_basis(holo_basis = holo_basis, threshold = threshold)
dr_basis = AS.de_rham_basis(holo_basis = holo_basis, cohomology_basis = str_basis, threshold=threshold)
basis = [holo_basis, str_basis, dr_basis]
return as_group_action_matrices(F, basis[2], generators, basis = basis)
as_cover.group_action_matrices_dR = as_group_action_matrices_dR
def as_group_action_matrices_log_holo(AS):
n = AS.height
generators = []
for i in range(n):
ei = n*[0]
ei[i] = 1
generators += [ei]
F = AS.base_ring
return as_group_action_matrices(F, AS.at_most_poles_forms(1), generators, basis = AS.at_most_poles_forms(1))
as_cover.group_action_matrices_log_holo = as_group_action_matrices_log_holo

View File

@ -56,3 +56,81 @@ def heisenberg_template(p):
fcts[2] += (z[0] - z[1])*f[1] 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]] 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]]
return template(height, field, group, fcts, gp_action) return template(height, field, group, fcts, gp_action)
def witt_pol(X, p, n):
n = len(X)
return sum(p^i*X[i]^(p^(n-i-1)) for i in range(0, n))
def witt_sum(p, n):
variables = ''
for i in range(0, n+1):
variables += 'X' + str(i) + ','
for i in range(0, n+1):
variables += 'Y' + str(i)
if i!=n:
variables += ','
RQ = PolynomialRing(QQ, variables, 2*(n+1))
X = RQ.gens()[:n+1]
Y = RQ.gens()[n+1:]
Rpx.<x> = PolynomialRing(GF(p), 1)
RQx.<x> = PolynomialRing(QQ, 1)
if n == 0:
return X[0] + Y[0]
WS = []
for k in range(0, n):
aux = witt_sum(p, k)
Rold = aux.parent()
Xold = Rold.gens()[:k+1]
Yold = Rold.gens()[k+1:]
WS+= [aux.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)})]
return 1/p^n*(witt_pol(X[:n+1], p, n) + witt_pol(Y[:n+1], p, n) - sum(p^k*WS[k]^(p^(n-k)) for k in range(0, n)))
def witt_sum_mod_p(p, n):
variables = ''
for i in range(0, n+1):
variables += 'X' + str(i) + ','
for i in range(0, n+1):
variables += 'Y' + str(i)
if i!=n:
variables += ','
RQ = PolynomialRing(QQ, variables, 2*(n+1))
X = RQ.gens()[:n+1]
Y = RQ.gens()[n+1:]
P = RQ(witt_sum(p, n))
RQp = PolynomialRing(GF(p), variables, 2*(n+1))
Xp = RQp.gens()[:n+1]
Yp = RQp.gens()[n+1:]
return RQp(P)
def witt_template(p, n):
height = n
field = GF(p)
group = cyclic_gp(p, n)
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:]
###########
rhs = []
gp_action = []
for i in range(0, n):
aux = witt_sum_mod_p(p, i)
Raux = aux.parent()
Xpn = Raux.gens()[:i+1]
Ypn = Raux.gens()[i+1:]
rhs_aux = aux.subs({Xpn[ii] : z[ii]^p for ii in range(i+1)}|{Ypn[ii] : -z[ii] for ii in range(i+1)})
rhs += [rhs_aux]
gp_action_aux = aux.subs({Xpn[ii] : z[ii] for ii in range(i+1)}|{Ypn[ii] : ii == 0 for ii in range(i+1)})
gp_action += [gp_action_aux]
fcts = [rhs[i] - z[i]^p + z[i] + f[i] for i in range(n)]
########
aux
gp_action = [gp_action]
return template(height, field, group, fcts, gp_action)