本文整理汇总了Python中lmfdb.WebNumberField.WebNumberField.arith_equiv方法的典型用法代码示例。如果您正苦于以下问题:Python WebNumberField.arith_equiv方法的具体用法?Python WebNumberField.arith_equiv怎么用?Python WebNumberField.arith_equiv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lmfdb.WebNumberField.WebNumberField
的用法示例。
在下文中一共展示了WebNumberField.arith_equiv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: render_field_webpage
# 需要导入模块: from lmfdb.WebNumberField import WebNumberField [as 别名]
# 或者: from lmfdb.WebNumberField.WebNumberField import arith_equiv [as 别名]
#.........这里部分代码省略.........
info['downloads'] = [('worksheet', '/')]
info['friends'] = []
if nf.can_class_number():
# hide ones that take a lond time to compute on the fly
# note that the first degree 4 number field missed the zero of the zeta function
if abs(D**n) < 50000000:
info['friends'].append(('L-function', "/L/NumberField/%s" % label))
info['friends'].append(('Galois group', "/GaloisGroup/%dT%d" % (n, t)))
if 'dirichlet_group' in info:
info['friends'].append(('Dirichlet character group', url_for("characters.dirichlet_group_table",
modulus=int(conductor),
char_number_list=','.join(
[str(a) for a in dirichlet_chars]),
poly=info['polynomial'])))
resinfo=[]
galois_closure = nf.galois_closure()
if galois_closure[0]>0:
if len(galois_closure[1])>0:
resinfo.append(('gc', galois_closure[1]))
if len(galois_closure[2]) > 0:
info['friends'].append(('Galois closure',url_for(".by_label", label=galois_closure[2][0])))
else:
resinfo.append(('gc', [dnc]))
sextic_twins = nf.sextic_twin()
if sextic_twins[0]>0:
if len(sextic_twins[1])>0:
resinfo.append(('sex', r' $\times$ '.join(sextic_twins[1])))
else:
resinfo.append(('sex', dnc))
siblings = nf.siblings()
# [degsib list, label list]
# first is list of [deg, num expected, list of knowls]
if len(siblings[0])>0:
for sibdeg in siblings[0]:
if len(sibdeg[2]) ==0:
sibdeg[2] = dnc
else:
sibdeg[2] = ', '.join(sibdeg[2])
if len(sibdeg[2])<sibdeg[1]:
sibdeg[2] += ', some '+dnc
resinfo.append(('sib', siblings[0]))
for lab in siblings[1]:
if lab != '':
labparts = lab.split('.')
info['friends'].append(("Degree %s sibling"%labparts[0] ,url_for(".by_label", label=lab)))
arith_equiv = nf.arith_equiv()
if arith_equiv[0]>0:
if len(arith_equiv[1])>0:
resinfo.append(('ae', ', '.join(arith_equiv[1]), len(arith_equiv[1])))
for aelab in arith_equiv[2]:
info['friends'].append(('Arithmetically equivalent sibling',url_for(".by_label", label=aelab)))
else:
resinfo.append(('ae', dnc, len(arith_equiv[1])))
info['resinfo'] = resinfo
learnmore = learnmore_list()
#if info['signature'] == [0,1]:
# info['learnmore'].append(('Quadratic imaginary class groups', url_for(".render_class_group_data")))
# With Galois group labels, probably not needed here
# info['learnmore'] = [('Global number field labels',
# url_for(".render_labels_page")), ('Galois group
# labels',url_for(".render_groups_page")),
# (Completename,url_for(".render_discriminants_page"))]
title = "Global Number Field %s" % info['label']
if npr == 1:
primes = 'prime'
else:
primes = 'primes'
properties2 = [('Label', label),
('Degree', '$%s$' % data['degree']),
('Signature', '$%s$' % data['signature']),
('Discriminant', '$%s$' % data['disc_factor']),
('Ramified ' + primes + '', '$%s$' % ram_primes),
('Class number', '%s %s' % (data['class_number'], grh_lab)),
('Class group', '%s %s' % (data['class_group_invs'], grh_lab)),
('Galois Group', group_display_short(data['degree'], t))
]
downloads = []
for lang in [["Magma","magma"], ["SageMath","sage"], ["Pari/GP", "gp"]]:
downloads.append(('Download {} code'.format(lang[0]),
url_for(".nf_code_download", nf=label, download_type=lang[1])))
from lmfdb.artin_representations.math_classes import NumberFieldGaloisGroup
try:
info["tim_number_field"] = NumberFieldGaloisGroup(nf._data['coeffs'])
v = nf.factor_perm_repn(info["tim_number_field"])
def dopow(m):
if m==0: return ''
if m==1: return '*'
return '*<sup>%d</sup>'% m
info["mydecomp"] = [dopow(x) for x in v]
except AttributeError:
pass
return render_template("number_field.html", properties2=properties2, credit=NF_credit, title=title, bread=bread, code=nf.code, friends=info.pop('friends'), downloads=downloads, learnmore=learnmore, info=info)