This is a matter of linear algebra. The projection is simply done
by multiplication with a suitable projection matrix.
(Recall a projection matrix P is defined by resp. satisfies P^2 = P.)
Code:
// your example:
> ring r=0,(x,y,z),ds;
> ideal i=x2,xy,z4;
> module M=syz(i);
> print(M);
-y,-z4,0,
x, 0, -z4,
0, x2, xy
// Now define the projection matrix
> matrix P = freemodule(3); // 3 x 3 unit matrix
> P[3,3] = 0; // kernel is e_3, and identity on e_1,e_2
> print(P);
1,0,0,
0,1,0,
0,0,0
> module PM = P*M; // the projected module
> print(PM); // this is what you wish to get
-y,-z4,0,
x, 0, -z4,
0, 0, 0