def modular_symbols(self): """ Return the space of modular symbols used for computing this set of modular eigenforms. EXAMPLES:: sage: n = numerical_eigenforms(61) ; n.modular_symbols() Modular Symbols space of dimension 5 for Gamma_0(61) of weight 2 with sign 1 over Rational Field """ M = ModularSymbols(self._group, self._weight, sign=1) if M.base_ring() != QQ: raise ValueError("modular forms space must be defined over QQ") return M
def modular_symbol_space(E, sign, base_ring, bound=None): r""" Creates the space of modular symbols of a given sign over a give base_ring, attached to the isogeny class of elliptic curves. INPUT: - ``E`` - an elliptic curve over `\QQ` - ``sign`` - integer, -1, 0, or 1 - ``base_ring`` - ring - ``bound`` - (default: None) maximum number of Hecke operators to use to cut out modular symbols factor. If None, use enough to provably get the correct answer. OUTPUT: a space of modular symbols EXAMPLES:: sage: import sage.schemes.elliptic_curves.ell_modular_symbols sage: E=EllipticCurve('11a1') sage: M=sage.schemes.elliptic_curves.ell_modular_symbols.modular_symbol_space(E,-1,GF(37)) sage: M Modular Symbols space of dimension 1 for Gamma_0(11) of weight 2 with sign -1 over Finite Field of size 37 """ _sign = int(sign) if _sign != sign: raise TypeError('sign must be an integer') if not (_sign in [-1, 0, 1]): raise TypeError('sign must -1, 0, or 1') N = E.conductor() M = ModularSymbols(N, sign=sign, base_ring=base_ring) if bound is None: bound = M.hecke_bound() + 10 V = M p = 2 while p <= bound and V.dimension() > 1: t = V.T(p) ap = E.ap(p) V = (t - ap).kernel() p = next_prime(p) return V
def modular_symbols(self): """ Return the space of modular symbols used for computing this set of modular eigenforms. EXAMPLES:: sage: n = numerical_eigenforms(61) ; n.modular_symbols() Modular Symbols space of dimension 5 for Gamma_0(61) of weight 2 with sign 1 over Rational Field """ try: return self.__modular_symbols except AttributeError: M = ModularSymbols(self._group, self._weight, sign=1) if M.base_ring() != QQ: raise ValueError("modular forms space must be defined over QQ") self.__modular_symbols = M return M
def modular_symbol_space(E, sign, base_ring, bound=None): r""" Creates the space of modular symbols of a given sign over a give base_ring, attached to the isogeny class of elliptic curves. INPUT: - ``E`` - an elliptic curve over `\QQ` - ``sign`` - integer, -1, 0, or 1 - ``base_ring`` - ring - ``bound`` - (default: None) maximum number of Hecke operators to use to cut out modular symbols factor. If None, use enough to provably get the correct answer. OUTPUT: a space of modular symbols EXAMPLES:: sage: import sage.schemes.elliptic_curves.ell_modular_symbols sage: E=EllipticCurve('11a1') sage: M=sage.schemes.elliptic_curves.ell_modular_symbols.modular_symbol_space(E,-1,GF(37)) sage: M Modular Symbols space of dimension 1 for Gamma_0(11) of weight 2 with sign -1 over Finite Field of size 37 """ _sign = int(sign) if _sign != sign: raise TypeError, 'sign must be an integer' if not (_sign in [-1,0,1]): raise TypeError, 'sign must -1, 0, or 1' N = E.conductor() M = ModularSymbols(N, sign=sign, base_ring=base_ring) if bound is None: bound = M.hecke_bound() + 10 V = M p = 2 while p <= bound and V.dimension() > 1: t = V.T(p) ap = E.ap(p) V = (t - ap).kernel() p = next_prime(p) return V