| LIB "arr.lib";
ring r = 0,(x,y,z),lp;
arr A = x,y,z;
arrCoordChange(A,1,[0,0,1]); //lifts z-hyperplane by 1 unit
==> _[1]=x
==> _[2]=y
==> _[3]=z-1
==>
matrix T[2][2] = [0,1,1,0]; // swaps x and y
arrCoordChange(A,T);
==> _[1]=y
==> _[2]=x
==> _[3]=z
==>
matrix c[2][1] = [1,0];
T = concat(T,c); // now swap x and y and add 1 to x afterwards
arrCoordChange(A,T);
==> _[1]=y
==> _[2]=x-1
==> _[3]=z
==>
// Note how T doesn't even need to be a full 3x3 base change matrix.
|