def compute_elldash(p, N, k0, n): r""" Returns the "Sturm bound" for the space of modular forms of level `\Gamma_0(N)` and weight `k_0 + n(p-1)`. .. seealso:: :meth:`~sage.modular.modform.space.ModularFormsSpace.sturm_bound` INPUT: - ``p`` -- prime. - ``N`` -- positive integer (level). - ``k0``, ``n`` - non-negative integers not both zero. OUTPUT: - positive integer. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import compute_elldash sage: compute_elldash(11,5,4,10) 53 """ return ModularForms(N, k0 + n * (p - 1)).sturm_bound()
def low_weight_bases(N, p, m, NN, weightbound): r""" Returns a list of integral bases of modular forms of level N and (even) weight at most ``weightbound``, as `q`-expansions modulo `(p^m,q^{NN})`. These forms are obtained by reduction mod `p^m` from an integral basis in Hermite normal form (so they are not necessarily in reduced row echelon form mod `p^m`, but they are not far off). INPUT: - ``N`` -- positive integer (level). - ``p`` -- prime. - ``m``, ``NN`` -- positive integers. - ``weightbound`` -- (even) positive integer. OUTPUT: - list of lists of `q`-expansions modulo `(p^m,q^{NN})`. EXAMPLES:: sage: from sage.modular.overconvergent.hecke_series import low_weight_bases sage: low_weight_bases(2,5,3,5,6) [[1 + 24*q + 24*q^2 + 96*q^3 + 24*q^4 + O(q^5)], [1 + 115*q^2 + 35*q^4 + O(q^5), q + 8*q^2 + 28*q^3 + 64*q^4 + O(q^5)], [1 + 121*q^2 + 118*q^4 + O(q^5), q + 32*q^2 + 119*q^3 + 24*q^4 + O(q^5)]] """ generators = [] for k in xrange(2, weightbound + 2, 2): b = ModularForms(N, k, base_ring=Zmod(p**m)).q_expansion_basis(prec=NN) generators.append(list(b)) return generators