Example of representing elements of the Stanley-Reisner ring with a system of parameters.

> with(linalg):

The polytope is a bipyramid with five vertices. p2 and p4 are the apices. A shelling order of the facets is 123, 125, 235, 134, 145, 345.

> p1:=[0,0,-1]; p2:=[2,0,1]; p3:=[0,1/2,1/2]; p4:=[-2,0,1]; p5:=[0,-1/2,1/2];

p1 := [0, 0, -1]

p2 := [2, 0, 1]

p3 := [0, 1/2, 1/2]

p4 := [-2, 0, 1]

p5 := [0, -1/2, 1/2]

Construct the theta matrix

> A:=transpose(array([p1,p2,p3,p4,p5]));

A := matrix([[0, 2, 0, -2, 0], [0, 0, 1/2, 0, -1/2]...

> theta:=multiply(A,[x1,x2,x3,x4,x5]);

theta := vector([2*x2-2*x4, 1/2*x3-1/2*x5, -x1+x2+1...

Let's represent watch how the representation of x1^3 changes as the polytope is shelled. At first we only have facet 123.

> B:=inverse(submatrix(A,1..3,1..3)); A1:=multiply(B,A);

B := matrix([[1/2, 1, -1], [1/2, 0, 0], [0, 2, 0]])...

A1 := matrix([[1, 0, 0, -2, -1], [0, 1, 0, -1, 0], ...

> u:=multiply(B,[t1,t2,t3]);

u := vector([1/2*t1+t2-t3, 1/2*t1, 2*t2])

> q1:=u->u[1]^3;

q1 := proc (u) options operator, arrow; u[1]^3 end ...

> r1:=expand(q1(u));

r1 := 1/8*t1^3+3/4*t1^2*t2-3/4*t1^2*t3+3/2*t1*t2^2-...

> p1:=(t1,t2,t3)->1/8*t1^3+3/4*t1^2*t2-3/4*t1^2*t3+3/2*t1*t2^2-3*t1*t2*t3+3/2*t1*t3^2+t2^3-3*t2^2*t3+3*t2*t3^2-t3^3;

p1 := proc (t1, t2, t3) options operator, arrow; 1/...

> eta1:=1;

eta1 := 1

> expand(p1(theta[1],theta[2],theta[3]))*eta1;

-8*x4^3+12*x4*x5*x1-x5^3+x1^3-12*x4^2*x5+12*x4^2*x1...

Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1.

Now assume we have facets 123 and 125. The minimal new face is 5, so some terms that contain x5 are no longer considered zero.

> eta2:=x5;

eta2 := x5

> B:=inverse(submatrix(A,1..3,[1,2,5])); A1:=multiply(B,A);

B := matrix([[1/2, -1, -1], [1/2, 0, 0], [0, -2, 0]...

A1 := matrix([[1, 0, -1, -2, 0], [0, 1, 0, -1, 0], ...

> u:=multiply(B,[t1,t2,t3]);

u := vector([1/2*t1-t2-t3, 1/2*t1, -2*t2])

> q2:=u->-u[3]^2+3*u[1]*u[3]-3*u[1]^2;

q2 := proc (u) options operator, arrow; -u[3]^2+3*u...

> r2:=expand(q2(u));

r2 := -t2^2-3/4*t1^2+3*t1*t3-3*t3^2

> p2:=(t1,t2,t3)->-(-t2^2-3/4*t1^2+3*t1*t3-3*t3^2);

p2 := proc (t1, t2, t3) options operator, arrow; t2...

> expand(p1(theta[1],theta[2],theta[3])*eta1 + p2(theta[1],theta[2],theta[3])*eta2);

6*x4*x3*x5-8*x4^3-3*x3*x5*x1+x1^3+12*x4^2*x1-6*x4*x...

Remember we only have facets 123 and 125. Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1+p2*x5.

Now assume we have facets 123, 125 and 235. The minimal new face is 35, so some terms that contain x3x5 are no longer considered zero.

> eta3:=x3*x5;

eta3 := x3*x5

> B:=inverse(submatrix(A,1..3,[2,3,5])); A1:=multiply(B,A);

B := matrix([[1/2, 0, 0], [-1/2, 1, 1], [-1/2, -1, ...

A1 := matrix([[0, 1, 0, -1, 0], [-1, 0, 1, 2, 0], [...

> u:=multiply(B,[t1,t2,t3]);

u := vector([1/2*t1, -1/2*t1+t2+t3, -1/2*t1-t2+t3])...

> q3:=u->u[3]+u[2];

q3 := proc (u) options operator, arrow; u[3]+u[2] e...

> r3:=expand(q3(u));

r3 := -t1+2*t3

> p3:=(t1,t2,t3)->-(-t1+2*t3);

p3 := proc (t1, t2, t3) options operator, arrow; t1...

> expand(p1(theta[1],theta[2],theta[3])*eta1 + p2(theta[1],theta[2],theta[3])*eta2 + p3(theta[1],theta[2],theta[3])*eta3);

2*x4*x3*x5-8*x4^3-x3*x5*x1+x1^3+12*x4^2*x1-6*x4*x1^...

Remember we only have facets 123, 125 and 235. Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1+p2*x5+p3*x3x5.

Now assume we have facets 123, 125, 235 and 134. The minimal new face is 4, so some terms that contain x4 are no longer considered zero.

> eta4:=x4;

eta4 := x4

> B:=inverse(submatrix(A,1..3,[1,3,4])); A1:=multiply(B,A);

B := matrix([[-1/2, 1, -1], [0, 2, 0], [-1/2, 0, 0]...

A1 := matrix([[1, -2, 0, 0, -1], [0, 0, 1, 0, -1], ...

> u:=multiply(B,[t1,t2,t3]);

u := vector([-1/2*t1+t2-t3, 2*t2, -1/2*t1])

> q4:=u->-8*u[3]^2+12*u[1]*u[3]-6*u[1]^2;

q4 := proc (u) options operator, arrow; -8*u[3]^2+1...

> r4:=expand(q4(u));

r4 := -1/2*t1^2-6*t2^2+12*t2*t3-6*t3^2

> p4:=(t1,t2,t3)->-(-1/2*t1^2-6*t2^2+12*t2*t3-6*t3^2);

p4 := proc (t1, t2, t3) options operator, arrow; 1/...

> expand(p1(theta[1],theta[2],theta[3])*eta1 + p2(theta[1],theta[2],theta[3])*eta2 + p3(theta[1],theta[2],theta[3])*eta3 + p4(theta[1],theta[2],theta[3])*eta4);

2*x4*x3*x5-12*x4*x5*x1-12*x2*x4*x1+12*x2*x4*x5-x3*x...

Remember we only have facets 123, 125, 235 and 134. Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1+p2*x5+p3*x3x5+p4*x4.

Now assume we have facets 123, 125, 235, 134 and 145. The minimal new face is 45, so some terms that contain x4x5 are no longer considered zero.

> eta5:=x4*x5;

eta5 := x4*x5

> B:=inverse(submatrix(A,1..3,[1,4,5])); A1:=multiply(B,A);

B := matrix([[-1/2, -1, -1], [-1/2, 0, 0], [0, -2, ...

A1 := matrix([[1, -2, -1, 0, 0], [0, -1, 0, 1, 0], ...

> u:=multiply(B,[t1,t2,t3]);

u := vector([-1/2*t1-t2-t3, -1/2*t1, -2*t2])

> q5:=u->-12*u[1]+12*u[2]+6*u[3];

q5 := proc (u) options operator, arrow; -12*u[1]+12...

> r5:=expand(q5(u));

r5 := 12*t3

> p5:=(t1,t2,t3)->-(12*t3);

p5 := proc (t1, t2, t3) options operator, arrow; -1...

> expand(p1(theta[1],theta[2],theta[3])*eta1 + p2(theta[1],theta[2],theta[3])*eta2 + p3(theta[1],theta[2],theta[3])*eta3 + p4(theta[1],theta[2],theta[3])*eta4 + p5(theta[1],theta[2],theta[3])*eta5);

-4*x4*x3*x5-12*x2*x4*x1-x3*x5*x1+x1^3+8*x2*x4^2+8*x...

Remember we only have facets 123, 125, 235, 134 and 145. Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1+p2*x5+p3*x3x5+p4*x4+p5*x4x5.

Now assume we have facets 123, 125, 235, 134,145 and 345. The minimal new face is 345, so some terms that contain x3x4x5 are no longer considered zero.

> eta6:=x3*x4*x5;

eta6 := x4*x3*x5

> B:=inverse(submatrix(A,1..3,[3,4,5])); A1:=multiply(B,A);

B := matrix([[1/2, 1, 1], [-1/2, 0, 0], [1/2, -1, 1...

A1 := matrix([[-1, 2, 1, 0, 0], [0, -1, 0, 1, 0], [...

> u:=multiply(B,[t1,t2,t3]);

u := vector([1/2*t1+t2+t3, -1/2*t1, 1/2*t1-t2+t3])

> q6:=u->-4;

q6 := -4

> r6:=expand(q6(u));

r6 := -4

> p6:=(t1,t2,t3)->4;

p6 := 4

> expand(p1(theta[1],theta[2],theta[3])*eta1 + p2(theta[1],theta[2],theta[3])*eta2 + p3(theta[1],theta[2],theta[3])*eta3 + p4(theta[1],theta[2],theta[3])*eta4 + p5(theta[1],theta[2],theta[3])*eta5 + p6(theta[1],theta[2],theta[3])*eta6);

-12*x2*x4*x1-x3*x5*x1+x1^3+8*x2*x4^2+8*x2^2*x4

Remember we only have facets 123, 125, 235, 134, 145 and 345. Note that all terms are supported by nonfaces except x1^3, so these are regarded as zero.

So x1^3=p1*1+p2*x5+p3*x3x5+p4*x4+p5*x4x5+p6*x3x4x5.

>