DeRhamComputation/superelliptic_drw/second_patch.sage

37 lines
1.2 KiB
Python

def patch(C):
if C.exponent != 2:
raise ValueError("Not implemented yet!")
Fxy, Rxy, x, y = C.fct_field
F = C.base_ring
Rx.<x> = PolynomialRing(F)
f = C.polynomial
g = C.genus()
f_star = Rx(x^(2*g+2)*f(1/x))
return superelliptic(f_star, 2)
def second_patch(argument):
C = argument.curve
C1 = patch(C)
Fxy, Rxy, x, y = C.fct_field
g = C.genus()
if isinstance(argument, superelliptic_function):
fct = Fxy(argument.function)
fct1 = Fxy(fct.subs({x : 1/x, y : y/x^(g+1)}))
return superelliptic_function(C1, fct1)
if isinstance(argument, superelliptic_form):
fct = Fxy(argument.form)
fct1 = Fxy(fct.subs({x : 1/x, y : y/x^(g+1)}))
fct1 *= -x^(-2)
return superelliptic_form(C1, fct1)
if isinstance(argument, superelliptic_drw_form):
h1 = argument.h1
omega = argument.omega
h2 = argument.h2
C = h1.curve
return superelliptic_drw_form(-second_patch(h1)*(C.x)^(-2), second_patch(omega), second_patch(h2))
def lift_form_to_drw(omega):
A, B = regular_form(omega)
A, B = A.change_ring(QQ), B.change_ring(QQ)
print("%s dx + %s dy"%(A, B))