The cubic curve routines for Maple may be found at
http://www.albany.edu/~hammond/maple/ellc . |
For these routines a cubic curve is represented by its vector of ten coefficients. For reasons connected with the usual numbering of the coefficients of a cubic curve in Weierstrass normal form the vector of coefficients is stored as an array with index values in the interval [-3, 6]. Of course such an array may be introduced explicitly using the Maple function array. The function winitell is provided here for convenience in entering a cubic curve in Weierstrass form. It takes as argument a list with 6 entries which are the coefficients a_{0}, a_{1}, a_{2}, a_{3}, a_{4}, a_{6}. (The automatic value a_{5} = 1 serves behind the scenes in the 10 slot array as the coefficient of y^{2}.) There is an optional second argument, a prime number p, that is used to indicate the field of coefficients, for handling arithmetic mod p.
Example:
Example:
Example:
nP = \underset{n times}{P + … + P} . |
Example:
Note the entry of denominators. It is the rule rather than the exception when working with rational coefficients and coordinates. Of course, denominators should not appear in computations modulo a prime p.
Example:
Example:
Get used to seeing denominators. Note also that is it not an easy matter to come up with examples of points on E having rational coordinates, much less integer coordinates.
But now explain what is happening here:
There are 3 coordinates, because the point of F in question is not a point of the affine plane. It is, in fact, the triple of homogeneous coordinates for the unique point of F on the line at infinity — the origin for the arithmetic on F. This computation means, therefore, that (5, 13) is the negative relative to the arithmetic on F when coefficients and coordinates are integers mod 7. Note that this is consistent with the fact that (-2, -1) is the negative of (-2, 1) when coefficients and coordinates are rational since one has
5 EQUIV -2 (mod 7) and 13 EQUIV -1 (mod 7) . |