Elliptic curves over a general field

This module defines the class EllipticCurve_field, based on EllipticCurve_generic, for elliptic curves over general fields.

class sage.schemes.elliptic_curves.ell_field.EllipticCurve_field(ainvs, extra=None)

Bases: sage.schemes.elliptic_curves.ell_generic.EllipticCurve_generic

base_field()

Twists: rewritten by John Cremona as follows:

The following twists are implemented:

  • Quadratic twist: except when char=2 and j=0.
  • Quartic twist: only if j=1728\not=0 (so not if char=2,3).
  • Sextic twist: only if j=0\not=1728 (so not if char=2,3).

More complicated twists exist in theory for char=2,3 and j=0=1728, but are not implemented.

hasse_invariant()

Returns the Hasse invariant of this elliptic curve.

OUTPUT:

The Hasse invariant of this elliptic curve, as an element of the base field. This is only defined over fields of positive characteristic, and is an element of the field which is zero if and only if the curve is supersingular. Over a field of characteristic zero, where the Hasse invariant is undefined, a ValueError is returned.

EXAMPLES:

sage: E = EllipticCurve([Mod(1,2),Mod(1,2),0,0,Mod(1,2)])
sage: E.hasse_invariant()                                
1
sage: E = EllipticCurve([0,0,Mod(1,3),Mod(1,3),Mod(1,3)])
sage: E.hasse_invariant()                                
0
sage: E = EllipticCurve([0,0,Mod(1,5),0,Mod(2,5)])       
sage: E.hasse_invariant()                         
0
sage: E = EllipticCurve([0,0,Mod(1,5),Mod(1,5),Mod(2,5)])
sage: E.hasse_invariant()                                
2

Some examples over larger fields:

sage: EllipticCurve(GF(101),[0,0,0,0,1]).hasse_invariant()
0
sage: EllipticCurve(GF(101),[0,0,0,1,1]).hasse_invariant()
98
sage: EllipticCurve(GF(103),[0,0,0,0,1]).hasse_invariant()
20
sage: EllipticCurve(GF(103),[0,0,0,1,1]).hasse_invariant()
17
sage: F.<a> = GF(107^2)                                  
sage: EllipticCurve(F,[0,0,0,a,1]).hasse_invariant()     
62*a + 75
sage: EllipticCurve(F,[0,0,0,0,a]).hasse_invariant()
0

Over fields of characteristic zero, the Hasse invariant is undefined:

sage: E = EllipticCurve([0,0,0,0,1])
sage: E.hasse_invariant()
...
ValueError: Hasse invariant only defined in positive characteristic
is_isogenous(other, field=None)

Returns whether or not self is isogenous to other.

INPUT:

  • other – another elliptic curve.
  • field (default None) – Currently not implemented. A field containing the base fields of the two elliptic curves onto which the two curves may be extended to test if they are isogenous over this field. By default is_isogenous will not try to find this field unless one of the curves can be be extended into the base field of the other, in which case it will test over the larger base field.

OUTPUT:

(bool) True if there is an isogeny from curve self to curve other defined over field.

METHOD:

Over general fields this is only implemented in trivial cases.

EXAMPLES:

sage: E1 = EllipticCurve(CC, [1,18]); E1
Elliptic Curve defined by y^2 = x^3 + 1.00000000000000*x + 18.0000000000000 over Complex Field with 53 bits of precision
sage: E2 = EllipticCurve(CC, [2,7]); E2  
Elliptic Curve defined by y^2 = x^3 + 2.00000000000000*x + 7.00000000000000 over Complex Field with 53 bits of precision
sage: E1.is_isogenous(E2)
...
NotImplementedError: Only implemented for isomorphic curves over general fields.

sage: E1 = EllipticCurve(Frac(PolynomialRing(ZZ,'t')), [2,19]); E1
Elliptic Curve defined by y^2 = x^3 + 2*x + 19 over Fraction Field of Univariate Polynomial Ring in t over Integer Ring
sage: E2 = EllipticCurve(CC, [23,4]); E2 
Elliptic Curve defined by y^2 = x^3 + 23.0000000000000*x + 4.00000000000000 over Complex Field with 53 bits of precision
sage: E1.is_isogenous(E2)
...
NotImplementedError: Only implemented for isomorphic curves over general fields.
is_quadratic_twist(other)

