diff --git a/README.md b/README.md index 7144a87..b6ea847 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,9 @@ One can check valuation of form/function at given place at infinity, using *valu ## Abelian covers of superelliptic curves -This module allows to define $(\mathbb Z/p)^n$-covers of superelliptic curves in characteristic $p$ that +This module allows to define $(\mathbb Z/p)^n$\-covers of superelliptic curves in characteristic $p$ that are **ramified over the points of infinity**. -We define now a $(\mathbb Z/3)^2$ cover of curve $C : y^2 = x^3 + x$, given by the equations $z_0^3 - z_0 = x^2 * y$, +We define now a $(\mathbb Z/3)^2$ cover of curve $C : y^2 = x^3 + x$, given by the equations $z_0^3 - z_0 = x^2 y$, $z_1^3 - z_1 = x^3$. ``` diff --git a/as_covers/as_auxilliary.sage b/as_covers/as_auxilliary.sage index fbe7828..503995e 100644 --- a/as_covers/as_auxilliary.sage +++ b/as_covers/as_auxilliary.sage @@ -1,4 +1,4 @@ -def magma_module_decomposition(A, B, text = False, prefix="", sufix=""): +def magma_module_decomposition(A, B, text = False, prefix="", sufix="", matrices=True): """Find decomposition of Z/p^2-module given by matrices A, B into indecomposables using magma. If text = True, print the command for Magma. Else - return the output of Magma free.""" q = parent(A).base_ring().order() @@ -18,7 +18,8 @@ def magma_module_decomposition(A, B, text = False, prefix="", sufix=""): result += ">;" result += "M := RModule(RSpace(GF("+str(q)+")," + str(n) + "), A);" result += "L := IndecomposableSummands(M); L;" - result += "for i in [1 .. #L] do print(Generators(Action(L[i]))); end for;" + if matrices: + result += "for i in [1 .. #L] do print(Generators(Action(L[i]))); end for;" result += sufix if text: return result diff --git a/as_covers/as_cech_class.sage b/as_covers/as_cech_class.sage index 9eb2b90..fafe8f2 100644 --- a/as_covers/as_cech_class.sage +++ b/as_covers/as_cech_class.sage @@ -35,6 +35,12 @@ class as_cech: f1 = other.f return as_cech(C, omega - omega1, f - f1) + def __neg__(self): + C = self.curve + omega = self.omega0 + f = self.f + return as_cech(C, -omega, -f) + def __rmul__(self, constant): C = self.curve omega = self.omega0 diff --git a/as_covers/as_form_class.sage b/as_covers/as_form_class.sage index 0544715..bbcf4bd 100644 --- a/as_covers/as_form_class.sage +++ b/as_covers/as_form_class.sage @@ -71,6 +71,11 @@ class as_form: g2 = other.form return as_form(C, g1 - g2) + def __neg__(self): + C = self.curve + g = self.form + return as_form(C, -g) + def __rmul__(self, constant): C = self.curve omega = self.form diff --git a/as_covers/as_function_class.sage b/as_covers/as_function_class.sage index 1042b9e..fda8e93 100644 --- a/as_covers/as_function_class.sage +++ b/as_covers/as_function_class.sage @@ -33,6 +33,11 @@ class as_function: g = self.function return as_function(C, constant*g) + def __neg__(self, other): + C = self.curve + g = self.function + return as_function(C, -g) + def __mul__(self, other): if isinstance(other, as_function): C = self.curve diff --git a/as_covers/group_action_matrices.sage b/as_covers/group_action_matrices.sage index b636126..d1c3693 100644 --- a/as_covers/group_action_matrices.sage +++ b/as_covers/group_action_matrices.sage @@ -9,14 +9,15 @@ def group_action_matrices(space, list_of_group_elements, basis): A[i][:, j] = vector(v1) return A -def group_action_matrices_holo(AS): +def group_action_matrices_holo(AS, basis=0, threshold=10): n = AS.height generators = [] for i in range(n): ei = n*[0] ei[i] = 1 generators += [ei] - basis = AS.holomorphic_differentials_basis() + if basis == 0: + basis = AS.holomorphic_differentials_basis(threshold=threshold) return group_action_matrices(basis, generators, basis = basis) def group_action_matrices_dR(AS, threshold=8): diff --git a/drafty/draft.sage b/drafty/draft.sage index 4587746..ad3236f 100644 --- a/drafty/draft.sage +++ b/drafty/draft.sage @@ -1,8 +1,7 @@ -p = 5 -m = 1 -F = GF(p) -Rx. = PolynomialRing(F) -f = x -C = superelliptic(f, 1) -AS1 = as_cover(C, [C.x^3], prec = 200) -print(AS1.genus()) \ No newline at end of file +p = 3 +F = GF(p^2, 'a') +#F1 = F.algebraic_closure('t') +a = F.gens()[0] +R. = PolynomialRing(F) +P1 = superelliptic(x, 1) +AS = as_cover(P1, [P1.x^2, a*P1.x^2]) diff --git a/drafty/draft2.sage b/drafty/draft2.sage index d9659ec..a08e87c 100644 --- a/drafty/draft2.sage +++ b/drafty/draft2.sage @@ -1,5 +1,18 @@ -F = GF(2) -A = matrix(F, [[1, 1, 1], [0, 0, 1], [0, 1, 0]]) -B = matrix(F, [[0, 0, 1], [1, 1, 1], [1, 0, 0]]) -print(A^2 == identity_matrix(3), B^2 == identity_matrix(3), A*B == B*A) -print(magmathis(A, B)) \ No newline at end of file +def reduction(g): + F = g.parent().base() + x, y = g.parent().gens() + Rxy. = PolynomialRing(F, 2) + Fxy = FractionField(Rxy) + Rx. = PolynomialRing(F) + Fx = FractionField(Rx) + FxRy. = PolynomialRing(Fx) + g = Fxy(g) + g1 = g.numerator() + g2 = g.denominator() + print('aa', FxRy(g2)) + + +F = GF(3).algebraic_closure() +R. = PolynomialRing(F, 2) +g = x +reduction(g) \ No newline at end of file diff --git a/superelliptic/superelliptic_class.sage b/superelliptic/superelliptic_class.sage index dc61f23..0664f79 100644 --- a/superelliptic/superelliptic_class.sage +++ b/superelliptic/superelliptic_class.sage @@ -238,40 +238,44 @@ class superelliptic: b += M return (C.x)^a/(C.y)^b -def reduction(C, g): +def reduction(curve, g): '''Auxilliary. Given a superelliptic curve C : y^m = f(x) and a polynomial g(x, y) it replaces repeteadly all y^m's in g(x, y) by f(x). As a result you obtain sum_{i = 0}^{m-1} y^i g_i(x).''' - p = C.characteristic - F = C.base_ring - Rxy. = PolynomialRing(F, 2) - Fxy = FractionField(Rxy) - f = C.polynomial + p = curve.characteristic + F = curve.base_ring + Fxy, Rxy, x, y = curve.fct_field + f = curve.polynomial r = f.degree() - m = C.exponent + m = curve.exponent g = Fxy(g) g1 = g.numerator() g2 = g.denominator() Rx. = PolynomialRing(F) Fx = FractionField(Rx) - FxRy. = PolynomialRing(Fx) - (A, B, C) = xgcd(FxRy(g2), FxRy(y^m - f)) - g = FxRy(g1*B/A) + FxRy1. = PolynomialRing(Fx, 1) #coercion problems from Rxy to FxRy + FxRy. = PolynomialRing(Fx) #coercion problems from Rxy to FxRy + (A, B, C) = xgcd(FxRy(FxRy1(g2)(y = y2)), FxRy(FxRy1(y^m - f)(y = y2))) #coercion problems from Rxy to FxRy + g = FxRy(FxRy1(g1)(y = y2))*B/A + g = FxRy(g) - while(g.degree(Rxy(y)) >= m): - d = g.degree(Rxy(y)) + while(g.degree(y2) >= m): + d = g.degree(y2) G = coff(g, d) i = floor(d/m) - g = g - G*y^d + f^i * y^(d%m) *G - - return(FxRy(g)) + g = g - G*y2^d + f^i * y2^(d%m) *G + Rxy1. = PolynomialRing(F, 2) + Fxy1 = FractionField(Rxy1) + g = sum(Fxy(y3)^i*Fx(coff(g, i)) for i in range(0, m)) + g = Fxy(g) + return(g) -#Auxilliary. Given a superelliptic curve C : y^m = f(x) and a polynomial g(x, y) -#it replaces repeteadly all y^m's in g(x, y) by f(x). As a result -#you obtain \sum_{i = 0}^{m-1} g_i(x)/y^i. This is needed for reduction of -#superelliptic forms. def reduction_form(C, g): + '''Auxilliary. Given a superelliptic curve C : y^m = f(x) and a polynomial g(x, y) + it replaces repeteadly all y^m's in g(x, y) by f(x). As a result + you obtain sum_{i = 0}^{m-1} g_i(x)/y^i. This is needed for reduction of + superelliptic forms.''' F = C.base_ring Rxy. = PolynomialRing(F, 2) Fxy = FractionField(Rxy) @@ -283,14 +287,15 @@ def reduction_form(C, g): g1 = Rxy(0) Rx. = PolynomialRing(F) Fx = FractionField(Rx) - FxRy. = PolynomialRing(Fx) + FxRy1. = PolynomialRing(Fx, 1) + FxRy. = PolynomialRing(Fx) - g = FxRy(g) + g = FxRy(FxRy1(g)(y = y2)) for j in range(0, m): if j==0: G = coff(g, 0) - g1 += FxRy(G) + g1 += Fxy(Fx(G)) else: G = coff(g, j) - g1 += Fxy(y^(j-m)*f*G) + g1 += Fxy(y)^(j-m)*Fxy(Fx(f*G)) return(g1) \ No newline at end of file diff --git a/superelliptic/superelliptic_form_class.sage b/superelliptic/superelliptic_form_class.sage index 01ae6f0..1575ebf 100644 --- a/superelliptic/superelliptic_form_class.sage +++ b/superelliptic/superelliptic_form_class.sage @@ -101,14 +101,17 @@ class superelliptic_form: C = self.curve m = C.exponent F = C.base_ring + Fxy, Rxy, x, y = C.fct_field + g = reduction(C, y^m*g) Rx. = PolynomialRing(F) Fx = FractionField(Rx) - FxRy. = PolynomialRing(Fx) - g = reduction(C, y^m*g) - g = FxRy(g) + FxRy. = PolynomialRing(Fx, 1) + print('a') + g = FxRy(g(x = x, y = y1)) + print('b') if j == 0: - return g.monomial_coefficient(y^(0))/C.polynomial - return g.monomial_coefficient(y^(m-j)) + return g.monomial_coefficient(y1^(0))/C.polynomial + return g.monomial_coefficient(y1^(m-j)) def is_regular_on_U0(self): C = self.curve diff --git a/tests.sage b/tests.sage index cf0054a..9570b7f 100644 --- a/tests.sage +++ b/tests.sage @@ -1,16 +1,16 @@ #load('init.sage') print("Expansion at infty test:") load('superelliptic/tests/expansion_at_infty.sage') -#print("superelliptic form coordinates test:") -#load('superelliptic/tests/form_coordinates_test.sage') -#print("p-th root test:") -#load('superelliptic/tests/pth_root_test.sage') +print("superelliptic form coordinates test:") +load('superelliptic/tests/form_coordinates_test.sage') +print("p-th root test:") +load('superelliptic/tests/pth_root_test.sage') #print("not working! superelliptic p rank test:") #load('superelliptic/tests/p_rank_test.sage') -#print("a-number test:") -#load('superelliptic/tests/a_number_test.sage') -#print("as_cover_test:") -#load('as_covers/tests/as_cover_test.sage') +print("a-number test:") +load('superelliptic/tests/a_number_test.sage') +print("as_cover_test:") +load('as_covers/tests/as_cover_test.sage') #print("group_action_matrices_test:") #load('as_covers/tests/group_action_matrices_test.sage') #print("dual_element_test:")