From 0300d463ed26d047d257b00dae78691f56018711 Mon Sep 17 00:00:00 2001 From: jgarnek Date: Tue, 11 Jun 2024 17:48:37 +0000 Subject: [PATCH] template - matrix for holo works --- as_covers/as_cover_class.sage | 24 +++++++-- as_covers/as_form_class.sage | 59 +++++++-------------- as_covers/as_function_class.sage | 11 ++-- as_covers/as_reduction.sage | 5 +- as_covers/group_action_matrices.sage | 45 +--------------- as_covers/template.sage | 78 ++++++++++++++++++++++++++++ 6 files changed, 129 insertions(+), 93 deletions(-) diff --git a/as_covers/as_cover_class.sage b/as_covers/as_cover_class.sage index 27d63ec..bc9f5e0 100644 --- a/as_covers/as_cover_class.sage +++ b/as_covers/as_cover_class.sage @@ -39,12 +39,10 @@ class as_cover: list_of_power_series = [g.expansion(pt=pt, prec=prec) for g in list_of_fcts] for j in range(n): #### - #TUTAJ WSTAWIĆ ZMIANĘ + # print(cover_template.fcts[j], {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)}) - #### - #power_series = list_of_power_series[j] jump, correction, t_old, z = artin_schreier_transform(power_series, prec = prec) x_series = x_series(t = t_old) y_series = y_series(t = t_old) @@ -467,3 +465,23 @@ class as_cover: result += [as_cech(self, omega, f)] return result + def group_action_matrices_holo(AS, basis=0, threshold=10): + n = AS.height + if basis == 0: + basis = AS.holomorphic_differentials_basis(threshold=threshold) + F = AS.base_ring + return as_group_action_matrices(F, basis, AS.group.gens, basis = basis) + + def group_action_matrices_dR(AS, basis = 0, threshold=8): + n = AS.height + 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) + dr_basis = AS.de_rham_basis(holo_basis = holo_basis, cohomology_basis = str_basis, threshold=threshold) + basis = [holo_basis, str_basis, dr_basis] + return as_group_action_matrices(F, basis[2], AS.group.gens, basis = basis) + + def group_action_matrices_log_holo(AS): + n = AS.height + F = AS.base_ring + return as_group_action_matrices(F, AS.at_most_poles_forms(1), AS.group.gens, basis = AS.at_most_poles_forms(1)) \ No newline at end of file diff --git a/as_covers/as_form_class.sage b/as_covers/as_form_class.sage index 35af778..76b2047 100644 --- a/as_covers/as_form_class.sage +++ b/as_covers/as_form_class.sage @@ -3,13 +3,7 @@ class as_form: self.curve = C n = C.height F = C.base_ring - variable_names = 'x, y' - for i in range(n): - variable_names += ', z' + str(i) - Rxyz = PolynomialRing(F, n+2, variable_names) - x, y = Rxyz.gens()[:2] - z = Rxyz.gens()[2:] - RxyzQ = FractionField(Rxyz) + RxyzQ, Rxyz, x, y, z = C.fct_field self.form = RxyzQ(g) def __repr__(self): @@ -27,13 +21,7 @@ class as_form: z_series = C.z_series[place] dx_series = C.dx_series[place] n = C.height - variable_names = 'x, y' - for j in range(n): - variable_names += ', z' + str(j) - Rxyz = PolynomialRing(F, n+2, variable_names) - x, y = Rxyz.gens()[:2] - z = Rxyz.gens()[2:] - RxyzQ = FractionField(Rxyz) + RxyzQ, Rxyz, x, y, z = C.fct_field prec = C.prec Rt. = LaurentSeriesRing(F, default_prec=prec) g = self.form @@ -49,13 +37,7 @@ class as_form: z_series = C.z_series[pt] dx_series = C.dx_series[pt] n = C.height - variable_names = 'x, y' - for j in range(n): - variable_names += ', z' + str(j) - Rxyz = PolynomialRing(F, n+2, variable_names) - x, y = Rxyz.gens()[:2] - z = Rxyz.gens()[2:] - RxyzQ = FractionField(Rxyz) + RxyzQ, Rxyz, x, y, z = C.fct_field prec = C.prec Rt. = LaurentSeriesRing(F, default_prec=prec) g = self.form @@ -85,19 +67,21 @@ class as_form: return as_form(C, constant*omega) def reduce(self): - aux = as_reduction(self.curve, self.form) + RxyzQ, Rxyz, x, y, z = self.curve.fct_field + aux = as_reduction(self.curve, RxyzQ(self.form)) return as_form(self.curve, aux) - def group_action(self, ZN_tuple): + def group_action(self, elt): C = self.curve n = C.height - RxyzQ, Rxyz, x, y, z = C.fct_field - sub_list = {x : x, y : y} | {z[j] : z[j]+ZN_tuple[j] for j in range(n)} - g = self.form - return as_form(C, g.substitute(sub_list)) + aux = as_function(C, self.form) + aux = aux.group_action(elt) + return as_form(C, aux.function) def coordinates(self, basis = 0): """Find coordinates of the given holomorphic form self in terms of the basis forms in a list holo.""" + print(self) + self = self.reduce() C = self.curve if basis == 0: basis = C.holomorphic_differentials_basis() @@ -109,27 +93,23 @@ class as_form: self_with_no_denominator = denom*self return linear_representation_polynomials(Rxyz(self_with_no_denominator.form), [Rxyz(omega.form) for omega in basis]) - def trace(self): + def trace(self, super=True): C = self.curve C_super = C.quotient n = C.height F = C.base_ring - variable_names = 'x, y' - for j in range(n): - variable_names += ', z' + str(j) - Rxyz = PolynomialRing(F, n+2, variable_names) - x, y = Rxyz.gens()[:2] - z = Rxyz.gens()[2:] - RxyzQ = FractionField(Rxyz) + RxyzQ, Rxyz, x, y, z = C.fct_field result = as_form(C, 0) - G = C.group + G = C.group.elts for a in G: result += self.group_action(a) result = result.form Rxy. = PolynomialRing(F, 2) Qxy = FractionField(Rxy) result = as_reduction(C, result) - return superelliptic_form(C_super, Qxy(result)) + if super: + return superelliptic_form(C_super, Qxy(result)) + return as_form(C, Qxy(result)) def residue(self, place=0): return self.expansion_at_infty(place = place).residue() @@ -188,10 +168,7 @@ def are_forms_linearly_dependent(set_of_forms): C = set_of_forms[0].curve F = C.base_ring n = C.height - variable_names = 'x, y' - for i in range(n): - variable_names += ', z' + str(i) - Rxyz = PolynomialRing(F, n+2, variable_names) + RxyzQ, Rxyz, x, y, z = C.fct_field denominators = prod(denominator(omega.form) for omega in set_of_forms) return is_linearly_dependent([Rxyz(denominators*omega.form) for omega in set_of_forms]) diff --git a/as_covers/as_function_class.sage b/as_covers/as_function_class.sage index 502c5fe..52ae94b 100644 --- a/as_covers/as_function_class.sage +++ b/as_covers/as_function_class.sage @@ -116,8 +116,13 @@ class as_function: g = self.function return as_function(C, g.substitute(sub_list)) result = self - for i in range(n): - for j in range(elt[i]): + for i in range(len(G.gens)): + if isinstance(elt, list): #elt can be a tuple... + range_limit = elt[i] + else: # ... or an integer. + range_limit = elt + for j in range(range_limit): + print(G.gens[i]) result = result.group_action(G.gens[i]) return result @@ -133,7 +138,7 @@ class as_function: F = C.base_ring RxyzQ, Rxyz, x, y, z = C.fct_field result = as_function(C, 0) - G = C.group + G = C.group.elts for a in G: result += self.group_action(a) result = result.function diff --git a/as_covers/as_reduction.sage b/as_covers/as_reduction.sage index 343e444..722a905 100644 --- a/as_covers/as_reduction.sage +++ b/as_covers/as_reduction.sage @@ -1,5 +1,6 @@ def as_reduction(AS, fct): '''Simplify rational function fct as a function in the function field of AS, so that z[i] appear in powers