Determine whether this curve is a quadratic twist of another.

INPUT:

  • other – an elliptic curves with the same base field as self.

OUTPUT:

Either 0, if the curves are not quadratic twists, or D if other is self.quadratic_twist(D) (up to isomorphism). If self and other are isomorphic, returns 1.

If the curves are defined over \mathbb{Q}, the output D is a squarefree integer.

Note

Not fully implemented in characteristic 2, or in characteristic 3 when both j-invariants are 0.

EXAMPLES:

sage: E = EllipticCurve('11a1') 
sage: Et = E.quadratic_twist(-24)
sage: E.is_quadratic_twist(Et)
-6

sage: E1=EllipticCurve([0,0,1,0,0])
sage: E1.j_invariant()
0
sage: E2=EllipticCurve([0,0,0,0,2])
sage: E1.is_quadratic_twist(E2)
2
sage: E1.is_quadratic_twist(E1)
1
sage: type(E1.is_quadratic_twist(E1)) == type(E1.is_quadratic_twist(E2))   #trac 6574
True
sage: E1=EllipticCurve([0,0,0,1,0])
sage: E1.j_invariant()
1728
sage: E2=EllipticCurve([0,0,0,2,0])
sage: E1.is_quadratic_twist(E2)
0
sage: E2=EllipticCurve([0,0,0,25,0])
sage: E1.is_quadratic_twist(E2)
5
sage: F = GF(101)
sage: E1 = EllipticCurve(F,[4,7])
sage: E2 = E1.quadratic_twist()
sage: D = E1.is_quadratic_twist(E2); D!=0
True
sage: F = GF(101)
sage: E1 = EllipticCurve(F,[4,7])
sage: E2 = E1.quadratic_twist()
sage: D = E1.is_quadratic_twist(E2)
sage: E1.quadratic_twist(D).is_isomorphic(E2)
True
sage: E1.is_isomorphic(E2)
False
sage: F2 = GF(101^2,'a')
sage: E1.change_ring(F2).is_isomorphic(E2.change_ring(F2))
True

A characteristic 3 example:

sage: F = GF(3^5,'a')
sage: E1 = EllipticCurve_from_j(F(1))
sage: E2 = E1.quadratic_twist(-1)
sage: D = E1.is_quadratic_twist(E2); D!=0
True
sage: E1.quadratic_twist(D).is_isomorphic(E2)
True
sage: E1 = EllipticCurve_from_j(F(0))
sage: E2 = E1.quadratic_twist()
sage: D = E1.is_quadratic_twist(E2); D
1
sage: E1.is_isomorphic(E2)
True
is_quartic_twist(other)

Determine whether this curve is a quartic twist of another.

INPUT:

  • other – an elliptic curves with the same base field as self.

OUTPUT:

Either 0, if the curves are not quartic twists, or D if other is self.quartic_twist(D) (up to isomorphism). If self and other are isomorphic, returns 1.

Note

Not fully implemented in characteristics 2 or 3.

EXAMPLES:

sage: E = EllipticCurve_from_j(GF(13)(1728))
sage: E1 = E.quartic_twist(2)
sage: D = E.is_quartic_twist(E1); D!=0
True
sage: E.quartic_twist(D).is_isomorphic(E1)
True
sage: E = EllipticCurve_from_j(1728)
sage: E1 = E.quartic_twist(12345)
sage: D = E.is_quartic_twist(E1); D
15999120
sage: (D/12345).is_perfect_power(4)
True
is_sextic_twist(other)

Determine whether this curve is a sextic twist of another.

INPUT:

  • other – an elliptic curves with the same base field as self.

OUTPUT:

Either 0, if the curves are not sextic twists, or D if other is self.sextic_twist(D) (up to isomorphism). If self and other are isomorphic, returns 1.

Note

Not fully implemented in characteristics 2 or 3.

EXAMPLES:

sage: E = EllipticCurve_from_j(GF(13)(0))
sage: E1 = E.sextic_twist(2)
sage: D = E.is_sextic_twist(E1); D!=0
True
sage: E.sextic_twist(D).is_isomorphic(E1)
True
sage: E = EllipticCurve_from_j(0)
sage: E1 = E.sextic_twist(12345)
sage: D = E.is_sextic_twist(E1); D
575968320
sage: (D/12345).is_perfect_power(6)
True
isogenies_prime_degree(l=None)

