本文整理汇总了Python中sage.all.ZZ.divides方法的典型用法代码示例。如果您正苦于以下问题:Python ZZ.divides方法的具体用法?Python ZZ.divides怎么用?Python ZZ.divides使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.all.ZZ
的用法示例。
在下文中一共展示了ZZ.divides方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_cusp_expansions_of_newform
# 需要导入模块: from sage.all import ZZ [as 别名]
# 或者: from sage.all.ZZ import divides [as 别名]
def get_cusp_expansions_of_newform(k, N=1, fi=0, prec=10):
r"""
Get and return Fourier coefficients of all cusps where there exist Atkin-Lehner involutions for these cusps.
INPUT:
- ''k'' -- positive integer : the weight
- ''N'' -- positive integer (default 1) : level
- ''fi'' -- non-neg. integer (default 0) We want to use the element nr. fi f=Newforms(N,k)[fi]
- ''prec'' -- integer (the number of coefficients to get)
OUTPUT:
- ''s'' string giving the Atkin-Lehner eigenvalues corresponding to the Cusps (where possible)
"""
res = dict()
(t, f) = _get_newform(k, N, 0, fi)
if(not t):
return s
res[Infinity] = 1
for c in f.group().cusps():
if(c == Cusp(Infinity)):
continue
res[c] = list()
cusp = QQ(c)
q = cusp.denominator()
p = cusp.numerator()
d = ZZ(cusp * N)
if(d == 0):
ep = f.atkin_lehner_eigenvalue()
if(d.divides(N) and gcd(ZZ(N / d), ZZ(d)) == 1):
ep = f.atkin_lehner_eigenvalue(ZZ(d))
else:
# this case is not known...
res[c] = None
continue
res[c] = ep
s = html.table([res.keys(), res.values()])
return s
示例2: ZZ
# 需要导入模块: from sage.all import ZZ [as 别名]
# 或者: from sage.all.ZZ import divides [as 别名]
baselabel=label.split('c')
a = rep.find_one({'Baselabel': baselabel[0]})
ar=ArtinRepresentation(label)
outfile=open(label, 'w')
cf=a['CharacterField']
cfz = ZZ(cf)
nf = ar.nf()
nfcc = nf.conjugacy_classes()
nfcc = [int(z.order()) for z in nfcc]
nfcc = lcm(nfcc)
if not cfz.divides(nfcc):
print "Failure "+str(cfz)+" divides "+str(nfcc)+" from "+label
sys.exit()
R,x = QQ['x'].objgen()
pol1 = R.cyclotomic_polynomial(nfcc)
K,z=NumberField(R.cyclotomic_polynomial(nfcc),'z').objgen()
RR,y = K['y'].objgen()
zsmall = z**(nfcc/cfz)
allpols = [sum(y**k * sum(pp[k][j] * zsmall**j for j in range(len(pp[k]))) for k in range(len(pp))) for pp in ar.local_factors_table()]
allroots = [myroots(pp, nfcc, z) for pp in allpols]
outfile.write(str(nfcc)+"\n")
outfile.write(str(allroots)+"\n")
j=0
p=1
while j<bound: