# $Source: /u/maple/research/lib/DEtools/src/RCS/gen_exp,v $ # $Notify: mvanhoei@daisy.uwaterloo.ca $ # The purpose of this file is to do the type checking and conversions # for `DEtools/diffop/gen_exp` macro( x=`DEtools/diffop/x`, DF=`DEtools/diffop/DF`, gen_exp=`DEtools/diffop/gen_exp` ): # Both for operator and equation syntax. # args[4..nargs] are options of the form x=point and such. `DEtools/gen_exp`:=proc(L,d,T) global x,DF; local a,p,rt,g; option `Copyright (c) 1997 Waterloo Maple Inc. All rights reserved. Author: M. van Hoeij`; a:=[args]; if indets(a,{radical,nonreal})<>{} then g := radfield(indets(a,{radical,nonreal})); return eval(subs(g[2],procname(op(eval(subs(g[1],a)))))) fi; if type(d,function) then return procname(`DEtools/de2diffop`(L,d,[DF,op(d)]), [DF,op(d)],args[3..nargs]) elif not(type(d,list)) then if d=_Envdiffopdomain then error "differential algebra not specified" else return procname(L,_Envdiffopdomain,args[2..nargs]) fi fi; if not type(T,'name') then error "A variable name must be given in the input" fi; _Envdiffopdomain:=d; # for the userinfo's in diffop. a:=[args[4..nargs]]; p:=0; hasoption(a,d[2],'p','a'); # point is given by x=point rt:={}; # restrict_to = subset of {minimal,integer,ramification1,rational} hasoption(a,'restrict_to','rt','a'); g:=NULL; hasoption(a,'groundfield','g','a'); if a<>[] then error "wrong arguments" fi; subs(x=`if`(p=infinity,1/d[2],d[2]-p),DF=T, gen_exp(subs(d[1]=DF,d[2]=x,L),p,DF,op(rt),g)) end: #savelib('`DEtools/gen_exp`'):