|
D.13.1.2 newtonPolytopeP
Procedure from library oldpolymake.lib (see oldpolymake_lib).
- Usage:
- newtonPolytopeP(f[,#]); f poly, # string
- Return:
- list L with four entries
L[1] : an integer matrix whose rows are the coordinates of vertices
of the Newton polytope of f
L[2] : the dimension of the Newton polytope of f
L[3] : a list whose ith entry explains to which vertices the
ith vertex of the Newton polytope is connected
-- i.e. L[3][i] is an integer vector and an entry k in
there means that the vertex L[1][i] is
connected to the vertex L[1][k]
L[4] : an integer matrix whose rows mulitplied by
(1,var(1),...,var(nvar)) give a linear system of equations
describing the affine hull of the Newton polytope, i.e. the
smallest affine space containing the Newton polytope
- Note:
- - if we replace the first column of L[4] by zeros, i.e. if we move
the affine hull to the origin, then we get the equations for the
orthogonal comploment of the linearity space of the normal fan dual
to the Newton polytope, i.e. we get the EQUATIONS that
we need as input for polymake when computing the normal fan
- 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.tu-berlin.de/polymake/
- the procedure creates the file /tmp/newtonPolytope.polymake which
contains the polytope in polymake format and which can be used for
further computations with polymake
- moreover, the procedure creates the file /tmp/newtonPolytope.output
and deletes it again before ending
- it is possible to give as an optional second argument a string
which then will be used instead of 'newtonPolytope' in the name of
the polymake output file
Example:
| LIB "oldpolymake.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 vertices of the Newton polytope are:
np[1];
// its dimension is
np[2];
// np[3] contains information how the vertices are connected to each other,
// e.g. the first vertex (number 0) is connected to the second, third and
// fourth vertex
np[3][1];
//////////////////////////
f=x2-y3;
// the Newton polytope of f is
np=newtonPolytopeP(f);
// the vertices of the Newton polytope are:
np[1];
// its dimension is
np[2];
// the Newton polytope is contained in the affine space given
// by the equations
np[4]*M;
|
|