Using Lawrence's formula to calculate the volume polynomial for the diamond with vertices (1,0), (2,1), (1,2), (0,1).
The facet inequalities are -x1-x2<=-1, x1-x2<=1, x1+x2<=3, -x1+x2<=1.
The tableaux P1, P2, P3, P4 below, are associated with vertices 1, 2, 3, 4, respectively.
Note that we chose to keep x1 and x2 basic in each tableau.
> with(linalg):
Warning, the protected names norm and trace have been redefined and unprotected
> T:=array([[-1,-1,1,0,0,0,b1], [1,-1,0,1,0,0,b2], [1,1,0,0,1,0,b3], [-1,1,0,0,0,1,b4], [-c1,-c2,-c3,0,0,0,0]]);
> mypivot:=(M,i,j)->pivot(mulrow(M,i,1/M[i,j]),i,j);
> T2:=mypivot(T,1,1);
> P1:=mypivot(T2,2,2);
> n1:=(1/2)*(1/2)*(P1[5,7]^2/(P1[5,3]*P1[5,4]));
> P2:=mypivot(P1,3,3);
> n2:=(1/2)*(1/2)*(P2[5,7]^2/(P2[5,4]*P2[5,5]));
> P3:=mypivot(P2,4,4);
> n3:=(1/2)*(1/2)*(P3[5,7]^2/(P3[5,5]*P3[5,6]));
> P4:=mypivot(P3,3,5);
> n4:=(1/2)*(1/2)*(P4[5,7]^2/(P4[5,3]*P4[5,6]));
> v:=simplify(n1+n2+n3+n4);
> v1:=factor(v);
>