Package sage :: Package ellcurve :: Module ellcurve :: Class EllipticCurve_generic
[show private | hide private]
[frames | no frames]

Type EllipticCurve_generic

   object --+    
            |    
EllipticCurve --+
                |
               EllipticCurve_generic

Known Subclasses:
EllipticCurve_RationalField

Elliptic curve over a generic base ring.
Method Summary
  __init__(self, ainvs, extra)
  __call__(self, x, y)
Create a point on the elliptic curve, if possible.
  __contains__(self, P)
Returns True if and only if P defines is a point on the elliptic curve.
  __getitem__(self, n)
  __repr__(self)
String representation of elliptic curve.
  a1(self)
EXAMPLES:
  a2(self)
EXAMPLES:
  a3(self)
EXAMPLES:
  a4(self)
EXAMPLES:
  a6(self)
EXAMPLES:
  a_invariants(self)
The a-invariants of this elliptic curve.
  ainvs(self)
The a-invariants of this elliptic curve.
  b_invariants(self)
The b-invariants of this elliptic curve.
  base_field(self)
Returns the base ring of the elliptic curves.
  base_ring(self)
Returns the base ring of the elliptic curves.
  c_invariants(self)
The c-invariants of this elliptic curve.
  discriminant(self)
Returns the discriminant of this elliptic curve.
  division_polynomial(self, n, i)
Returns the n-th torsion polynomial (a.k.a., division polynomial).
  gens(self)
  j_invariant(self)
Returns the j-invariant of this elliptic curve.
  quadratic_twist(self, D)
  torsion_polynomial(self, n, i)
Returns the n-th torsion polynomial (a.k.a., division polynomial).
  weierstrass_model(self)
    Inherited from EllipticCurve
  __new__(cls, *args, **kwds)
