本文整理汇总了Python中sage.modular.dirichlet.DirichletGroup.conductor方法的典型用法代码示例。如果您正苦于以下问题:Python DirichletGroup.conductor方法的具体用法?Python DirichletGroup.conductor怎么用?Python DirichletGroup.conductor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.modular.dirichlet.DirichletGroup
的用法示例。
在下文中一共展示了DirichletGroup.conductor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AlgebraicWeight
# 需要导入模块: from sage.modular.dirichlet import DirichletGroup [as 别名]
# 或者: from sage.modular.dirichlet.DirichletGroup import conductor [as 别名]
class AlgebraicWeight(WeightCharacter):
r"""
A point in weight space corresponding to a locally algebraic character, of
the form `x \mapsto \chi(x) x^k` where `k` is an integer and `\chi` is a
Dirichlet character modulo `p^n` for some `n`.
TESTS::
sage: w = pAdicWeightSpace(23)(12, DirichletGroup(23, QQ).0) # exact
sage: w == loads(dumps(w))
True
sage: w = pAdicWeightSpace(23)(12, DirichletGroup(23, Qp(23)).0) # inexact
sage: w == loads(dumps(w))
True
sage: w is loads(dumps(w)) # elements are not globally unique
False
"""
def __init__(self, parent, k, chi=None):
r"""
Create a locally algebraic weight-character.
EXAMPLES::
sage: pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0)
(13, 29, [2 + 2*29 + ... + O(29^20)])
"""
WeightCharacter.__init__(self, parent)
k = ZZ(k)
self._k = k
if chi is None:
chi = trivial_character(self._p, QQ)
n = ZZ(chi.conductor())
if n == 1:
n = self._p
if not n.is_power_of(self._p):
raise ValueError, "Character must have %s-power conductor" % p
self._chi = DirichletGroup(n, chi.base_ring())(chi)
def __call__(self, x):
r"""
Evaluate this character at an element of `\ZZ_p^\times`.
EXAMPLES:
Exact answers are returned when this is possible::
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, QQ).0)
sage: kappa(1)
1
sage: kappa(0)
0
sage: kappa(12)
-106993205379072
sage: kappa(-1)
-1
sage: kappa(13 + 4*29 + 11*29^2 + O(29^3))
9 + 21*29 + 27*29^2 + O(29^3)
When the character chi is defined over a p-adic field, the results returned are inexact::
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
sage: kappa(1)
1 + O(29^20)
sage: kappa(0)
0
sage: kappa(12)
17 + 11*29 + 7*29^2 + 4*29^3 + 5*29^4 + 2*29^5 + 13*29^6 + 3*29^7 + 18*29^8 + 21*29^9 + 28*29^10 + 28*29^11 + 28*29^12 + 28*29^13 + 28*29^14 + 28*29^15 + 28*29^16 + 28*29^17 + 28*29^18 + 28*29^19 + O(29^20)
sage: kappa(12) == -106993205379072
True
sage: kappa(-1) == -1
True
sage: kappa(13 + 4*29 + 11*29^2 + O(29^3))
9 + 21*29 + 27*29^2 + O(29^3)
"""
if isinstance(x, pAdicGenericElement):
if x.parent().prime() != self._p:
raise TypeError, "x must be an integer or a %s-adic integer" % self._p
if self._p**(x.precision_absolute()) < self._chi.conductor():
raise Exception, "Precision too low"
xint = x.lift()
else:
xint = x
if (xint % self._p == 0): return 0
return self._chi(xint) * x**self._k
def k(self):
r"""
If this character is `x \mapsto x^k \chi(x)` for an integer `k` and a
Dirichlet character `\chi`, return `k`.
EXAMPLE::
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
sage: kappa.k()
13
"""
return self._k
def chi(self):
#.........这里部分代码省略.........
示例2: dimension_new_cusp_forms
# 需要导入模块: from sage.modular.dirichlet import DirichletGroup [as 别名]
# 或者: from sage.modular.dirichlet.DirichletGroup import conductor [as 别名]
def dimension_new_cusp_forms(self, k=2, eps=None, p=0, algorithm="CohenOesterle"):
r"""
Dimension of the new subspace (or `p`-new subspace) of cusp forms of
weight `k` and character `\varepsilon`.
INPUT:
- ``k`` - an integer (default: 2)
- ``eps`` - a Dirichlet character
- ``p`` - a prime (default: 0); just the `p`-new subspace if given
- ``algorithm`` - either "CohenOesterle" (the default) or "Quer". This
specifies the method to use in the case of nontrivial character:
either the Cohen--Oesterle formula as described in Stein's book, or
by Moebius inversion using the subgroups GammaH (a method due to
Jordi Quer).
EXAMPLES::
sage: G = DirichletGroup(9)
sage: eps = G.0^3
sage: eps.conductor()
3
sage: [Gamma1(9).dimension_new_cusp_forms(k, eps) for k in [2..10]]
[0, 0, 0, 2, 0, 2, 0, 2, 0]
sage: [Gamma1(9).dimension_cusp_forms(k, eps) for k in [2..10]]
[0, 0, 0, 2, 0, 4, 0, 6, 0]
sage: [Gamma1(9).dimension_new_cusp_forms(k, eps, 3) for k in [2..10]]
[0, 0, 0, 2, 0, 2, 0, 2, 0]
Double check using modular symbols (independent calculation)::
sage: [ModularSymbols(eps,k,sign=1).cuspidal_subspace().new_subspace().dimension() for k in [2..10]]
[0, 0, 0, 2, 0, 2, 0, 2, 0]
sage: [ModularSymbols(eps,k,sign=1).cuspidal_subspace().new_subspace(3).dimension() for k in [2..10]]
[0, 0, 0, 2, 0, 2, 0, 2, 0]
Another example at level 33::
sage: G = DirichletGroup(33)
sage: eps = G.1
sage: eps.conductor()
11
sage: [Gamma1(33).dimension_new_cusp_forms(k, G.1) for k in [2..4]]
[0, 4, 0]
sage: [Gamma1(33).dimension_new_cusp_forms(k, G.1, algorithm="Quer") for k in [2..4]]
[0, 4, 0]
sage: [Gamma1(33).dimension_new_cusp_forms(k, G.1^2) for k in [2..4]]
[2, 0, 6]
sage: [Gamma1(33).dimension_new_cusp_forms(k, G.1^2, p=3) for k in [2..4]]
[2, 0, 6]
"""
if eps == None:
return GammaH_class.dimension_new_cusp_forms(self, k, p)
N = self.level()
eps = DirichletGroup(N)(eps)
from all import Gamma0
if eps.is_trivial():
return Gamma0(N).dimension_new_cusp_forms(k, p)
from congroup_gammaH import mumu
if p == 0 or N%p != 0 or eps.conductor().valuation(p) == N.valuation(p):
D = [eps.conductor()*d for d in divisors(N//eps.conductor())]
return sum([Gamma1_constructor(M).dimension_cusp_forms(k, eps.restrict(M), algorithm)*mumu(N//M) for M in D])
eps_p = eps.restrict(N//p)
old = Gamma1_constructor(N//p).dimension_cusp_forms(k, eps_p, algorithm)
return self.dimension_cusp_forms(k, eps, algorithm) - 2*old