From 81b0e4c907e6d31d38f639af8a72835bf1806cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Garnek?= <jgarnek@jupyter2022z.internal.wmi> Date: Fri, 20 Dec 2024 12:12:21 +0100 Subject: [PATCH] fixed tests; changed reduce for forms --- as_covers/as_cover_class.sage | 7 ++++--- as_covers/as_form_class.sage | 7 +++++-- as_covers/tests/as_cover_test.sage | 6 +++--- as_covers/tests/group_action_matrices_test.sage | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/as_covers/as_cover_class.sage b/as_covers/as_cover_class.sage index 7a5b9cd..a1aac18 100644 --- a/as_covers/as_cover_class.sage +++ b/as_covers/as_cover_class.sage @@ -38,7 +38,7 @@ class as_cover: for j in range(n): #### # - power_series = Rzf(cover_template.fcts[j]).subs({zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)}) + power_series = Rzf(cover_template.fcts[j]).subs({zgen[i] : z_series[i] for i in range(j)} | {zgen[i] : 0 for i in range(j, n)} | {fgen[i] : list_of_power_series[i] for i in range(n)} | {xgen : x_series, ygen:y_series}) #### jump, correction, t_old, z = artin_schreier_transform(power_series, prec = prec) x_series = x_series(t = t_old) @@ -74,7 +74,7 @@ class as_cover: self.dx = as_form(self, 1) self.one = as_function(self, 1) Rzf, zgen, fgen, xgen, ygen = cover_template.fct_field - subs_fs = {zgen[i] : z[i]}| {fgen[i] : RxyzQ(list_of_fcts[i].function) for i in range(n)}|{xgen:x, ygen:y} + subs_fs = {zgen[i] : z[i] for i in range(n)}| {fgen[i] : RxyzQ(list_of_fcts[i].function) for i in range(n)}|{xgen:x, ygen:y} self.rhs = [RxyzQ(cover_template.fcts[i].subs(subs_fs)) for i in range(n)] ##### ##### We compute now the differentials dz[i] @@ -306,7 +306,7 @@ class as_cover: p = self.characteristic n = self.height F = self.base_ring - rr_space = self.at_most_poles(threshold, threshold=int(sqrt(threshold))) #there are two thresholds, how to pick them? we picked sqrt randomly + rr_space = self.at_most_poles(threshold, threshold=threshold) #there are two thresholds, how to pick them? we picked sqrt randomly list_of_fcts = [ff for ff in rr_space if ff.valuation(place)%p != 0] list_of_fcts2 = [len(str(ff)) for ff in list_of_fcts] i_min = list_of_fcts2.index(min(list_of_fcts2)) @@ -557,6 +557,7 @@ class as_cover: def group_action_matrices_dR(AS, basis = 0, threshold=8): n = AS.height + F = AS.base_ring if basis == 0: holo_basis = AS.holomorphic_differentials_basis(threshold = threshold) str_basis = AS.cohomology_of_structure_sheaf_basis(holo_basis = holo_basis, threshold = threshold) diff --git a/as_covers/as_form_class.sage b/as_covers/as_form_class.sage index ce6ee7e..21fbbd3 100644 --- a/as_covers/as_form_class.sage +++ b/as_covers/as_form_class.sage @@ -68,8 +68,9 @@ class as_form: def reduce(self): RxyzQ, Rxyz, x, y, z = self.curve.fct_field - aux = as_reduction(self.curve, RxyzQ(self.form)) - return as_form(self.curve, aux) + m = self.curve.quotient.exponent + aux = as_reduction(self.curve, RxyzQ(y^m*self.form)) + return as_form(self.curve, aux/y^m) def group_action(self, elt): C = self.curve @@ -81,6 +82,7 @@ class as_form: def coordinates(self, basis = 0): """Find coordinates of the given holomorphic form self in terms of the basis forms in a list holo.""" self = self.reduce() + print(self) C = self.curve if basis == 0: basis = C.holomorphic_differentials_basis() @@ -90,6 +92,7 @@ class as_form: denom = LCM([denominator(omega.form) for omega in basis]) basis = [denom*omega for omega in basis] self_with_no_denominator = denom*self + print(denom, basis, self_with_no_denominator) return linear_representation_polynomials(Rxyz(self_with_no_denominator.form), [Rxyz(omega.form) for omega in basis]) def trace(self, super=True): diff --git a/as_covers/tests/as_cover_test.sage b/as_covers/tests/as_cover_test.sage index 15ddb7d..bf15a11 100644 --- a/as_covers/tests/as_cover_test.sage +++ b/as_covers/tests/as_cover_test.sage @@ -9,8 +9,8 @@ Rxy.<x, y> = PolynomialRing(GF(p), 2) fArS1 = superelliptic_function(C_super, y*x) fArS2 = superelliptic_function(C_super, y*x^2) fArS3 = superelliptic_function(C_super, y + x) -AS1 = as_cover(C_super, [fArS1, fArS2, fArS3], prec=150) -AS2 = as_cover(C_super, [fArS2, fArS3, fArS1], prec=150) +AS1 = elementary_cover([fArS1, fArS2, fArS3], prec=150) +AS2 = elementary_cover([fArS2, fArS3, fArS1], prec=150) print(AS1.genus() == AS2.genus()) ################## p = 5 @@ -21,6 +21,6 @@ C_super = superelliptic(f, m) Rxy.<x, y> = PolynomialRing(GF(p), 2) fArS1 = superelliptic_function(C_super, y*x) fArS2 = superelliptic_function(C_super, y*x^2) -AS1 = as_cover(C_super, [fArS1, fArS2], prec=1000) +AS1 = elementary_cover([fArS1, fArS2], prec=1000) omega = as_form(AS1, 1/y) print(omega.expansion_at_infty().valuation()==AS1.exponent_of_different()) \ No newline at end of file diff --git a/as_covers/tests/group_action_matrices_test.sage b/as_covers/tests/group_action_matrices_test.sage index c8fe89f..19936ab 100644 --- a/as_covers/tests/group_action_matrices_test.sage +++ b/as_covers/tests/group_action_matrices_test.sage @@ -7,7 +7,7 @@ C_super = superelliptic(f, m) f1 = C_super.x^2*C_super.y f2 = C_super.x^3 -AS = as_cover(C_super, [f1, f2], prec=1000) +AS = elementary_cover([f1, f2], prec=1000) A, B = AS.group_action_matrices_holo() n = A.dimensions()[0]