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];**

Construct the theta matrix

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

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

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);**

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

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

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

`> `
**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;**

`> `
**eta1:=1;**

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

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;**

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

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

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

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

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

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

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;**

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

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

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

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

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

`> `
**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);**

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;**

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

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

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

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

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

`> `
**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);**

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;**

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

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

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

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

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

`> `
**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);**

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;**

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

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

`> `
**q6:=u->-4;**

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

`> `
**p6:=(t1,t2,t3)->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);**

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.

`> `