本文整理汇总了Python中constructor.EllipticCurve.discriminant方法的典型用法代码示例。如果您正苦于以下问题:Python EllipticCurve.discriminant方法的具体用法?Python EllipticCurve.discriminant怎么用?Python EllipticCurve.discriminant使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类constructor.EllipticCurve
的用法示例。
在下文中一共展示了EllipticCurve.discriminant方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _tate
# 需要导入模块: from constructor import EllipticCurve [as 别名]
# 或者: from constructor.EllipticCurve import discriminant [as 别名]
def _tate(self, proof = None, globally = False):
r"""
Tate's algorithm for an elliptic curve over a number field.
Computes both local reduction data at a prime ideal and a
local minimal model.
The model is not required to be integral on input. If `P` is
principal, uses a generator as uniformizer, so it will not
affect integrality or minimality at other primes. If `P` is not
principal, the minimal model returned will preserve
integrality at other primes, but not minimality.
The optional argument globally, when set to True, tells the algorithm to use the generator of the prime ideal if it is principal. Otherwise just any uniformizer will be used.
.. note::
Called only by ``EllipticCurveLocalData.__init__()``.
OUTPUT:
(tuple) ``(Emin, p, val_disc, fp, KS, cp)`` where:
- ``Emin`` (EllipticCurve) is a model (integral and) minimal at P
- ``p`` (int) is the residue characteristic
- ``val_disc`` (int) is the valuation of the local minimal discriminant
- ``fp`` (int) is the valuation of the conductor
- ``KS`` (string) is the Kodaira symbol
- ``cp`` (int) is the Tamagawa number
EXAMPLES (this raised a type error in sage prior to 4.4.4, see :trac:`7930`) ::
sage: E = EllipticCurve('99d1')
sage: R.<X> = QQ[]
sage: K.<t> = NumberField(X^3 + X^2 - 2*X - 1)
sage: L.<s> = NumberField(X^3 + X^2 - 36*X - 4)
sage: EK = E.base_extend(K)
sage: toK = EK.torsion_order()
sage: da = EK.local_data() # indirect doctest
sage: EL = E.base_extend(L)
sage: da = EL.local_data() # indirect doctest
EXAMPLES:
The following example shows that the bug at :trac:`9324` is fixed::
sage: K.<a> = NumberField(x^2-x+6)
sage: E = EllipticCurve([0,0,0,-53160*a-43995,-5067640*a+19402006])
sage: E.conductor() # indirect doctest
Fractional ideal (18, 6*a)
The following example shows that the bug at :trac:`9417` is fixed::
sage: K.<a> = NumberField(x^2+18*x+1)
sage: E = EllipticCurve(K, [0, -36, 0, 320, 0])
sage: E.tamagawa_number(K.ideal(2))
4
This is to show that the bug :trac: `11630` is fixed. (The computation of the class group would produce a warning)::
sage: K.<t> = NumberField(x^7-2*x+177)
sage: E = EllipticCurve([0,1,0,t,t])
sage: P = K.ideal(2,t^3 + t + 1)
sage: E.local_data(P).kodaira_symbol()
II
"""
E = self._curve
P = self._prime
K = E.base_ring()
OK = K.maximal_order()
t = verbose("Running Tate's algorithm with P = %s"%P, level=1)
F = OK.residue_field(P)
p = F.characteristic()
# In case P is not principal we mostly use a uniformiser which
# is globally integral (with positive valuation at some other
# primes); for this to work, it is essential that we can
# reduce (mod P) elements of K which are not integral (but are
# P-integral). However, if the model is non-minimal and we
# end up dividing a_i by pi^i then at that point we use a
# uniformiser pi which has non-positive valuation at all other
# primes, so that we can divide by it without losing
# integrality at other primes.
if globally:
principal_flag = P.is_principal()
else:
principal_flag = False
if (K is QQ) or principal_flag :
pi = P.gens_reduced()[0]
verbose("P is principal, generator pi = %s"%pi, t, 1)
else:
pi = K.uniformizer(P, 'positive')
verbose("uniformizer pi = %s"%pi, t, 1)
#.........这里部分代码省略.........