Generic code, valid for all fields, for those l for which the modular curve has genus 0.

INPUT:

  • l – either None, a prime or a list of primes, from [2,3,5,7,13].

OUTPUT:

(list) All l-isogenies for the given l with domain self.

METHOD:

Calls the generic function isogenies_prime_degree_genus_0(). This requires that certain operations have been implemented over the base field, such as root-finding for univariate polynomials.

EXAMPLES:

sage: F = QQbar                      
sage: E = EllipticCurve(F, [1,18]); E
Elliptic Curve defined by y^2 = x^3 + x + 18 over Algebraic Field

sage: F = CC
sage: E = EllipticCurve(F, [1,18]); E
Elliptic Curve defined by y^2 = x^3 + 1.00000000000000*x + 18.0000000000000 over Complex Field with 53 bits of precision
sage: E.isogenies_prime_degree(11)
...
NotImplementedError: This code could be implemented for general complex fields, but has not been yet.

Examples over finite fields:

sage: E = EllipticCurve(GF(next_prime(1000000)), [7,8])
sage: E.isogenies_prime_degree()
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 970389*x + 794257 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 29783*x + 206196 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 999960*x + 78 over Finite Field of size 1000003, Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 878063*x + 845666 over Finite Field of size 1000003, Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 375648*x + 342776 over Finite Field of size 1000003]
sage: E.isogenies_prime_degree(2)            
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 970389*x + 794257 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 29783*x + 206196 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 999960*x + 78 over Finite Field of size 1000003]            
sage: E.isogenies_prime_degree(3)
[]
sage: E.isogenies_prime_degree(5)
[]
sage: E.isogenies_prime_degree(7)
[]
sage: E.isogenies_prime_degree(13)            
[Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 878063*x + 845666 over Finite Field of size 1000003,
Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 375648*x + 342776 over Finite Field of size 1000003]

sage: E.isogenies_prime_degree([2, 3, 5, 7, 13])
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 970389*x + 794257 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 29783*x + 206196 over Finite Field of size 1000003, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 999960*x + 78 over Finite Field of size 1000003, Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 878063*x + 845666 over Finite Field of size 1000003, Isogeny of degree 13 from Elliptic Curve defined by y^2 = x^3 + 7*x + 8 over Finite Field of size 1000003 to Elliptic Curve defined by y^2 = x^3 + 375648*x + 342776 over Finite Field of size 1000003]
sage: E.isogenies_prime_degree([2, 4])  
...
ValueError: 4 is not prime.
sage: E.isogenies_prime_degree([2, 29])
...
NotImplementedError: Over general fields, only isogenies of degree 2, 3, 5, 7 or 13 have been implemented.
sage: E.isogenies_prime_degree(4) 
...
ValueError: 4 is not prime.
sage: E.isogenies_prime_degree(11)
...
NotImplementedError: Over general fields, only isogenies of degree 2, 3, 5, 7 or 13 have been implemented.

sage: E = EllipticCurve(GF(17),[2,0])                      
sage: E.isogenies_prime_degree(3)
[]
sage: E.isogenies_prime_degree(2)            
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x over Finite Field of size 17 to Elliptic Curve defined by y^2 = x^3 + 9*x over Finite Field of size 17, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x over Finite Field of size 17 to Elliptic Curve defined by y^2 = x^3 + 5*x + 9 over Finite Field of size 17, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x over Finite Field of size 17 to Elliptic Curve defined by y^2 = x^3 + 5*x + 8 over Finite Field of size 17]
            
sage: E = EllipticCurve(GF(13^4, 'a'),[2,8])
sage: E.isogenies_prime_degree(2)                                  
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 7*x + 4 over Finite Field in a of size 13^4, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + (8*a^3+2*a^2+7*a+5)*x + (12*a^3+3*a^2+4*a+4) over Finite Field in a of size 13^4, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + (5*a^3+11*a^2+6*a+11)*x + (a^3+10*a^2+9*a) over Finite Field in a of size 13^4]

