当前位置: 首页>>代码示例>>Python>>正文


Python EllipticCurve.has_good_reduction_outside_S方法代码示例

本文整理汇总了Python中constructor.EllipticCurve.has_good_reduction_outside_S方法的典型用法代码示例。如果您正苦于以下问题:Python EllipticCurve.has_good_reduction_outside_S方法的具体用法?Python EllipticCurve.has_good_reduction_outside_S怎么用?Python EllipticCurve.has_good_reduction_outside_S使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在constructor.EllipticCurve的用法示例。


在下文中一共展示了EllipticCurve.has_good_reduction_outside_S方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: egros_from_j_0

# 需要导入模块: from constructor import EllipticCurve [as 别名]
# 或者: from constructor.EllipticCurve import has_good_reduction_outside_S [as 别名]
def egros_from_j_0(S=[]):
    r"""
    Given a list of primes S, returns a list of elliptic curves over `\QQ`
    with j-invariant 0 and good reduction outside S, by checking all
    relevant sextic twists.

    INPUT:

    - S -- list of primes (default: empty list).

    .. note::

        Primality of elements of S is not checked, and the output
        is undefined if S is not a list or contains non-primes.

    OUTPUT:

    A sorted list of all elliptic curves defined over `\QQ` with
    `j`-invariant equal to `0` and with good reduction at
    all primes outside the list ``S``.

    EXAMPLES::

        sage: from sage.schemes.elliptic_curves.ell_egros import egros_from_j_0
        sage: egros_from_j_0([])
        []
        sage: egros_from_j_0([2])
        []
        sage: [e.label() for e in egros_from_j_0([3])]
        ['27a1', '27a3', '243a1', '243a2', '243b1', '243b2']
        sage: len(egros_from_j_0([2,3,5]))  # long time (8s on sage.math, 2013)
        432
    """
    Elist=[]
    if not 3 in S:
        return Elist
    no2 = not 2 in S
    for ei in xmrange([2] + [6]*len(S)):
        u = prod([p**e for p,e in zip([-1]+S,ei)],QQ(1))
        if no2:
            u*=16 ## make sure 12|val(D,2)
        Eu = EllipticCurve([0,0,0,0,u]).minimal_model()
        if Eu.has_good_reduction_outside_S(S):
            Elist += [Eu]
    Elist.sort(cmp=curve_cmp)
    return Elist
开发者ID:Findstat,项目名称:sage,代码行数:48,代码来源:ell_egros.py

示例2: egros_from_j_1728

# 需要导入模块: from constructor import EllipticCurve [as 别名]
# 或者: from constructor.EllipticCurve import has_good_reduction_outside_S [as 别名]
def egros_from_j_1728(S=[]):
    r"""
    Given a list of primes S, returns a list of elliptic curves over `\QQ`
    with j-invariant 1728 and good reduction outside S, by checking
    all relevant quartic twists.

    INPUT:

    - S -- list of primes (default: empty list).

    .. note::

        Primality of elements of S is not checked, and the output
        is undefined if S is not a list or contains non-primes.

    OUTPUT:

    A sorted list of all elliptic curves defined over `\QQ` with
    `j`-invariant equal to `1728` and with good reduction at
    all primes outside the list ``S``.

    EXAMPLES::

        sage: from sage.schemes.elliptic_curves.ell_egros import egros_from_j_1728
        sage: egros_from_j_1728([])
        []
        sage: egros_from_j_1728([3])
        []
        sage: [e.cremona_label() for e in egros_from_j_1728([2])]
        ['32a1', '32a2', '64a1', '64a4', '256b1', '256b2', '256c1', '256c2']

    """
    Elist=[]
    no2 = not 2 in S
    for ei in xmrange([2] + [4]*len(S)):
        u = prod([p**e for p,e in zip([-1]+S,ei)],QQ(1))
        if no2:
            u*=4 ## make sure 12|val(D,2)
        Eu = EllipticCurve([0,0,0,u,0]).minimal_model()
        if Eu.has_good_reduction_outside_S(S):
            Elist += [Eu]
    Elist.sort(cmp=curve_cmp)
    return Elist
开发者ID:Findstat,项目名称:sage,代码行数:45,代码来源:ell_egros.py


注:本文中的constructor.EllipticCurve.has_good_reduction_outside_S方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。