= PolynomialRing(GF(p), 1) + RQx. = PolynomialRing(QQ, 1) + if n == 0: + return X[0] + Y[0] + WS = [] + for k in range(0, n): + aux = witt_sum(p, k) + Rold = aux.parent() + Xold = Rold.gens()[:k+1] + Yold = Rold.gens()[k+1:] + WS+= [aux.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)})] + return 1/p^n*(witt_pol(X[:n+1], p, n) + witt_pol(Y[:n+1], p, n) - sum(p^k*WS[k]^(p^(n-k)) for k in range(0, n))) + +def witt_sum_mod_p(p, n): + variables = '' + for i in range(0, n+1): + variables += 'X' + str(i) + ',' + for i in range(0, n+1): + variables += 'Y' + str(i) + if i!=n: + variables += ',' + RQ = PolynomialRing(QQ, variables, 2*(n+1)) + X = RQ.gens()[:n+1] + Y = RQ.gens()[n+1:] + P = RQ(witt_sum(p, n)) + RQp = PolynomialRing(GF(p), variables, 2*(n+1)) + Xp = RQp.gens()[:n+1] + Yp = RQp.gens()[n+1:] + return RQp(P) + +def witt_template(p, n): + height = n + field = GF(p) + group = cyclic_gp(p, n) + variable_names = '' + for i in range(n): + variable_names += 'z'+str(i)+',' + for i in range(n): + variable_names += 'f'+str(i) + if i!=n-1: + variable_names += ',' + R = PolynomialRing(field, 2*n, variable_names) + z = R.gens()[:n] + f = R.gens()[n:] + ########### + rhs = [] + gp_action = [] + for i in range(0, n): + aux = witt_sum_mod_p(p, i) + Raux = aux.parent() + Xpn = Raux.gens()[:i+1] + Ypn = Raux.gens()[i+1:] + rhs_aux = aux.subs({Xpn[ii] : z[ii]^p for ii in range(i+1)}|{Ypn[ii] : -z[ii] for ii in range(i+1)}) + rhs += [rhs_aux] + gp_action_aux = aux.subs({Xpn[ii] : z[ii] for ii in range(i+1)}|{Ypn[ii] : ii == 0 for ii in range(i+1)}) + gp_action += [gp_action_aux] + fcts = [rhs[i] - z[i]^p + z[i] + f[i] for i in range(n)] + ######## + aux + gp_action = [gp_action] return template(height, field, group, fcts, gp_action) \ No newline at end of file