本文整理汇总了Python中sage.all.NumberField.ideal方法的典型用法代码示例。如果您正苦于以下问题:Python NumberField.ideal方法的具体用法?Python NumberField.ideal怎么用?Python NumberField.ideal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.all.NumberField
的用法示例。
在下文中一共展示了NumberField.ideal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test1
# 需要导入模块: from sage.all import NumberField [as 别名]
# 或者: from sage.all.NumberField import ideal [as 别名]
def test1(B=50):
"""
Tests that the functions all run without crashing over a specific number field.
Does not test that the output is correct. That should be in
another test.
"""
from sage.all import polygen, QQ, NumberField, EllipticCurve
x = polygen(QQ,'x')
F = NumberField(x**2 - x - 1,'a'); a = F.gen()
E = EllipticCurve([1,a+1,a,a,0])
ap(E,F.ideal(3))
primes_of_bounded_norm(F,B)
ap_list(E,B)
assert len(ap_list(E,B,primes=True)) == 2
apd = ap_dict(E,B)
reduced_rep(F.ideal(3))
assert an_dict(E,B) == an_dict_from_ap(apd, E.conductor(), B)
示例2: test_web_latex_ideal_fact
# 需要导入模块: from sage.all import NumberField [as 别名]
# 或者: from sage.all.NumberField import ideal [as 别名]
def test_web_latex_ideal_fact(self):
r"""
Checking utility: web_latex_ideal_fact
"""
from sage.all import NumberField
x = var('x')
K = NumberField(x**2 - 5, 'a')
a = K.gen()
I = K.ideal(2/(5+a)).factor()
self.assertEqual(web_latex_ideal_fact(I),
'\\( \\left(-a\\right)^{-1} \\)')