本文整理匯總了Python中sage.modular.cusps.Cusp.abvarquo_rational_cuspidal_subgroup方法的典型用法代碼示例。如果您正苦於以下問題:Python Cusp.abvarquo_rational_cuspidal_subgroup方法的具體用法?Python Cusp.abvarquo_rational_cuspidal_subgroup怎麽用?Python Cusp.abvarquo_rational_cuspidal_subgroup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sage.modular.cusps.Cusp
的用法示例。
在下文中一共展示了Cusp.abvarquo_rational_cuspidal_subgroup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _compute_lattice
# 需要導入模塊: from sage.modular.cusps import Cusp [as 別名]
# 或者: from sage.modular.cusps.Cusp import abvarquo_rational_cuspidal_subgroup [as 別名]
def _compute_lattice(self, rational_only=False, rational_subgroup=False):
r"""
Return a list of vectors that define elements of the rational
homology that generate this finite subgroup.
INPUT:
- ``rational_only`` - bool (default: False); if
``True``, only use rational cusps.
OUTPUT:
- ``list`` - list of vectors
EXAMPLES::
sage: J = J0(37)
sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J)
sage: C._compute_lattice()
Free module of degree 4 and rank 4 over Integer Ring
Echelon basis matrix:
[ 1 0 0 0]
[ 0 1 0 0]
[ 0 0 1 0]
[ 0 0 0 1/3]
sage: J = J0(43)
sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J)
sage: C._compute_lattice()
Free module of degree 6 and rank 6 over Integer Ring
Echelon basis matrix:
[ 1 0 0 0 0 0]
[ 0 1/7 0 6/7 0 5/7]
[ 0 0 1 0 0 0]
[ 0 0 0 1 0 0]
[ 0 0 0 0 1 0]
[ 0 0 0 0 0 1]
sage: J = J0(22)
sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J)
sage: C._compute_lattice()
Free module of degree 4 and rank 4 over Integer Ring
Echelon basis matrix:
[1/5 1/5 4/5 0]
[ 0 1 0 0]
[ 0 0 1 0]
[ 0 0 0 1/5]
sage: J = J1(13)
sage: C = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J)
sage: C._compute_lattice()
Free module of degree 4 and rank 4 over Integer Ring
Echelon basis matrix:
[ 1/19 0 0 9/19]
[ 0 1/19 1/19 18/19]
[ 0 0 1 0]
[ 0 0 0 1]
We compute with and without the optional
``rational_only`` option.
::
sage: J = J0(27); G = sage.modular.abvar.cuspidal_subgroup.CuspidalSubgroup(J)
sage: G._compute_lattice()
Free module of degree 2 and rank 2 over Integer Ring
Echelon basis matrix:
[1/3 0]
[ 0 1/3]
sage: G._compute_lattice(rational_only=True)
Free module of degree 2 and rank 2 over Integer Ring
Echelon basis matrix:
[1/3 0]
[ 0 1]
"""
A = self.abelian_variety()
Cusp = A.modular_symbols()
Amb = Cusp.ambient_module()
Eis = Amb.eisenstein_submodule()
C = Amb.cusps()
N = Amb.level()
if rational_subgroup:
# QQ-rational subgroup of cuspidal subgroup
assert A.is_ambient()
Q = Cusp.abvarquo_rational_cuspidal_subgroup()
return Q.V()
if rational_only:
# subgroup generated by differences of rational cusps
if not is_Gamma0(A.group()):
raise NotImplementedError, 'computation of rational cusps only implemented in Gamma0 case.'
if not N.is_squarefree():
data = [n for n in range(2,N) if gcd(n,N) == 1]
C = [c for c in C if is_rational_cusp_gamma0(c, N, data)]
v = [Amb([infinity, alpha]).element() for alpha in C]
cusp_matrix = matrix(QQ, len(v), Amb.dimension(), v)
#.........這裏部分代碼省略.........