10.1.2.1 EllipticCurve Objects

class EllipticCurve
Elliptic curve over a generic base ring.
EllipticCurve( ainvs, [extra=None])

Instances of class EllipticCurve have the following methods (in addition to inherited methods and special methods):

a1,$  $ a2,$  $ a3,$  $ a4,$  $ a6,$  $ a_invariants,$  $ ainvs,$  $ b_invariants,$  $ base_field,$  $ base_ring,$  $ c_invariants,$  $ change_ring,$  $ discriminant,$  $ division_polynomial,$  $ formal_group,$  $ formal_inverse,$  $ formal_log,$  $ formal_mult,$  $ formal_n_isogeny,$  $ formal_sigma,$  $ formal_w,$  $ formal_x,$  $ formal_y,$  $ gens,$  $ is_on_curve,$  $ j_invariant,$  $ quadratic_twist,$  $ torsion_polynomial,$  $ weierstrass_model

Further documentation:

a1( )

sage: E = EllipticCurve([1,2,3,4,6])
sage: E.a1()
1

a2( )

sage: E = EllipticCurve([1,2,3,4,6])
sage: E.a2()
2

a3( )

sage: E = EllipticCurve([1,2,3,4,6])
sage: E.a3()
3

a4( )

sage: E = EllipticCurve([1,2,3,4,6])
sage: E.a4()
4

a6( )

sage: E = EllipticCurve([1,2,3,4,6])
sage: E.a6()
6

a_invariants( )

The a-invariants of this elliptic curve.

sage: E = EllipticCurve([1,2,3,4,5])
sage: E.a_invariants()
[1, 2, 3, 4, 5]
sage: E = EllipticCurve([0,1])
sage: E
Elliptic Curve defined by y^2  = x^3 +1 over Rational Field
sage: E.a_invariants()
[0, 0, 0, 0, 1]
sage: E = EllipticCurve([GF(7)(3),5])
sage: E.a_invariants()
[0, 0, 0, 3, 5]

ainvs( )

The a-invariants of this elliptic curve.

sage: E = EllipticCurve([1,2,3,4,5])
sage: E.a_invariants()
[1, 2, 3, 4, 5]
sage: E = EllipticCurve([0,1])
sage: E
Elliptic Curve defined by y^2  = x^3 +1 over Rational Field
sage: E.a_invariants()
[0, 0, 0, 0, 1]
sage: E = EllipticCurve([GF(7)(3),5])
sage: E.a_invariants()
[0, 0, 0, 3, 5]

b_invariants( )

The b-invariants of this elliptic curve.

sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.b_invariants()
(-4, -20, -79, -21)
sage: E = EllipticCurve([-4,0])
sage: E.b_invariants()
(0, -8, 0, -16)

ALGORITHM: These are simple functions of the a invariants.

AUTHOR: William Stein, 2005-04-25

base_field( )

Returns the base ring of the elliptic curves.

sage: E = EllipticCurve([GF(49)(3),5])
sage: E.base_ring()
Finite field of size 7^2

sage: E = EllipticCurve([1,1])
sage: E.base_ring()
Rational Field

sage: E = EllipticCurve(ZZ, [3,5])
sage: E.base_ring()
Integer Ring

base_ring( )

Returns the base ring of the elliptic curves.

sage: E = EllipticCurve([GF(49)(3),5])
sage: E.base_ring()
Finite field of size 7^2

sage: E = EllipticCurve([1,1])
sage: E.base_ring()
Rational Field

sage: E = EllipticCurve(ZZ, [3,5])
sage: E.base_ring()
Integer Ring

c_invariants( )

The c-invariants of this elliptic curve.

sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.c_invariants()
(496, 20008)
sage: E = EllipticCurve([-4,0])
sage: E.c_invariants()
(192, 0)

ALGORITHM: These are simple functions of the b invariants.

AUTHOR: William Stein, 2005-04-25

change_ring( R)

Return the elliptic curve defined by coercing the a-invariants of this elliptic curve into the ring R.

INPUT:
    R -- ring

OUTPUT:
    an elliptic curve

