示例#1
0
 def central_character(self):
     r"""
     Return the central character of this representation. This is the
     restriction to `\QQ_p^\times` of the unique smooth character `\omega`
     of `\mathbf{A}^\times / \QQ^\times` such that `\omega(\varpi_\ell) =
     \ell^j \varepsilon(\ell)` for all primes `\ell \nmid Np`, where
     `\varpi_\ell` is a uniformiser at `\ell`, `\varepsilon` is the
     Nebentypus character of the newform `f`, and `j` is the twist factor
     (see the documentation for :func:`~LocalComponent`).
     
     EXAMPLES::
     
         sage: LocalComponent(Newform('27a'), 3).central_character()
         Character of Q_3*, of level 0, mapping 3 |--> 1
         
         sage: LocalComponent(Newforms(Gamma1(5), 5, names='c')[0], 5).central_character()
         Character of Q_5*, of level 1, mapping 2 |--> c0 + 1, 5 |--> 125
         
         sage: LocalComponent(Newforms(DirichletGroup(24)([1, -1,-1]), 3, names='a')[0], 2).central_character()
         Character of Q_2*, of level 3, mapping 7 |--> 1, 5 |--> -1, 2 |--> -2
     """
     from sage.rings.arith import crt
     chi = self.newform().character()
     f = self.prime() ** self.conductor()
     N = self.newform().level() // f
     G = DirichletGroup(f, self.coefficient_field())
     chip = G([chi(crt(ZZ(x), 1, f, N)) for x in G.unit_gens()]).primitive_character()
     a = crt(1, self.prime(), f, N)        
     
     if chip.conductor() == 1:
         return SmoothCharacterGroupQp(self.prime(), self.coefficient_field()).character(0, [chi(a) * self.prime()**self.twist_factor()])
     else:
         return SmoothCharacterGroupQp(self.prime(), self.coefficient_field()).character(chip.conductor().valuation(self.prime()), list((~chip).values_on_gens()) + [chi(a) * self.prime()**self.twist_factor()])
示例#2
0
    def central_character(self):
        r"""
        Return the central character of this representation. This is the
        restriction to `\QQ_p^\times` of the unique smooth character `\omega`
        of `\mathbf{A}^\times / \QQ^\times` such that `\omega(\varpi_\ell) =
        \ell^j \varepsilon(\ell)` for all primes `\ell \nmid Np`, where
        `\varpi_\ell` is a uniformiser at `\ell`, `\varepsilon` is the
        Nebentypus character of the newform `f`, and `j` is the twist factor
        (see the documentation for :func:`~LocalComponent`).

        EXAMPLES::

            sage: LocalComponent(Newform('27a'), 3).central_character()
            Character of Q_3*, of level 0, mapping 3 |--> 1

            sage: LocalComponent(Newforms(Gamma1(5), 5, names='c')[0], 5).central_character()
            Character of Q_5*, of level 1, mapping 2 |--> c0 + 1, 5 |--> 125

            sage: LocalComponent(Newforms(DirichletGroup(24)([1, -1,-1]), 3, names='a')[0], 2).central_character()
            Character of Q_2*, of level 3, mapping 7 |--> 1, 5 |--> -1, 2 |--> -2
        """
        from sage.arith.all import crt
        chi = self.newform().character()
        f = self.prime() ** self.conductor()
        N = self.newform().level() // f
        G = DirichletGroup(f, self.coefficient_field())
        chip = G([chi(crt(ZZ(x), 1, f, N)) for x in G.unit_gens()]).primitive_character()
        a = crt(1, self.prime(), f, N)

        if chip.conductor() == 1:
            return SmoothCharacterGroupQp(self.prime(), self.coefficient_field()).character(0, [chi(a) * self.prime()**self.twist_factor()])
        else:
            return SmoothCharacterGroupQp(self.prime(), self.coefficient_field()).character(chip.conductor().valuation(self.prime()), list((~chip).values_on_gens()) + [chi(a) * self.prime()**self.twist_factor()])
示例#3
0
def get_magma_qexpansions(filename, i1, prec, base_ring, magma=None):
    if magma is None:
        from sage.interfaces.magma import Magma
        magma = Magma()
    magma.set('prec',prec)
    magma.load("get_qexpansions.m")
    if i1 is None:
        for line in filename:
            print line
            magma.eval(line)
        magma.eval("f := g") # In case text is reversed
        f = 'f'
        eps_data_f = 'eps_on_gens'
    else:
        magma.load(filename)
        f = 'eigenforms_list[%s][1]'%i1
        eps_data_f = 'eigenforms_list[%s][2]'%i1
    qexpm = magma.extend_qexpansion(f, eps_data_f, prec)
    F0 = [0] * qexpm.Valuation().sage() + [o.sage() for o in qexpm.ElementToSequence()]
    K = F0[-1].parent()
    a = K.gen()
    phi = find_embeddings(K,base_ring)[0]
    F = [phi(o) for o in F0]
    eps_f = magma.get_character(f, eps_data_f).ValueList().sage()
    eps_f_full = magma.get_character_full(f, eps_data_f).ValueList().sage()
    N = len(eps_f)
    Geps = DirichletGroup(N, base_ring = K)

    eps_f = Geps([eps_f[i - 1] for i in Geps.unit_gens()])
    Geps_full = DirichletGroup(N)
    psi = eps_f_full[0].parent().embeddings(Geps_full.base_ring())[0]
    eps_f_full = Geps_full([psi(eps_f_full[i - 1]) for i in Geps_full.unit_gens()])

    if a == 1:
        sigma = lambda x:x
    else:
        try:
            sigma = next((s for s in K.automorphisms() if s(a)*a == 1))
        except StopIteration:
            raise NotImplementedError
    G = [phi(sigma(o)) for o in F0]
    eps_g = eps_f**-1
    eps_g_full = eps_f_full**-1
    F = ModFormqExp(F, base_ring, weight=1, level = N, character = eps_f, character_full = eps_f_full)
    G = ModFormqExp(G, base_ring, weight=1, level = N, character = eps_g, character_full = eps_g_full)
    return F, G
示例#4
0
    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
示例#5
0
 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