sage: E.isogenies_prime_degree(3)
[Isogeny of degree 3 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 9*x + 11 over Finite Field in a of size 13^4]
sage: E.isogenies_prime_degree([2, 3, 5, 7, 13])
...
NotImplementedError: 2, 3, 5, 7 and 13-isogenies are not yet implemented in characteristic 2 and 3, and when the characteristic is the same as the degree of the isogeny.
sage: E.isogenies_prime_degree([2, 3, 5, 7])                
[Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 7*x + 4 over Finite Field in a of size 13^4, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + (8*a^3+2*a^2+7*a+5)*x + (12*a^3+3*a^2+4*a+4) over Finite Field in a of size 13^4, Isogeny of degree 2 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + (5*a^3+11*a^2+6*a+11)*x + (a^3+10*a^2+9*a) over Finite Field in a of size 13^4, Isogeny of degree 3 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 9*x + 11 over Finite Field in a of size 13^4, Isogeny of degree 7 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 3*x + 11 over Finite Field in a of size 13^4, Isogeny of degree 7 from Elliptic Curve defined by y^2 = x^3 + 2*x + 8 over Finite Field in a of size 13^4 to Elliptic Curve defined by y^2 = x^3 + 9*x + 2 over Finite Field in a of size 13^4]

Examples over number fields (other than QQ):

sage: QQroot2.<e> = NumberField(x^2-2)
sage: E = EllipticCurve(QQroot2,[1,1])
sage: E.isogenies_prime_degree(11)
...
NotImplementedError: Over general fields, only isogenies of degree 2, 3, 5, 7 or 13 have been implemented.
sage: E.isogenies_prime_degree(5)
[]

sage: E = EllipticCurve(QQroot2, [1,0,1,4, -6]); E
Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2
sage: E.isogenies_prime_degree(2)
[Isogeny of degree 2 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-36)*x + (-70) over Number Field in e with defining polynomial x^2 - 2]
sage: E.isogenies_prime_degree(3)            
[Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-171)*x + (-874) over Number Field in e with defining polynomial x^2 - 2, Isogeny of degree 3 from Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x + (-6) over Number Field in e with defining polynomial x^2 - 2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + (-128/3)*x + 5662/27 over Number Field in e with defining polynomial x^2 - 2]
isogeny(kernel, codomain=None, degree=None, model=None, check=True)

Returns an elliptic curve isogeny from self.

The isogeny can be determined in two ways, either by a polynomial or a set of torsion points. The methods used are:

  • Velu’s Formulas: Velu’s original formulas for computing isogenies. This algorithm is selected by giving as the kernel parameter a point or a list of points which generate a finite subgroup.
  • Kohel’s Formulas: Kohel’s original formulas for computing isogenies. This algorithm is selected by giving as the kernel parameter a polynomial (or a coefficient list (little endian)) which will define the kernel of the isogeny.

INPUT:

  • E - an elliptic curve, the domain of the isogeny to

    initialize.

  • kernel - a kernel, either a point in E, a list of points

    in E, a univariate kernel polynomial or None. If initiating from a domain/codomain, this must be set to None.

  • codomain - an elliptic curve (default:None). If kernel is

    None, then this must be the codomain of a separable normalized isogeny, furthermore, degree must be the degree of the isogeny from E to codomain. If kernel is not None, then this must be isomorphic to the codomain of the normalized separable isogeny defined by kernel, in this case, the isogeny is post composed with an isomorphism so that this parameter is the codomain.

  • degree - an integer (default:None). If kernel is None,

    then this is the degree of the isogeny from E to codomain. If kernel is not None, then this is used to determine whether or not to skip a gcd of the kernel polynomial with the two torsion polynomial of E.

  • model - a string (default:None). Only supported variable is

    “minimal”, in which case if``E`` is a curve over the rationals, then the codomain is set to be the unique global minimum model.

  • check (default: True) checks if the input is valid to define an

    isogeny

OUTPUT:

An isogeny between elliptic curves. This is a morphism of curves.

EXAMPLES:

sage: F = GF(2^5, 'alpha'); alpha = F.gen()
sage: E = EllipticCurve(F, [1,0,1,1,1])
sage: R.<x> = F[]
sage: phi = E.isogeny(x+1)
sage: phi.rational_maps()
((x^2 + x + 1)/(x + 1), (x^2*y + x)/(x^2 + 1))