sage: E = EllipticCurve([0, 0, 1, -1, 0])
sage: E.change_ring(GF(3))
Elliptic Curve defined by y^2 + y = x^3 + 2*x over Finite field of size 3

discriminant( )

Returns the discriminant of this elliptic curve.

sage: E = EllipticCurve([0,0,1,-1,0])
sage: E.discriminant()
37
sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.discriminant()
-161051

sage: E = EllipticCurve([GF(7)(2),1])
sage: E.discriminant()
1

division_polynomial( n, [i=0])

Returns the n-th torsion polynomial (a.k.a., division polynomial).

INPUT:
    n -- non-negative integer
    i -- integer, either 0 (default) or 1.
    
OUTPUT:
    Polynomial -- n-th torsion polynomial, which is a polynomial over
                  the base field of the elliptic curve.

sage: E = EllipticCurve([0,0,1,-1,0])
sage: E.division_polynomial(1)
1
sage: E.division_polynomial(2)
4*x^3 - 4*x + 1
sage: E.division_polynomial(3)
3*x^4 - 6*x^2 + 3*x - 1

sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.torsion_polynomial(0)
0
sage: E.torsion_polynomial(1)
1
sage: E.torsion_polynomial(2)
4*x^3 - 4*x^2 - 40*x - 79
sage: E.torsion_polynomial(3)
3*x^4 - 4*x^3 - 60*x^2 - 237*x - 21
sage: E.torsion_polynomial(4)
8*x^9 - 24*x^8 - 464*x^7 - 2758*x^6 + 6636*x^5 + 34356*x^4 + 53510*x^3 +
99714*x^2 + 351024*x + 459859

sage: E = EllipticCurve([-4,0])
sage: E.torsion_polynomial(2)
4*x^3 - 16*x
sage: E.torsion_polynomial(5)
5*x^12 - 248*x^10 - 1680*x^8 + 19200*x^6 - 32000*x^4 + 51200*x^2 + 4096
sage: E.torsion_polynomial(6)
12*x^19 - 1200*x^17 - 18688*x^15 + 422912*x^13 - 2283520*x^11 + 9134080*x^9
- 27066368*x^7 + 19136512*x^5 + 19660800*x^3 - 3145728*x

AUTHOR: David Kohel (kohel@maths.usyd.edu.au), 2005-04-25

formal_w( [prec=20])

The formal group power series w.

INPUT:
    prec -- integer
OUTPUT:
    a power series

DETAILS: Return the formal power series

$\displaystyle w(t) = t^3 + ...
$

to precision $ O(t^prec)$ of Proposition IV.1.1 of [Silverman AEC1]. This is the formal expansion of $ w = -1/y$ about the formal parameter $ t = -x/y$ at $ \infty$ .

We compute w using the recursive procedure (4.1) on page 18 of Bluher's ``A leisurely introduction to formal groups and elliptic curves'', which I downloaded from http://www.math.uiuc.edu/Algebraic-Number-Theory/0076/

sage: e = EllipticCurve([0, 0, 1, -1, 0])
sage: e.formal_w(10)
t^3 + t^6 - t^7 + 2*t^9 + O(t^10)

formal_x( [prec=20])

Return the formal power series x(t) in terms of the local parameter t = -x/y at infinity.

formal_y( [prec=20])

Return the formal power series y(t) in terms of the local parameter t = -x/y at infinity.

is_on_curve( x, y)

Returns True if the (x,y) is an affine point on this curve.

j_invariant( )

Returns the j-invariant of this elliptic curve.

sage: E = EllipticCurve([0,0,1,-1,0])
sage: E.j_invariant()
110592/37
sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.j_invariant()
-122023936/161051
sage: E = EllipticCurve([-4,0])
sage: E.j_invariant()
1728

sage: E = EllipticCurve([GF(7)(2),1])
sage: E.j_invariant()
1

quadratic_twist( D)

Return the quadratic twist of this curve by D.

torsion_polynomial( n, [i=0])

Returns the n-th torsion polynomial (a.k.a., division polynomial).

INPUT:
    n -- non-negative integer
    i -- integer, either 0 (default) or 1.
    
