Home Online Manual
Back: polymakePolytope
Forward: newtonPolytopeLP
Up: polymake_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.2.2 newtonPolytopeP

Procedure from library polymake.lib (see polymake_lib).

newtonPolytopeP(f); f poly

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 matrix of type bigintmat 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

- 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 complement 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.polymake.org/

LIB "polymake.lib";
==> Welcome to polymake version
==> Copyright (c) 1997-2015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
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);
==> polymake: used package ppl
==>   The Parma Polyhedra Library (PPL): A C++ library for convex polyhedra
==>   and other numerical abstractions.
==>   http://www.cs.unipr.it/ppl/
// the vertices of the Newton polytope are:
==> 0,0,0,
==> 2,0,0,
==> 0,3,0,
==> 0,0,2
// its dimension is
==> 3
// 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
==> 2,3,4
// the Newton polytope of f is
// the vertices of the Newton polytope are:
==> 2,0,0,
==> 0,3,0
// its dimension is
==> 1
// the Newton polytope is contained in the affine space given
//     by the equations
==> _[1,1]=-3x-2y+6
==> _[2,1]=z