 LIB "involut.lib";
ring R = 0,(x,d),dp;
def r = nc_algebra(1,1); setring r; // WeylAlgebra
map F = r,x,d;
F(F); // should be maxideal(1) for an involution
==> _[1]=x
==> _[2]=d
poly f = x*d^2+d;
poly If = involution(f,F);
fIf;
==> 0
poly g = x^2*d+2*x*d+3*x+7*d;
poly tg = d*x^22*d*x+3*x7*d;
poly Ig = involution(g,F);
tgIg;
==> 0
ideal I = f,g;
ideal II = involution(I,F);
II;
==> II[1]=xd2+d
==> II[2]=x2d2xd+x7d2
matrix(I)  involution(II,F);
==> _[1,1]=0
==> _[1,2]=0
module M = [f,g,0],[g,0,x^2*d];
module IM = involution(M,F);
print(IM);
==> xd2+d, x2d2xd+x7d2,
==> x2d2xd+x7d2,0,
==> 0, x2d2x
print(matrix(M)  involution(IM,F));
==> 0,0,
==> 0,0,
==> 0,0