OUTPUT:
    Polynomial -- n-th torsion polynomial, which is a polynomial over
                  the base field of the elliptic curve.

sage: E = EllipticCurve([0,0,1,-1,0])
sage: E.division_polynomial(1)
1
sage: E.division_polynomial(2)
4*x^3 - 4*x + 1
sage: E.division_polynomial(3)
3*x^4 - 6*x^2 + 3*x - 1

sage: E = EllipticCurve([0, -1, 1, -10, -20])
sage: E.torsion_polynomial(0)
0
sage: E.torsion_polynomial(1)
1
sage: E.torsion_polynomial(2)
4*x^3 - 4*x^2 - 40*x - 79
sage: E.torsion_polynomial(3)
3*x^4 - 4*x^3 - 60*x^2 - 237*x - 21
sage: E.torsion_polynomial(4)
8*x^9 - 24*x^8 - 464*x^7 - 2758*x^6 + 6636*x^5 + 34356*x^4 + 53510*x^3 +
99714*x^2 + 351024*x + 459859

sage: E = EllipticCurve([-4,0])
sage: E.torsion_polynomial(2)
4*x^3 - 16*x
sage: E.torsion_polynomial(5)
5*x^12 - 248*x^10 - 1680*x^8 + 19200*x^6 - 32000*x^4 + 51200*x^2 + 4096
sage: E.torsion_polynomial(6)
12*x^19 - 1200*x^17 - 18688*x^15 + 422912*x^13 - 2283520*x^11 + 9134080*x^9
- 27066368*x^7 + 19136512*x^5 + 19660800*x^3 - 3145728*x

AUTHOR: David Kohel (kohel@maths.usyd.edu.au), 2005-04-25

weierstrass_model( )

Return a model of the form $ y^2 = x^3 + a*x + b$ for this curve.

Instances of class EllipticCurve also have the following special methods:

__call__,$  $ __cmp__,$  $ __contains__,$  $ __getitem__,$  $ __repr__,$  $ _EllipticCurve__is_over_RationalField,$  $ _latex_,$  $ _type

Further documentation:

__call__( [x=True], [y=Infinity], [check=Infinity])

Create a point on the elliptic curve, if possible. If a the point is not on the curve, an ArithmeticError exception is raised.

sage: E = EllipticCurve([0, 0, 1, -1, 0])
sage: P = E(0,0)
sage: P
(0, 0)
sage: P.curve()
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
sage: E([0,0])
(0, 0)
sage: E([1,0,0])
(1,0,0)
sage: E(infinity)
(1,0,0)

We create points on an elliptic curve over a prime finite field.

sage: E = EllipticCurve([GF(7)(0), 1])
sage: E([2,3])
(2, 3)
sage: E([0,0])
Traceback (most recent call last):
...
ArithmeticError: Point (0, 0) is not on curve.

We create a point on an elliptic curve over a number field.

sage: x = polygen(RationalField())
sage: K = NumberField(x**3 + x + 1); a = K.gen()
sage: E = EllipticCurve([a,a])
sage: E
Elliptic Curve defined by y^2  = x^3 + a*x + a over Number Field in a with
defining polynomial x^3 + x + 1
sage: E = EllipticCurve([K(1),1])
sage: E
Elliptic Curve defined by y^2  = x^3 + x +1 over Number Field in a with
defining polynomial x^3 + x + 1
sage: P = E([a,0])
sage: P
(a, 0)
sage: P+P
(1,0,0)

__contains__( P)

Returns True if and only if P defines is a point on the elliptic curve. P just has to be something that can be coerced to a point.

sage: E = EllipticCurve([0, 0, 1, -1, 0])
sage: (0,0) in E
True
sage: (1,3) in E
False
sage: E = EllipticCurve([GF(7)(0), 1])
sage: [0,0] in E
False
sage: [0,8] in E
True
sage: P = E(0,8)
sage: P
(0, 1)
sage: P in E
True

__getitem__( n)

__repr__( )

String representation of elliptic curve.

sage: EllipticCurve([1,2,3,4,5])
Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over
Rational Field

See About this document... for information on suggesting changes.