Help:=proc():print(`IsPos(f,x,K),Sam(f,x,w,K)`):end: #IsPos(f,x,K): inputs a function of the #list of variables x, and a pos. integer K #outputs true iff all the Taylor coeff. up #to K are non-negative IsPos:=proc(f,x,K) local g,i,S: g:=mtaylor(f,x,K): S:={}: for i from 1 to nops(g) do S:=S union {subs({seq(x[i]=1,i=1..nops(x))}, op(i,g))}: od: evalb(min(op(S)) >=0): end: #Sam(f,x,w,K): inputs a function of the #of list of variables z, and w and a pos. integer K #outputs true iff all the Taylor coeff. up #to K are non-negative #Here f is a f.p.s in z with coeff. that #are Laurent polynomials in w Sam:=proc(f,x,w,K) local g,i,S,S1,T,j,i1,t: g:=mtaylor(f,x,K): S:={}: for i from 1 to nops(g) do S:=S union {subs({seq(x[i1]=1,i1=1..nops(x))}, op(i,g))}: od: S:=expand(S): {seq(coeffs(S[i],w),i=1..nops(S))}: end: