当前位置: 首页>>代码示例>>Python>>正文


Python DirichletGroup.unit_gens方法代码示例

本文整理汇总了Python中sage.modular.dirichlet.DirichletGroup.unit_gens方法的典型用法代码示例。如果您正苦于以下问题:Python DirichletGroup.unit_gens方法的具体用法?Python DirichletGroup.unit_gens怎么用?Python DirichletGroup.unit_gens使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sage.modular.dirichlet.DirichletGroup的用法示例。


在下文中一共展示了DirichletGroup.unit_gens方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: central_character

# 需要导入模块: from sage.modular.dirichlet import DirichletGroup [as 别名]
# 或者: from sage.modular.dirichlet.DirichletGroup import unit_gens [as 别名]
 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()])
开发者ID:jwbober,项目名称:sagelib,代码行数:35,代码来源:local_comp.py

示例2: dimension_of_ordinary_subspace

# 需要导入模块: from sage.modular.dirichlet import DirichletGroup [as 别名]
# 或者: from sage.modular.dirichlet.DirichletGroup import unit_gens [as 别名]
 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
开发者ID:lalitkumarj,项目名称:OMSCategory,代码行数:98,代码来源:modsym_space.py


注:本文中的sage.modular.dirichlet.DirichletGroup.unit_gens方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。