# $Source: /u/maple/research/lib/DEtools/src/RCS/DFactor,v $ # $Notify: mvanhoei@daisy.uwaterloo.ca $ macro( RAD={radical,nonreal}, DF=`DEtools/diffop/DF`, x=`DEtools/diffop/x`, DFactorLCLM=`DEtools/diffop/DFactorLCLM`, DFactor=`DEtools/diffop/DFactor` ): # Input a differential operator L # Output: a factorization `DEtools/DFactor`:=proc(L,domain) local d,v; option `Copyright (c) 1997 Waterloo Maple Inc. All rights reserved. Author: M. van Hoeij`; d:=[args]; v := indets(d,RAD); if v<>{} then v := radfield(v); return eval(subs(v[2],procname(op(eval(subs(v[1],d)))))) fi; d:=`if`(nargs>1 and type(domain,list),domain,_Envdiffopdomain); if nops(d)<>2 then error "differential algebra not specified" fi; _Envdiffopdomain:=d; # for the userinfo's in diffop. _Envdiffopwarnings:=true; # if message really urgent then give it. # call the DFactor code map(sort,subs(DF=d[1],x=d[2], DFactor(subs(d[1]=DF,d[2]=x,L),args[2..nargs])),d[1]) end: #savelib('`DEtools/DFactor`'): # Input a differential operator L # Output: an LCLM factorization `DEtools/DFactorLCLM`:=proc(L,domain) local d,v; option `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved. Author: M. van Hoeij`; d:=[args]; v := indets(d,RAD); if v<>{} then v := radfield(v); v := eval(subs(v[2],procname(op(eval(subs(v[1],d)))))) else v:=indets(d,RootOf); d:=`if`(nargs>1 and type(domain,list),domain,_Envdiffopdomain); if nops(d)<>2 then error "differential algebra not specified" fi; _Envdiffopdomain:=d; # for the userinfo's in diffop. v:=map(sort,subs(DF=d[1],x=d[2],map(`DEtools/diffop/index_them`, DFactorLCLM(subs(d[1]=DF,d[2]=x,L),v),v)),d[1]) fi; if not has([args],RootOf) then v:=convert(v,radical) fi; v end: # Replace the RootOf's that don't occur in A by indexed RootOf's. `DEtools/diffop/index_them`:=proc(i,A) local j,v,k; option `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved.`; v:=indets(i,RootOf) minus indets(A,RootOf); v:={seq(`if`(has(j,index),NULL,j),j=v)}; if v={} then i else v:=v minus indets(map(op,v),RootOf); v:=v[1]; seq(procname(subs(v=RootOf(op(v),index=j),i),A) ,j=1..degree(`DEtools/diffop/subs_Z`(op(1,v),k),k)) fi end: #savelib('`DEtools/DFactorLCLM`','`DEtools/diffop/index_them`'):