DeRhamComputation/sage/as_covers/as_cech_class.sage

91 lines
3.6 KiB
Python

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
self.omega8 = self.omega0 - self.f.diffn()
if self.omega0.form not in Rxyz or self.omega8.valuation() < 0:
raise ValueError('cech cocycle not regular')
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_cech(C, constant*omega, constant*f)
def coordinates(self, threshold=10, basis = 0):
'''Find coordinates of self in the de Rham cohomology basis. Threshold is an argument passed to AS.de_rham_basis().'''
AS = self.curve
RxyzQ, Rxyz, x, y, z = AS.fct_field
if basis == 0:
basis = [AS.holomorphic_differentials_basis(), AS.cohomology_of_structure_sheaf_basis(), AS.de_rham_basis(threshold=threshold)]
holo_diffs = basis[0]
coh_basis = basis[1]
dR = basis[2]
F = AS.base_ring
f_products = []
for f in coh_basis:
f_products += [[omega.serre_duality_pairing(f) for omega in holo_diffs]]
print(f_products)
product_of_fct_and_omegas = []
fct = self.f
product_of_fct_and_omegas = [omega.serre_duality_pairing(fct) 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) #coeficients of self in the basis elts coming from cohomology of OX
for i in range(AS.genus()):
self -= coh_coordinates[i]*dR[i+AS.genus()]
#We remove now from f the summands which are obviously regular at infty
print(self, [])
f_num = numerator(self.f.function)
f_den = denominator(self.f.function)
v_f_den = as_function(AS, f_den).valuation()
for a in f_num.monomials():
if as_function(AS, a).valuation() >= v_f_den:
self.f.function -= f_num.monomial_coefficient(a)*a/f_den
f_num = numerator(self.f.function)
f_den = denominator(self.f.function)
quo, rem = f_num.quo_rem(f_den)
if as_function(AS, rem/f_den).valuation() >= 0:
self.f = as_function(AS, quo)
hol_form = self.omega0 - self.f.diffn() #now this should be a holomorphic form
hol_form = as_form(AS, as_reduction(AS, hol_form.form))
print('hol_form', hol_form)
return hol_form.coordinates() + coh_coordinates
print(self, [omega.serre_duality_pairing(self.f) for omega in holo_diffs])
raise ValueError('I arrived at a form (omega, 0), in which omega is not regular on U0. I hoped this wouldn t happen.')
def group_action(self, g):
AS = self.curve
omega = self.omega0
f = self.f
return as_cech(self.curve, omega.group_action(g), f.group_action(g))