| LIB "jacobson.lib";
ring r = 0,(x,d),Dp;
def R = nc_algebra(1,1); setring R; // the 1st Weyl algebra
matrix m[2][2] = d,x,0,d; print(m);
==> d,x,
==> 0,d
list J = jacobson(m); // returns a list with 3 entries
print(J[2]); // a Jacobson Form D for m
==> xd2-d,0,
==> 0, 1
print(J[1]*m*J[3] - J[2]); // check that U*M*V = D
==> 0,0,
==> 0,0
/* now, let us do the same for the shift algebra */
ring r2 = 0,(x,s),Dp;
def R2 = nc_algebra(1,s); setring R2; // the 1st shift algebra
matrix m[2][2] = s,x,0,s; print(m); // matrix of the same for as above
==> s,x,
==> 0,s
list J = jacobson(m);
print(J[2]); // a Jacobson Form D, quite different from above
==> xs2+s2,0,
==> 0, x
print(J[1]*m*J[3] - J[2]); // check that U*M*V = D
==> 0,0,
==> 0,0
|