# $Source: /u/maple/research/lib/algcurves/src/RCS/Weierstrassform,v $ # $Notify: mvanhoei@daisy.uwaterloo.ca $ macro( RAD={radical,nonreal}, Weierstrassform=`algcurves/Weierstrassform`, find_a_point=`algcurves/find_a_point`, find_points=`algcurves/find_points`, degree_ext=`algcurves/degree_ext`, g_conversion1=`algcurves/g_conversion1`, g_conversion2=`algcurves/g_conversion2`, g_factors=`algcurves/g_factors`, g_ext=`algcurves/g_ext`, g_ext_r=`algcurves/g_ext_r` ): Weierstrassform:=proc(F,x::name,y::name,x0::name,y0::name) global `algcurves/x0`,`algcurves/y0`; local f,p,g,d,P,D; options remember, `Copyright (c) 1996 Waterloo Maple Inc. All rights reserved. Author: M. van Hoeij`; # Make sure that the coefficients are evala normalized: Normalizer:=`if`(has([args],RootOf),`evala/Normal`,normal); f:=collect(primpart(F,{x,y}),{x,y},'distributed',Normalizer); if indets([args],RAD)<>{} then f:=[args]; p := radfield(indets(f,RAD)); return eval(subs(p[2],procname(op(eval(subs(p[1],f)))))) elif not has(f,x) or not has (f,y) then error "%1 must have both variables %2,%3",F,x,y elif has(evala(Content(f,x)),y) or has(evala(Content(f,y)),x) then error "%1 is reducible",F elif nargs<6 or not type(args[6],list) then p,g:=find_a_point(f,x,y); if g<>2 then d:=degree_ext(p,[args]); if d>1 then # Try to find a better point. P:=find_a_point(f,y,x)[1]; D:=degree_ext(P,[args]); if D