|
D.13.2.2 newtonPolytopeP
Procedure from library polymake.lib (see polymake_lib).
- Usage:
- newtonPolytopeP(f); f poly
- 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 matrix of type bigintmat whose rows multiplied 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 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/
Example:
| 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:
np[1];
==> 0,0,0,
==> 2,0,0,
==> 0,3,0,
==> 0,0,2
// its dimension is
np[2];
==> 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
np[3][1];
==> 2,3,4
//////////////////////////
f=x2-y3;
// the Newton polytope of f is
np=newtonPolytopeP(f);
// the vertices of the Newton polytope are:
np[1];
==> 2,0,0,
==> 0,3,0
// its dimension is
np[2];
==> 1
// the Newton polytope is contained in the affine space given
// by the equations
intmat(np[4])*M;
==> _[1,1]=-3x-2y+6
==> _[2,1]=z
|
|