application: tropical
This application concentrates on tropical hypersurfaces and tropical polytopes. It provides the functionality for the computation of basic properties. Visualization and various constructions are possible.
imports from: common, graph
uses: polytope, topaz
Objects
- TropicalHypersurface
A tropical hypersurface is the set of points in the tropical (d-1)-torus for which the minimum of a tropical polynomial is attained at least twice. It is given as a list of MONOMIALS and COEFFICIENTS. Currently polymake supports tropical hypersurfaces given by a homogeneous polynomial only!
Throughout this hypersurface is seen as a polyhedral complex in Rd-1.
Properties of TropicalHypersurface
- Basic propertiesCOEFFICIENTS: common::Vector<Scalar>
Coefficients of the (tropical) polynomial defining the hypersurface.
MONOMIALS: common::Matrix<Int>Monomials of the (tropical) polynomial defining the hypersurface (Laurent polynomials are allowed.) The rows stands for the monomials, the columns for the variables. I.e., the entry in position (i,j) is the exponent of xj in the i-th monomial.
User Methods of TropicalHypersurface
- Basic propertiesmin_attained (x) → Array
List the MONOMIALS for which the minimum is attained.
VERTICES ()Vertices of the hypersurface.
- VisualizationVISUAL () → Visual::TropicalHypersurface
Visualizes the tropical hypersurface.
Options
option list: Visual::Polygons::decorations Returns
Visual::TropicalHypersurface
Permutations of TropicalHypersurface
- MonomPermUNDOCUMENTED
Properties of MonomPerm
- PointsPermUNDOCUMENTED
Properties of PointsPerm
- TropicalPolytope
Tropical convex hull of finitely many points in the tropical (d-1)-torus, as introduced by Develin and Sturmfels. One construction is via the bounded subcomplex of an unbounded ordinary convex polyhedron.
Properties of TropicalPolytope
- Basic propertiesAMBIENT_DIM: common::Int
Dimension of the tropical projective space which contains the tropical polytope.
CONVEX_HULL_2D_CYCLIC: common::Array<Int>Cyclic order of the PSEUDOVERTICES in the boundary (for dimension 2 only).
ENVELOPE: polytope::Polytope<Scalar>Tropical polytopes have a natural description as the complex of bounded faces of their envelopes. This envelope depends on the choice of the POINTS that generate the tropical polytope.
POINTS: common::Matrix<Scalar>Input points in homogeneous coordinates. This is the fixed system of generators with respect to which many combinatorial properties are expressed.
PSEUDOVERTEX_COARSE_TYPES: common::Array<Array<Int>>Coarse types of PSEUDOVERTICES relative to POINTS.
PSEUDOVERTEX_LABELS: common::Array<String>Unique names assigned to the PSEUDOVERTICES. Can be used as "NodeLabels" in VISUAL_PLANAR.
VERTEX_LABELS: common::Array<String>Unique names assigned to the VERTICES. If specified, they are shown by visualization tools instead of vertex indices.
VERTICES: common::Matrix<Scalar>Vertices of the tropical convex hull in homogeneous coordinates: We normalize by setting the first homogeneous coordinate to zero.
- CombinatoricsPSEUDOVERTEX_GRAPH: graph::Graph<Undirected>
Tropical polytopes have a natural description as ordinary polytopal complexes. This is the 1-skeleton of such a complex.
User Methods of TropicalPolytope
- VisualizationVISUAL () → Visual::TropicalPolytope
Visualize the tropical polytope.
Options
option list: Visual::Polygons::decorations Returns
Visual::TropicalPolytope VISUAL_PLANAR () → Visual::TropicalPolytopeVisualize the tropical polytope projected onto the plane.
Options
Matrix Directions directions to project ontooption list: Visual::Graph::decorations Returns
Visual::TropicalPolytope VISUAL_PSEUDOVERTEX_GRAPH () → Visual::TropicalPolytopeVisualize the PSEUDOVERTEX_GRAPH of a tropical polytope.
Options
Int seed random seed value for the string embedderoption list: Visual::Graph::decorations Returns
Visual::TropicalPolytope
Permutations of TropicalPolytope
- PseudoVertexPermUNDOCUMENTED
Properties of PseudoVertexPerm
User Functions
- Othercoarse_types (points, generators) → Array< Array<int>>
Compute the coarse types of the points set relative to a set of generators. The following are two typical cases: (1) points = VERTICES and generators = VERTICES (2) points = POINTS and generators = PSEUDOVERTICES
discard_non_vertices (points) → MatrixGiven points in the tropical projective space, discard all the non-vertices of the tropical convex hull.
extract_pseudovertices (T, P)Get the pseudovertices of a tropical polytope T from the bounded subcomplex of the corresponding unbounded polyhedron P.
Parameters
TropicalPolytope T Polytope P nearest_point (P, point) → VectorCompute the nearest point of a point x in the tropical projective space onto a tropical polytope P. Cf.
Develin & Sturmfels math.MG/0308254v2, Proposition 9.points2hypersurface (points) → TropicalHypersurfaceConstructs a tropical hypersurface defined by the linear hypersurfaces associated to the points.
poly2trop (P) → TropicalPolytopeTakes an ordinary convex polytope and interprets it in tropical projective space.
pseudovertices2poly (T) → PolytopeTakes a tropical polytope T and interprets it in ordinary Euclidean space.
pseudovertices_float_coords (P) → Matrix<Float>Return the pseudovertex coordinates dehomogenized and converted to Matrix<Float>; to be used as "Coord" for visualization.
trop2poly (T) → PolytopeGiven points in the tropical projective space, compute an ordinary unbounded polyhedron such that the tropical convex hull of the input is the bounded subcomplex of the latter. Cf. Develin & Sturmfels math.MG/0308254v2, Lemma 22.
Warning: This client does not implement the reverse transformation to poly2trop.
types (points, generators) → Array<Array<Set>>Compute the fine types of the points set relative to a set of generators. The following are two typical cases: (1) points = VERTICES and generators = VERTICES (2) points = POINTS and generators = PSEUDOVERTICES
- Producing a new tropical polytope from anothercornered_hull (T) → TropicalPolytope
Compute the cornered hull of a tropical polytope. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.
dualize (points, generators) → MatrixDualizes a point set with respect to the generators of a tropical polytope. The points are dualized with respect to the (rows of the) matrix of the generators. Cf. Develin & Sturmfels, Tropical Convexity, Lemma 22.
minkowski_sum (lambda, P, mu, Q) → TropicalPolytopeProduces the tropical polytope lambda*P+mu*Q, where * and + are tropical scalar multiplication and tropical addition, respectively.
- Producing from scratchcyclic (d, n) → TropicalPolytope
Produces a tropical cyclic d-polytope with n vertices. Cf. Josephine Yu & Florian Block, arXiv: math.MG/0503279.
hypersimplex (k, d) → TropicalPolytopeProduce the tropical hypersimplex Δ(k,d). Cf. M. Joswig math/0312068v3, Ex. 2.10. The value of k defaults to 1, yielding a tropical standard simplex.
- Tropical convex hullsch2d_3phases (n, Types, G) → Array<int>
List the pseudovertices of a 2d tropical polytope on the boundary in counter-clockwise cyclic order.
Parameters
Int n the number of generatorsArray<Array<Set>> Types the types of the generatorsGraph G Returns
Array<int> the pseudovertices on the boundary

