本文整理汇总了Python中sage.modular.cusps.Cusp.dimension方法的典型用法代码示例。如果您正苦于以下问题:Python Cusp.dimension方法的具体用法?Python Cusp.dimension怎么用?Python Cusp.dimension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.modular.cusps.Cusp
的用法示例。
在下文中一共展示了Cusp.dimension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _compute_lattice
# 需要导入模块: from sage.modular.cusps import Cusp [as 别名]
# 或者: from sage.modular.cusps.Cusp import dimension [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)
#.........这里部分代码省略.........