def __init__(self, f, p, base_extend=True): r""" EXAMPLE:: sage: from sage.modular.local_comp.type_space import example_type_space sage: example_type_space() # indirect doctest 6-dimensional type space at prime 7 of form q + q^2 + (-1/2*a1 + 1/2)*q^3 + q^4 + (a1 - 1)*q^5 + O(q^6) """ self._p = p self._f = f if f.level() % p: raise ValueError("p must divide level") amb = ModularSymbols(self.group(), f.weight()) self.e_space = find_in_space(f, amb, base_extend=base_extend).sign_submodule(1) R = self.e_space.base_ring() mat = amb._action_on_modular_symbols([p**self.u(), 1, 0, p**self.u()]) V = amb.free_module().base_extend(R) bvecs = [] for v in self.e_space.free_module().basis(): bvecs += mat.maxspin(v) T = V.submodule(bvecs) self._unipmat = mat.change_ring(R).restrict(T).transpose() / ZZ( p**(self.u() * (f.weight() - 2))) self.t_space = amb.base_extend(R).submodule(T, check=False)
def __init__(self, f, p, base_extend=True): r""" EXAMPLE:: sage: from sage.modular.local_comp.type_space import example_type_space sage: example_type_space() # indirect doctest 6-dimensional type space at prime 7 of form q + q^2 + (-1/2*a1 + 1/2)*q^3 + q^4 + (a1 - 1)*q^5 + O(q^6) """ self._p = p self._f = f if f.level() % p: raise ValueError( "p must divide level" ) amb = ModularSymbols(self.group(), f.weight()) self.e_space = find_in_space(f, amb, base_extend=base_extend).sign_submodule(1) R = self.e_space.base_ring() mat = amb._action_on_modular_symbols([p**self.u(), 1, 0, p**self.u()]) V = amb.free_module().base_extend(R) bvecs = [] for v in self.e_space.free_module().basis(): bvecs += mat.maxspin(v) T = V.submodule(bvecs) self._unipmat = mat.change_ring(R).restrict(T).transpose() / ZZ(p ** (self.u() * (f.weight() - 2))) self.t_space = amb.base_extend(R).submodule(T, check=False)
def modular_symbols(self, sign=0, weight=2, base_ring=QQ): """ Return the space of modular symbols of the specified weight and sign on the congruence subgroup self. EXAMPLES:: sage: G = Gamma0(23) sage: G.modular_symbols() Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field sage: G.modular_symbols(weight=4) Modular Symbols space of dimension 12 for Gamma_0(23) of weight 4 with sign 0 over Rational Field sage: G.modular_symbols(base_ring=GF(7)) Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Finite Field of size 7 sage: G.modular_symbols(sign=1) Modular Symbols space of dimension 3 for Gamma_0(23) of weight 2 with sign 1 over Rational Field """ from sage.modular.modsym.modsym import ModularSymbols return ModularSymbols(self, sign=sign, weight=weight, base_ring=base_ring)
def _modular_symbols(self): """ Return the modular symbols space associated to this ambient Jacobian. OUTPUT: modular symbols space EXAMPLES:: sage: M = J0(33)._modular_symbols(); M Modular Symbols subspace of dimension 6 of Modular Symbols space of dimension 9 for Gamma_0(33) of weight 2 with sign 0 over Rational Field sage: J0(33)._modular_symbols() is M True """ try: return self.__modsym except AttributeError: self.__modsym = ModularSymbols(self.__group, weight=2).cuspidal_submodule() return self.__modsym
def dimension_of_ordinary_subspace(self, p=None, cusp=False): """ If ``cusp`` is ``True``, return dimension of cuspidal ordinary subspace. This does a weight 2 computation with sage's ModularSymbols. EXAMPLES:: sage: M = OverconvergentModularSymbols(11, 0, sign=-1, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace() 2 sage: M.dimension_of_ordinary_subspace(cusp=True) 2 sage: M = OverconvergentModularSymbols(11, 0, sign=1, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 2 sage: M.dimension_of_ordinary_subspace() 4 sage: M = OverconvergentModularSymbols(11, 0, sign=0, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace() 6 sage: M.dimension_of_ordinary_subspace(cusp=True) 4 sage: M = OverconvergentModularSymbols(11, 0, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 1 sage: M.dimension_of_ordinary_subspace() 2 sage: M = OverconvergentModularSymbols(11, 2, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 0 sage: M.dimension_of_ordinary_subspace() 1 sage: M = OverconvergentModularSymbols(11, 10, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 1 sage: M.dimension_of_ordinary_subspace() 2 An example with odd weight and hence non-trivial character:: sage: K = Qp(11, 6) sage: DG = DirichletGroup(11, K) sage: chi = DG([K(378703)]) sage: MM = FamiliesOfOMS(chi, 1, p=11, prec_cap=[4, 4], base_coeffs=ZpCA(11, 4), sign=-1) sage: MM.dimension_of_ordinary_subspace() 1 """ try: p = self.prime() except AttributeError: if p is None: raise ValueError( "If self doesn't have a prime, must specify p.") try: return self._ord_dim_dict[(p, cusp)] except AttributeError: self._ord_dim_dict = {} except KeyError: pass from sage.modular.dirichlet import DirichletGroup from sage.rings.finite_rings.constructor import GF try: chi = self.character() except AttributeError: chi = DirichletGroup(self.level(), GF(p))[0] if chi is None: chi = DirichletGroup(self.level(), GF(p))[0] from sage.modular.modsym.modsym import ModularSymbols r = self.weight() % (p - 1) if chi.is_trivial(): N = chi.modulus() if N % p != 0: N *= p else: e = N.valuation(p) N.divide_knowing_divisible_by(p**(e - 1)) chi = DirichletGroup(N, GF(p))[0] elif chi.modulus() % p != 0: chi = DirichletGroup(chi.modulus() * p, GF(p))(chi) DG = DirichletGroup(chi.modulus(), GF(p)) if r == 0: from sage.modular.arithgroup.congroup_gamma0 import Gamma0_constructor as Gamma0 verbose("in dim: %s, %s, %s" % (self.sign(), chi, p)) M = ModularSymbols(DG(chi), 2, self.sign(), GF(p)) else: psi = [GF(p)(u)**r for u in DG.unit_gens()] #mod p Teichmuller^r psi = DG(psi) M = ModularSymbols(DG(chi) * psi, 2, self.sign(), GF(p)) if cusp: M = M.cuspidal_subspace() hecke_poly = M.hecke_polynomial(p) verbose("in dim: %s" % (hecke_poly)) x = hecke_poly.parent().gen() d = hecke_poly.degree() - hecke_poly.ord(x) self._ord_dim_dict[(p, cusp)] = d return d
def dimension_of_ordinary_subspace(self, p=None, cusp=False): """ If ``cusp`` is ``True``, return dimension of cuspidal ordinary subspace. This does a weight 2 computation with sage's ModularSymbols. EXAMPLES:: sage: M = OverconvergentModularSymbols(11, 0, sign=-1, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace() 2 sage: M.dimension_of_ordinary_subspace(cusp=True) 2 sage: M = OverconvergentModularSymbols(11, 0, sign=1, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 2 sage: M.dimension_of_ordinary_subspace() 4 sage: M = OverconvergentModularSymbols(11, 0, sign=0, p=3, prec_cap=4, base=ZpCA(3, 8)) sage: M.dimension_of_ordinary_subspace() 6 sage: M.dimension_of_ordinary_subspace(cusp=True) 4 sage: M = OverconvergentModularSymbols(11, 0, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 1 sage: M.dimension_of_ordinary_subspace() 2 sage: M = OverconvergentModularSymbols(11, 2, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 0 sage: M.dimension_of_ordinary_subspace() 1 sage: M = OverconvergentModularSymbols(11, 10, sign=1, p=11, prec_cap=4, base=ZpCA(11, 8)) sage: M.dimension_of_ordinary_subspace(cusp=True) 1 sage: M.dimension_of_ordinary_subspace() 2 An example with odd weight and hence non-trivial character:: sage: K = Qp(11, 6) sage: DG = DirichletGroup(11, K) sage: chi = DG([K(378703)]) sage: MM = FamiliesOfOMS(chi, 1, p=11, prec_cap=[4, 4], base_coeffs=ZpCA(11, 4), sign=-1) sage: MM.dimension_of_ordinary_subspace() 1 """ try: p = self.prime() except AttributeError: if p is None: raise ValueError("If self doesn't have a prime, must specify p.") try: return self._ord_dim_dict[(p, cusp)] except AttributeError: self._ord_dim_dict = {} except KeyError: pass from sage.modular.dirichlet import DirichletGroup from sage.rings.finite_rings.constructor import GF try: chi = self.character() except AttributeError: chi = DirichletGroup(self.level(), GF(p))[0] if chi is None: chi = DirichletGroup(self.level(), GF(p))[0] from sage.modular.modsym.modsym import ModularSymbols r = self.weight() % (p-1) if chi.is_trivial(): N = chi.modulus() if N % p != 0: N *= p else: e = N.valuation(p) N.divide_knowing_divisible_by(p ** (e-1)) chi = DirichletGroup(N, GF(p))[0] elif chi.modulus() % p != 0: chi = DirichletGroup(chi.modulus() * p, GF(p))(chi) DG = DirichletGroup(chi.modulus(), GF(p)) if r == 0: from sage.modular.arithgroup.congroup_gamma0 import Gamma0_constructor as Gamma0 verbose("in dim: %s, %s, %s"%(self.sign(), chi, p)) M = ModularSymbols(DG(chi), 2, self.sign(), GF(p)) else: psi = [GF(p)(u) ** r for u in DG.unit_gens()] #mod p Teichmuller^r psi = DG(psi) M = ModularSymbols(DG(chi) * psi, 2, self.sign(), GF(p)) if cusp: M = M.cuspidal_subspace() hecke_poly = M.hecke_polynomial(p) verbose("in dim: %s"%(hecke_poly)) x = hecke_poly.parent().gen() d = hecke_poly.degree() - hecke_poly.ord(x) self._ord_dim_dict[(p, cusp)] = d return d