DeRhamComputation/superelliptic/tests/pth_root_test.sage

15 lines
290 B
Python
Raw Normal View History

p = 3
m = 4
F = GF(p)
Rx.<x> = PolynomialRing(F)
f = x^5 + x
C = superelliptic(f, m)
g = (C.x)^5 * (C.y)^2 + 2*(C.x)^2 * (C.y)^3
g = g^p
print(g.pth_root()==(C.x)^5 * (C.y)^2 + 2*(C.x)^2 * (C.y)^3)
g = C.x
try:
print(g.pth_root())
print("False")
except ValueError:
print("True")