(Static method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Method Details

__call__(self, x=Infinity, y=Infinity)
(Call operator)

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

EXAMPLES:
>>> E = EllipticCurve([0, 0, 1, -1, 0])
>>> P = E(0,0)
>>> P
(0, 0)

>>> P.curve()
Elliptic Curve defined by y^2 + y = x^3 - x  over Rational Field

>>> E([0,0])
(0, 0)

>>> E([1,0,0])
(1,0,0)

>>> E(infinity)
(1,0,0)
We create points on an elliptic curve over a prime finite field.
>>> E = EllipticCurve([GF(7)(0), 1])
>>> E([2,3])
(2, 3)

>>> 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.
>>> x = polygen(RationalField())
>>> K = NumberField(x**3 + x + 1); a = K.gen()
>>> E = EllipticCurve([a,a])
>>> E
Elliptic Curve defined by y^2  = x^3 + a*x + a over Number Field with defining polynomial x^3 + x + 1

>>> E = EllipticCurve([K(1),1])
>>> E
Elliptic Curve defined by y^2  = x^3 + x +1 over Number Field with defining polynomial x^3 + x + 1

>>> P = E([a,0])
>>> P
(a, 0)

>>> P+P
(1,0,0)

__contains__(self, P)
(In operator)

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.

EXAMPLES:
>>> E = EllipticCurve([0, 0, 1, -1, 0])
>>> (0,0) in E
True

>>> (1,3) in E
False

>>> E = EllipticCurve([GF(7)(0), 1])
>>> [0,0] in E
False

>>> [0,8] in E
True

>>> P = E(0,8)
>>> P
(0, 1)

>>> P in E
True

__repr__(self)
(Representation operator)

String representation of elliptic curve.

EXAMPLES:
>>> 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
Overrides:
__builtin__.object.__repr__

a1(self)

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

a2(self)

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

a3(self)

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

a4(self)

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

a6(self)

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

a_invariants(self)

The a-invariants of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([1,2,3,4,5])
>>> E.a_invariants()
[1, 2, 3, 4, 5]

>>> E = EllipticCurve([0,1])
>>> E
Elliptic Curve defined by y^2  = x^3 +1 over Rational Field

>>> E.a_invariants()
[0, 0, 0, 0, 1]

>>> E = EllipticCurve([GF(7)(3),5])
>>> E.a_invariants()
[0, 0, 0, 3, 5]

ainvs(self)

The a-invariants of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([1,2,3,4,5])
>>> E.a_invariants()
[1, 2, 3, 4, 5]

>>> E = EllipticCurve([0,1])
>>> E
Elliptic Curve defined by y^2  = x^3 +1 over Rational Field

>>> E.a_invariants()
[0, 0, 0, 0, 1]

>>> E = EllipticCurve([GF(7)(3),5])
>>> E.a_invariants()
[0, 0, 0, 3, 5]

b_invariants(self)

The b-invariants of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([0, -1, 1, -10, -20])
>>> E.b_invariants()
(-4, -20, -79, -21)

>>> E = EllipticCurve([-4,0])
>>> E.b_invariants()
(0, -8, 0, -16)

ALGORITHM: These are simple functions of the a invariants.

AUTHOR: William Stein, 2005-04-25

base_field(self)

Returns the base ring of the elliptic curves.

EXAMPLES:
>>> E = EllipticCurve([GF(49)(3),5])
>>> E.base_ring()
Finite field of size 7^2
>>> E = EllipticCurve([1,1])
>>> E.base_ring()
Rational Field
>>> E = EllipticCurve(ZZ, [3,5])
>>> E.base_ring()
Integer Ring

base_ring(self)

Returns the base ring of the elliptic curves.

EXAMPLES:
>>> E = EllipticCurve([GF(49)(3),5])
>>> E.base_ring()
Finite field of size 7^2
>>> E = EllipticCurve([1,1])
>>> E.base_ring()
Rational Field
>>> E = EllipticCurve(ZZ, [3,5])
>>> E.base_ring()
Integer Ring

c_invariants(self)

The c-invariants of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([0, -1, 1, -10, -20])
>>> E.c_invariants()
(496, 20008)

>>> E = EllipticCurve([-4,0])
>>> E.c_invariants()
(192, 0)

ALGORITHM: These are simple functions of the b invariants.

AUTHOR: William Stein, 2005-04-25

discriminant(self)

Returns the discriminant of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([0,0,1,-1,0])
>>> E.discriminant()
37

>>> E = EllipticCurve([0, -1, 1, -10, -20])
>>> E.discriminant()
-161051
>>> E = EllipticCurve([GF(7)(2),1])
>>> E.discriminant()
1

division_polynomial(self, 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. 

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

    >>> E = EllipticCurve([0, -1, 1, -10, -20])
    >>> E.torsion_polynomial(0)
    0
    >>> E.torsion_polynomial(1)
    1
    >>> E.torsion_polynomial(2)
    4*x^3 - 4*x^2 - 40*x - 79
    >>> E.torsion_polynomial(3)
    3*x^4 - 4*x^3 - 60*x^2 - 237*x - 21
    >>> 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

    >>> E = EllipticCurve([-4,0])
    >>> E.torsion_polynomial(2)
    4*x^3 - 16*x
    >>> E.torsion_polynomial(5)
    5*x^12 - 248*x^10 - 1680*x^8 + 19200*x^6 - 32000*x^4 + 51200*x^2 + 4096
    >>> 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

ALGORITHM: ?

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

j_invariant(self)

Returns the j-invariant of this elliptic curve.

EXAMPLES:
>>> E = EllipticCurve([0,0,1,-1,0])
>>> E.j_invariant()
110592/37

>>> E = EllipticCurve([0, -1, 1, -10, -20])
>>> E.j_invariant()
-122023936/161051

>>> E = EllipticCurve([-4,0])
>>> E.j_invariant()
1728
>>> E = EllipticCurve([GF(7)(2),1])
>>> E.j_invariant()
1

torsion_polynomial(self, 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. 

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

    >>> E = EllipticCurve([0, -1, 1, -10, -20])
    >>> E.torsion_polynomial(0)
    0
    >>> E.torsion_polynomial(1)
    1
    >>> E.torsion_polynomial(2)
    4*x^3 - 4*x^2 - 40*x - 79
    >>> E.torsion_polynomial(3)
    3*x^4 - 4*x^3 - 60*x^2 - 237*x - 21
    >>> 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

    >>> E = EllipticCurve([-4,0])
    >>> E.torsion_polynomial(2)
    4*x^3 - 16*x
    >>> E.torsion_polynomial(5)
    5*x^12 - 248*x^10 - 1680*x^8 + 19200*x^6 - 32000*x^4 + 51200*x^2 + 4096
    >>> 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

ALGORITHM: ?

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

Generated by Epydoc 2.1 on Fri May 20 19:41:04 2005 http://epydoc.sf.net