sage: E = EllipticCurve('11a1')
sage: P = E.torsion_points()[1]
sage: E.isogeny(P)
Isogeny of degree 5 from Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field to Elliptic Curve defined by y^2 + y = x^3 - x^2 - 7820*x - 263580 over Rational Field

sage: E = EllipticCurve(GF(19),[1,1])
sage: P = E(15,3); Q = E(2,12);
sage: (P.order(), Q.order())
(7, 3)
sage: phi = E.isogeny([P,Q]); phi
Isogeny of degree 21 from Elliptic Curve defined by y^2 = x^3 + x + 1 over Finite Field of size 19 to Elliptic Curve defined by y^2 = x^3 + x + 1 over Finite Field of size 19
sage: phi(E.random_point()) # all points defined over GF(19) are in the kernel
(0 : 1 : 0)


# not all polynomials define a finite subgroup trac #6384
sage: E = EllipticCurve(GF(31),[1,0,0,1,2])
sage: phi = E.isogeny([14,27,4,1])
...
ValueError: The polynomial does not define a finite subgroup of the elliptic curve.
isogeny_codomain(kernel, degree=None)

Returns the codomain of the isogeny from self with given kernel.

INPUT:

  • kernel - Either a list of points in the kernel of the isogeny,

    or a kernel polynomial (specified as a either a univariate polynomial or a coefficient list.)

  • degree - an integer, (default:None) optionally specified degree

    of the kernel.

OUTPUT:

An elliptic curve, the codomain of the separable normalized isogeny from this kernel

EXAMPLES:

sage: E = EllipticCurve('17a1')
sage: R.<x> = QQ[]
sage: E2 = E.isogeny_codomain(x - 11/4); E2
Elliptic Curve defined by y^2 + x*y + y = x^3 - x^2 - 1461/16*x - 19681/64 over Rational Field
quadratic_twist(D=None)

Return the quadratic twist of this curve by D.

INPUT:

  • D (default None) the twisting parameter (see below).

In characteristics other than 2, D must be nonzero, and the twist is isomorphic to self after adjoining \sqrt(D) to the base.

In characteristic 2, D is arbitrary, and the twist is isomorphic to self after adjoining a root of x^2+x+D to the base.

In characteristic 2 when j=0, this is not implemented.

If the base field F is finite, D need not be specified, and the curve returned is the unique curve (up to isomorphism) defined over F isomorphic to the original curve over the quadratic extension of F but not over F itself. Over infinite fields, an error is raised if D is not given.

EXAMPLES:

sage: E = EllipticCurve([GF(1103)(1), 0, 0, 107, 340]); E
Elliptic Curve defined by y^2 + x*y  = x^3 + 107*x + 340 over Finite Field of size 1103
sage: F=E.quadratic_twist(-1); F
Elliptic Curve defined by y^2  = x^3 + 1102*x^2 + 609*x + 300 over Finite Field of size 1103
sage: E.is_isomorphic(F)
False
sage: E.is_isomorphic(F,GF(1103^2,'a'))
True

A characteristic 2 example:

sage: E=EllipticCurve(GF(2),[1,0,1,1,1])
sage: E1=E.quadratic_twist(1)
sage: E.is_isomorphic(E1)
False
sage: E.is_isomorphic(E1,GF(4,'a'))
True

Over finite fields, the twisting parameter may be omitted:

sage: k.<a> = GF(2^10)
sage: E = EllipticCurve(k,[a^2,a,1,a+1,1])
sage: Et = E.quadratic_twist()
sage: Et # random (only determined up to isomorphism)
Elliptic Curve defined by y^2 + x*y  = x^3 + (a^7+a^4+a^3+a^2+a+1)*x^2 + (a^8+a^6+a^4+1) over Finite Field in a of size 2^10
sage: E.is_isomorphic(Et)
False
sage: E.j_invariant()==Et.j_invariant()
True

sage: p=next_prime(10^10)
sage: k = GF(p)
sage: E = EllipticCurve(k,[1,2,3,4,5])
sage: Et = E.quadratic_twist()
sage: Et # random (only determined up to isomorphism)
Elliptic Curve defined by y^2  = x^3 + 7860088097*x^2 + 9495240877*x + 3048660957 over Finite Field of size 10000000019
sage: E.is_isomorphic(Et)
False
sage: k2 = GF(p^2,'a')
sage: E.change_ring(k2).is_isomorphic(Et.change_ring(k2))
True
quartic_twist(D)

