 LIB "matrix.lib";
ring r=(0,a,b),(A,B,C),dp;
matrix m[6][8]=
0, 0, b*B, A,4C,2A,0, 0,
2C,4C,A,B, 0, B, 3B,AB,
0,a*A, 0, 0, B, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 2A,
0, 0, 0, 0, 0, 0, 2b, A,
0, 0, 0, 0, 0, 0, 0, 2a;"";
==>
print(rowred(m));"";
==> 0, 0, 0, 0, 1,0, 0,0,
==> 0, 0, 0, 0, 0,0, 1,0,
==> 0, 0, 0, 0, 0,0, 0,1,
==> 0, 0, (b)*B,A,0,2*A,0,0,
==> 2*C,4*C, A, B, 0,B, 0,0,
==> 0, (a)*A,0, 0, 0,0, 0,0
==>
list L=rowred(m,1);
print(L[1]);
==> 0, 0, 0, 0, 1,0, 0,0,
==> 0, 0, 0, 0, 0,0, 1,0,
==> 0, 0, 0, 0, 0,0, 0,1,
==> 0, 0, (b)*B,A,0,2*A,0,0,
==> 2*C,4*C, A, B, 0,B, 0,0,
==> 0, (a)*A,0, 0, 0,0, 0,0
print(L[2]);
==> 0,0,0,1/2, 0, 1/(2a)*A,
==> 0,0,0,0, 1/(2b), 1/(4ab)*A,
==> 0,0,0,0, 0, 1/(2a),
==> 1,0,0,2*C, 0, 2/(a)*AC,
==> 0,1,0,0, 3/(2b)*B,(2b+3)/(4ab)*AB,
==> 0,0,1,1/2*B,0, 1/(2a)*AB
