Home Online Manual
Top
Back: displayPuiseuxExpansion
Forward: drawTropicalCurve
FastBack:
FastForward:
Up: tropical_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.4.5 tropicalCurve

Procedure from library tropical.lib (see tropical_lib).

Usage:
tropicalCurve(tp[,#]); tp list, # optional list

Assume:
tp is list of linear polynomials of the form ax+by+c
with integers a, b and a rational number c representing a tropical Laurent polynomial defining a tropical plane curve; alternatively tp can be a polynomial in Q(t)[x,y] defining a tropical plane curve via the valuation map;
the basering must have a global monomial ordering,
two variables and up to one parameter!

Return:
list, each entry i=1,...,size(l)-1 corresponds to a vertex in the tropical plane curve defined by tp
l[i][1] = x-coordinate of the ith vertex
l[i][2] = y-coordinate of the ith vertex
l[i][3] = intmat, if j is an entry in the first row
of intmat then the ith vertex of
the tropical curve is connected to the
jth vertex with multiplicity given
by the corresponding entry in the second row
l[i][4] = list of lists, the first entry of a list is a primitive integer vector defining the direction
of an unbounded edge emerging from the ith vertex
of the graph, the corresponding second entry in
the list is the multiplicity of the unbounded edge
l[i][5] = a polynomial whose monomials mark the vertices in the Newton polygon corresponding to the entries
in tp which take the common minimum at the ith
vertex -- if some coefficient a or b of the
linear polynomials in the input was negative,
then each monomial has to be shifted by
the values in l[size(l)][3]
l[size(l)][1] = list, the entries describe the boundary points of the Newton subdivision
l[size(l)][2] = list, the entries are pairs of integer vectors defining an interior
edge of the Newton subdivision
l[size(l)][3] = intvec, the monmials occuring in l[i][5] have to be shifted by this vector
in order to represent marked
vertices in the Newton polygon

Note:
here the tropical polynomial is supposed to be the MINIMUM of the linear forms in tp, unless the optional input #[1] is the string 'max'

Example:
 
LIB "tropical.lib";
==> Welcome to polymake version
==> Copyright (c) 1997-2015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
ring r=(0,t),(x,y),dp;
poly f=t*(x7+y7+1)+1/t*(x4+y4+x2+y2+x3y+xy3)+1/t7*x2y2;
list graph=tropicalCurve(f);
// the tropical curve has size(graph)-1 vertices
size(graph)-1;
==> 7
// the coordinates of the first vertex are graph[1][1],graph[1][2];
graph[1][1],graph[1][2];
==> -8/3 -8/3
// the first vertex is connected to the vertices
//     graph[1][3][1,1..ncols(graph[1][3])]
intmat M=graph[1][3];
M[1,1..ncols(graph[1][3])];
==> 2 3
// the weights of the edges to these vertices are
//     graph[1][3][2,1..ncols(graph[1][3])]
M[2,1..ncols(graph[1][3])];
==> 1 1
// from the first vertex emerge size(graph[1][4]) unbounded edges
size(graph[1][4]);
==> 1
// the primitive integral direction vector of the first unbounded edge
//     of the first vertex
graph[1][4][1][1];
==> -1,-1
// the weight of the first unbounded edge of the first vertex
graph[1][4][1][2];
==> 7
// the monomials which are part of the Newton subdivision of the first vertex
graph[1][5];
==> x7+y7+x2y2
// connecting the points in graph[size(graph)][1] we get
//     the boundary of the Newton polytope
graph[size(graph)][1];
==> [1]:
==>    0,7
==> [2]:
==>    7,0
==> [3]:
==>    0,0
// an entry in graph[size(graph)][2] is a pair of points
//     in the Newton polytope bounding an inner edge
graph[size(graph)][2][1];
==> [1]:
==>    7,0
==> [2]:
==>    2,2