Return the quartic twist of this curve by D.

INPUT:

  • D (must be nonzero) – the twisting parameter..

Note

The characteristic must not be 2 or 3, and the j-invariant must be 1728.

EXAMPLES:

sage: E=EllipticCurve_from_j(GF(13)(1728)); E
Elliptic Curve defined by y^2  = x^3 + x over Finite Field of size 13
sage: E1=E.quartic_twist(2); E1
Elliptic Curve defined by y^2  = x^3 + 5*x over Finite Field of size 13
sage: E.is_isomorphic(E1)
False
sage: E.is_isomorphic(E1,GF(13^2,'a'))
False
sage: E.is_isomorphic(E1,GF(13^4,'a'))
True
sextic_twist(D)

Return the quartic twist of this curve by D.

INPUT:

  • D (must be nonzero) – the twisting parameter..

Note

The characteristic must not be 2 or 3, and the j-invariant must be 0.

EXAMPLES:

sage: E=EllipticCurve_from_j(GF(13)(0)); E
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 13
sage: E1=E.sextic_twist(2); E1
Elliptic Curve defined by y^2 = x^3 + 11 over Finite Field of size 13
sage: E.is_isomorphic(E1)
False
sage: E.is_isomorphic(E1,GF(13^2,'a'))
False
sage: E.is_isomorphic(E1,GF(13^4,'a'))
False
sage: E.is_isomorphic(E1,GF(13^6,'a'))
True
weierstrass_p(prec=20, algorithm=None)

Computes the Weierstrass \wp-function of the elliptic curve.

INPUT:

  • mprec - precision

  • algorithm - string (default:None) an algorithm identifier

    indicating using the pari, fast or quadratic algorithm. If the algorithm is None, then this function determines the best algorithm to use.

OUTPUT:

a Laurent series in one variable z with coefficients in the base field k of E.

EXAMPLES:

sage: E = EllipticCurve('11a1')
sage: E.weierstrass_p(prec=10)
z^-2 + 31/15*z^2 + 2501/756*z^4 + 961/675*z^6 + 77531/41580*z^8 + O(z^10)
sage: E.weierstrass_p(prec=8)
z^-2 + 31/15*z^2 + 2501/756*z^4 + 961/675*z^6 + O(z^8)
sage: Esh = E.short_weierstrass_model()
sage: Esh.weierstrass_p(prec=8)
z^-2 + 13392/5*z^2 + 1080432/7*z^4 + 59781888/25*z^6 + O(z^8)

sage: E.weierstrass_p(prec=8, algorithm='pari')
z^-2 + 31/15*z^2 + 2501/756*z^4 + 961/675*z^6 + O(z^8)
sage: E.weierstrass_p(prec=8, algorithm='quadratic')
z^-2 + 31/15*z^2 + 2501/756*z^4 + 961/675*z^6 + O(z^8)

sage: k = GF(101)
sage: E = EllipticCurve(k, [2,3])
sage: E.weierstrass_p(prec=30)
z^-2 + 40*z^2 + 14*z^4 + 62*z^6 + 15*z^8 + 47*z^10 + 66*z^12 + 61*z^14 + 79*z^16 + 98*z^18 + 93*z^20 + 82*z^22 + 15*z^24 + 71*z^26 + 27*z^28 + O(z^30)

sage: k = GF(11)
sage: E = EllipticCurve(k, [1,1])
sage: E.weierstrass_p(prec=6, algorithm='fast')
z^-2 + 2*z^2 + 3*z^4 + O(z^6)
sage: E.weierstrass_p(prec=7, algorithm='fast')
...
ValueError: For computing the Weierstrass p-function via the fast algorithm, the characteristic (11) of the underlying field must be greater than prec + 4 = 11.
sage: E.weierstrass_p(prec=8 ,algorithm='pari')
z^-2 + 2*z^2 + 3*z^4 + 5*z^6 + O(z^8)
sage: E.weierstrass_p(prec=9, algorithm='pari')
...
ValueError: For computing the Weierstrass p-function via pari, the characteristic (11) of the underlying field must be greater than prec + 2 = 11.

Previous topic

Elliptic curves over a general ring.

Next topic

Elliptic curves over the rational numbers

This Page