# $Source: /u/maple/research/lib/LREtools/src/RCS/p_curv,v $ # $Notify: mvanhoei@daisy.uwaterloo.ca macro( p_curv=`LREtools/p_curv`, co=`LREtools/p_curv/co`, AFactor=`LREtools/p_curv/AFactor`, order1=`LREtools/p_curv/order1` ): # Compute the factors of the characteristic polynomial of # the p-curvature of a difference operator. # # Mark van Hoeij, 1998. # L in C[x,tau] # args[5..-1] can be used to specify additional field extensions. # # If p=list of primes then just check if an order1 factor could # exist, then the output is true/false. # # If p=prime then compute the characteristic polynomial of the # p-curvature and factor it over the algebraic closure. p_curv:=proc(L,x,tau,p) local M,N,n,i,c,b,F; option `Copyright (c) 1998 Waterloo Maple Inc. All rights reserved.`; if type(p,list) then for i in p do M:=traperror(procname(L,x,tau,i,'test')); if M=false then return M fi; od; return true fi; M:=ReduceField([L,indets([args],{'RootOf','radical','nonreal'})] ,indets([args[2..-1]],'name')) mod p; M, F:=Primpart(M[1],tau) mod p, indets(M,'RootOf'); if args[-1]='test' and degree(M,tau)0,[tau-infinity,1,n],NULL),seq([i[1],1,i[2]],i=C1), seq(seq([j,degree(i[1],tau),i[2],i[1]],j=i[3]),i=C)] end: # If a polynomial in 2 variables is a product of factors of deg 1 in tau, # and irreducible over the base field, then factor it over closure of # the base field. AFactor:=proc(f,x,tau,p) local i,n,R,S; option `Copyright (c) 1998 Waterloo Maple Inc. All rights reserved.`; n:=degree(f,tau); if n=1 or {seq(irem(degree(f,i),n),i=[x,{x,tau}])}<>{0} or member(1 ,{seq(irem(i[2],2),i=(Sqrfree(Discrim(f,tau) mod p) mod p)[2])}) then R:=f # f is not a product of deg 1 factors. elif args[-1]='test' then # Just check if a 1st order factor could exist, which is # the case. R:=tau$n else R:=op(indets(f,'RootOf')); if R=NULL then R:=RootOf(Randprime(n,x) mod p) mod p; R:=seq(i[1],i=(Factors(f,R) mod p)[2]) else S:=RootOf(Randprime(n*degree(op(1,R),_Z),x) mod p) mod p; R:=seq(i[1],i=(Factors(subs(R=(Roots(subs(_Z=x,op(1,R)) ,S) mod p)[1][1],f),S) mod p)[2]) fi fi; [seq(collect(i/lcoeff(i,tau),tau,Normal) mod p,i=[R])] end: #savelib('order1','AFactor','p_curv','co','`LREtools/p_curv.m`'):