def katz_expansions(k0, p, ellp, mdash, n): r""" Returns a list e of q-expansions, and the Eisenstein series `E_{p-1} = 1 + \dots`, all modulo `(p^\text{mdash},q^\text{ellp})`. The list e contains the elements `e_{i,s}` in the Katz expansions basis in Step 3 of Algorithm 1 in [AGBL]_ when one takes as input to that algorithm p,m and k and define ``k0``, ``mdash``, n, ``ellp = ell*p`` as in Step 1. INPUT: - ``k0`` -- integer in range 0 to p-1. - ``p`` -- prime at least 5. - ``ellp,mdash,n`` -- positive integers. OUTPUT: - list of q-expansions and the Eisenstein series E_{p-1} modulo `(p^\text{mdash},q^\text{ellp})`. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import katz_expansions sage: katz_expansions(0,5,10,3,4) ([1 + O(q^10), q + 6*q^2 + 27*q^3 + 98*q^4 + 65*q^5 + 37*q^6 + 81*q^7 + 85*q^8 + 62*q^9 + O(q^10)], 1 + 115*q + 35*q^2 + 95*q^3 + 20*q^4 + 115*q^5 + 105*q^6 + 60*q^7 + 25*q^8 + 55*q^9 + O(q^10)) """ S = Zmod(p**mdash) Ep1 = eisenstein_series_qexp(p - 1, ellp, K=S, normalization="constant") E4 = eisenstein_series_qexp(4, ellp, K=S, normalization="constant") E6 = eisenstein_series_qexp(6, ellp, K=S, normalization="constant") delta = delta_qexp(ellp, K=S) h = delta / E6**2 hj = delta.parent()(1) e = [] # We compute negative powers of E_(p-1) successively (this saves a great # deal of time). The effect is that Ep1mi = Ep1 ** (-i). Ep1m1 = ~Ep1 Ep1mi = 1 for i in xrange(0, n + 1): Wi, hj = compute_Wi(k0 + i * (p - 1), p, h, hj, E4, E6) for bis in Wi: eis = p**floor(i / (p + 1)) * Ep1mi * bis e.append(eis) Ep1mi = Ep1mi * Ep1m1 return e, Ep1
def katz_expansions(k0,p,ellp,mdash,n): r""" Returns a list e of q-expansions, and the Eisenstein series `E_{p-1} = 1 + \dots`, all modulo `(p^\text{mdash},q^\text{ellp})`. The list e contains the elements `e_{i,s}` in the Katz expansions basis in Step 3 of Algorithm 1 in [AGBL]_ when one takes as input to that algorithm p,m and k and define ``k0``, ``mdash``, n, ``ellp = ell*p`` as in Step 1. INPUT: - ``k0`` -- integer in range 0 to p-1. - ``p`` -- prime at least 5. - ``ellp,mdash,n`` -- positive integers. OUTPUT: - list of q-expansions and the Eisenstein series E_{p-1} modulo `(p^\text{mdash},q^\text{ellp})`. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import katz_expansions sage: katz_expansions(0,5,10,3,4) ([1 + O(q^10), q + 6*q^2 + 27*q^3 + 98*q^4 + 65*q^5 + 37*q^6 + 81*q^7 + 85*q^8 + 62*q^9 + O(q^10)], 1 + 115*q + 35*q^2 + 95*q^3 + 20*q^4 + 115*q^5 + 105*q^6 + 60*q^7 + 25*q^8 + 55*q^9 + O(q^10)) """ S = Zmod(p**mdash) Ep1 = eisenstein_series_qexp(p-1, ellp, K=S, normalization="constant") E4 = eisenstein_series_qexp(4, ellp, K=S, normalization="constant") E6 = eisenstein_series_qexp(6, ellp, K=S, normalization="constant") delta = delta_qexp(ellp, K=S) h = delta / E6**2 hj = delta.parent()(1) e = [] # We compute negative powers of E_(p-1) successively (this saves a great # deal of time). The effect is that Ep1mi = Ep1 ** (-i). Ep1m1 = ~Ep1 Ep1mi = 1 for i in xrange(0,n+1): Wi,hj = compute_Wi(k0 + i*(p-1),p,h,hj,E4,E6) for bis in Wi: eis = p**floor(i/(p+1)) * Ep1mi * bis e.append(eis) Ep1mi = Ep1mi * Ep1m1 return e,Ep1
def higher_level_katz_exp(p, N, k0, m, mdash, elldash, elldashp, modformsring, bound): r""" Returns a matrix `e` of size ``ell x elldashp`` over the integers modulo `p^\text{mdash}`, and the Eisenstein series `E_{p-1} = 1 + .\dots \bmod (p^\text{mdash},q^\text{elldashp})`. The matrix e contains the coefficients of the elements `e_{i,s}` in the Katz expansions basis in Step 3 of Algorithm 2 in [AGBL]_ when one takes as input to that algorithm `p`,`N`,`m` and `k` and define ``k0``, ``mdash``, ``n``, ``elldash``, ``elldashp = ell*dashp`` as in Step 1. INPUT: - ``p`` -- prime at least 5. - ``N`` -- positive integer at least 2 and not divisible by p (level). - ``k0`` -- integer in xrange 0 to p-1. - ``m,mdash,elldash,elldashp`` -- positive integers. - ``modformsring`` -- True or False. - ``bound`` -- positive (even) integer. OUTPUT: - matrix and q-expansion. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import higher_level_katz_exp sage: e,Ep1 = higher_level_katz_exp(5,2,0,1,2,4,20,true,6) sage: e [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [ 0 1 18 23 19 6 9 9 17 7 3 17 12 8 22 8 11 19 1 5] [ 0 0 1 11 20 16 0 8 4 0 18 15 24 6 15 23 5 18 7 15] [ 0 0 0 1 4 16 23 13 6 5 23 5 2 16 4 18 10 23 5 15] sage: Ep1 1 + 15*q + 10*q^2 + 20*q^3 + 20*q^4 + 15*q^5 + 5*q^6 + 10*q^7 + 5*q^9 + 10*q^10 + 5*q^11 + 10*q^12 + 20*q^13 + 15*q^14 + 20*q^15 + 15*q^16 + 10*q^17 + 20*q^18 + O(q^20) """ ordr = 1 / (p + 1) S = Zmod(p**mdash) Ep1 = eisenstein_series_qexp(p - 1, prec=elldashp, K=S, normalization="constant") n = floor(((p + 1) / (p - 1)) * (m + 1)) Wjs = complementary_spaces(N, p, k0, n, mdash, elldashp, elldash, modformsring, bound) Basis = [] for j in xrange(n + 1): Wj = Wjs[j] dimj = len(Wj) Ep1minusj = Ep1**(-j) for i in xrange(dimj): wji = Wj[i] b = p**floor(ordr * j) * wji * Ep1minusj Basis.append(b) # extract basis as a matrix ell = len(Basis) M = matrix(S, ell, elldashp) for i in xrange(ell): for j in xrange(elldashp): M[i, j] = Basis[i][j] ech_form(M, p) # put it into echelon form return M, Ep1
def complementary_spaces(N, p, k0, n, mdash, elldashp, elldash, modformsring, bound): r""" Returns a list ``Ws``, each element in which is a list ``Wi`` of q-expansions modulo `(p^\text{mdash},q^\text{elldashp})`. The list ``Wi`` is a basis for a choice of complementary space in level `\Gamma_0(N)` and weight `k` to the image of weight `k - (p-1)` forms under multiplication by the Eisenstein series `E_{p-1}`. The lists ``Wi`` play the same role as `W_i` in Step 2 of Algorithm 2 in [AGBL]_. (The parameters ``k0,n,mdash,elldash,elldashp = elldash*p`` are defined as in Step 1 of that algorithm when this function is used in :func:`hecke_series`.) However, the complementary spaces are computed in a different manner, combining a suggestion of David Loeffler with one of John Voight. That is, one builds these spaces recursively using random products of forms in low weight, first searching for suitable products modulo `(p,q^\text{elldash})`, and then later reconstructing only the required products to the full precision modulo `(p^\text{mdash},q^{elldashp})`. The forms in low weight are chosen from either bases of all forms up to weight ``bound`` or from a (tentative) generating set for the ring of all modular forms, according to whether ``modformsring`` is ``False`` or ``True``. INPUT: - ``N`` -- positive integer at least 2 and not divisible by p (level). - ``p`` -- prime at least 5. - ``k0`` -- integer in range 0 to ``p-1``. - ``n,mdash,elldashp,elldash`` -- positive integers. - ``modformsring`` -- True or False. - ``bound`` -- positive (even) integer (ignored if ``modformsring`` is True). OUTPUT: - list of lists of q-expansions modulo ``(p^\text{mdash},q^\text{elldashp})``. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import complementary_spaces sage: complementary_spaces(2,5,0,3,2,5,4,true,6) # random [[1], [1 + 23*q + 24*q^2 + 19*q^3 + 7*q^4 + O(q^5)], [1 + 21*q + 2*q^2 + 17*q^3 + 14*q^4 + O(q^5)], [1 + 19*q + 9*q^2 + 11*q^3 + 9*q^4 + O(q^5)]] sage: complementary_spaces(2,5,0,3,2,5,4,false,6) # random [[1], [3 + 4*q + 2*q^2 + 12*q^3 + 11*q^4 + O(q^5)], [2 + 2*q + 14*q^2 + 19*q^3 + 18*q^4 + O(q^5)], [6 + 8*q + 10*q^2 + 23*q^3 + 4*q^4 + O(q^5)]] """ if modformsring == False: LWB = random_low_weight_bases(N, p, mdash, elldashp, bound) else: LWB, bound = low_weight_generators(N, p, mdash, elldashp) LWBModp = [[f.change_ring(GF(p)).truncate_powerseries(elldash) for f in x] for x in LWB] CompSpacesCode = complementary_spaces_modp(N, p, k0, n, elldash, LWBModp, bound) Ws = [] Epm1 = eisenstein_series_qexp(p - 1, prec=elldashp, K=Zmod(p**mdash), normalization="constant") for i in xrange(n + 1): CompSpacesCodemi = CompSpacesCode[i] Wi = [] for k in xrange(len(CompSpacesCodemi)): CompSpacesCodemik = CompSpacesCodemi[k] Wik = Epm1.parent()(1) for j in xrange(len(CompSpacesCodemik)): l = CompSpacesCodemik[j][0] index = CompSpacesCodemik[j][1] Wik = Wik * LWB[l][index] Wi.append(Wik) Ws.append(Wi) return Ws
def higher_level_katz_exp(p,N,k0,m,mdash,elldash,elldashp,modformsring,bound): r""" Returns a matrix `e` of size ``ell x elldashp`` over the integers modulo `p^\text{mdash}`, and the Eisenstein series `E_{p-1} = 1 + .\dots \bmod (p^\text{mdash},q^\text{elldashp})`. The matrix e contains the coefficients of the elements `e_{i,s}` in the Katz expansions basis in Step 3 of Algorithm 2 in [AGBL]_ when one takes as input to that algorithm `p`,`N`,`m` and `k` and define ``k0``, ``mdash``, ``n``, ``elldash``, ``elldashp = ell*dashp`` as in Step 1. INPUT: - ``p`` -- prime at least 5. - ``N`` -- positive integer at least 2 and not divisible by p (level). - ``k0`` -- integer in xrange 0 to p-1. - ``m,mdash,elldash,elldashp`` -- positive integers. - ``modformsring`` -- True or False. - ``bound`` -- positive (even) integer. OUTPUT: - matrix and q-expansion. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import higher_level_katz_exp sage: e,Ep1 = higher_level_katz_exp(5,2,0,1,2,4,20,true,6) sage: e [ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [ 0 1 18 23 19 6 9 9 17 7 3 17 12 8 22 8 11 19 1 5] [ 0 0 1 11 20 16 0 8 4 0 18 15 24 6 15 23 5 18 7 15] [ 0 0 0 1 4 16 23 13 6 5 23 5 2 16 4 18 10 23 5 15] sage: Ep1 1 + 15*q + 10*q^2 + 20*q^3 + 20*q^4 + 15*q^5 + 5*q^6 + 10*q^7 + 5*q^9 + 10*q^10 + 5*q^11 + 10*q^12 + 20*q^13 + 15*q^14 + 20*q^15 + 15*q^16 + 10*q^17 + 20*q^18 + O(q^20) """ ordr = 1/(p+1) S = Zmod(p**mdash) Ep1 = eisenstein_series_qexp(p-1,prec=elldashp,K=S, normalization="constant") n = floor(((p+1)/(p-1))*(m+1)) Wjs = complementary_spaces(N,p,k0,n,mdash,elldashp,elldash,modformsring,bound) Basis = [] for j in xrange(n+1): Wj = Wjs[j] dimj = len(Wj) Ep1minusj = Ep1**(-j) for i in xrange(dimj): wji = Wj[i] b = p**floor(ordr*j) * wji * Ep1minusj Basis.append(b) # extract basis as a matrix ell = len(Basis) M = matrix(S,ell,elldashp) for i in xrange(ell): for j in xrange(elldashp): M[i,j] = Basis[i][j] ech_form(M,p) # put it into echelon form return M,Ep1
def complementary_spaces(N,p,k0,n,mdash,elldashp,elldash,modformsring,bound): r""" Returns a list ``Ws``, each element in which is a list ``Wi`` of q-expansions modulo `(p^\text{mdash},q^\text{elldashp})`. The list ``Wi`` is a basis for a choice of complementary space in level `\Gamma_0(N)` and weight `k` to the image of weight `k - (p-1)` forms under multiplication by the Eisenstein series `E_{p-1}`. The lists ``Wi`` play the same role as `W_i` in Step 2 of Algorithm 2 in [AGBL]_. (The parameters ``k0,n,mdash,elldash,elldashp = elldash*p`` are defined as in Step 1 of that algorithm when this function is used in :func:`hecke_series`.) However, the complementary spaces are computed in a different manner, combining a suggestion of David Loeffler with one of John Voight. That is, one builds these spaces recursively using random products of forms in low weight, first searching for suitable products modulo `(p,q^\text{elldash})`, and then later reconstructing only the required products to the full precision modulo `(p^\text{mdash},q^{elldashp})`. The forms in low weight are chosen from either bases of all forms up to weight ``bound`` or from a (tentative) generating set for the ring of all modular forms, according to whether ``modformsring`` is ``False`` or ``True``. INPUT: - ``N`` -- positive integer at least 2 and not divisible by p (level). - ``p`` -- prime at least 5. - ``k0`` -- integer in range 0 to ``p-1``. - ``n,mdash,elldashp,elldash`` -- positive integers. - ``modformsring`` -- True or False. - ``bound`` -- positive (even) integer (ignored if ``modformsring`` is True). OUTPUT: - list of lists of q-expansions modulo ``(p^\text{mdash},q^\text{elldashp})``. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import complementary_spaces sage: complementary_spaces(2,5,0,3,2,5,4,true,6) # random [[1], [1 + 23*q + 24*q^2 + 19*q^3 + 7*q^4 + O(q^5)], [1 + 21*q + 2*q^2 + 17*q^3 + 14*q^4 + O(q^5)], [1 + 19*q + 9*q^2 + 11*q^3 + 9*q^4 + O(q^5)]] sage: complementary_spaces(2,5,0,3,2,5,4,false,6) # random [[1], [3 + 4*q + 2*q^2 + 12*q^3 + 11*q^4 + O(q^5)], [2 + 2*q + 14*q^2 + 19*q^3 + 18*q^4 + O(q^5)], [6 + 8*q + 10*q^2 + 23*q^3 + 4*q^4 + O(q^5)]] """ if modformsring == False: LWB = random_low_weight_bases(N,p,mdash,elldashp,bound) else: LWB,bound = low_weight_generators(N,p,mdash,elldashp) LWBModp = [ [ f.change_ring(GF(p)).truncate_powerseries(elldash) for f in x] for x in LWB] CompSpacesCode = complementary_spaces_modp(N,p,k0,n,elldash,LWBModp,bound) Ws = [] Epm1 = eisenstein_series_qexp(p-1, prec=elldashp, K = Zmod(p**mdash), normalization="constant") for i in xrange(n+1): CompSpacesCodemi = CompSpacesCode[i] Wi = [] for k in xrange(len(CompSpacesCodemi)): CompSpacesCodemik = CompSpacesCodemi[k] Wik = Epm1.parent()(1) for j in xrange(len(CompSpacesCodemik)): l = CompSpacesCodemik[j][0] index = CompSpacesCodemik[j][1] Wik = Wik*LWB[l][index] Wi.append(Wik) Ws.append(Wi) return Ws