(* Freeware 1992 Loki_Demsey *)
(* :Version: Mathematica 2.0 *)
(* :Name: `DupForm` *)
(* :Title: Duplicator formula for points on elliptic cubic curves *)
(* :Author: Matthew (Loki) Demsey, This is Release 1.01 - April, 1992
Department of Mathematics, University of Arizona *)
(* :Keywords: elliptic cubic curves, duplicator formula *)
(* :Requirements: none. *)
(* :Warnings: none. *)
(* :Summary:
Duplication formula for computations on elliptic cubic curves
*)
(* :Authors notes:
Please mail all criticisms, bugs, and suggestions to :
BitNet : norton@rsconvex.geo.arizona.edu - put "TO: Loki" in subject, please.
SnailMail: M.L. Demsey, c/o Dr. Denis Norton, Department of GeoSciences,
University of Arizona, Tucson, AZ 85721
*)
BeginPackage["DupForm`"]
Duplication::usage = "Duplication[x1, y1, a, f] returns the 2P coordinates, where
(x1, y1) is P on the elliptic curve E: y^2 = f. f must be expressed in terms
of variable x. a is the coefficient of the x^2 term of f."
Begin["`Private`"]
ycoord[x3_, x1_, y1_, derf_] :=
Block[{lam, Nu},
lam = lambda[y1, derf];
Nu = nu[x1, y1, lam];
lam x3 + Nu
]
xcoord[x1_, aa_, func_, derf_] :=
Block[ {},
derf^2 / (4 func) - aa - 2 x1
]
Duplication[x1_, y1_, aa_, f_ ] :=
Block[{derf, func, fd, x3, y3},
fd = Simplify[D[f,x]];
derf = fd /. {x -> x1};
func = f /. {x -> x1};
x3 = xcoord[x1, aa, func, derf];
y3 = ycoord[x3, x1, y1, derf];
{x3, - y3}
]
lambda[y1_, derf_] :=
Block[ {},
derf / (2 y1)
]
nu[x1_,y1_, lam_] :=
Block[ {},
y1 - lam x1
]
End[]
EndPackage[] (* DupForm *)