
D.13.1.4 normalFanL
Procedure from library polymake.lib (see polymake_lib).
 Usage:
 normalFanL (vert,aff,graph,rays,[,#]); vert,aff intmat, graph list, rays int, # string
 Assume:
  vert is an integer matrix whose rows are the coordinate of
the vertices of a convex lattice polytope;
 aff describes the affine hull of this polytope, i.e.
the smallest affine space containing it, in the following sense:
denote by n the number of columns of vert, then multiply aff by
(1,x(1),...,x(n)) and set the resulting terms to zero in order to
get the equations for the affine hull;
 the ith entry of graph is an integer vector describing to which
vertices the ith vertex is connected, i.e. a k as entry means that
the vertex vert[i] is connected to vert[k];
 the integer rays is either one (if the extreme rays should be
computed) or zero (otherwise)
 Return:
 list, the ith entry of L[1] contains information about the cone in the
normal fan dual to the ith vertex of the polytope
L[1][i][1] = integer matrix representing the inequalities which
describe the cone dual to the ith vertex
L[1][i][2] = a list which contains the inequalities represented
by L[i][1] as a list of strings, where we use the
variables x(1),...,x(n)
L[1][i][3] = only present if 'er' is set to 1; in that case it is
an interger matrix whose rows are the extreme rays
of the cone
L[2] = is an integer matrix whose rows span the linearity space
of the fan, i.e. the linear space which is contained in
each cone
 Note:
  the procedure calls for its computation polymake by Ewgenij Gawrilow,
TU Berlin and Michael Joswig, so it only works if polymake is
installed;
see http://www.math.tuberlin.de/polymake/
 in the optional argument # it is possible to hand over other names
for the variables to be used  be careful, the format must be correct
and that is not tested, e.g. if you want the variable names to be
u00,u10,u01,u11 then you must hand over the string u11,u10,u01,u11
Example:
 LIB "polymake.lib";
ring r=0,(x,y,z),dp;
matrix M[4][1]=1,x,y,z;
poly f=y3+x2+xy+2xz+yz+z2+1;
// the Newton polytope of f is
list np=newtonPolytopeP(f);
// the Groebner fan of f, i.e. the normal fan of the Newton polytope
list gf=normalFanL(np[1],np[4],np[3],1,"x,y,z");
// the number of cones in the Groebner fan of f is:
size(gf[1]);
// the inequalities of the first cone as matrix are:
print(gf[1][1][1]);
// the inequalities of the first cone as string are:
print(gf[1][1][2]);
// the rows of the following matrix are the extreme rays of the first cone:
print(gf[1][1][3]);
// each cone contains the linearity space spanned by:
print(gf[2]);

