next up previous contents
Next: Computing in The Group Up: Lecture 28: Computing with Previous: Contents   Contents

Initializing Elliptic Curves

We are concerned primarily with elliptic curves $ E$ given by an equation of the form

$\displaystyle y^2 = x^3 + ax + b
$

with $ a$ and $ b$ either rational numbers or elements of a finite field $ \mathbb{Z}/p\mathbb{Z}$. If $ a$ and $ b$ are in $ \mathbb{Q}$, we initialize $ E$ in PARI using the following command:
? E = ellinit([0,0,0,a,b]);
If you wish to view $ a$ and $ b$ as element of $ \mathbb{Z}/p\mathbb{Z}$, initialize $ E$ as follows:
? E = ellinit([0,0,0,a,b]*Mod(1,p));
If $ \Delta = -16(4a^3 + 27b^2)= 0$ then ellinit will complain; otherwise, ellinit returns a $ 19$-component vector of information about $ E$. You can access some of this information using the dot notation, as shown below.
? E = ellinit([0,0,0,1,1]); 
? E.a4
%11 = 1
? E.a6
%12 = 1
? E.disc
%13 = -496
? E.j  
%14 = 6912/31
? E5 = ellinit([0,0,0,1,1]*Mod(1,5));
? E5.disc
%15 = Mod(4, 5)
? E5.j
%16 = Mod(2, 5)
Here E.j is the $ j$-invariant of $ E$. It is equal to $ \frac{2^8 3^3 a^3}{4a^3 + 27b^2}$, and has some remarkable properties that I probably won't tell you about.

Most elliptic curves functions in PARI take as their first argument the output of ellinit. For example, the function ellisoncurve(E,P) takes the output of ellinit as its first argument and a point P=[x,y], and returns 1 if P lies on E and 0 otherwise.

? P = [0,1]
? ellisoncurve(E, P)
%17 = 1
? P5 = [0,1]*Mod(1,5) 
? ellisoncurve(E5, P)
%18 = 1



William A Stein 2001-11-21