Procedure from library gaussman.lib (see gaussman_lib).
gaussman.lib
gmsnf(p,K); poly p, int K
basering returned by gmsring
list nf; ideal nf[1]; projection of p to <gmsbasis>C[[s]] mod s^(K+1) ideal nf[2]; p==nf[1]+nf[2]
computation can be continued by setting p=nf[2]
Example:
LIB "gaussman.lib"; ring R=0,(x,y),ds; poly t=x5+x2y2+y5; def G=gmsring(t,"s"); setring(G); list l0=gmsnf(gmspoly,0); print(l0[1]); → -1/2y5 list l1=gmsnf(gmspoly,1); print(l1[1]); → -1/2y5+1/2s list l=gmsnf(l0[2],1); print(l[1]); → 1/2s