Пример #1
0
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
Пример #2
0
def egros_from_j_0(S=[]):
    r"""
    Given a list of primes S, returns a list of elliptic curves over Q
    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 `Q` 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]))
        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
Пример #3
0
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
Пример #4
0
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