DeRhamComputation/superelliptic/frobenius_kernel.sage

25 lines
667 B
Python

def frobenius_kernel(C, prec=50):
M = C.frobenius_matrix(prec=prec).transpose()
K = M.kernel().basis()
g = C.genus()
result = []
basis = C.cohomology_of_structure_sheaf_basis()
for v in K:
coh = 0*C.x
for i in range(g):
coh += v[i] * basis[i]
result += [coh]
return result
def cartier_kernel(C, prec=50):
M = C.cartier_matrix(prec=prec).transpose()
K = M.kernel().basis()
g = C.genus()
result = []
basis = C.holomorphic_differentials_basis()
for v in K:
coh = 0*C.dx
for i in range(g):
coh += v[i] * basis[i]
result += [coh]
return result