klasa kocyklu cecha; dodane linear_combinations_polynomials; poprawione de_rham_basis

This commit is contained in:
jgarnek 2022-12-22 09:14:40 +00:00
parent c0583f32d5
commit c098f37690
7 changed files with 2897 additions and 4890 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,39 @@
class as_cech:
def __init__(self, C, omega, f):
self.curve = C
n = C.height
F = C.base_ring
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)
self.omega0 = omega
self.f = f
def __repr__(self):
return "( " + str(self.omega0)+", " + str(self.f) + " )"
def __add__(self, other):
C = self.curve
omega = self.omega0
f = self.f
omega1 = other.omega0
f1 = other.f
return as_cech(C, omega + omega1, f+f1)
def __sub__(self, other):
C = self.curve
omega = self.omega0
f = self.f
omega1 = other.omega0
f1 = other.f
return as_cech(C, omega - omega1, f - f1)
def __rmul__(self, constant):
C = self.curve
omega = self.omega0
f = self.f
return as_form(C, constant*omega, constant*f)

View File

@ -330,48 +330,51 @@ class as_cover:
i += 1
return result_fcts
def lift_to_de_rham(AS, fct, threshold = 8):
def lift_to_de_rham(self, fct, threshold = 30):
'''Given function fct, find form eta regular on affine part such that eta - d(fct) is regular in infty. (Works for one place at infty now)'''
print(fct)
from itertools import product
x_series = AS.x
y_series = AS.y
z_series = AS.z
dx_series = AS.dx
delta = AS.nb_of_pts_at_infty
p = AS.characteristic
n = AS.height
prec = AS.prec
C = AS.quotient
F = AS.base_ring
x_series = self.x
y_series = self.y
z_series = self.z
dx_series = self.dx
delta = self.nb_of_pts_at_infty
p = self.characteristic
n = self.height
prec = self.prec
C = self.quotient
F = self.base_ring
m = C.exponent
r = C.polynomial.degree()
RxyzQ, Rxyz, x, y, z = AS.fct_field
RxyzQ, Rxyz, x, y, z = self.fct_field
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
#Tworzymy zbiór S form z^i x^j y^k dx/y o waluacji >= waluacja z^(p-1)*dx/y
S = [(fct.diffn(), fct.diffn().expansion_at_infty())]
pr = [list(GF(p)) for _ in range(n)]
holo = self.holomorphic_differentials_basis()
for i in range(0, threshold*r):
for j in range(0, m):
for k in product(*pr):
eta = as_form(AS, x^i * prod(z[i1]^(k[i1]) for i1 in range(n))*y^j)
eta = as_form(self, x^i*prod(z[i1]^(k[i1]) for i1 in range(n))*y^j)
eta_exp = eta.expansion_at_infty()
S += [(eta, eta_exp)]
forms = holomorphic_combinations(S)
if len(forms) <= self.genus():
raise ValueError("Increase threshold!")
for omega in forms:
if not are_forms_linearly_dependent(holo + [omega]):
for a in F:
if (a*omega - fct.diffn()).form in Rxyz:
return a*omega
for a in F:
if (a*omega - fct.diffn()).form in Rxyz:
return a*omega
raise ValueError("Unknown.")
def de_rham_basis(AS, threshold = 8):
def de_rham_basis(self, threshold = 30):
result = []
for omega in AS.holomorphic_differentials_basis():
for omega in self.holomorphic_differentials_basis():
result += [(omega, 0)]
for f in AS.cohomology_of_structure_sheaf_basis():
omega = lift_to_de_rham(AS, fct, threshold = 8)
result += [(omega, f)]
return result
for f in self.cohomology_of_structure_sheaf_basis():
omega = self.lift_to_de_rham(f, threshold = threshold)
result += [as_cech(self, omega, f)]
return result
def holomorphic_combinations(S):
"""Given a list S of pairs (form, corresponding Laurent series at some pt), find their combinations holomorphic at that pt."""

View File

@ -81,8 +81,7 @@ class as_form:
Rxyz = PolynomialRing(F, n+2, variable_names)
x, y = Rxyz.gens()[:2]
z = Rxyz.gens()[2:]
from sage.rings.polynomial.toy_variety import linear_representation
return linear_representation(Rxyz(self.form), holo)
return linear_representation_polynomials(Rxyz(self.form), holo)
def trace(self):
C = self.curve

View File

@ -0,0 +1,16 @@
def linear_representation_polynomials(polynomial, list_of_polynomials):
'''Given >list_of_polynomials< and >polynomial<, which is a linear combination of polynomials in the list (over the base ring),
find coefficients of this combination.'''
F = polynomial.parent().base_ring()
monomials = polynomial.monomials()
for pol in list_of_polynomials:
monomials += pol.monomials()
monomials = Set(monomials)
monomials = list(monomials)
d = len(monomials)
M = matrix(F, d, len(list_of_polynomials))
for i, pol in enumerate(list_of_polynomials):
for j, m in enumerate(monomials):
M[j, i] = pol.monomial_coefficient(m)
v = vector([polynomial.monomial_coefficient(m) for m in monomials])
return list(M.solve_right(v))

View File

@ -1,11 +1,13 @@
p = 3
p = 2
m = 1
F = GF(p)
F = GF(p^(2), 'a')
a = F.gens()[0]
Rx.<x> = PolynomialRing(F)
f = x
C_super = superelliptic(f, m)
Rxy.<x, y> = PolynomialRing(F, 2)
f1 = superelliptic_function(C_super, x^7)
f2 = superelliptic_function(C_super, x^4)
AS = as_cover(C_super, [f1, f2], prec=1000)
f1 = superelliptic_function(C_super, x^3)
f2 = superelliptic_function(C_super, a*x^3)
AS = as_cover(C_super, [f1, f2], prec=1000)
#print(AS.at_most_poles(7))

View File

@ -13,6 +13,7 @@ load('as_covers/combination_components.sage')
load('as_covers/group_action_matrices.sage')
load('auxilliaries/reverse.sage')
load('auxilliaries/hensel.sage')
load('auxilliaries/linear_combination_polynomials.sage')
##############
##############
load('drafty/lift_to_de_rham.sage')