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: fan, group, polytope, topaz
Objects
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
- COEFFICIENTS: common::Vector<Scalar>
Coefficients of the (tropical) polynomial defining the hypersurface.
- MONOMIALS: common::Matrix<Int, NonSymmetric>
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.
- POINTS: common::Matrix<Scalar, NonSymmetric>
Points and rays of the hypersurface, vertices of the complex.
User Methods of TropicalHypersurface
- min_attained (x) → Array
- VERTICES ()
Vertices of the hypersurface.
- VISUAL () → Visual::TropicalHypersurface
Visualizes the tropical hypersurface.
Options
option list: Visual::Polygons::decorations Returns
Visual::TropicalHypersurface
Permutations of TropicalHypersurface
- MonomPerm
UNDOCUMENTED
Properties of MonomPerm
- PointsPerm
UNDOCUMENTED
Properties of PointsPerm
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
- AMBIENT_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.
- HALF_SPACES: common::Array<Pair<Vector<Scalar>, Set<Int>>>
Tropical halfspaces encoded as pairs of apices and sets of sectors. Maybe redundant (for now; subject to change in the future).
- POINTS: common::Matrix<Scalar, NonSymmetric>
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, NonSymmetric>
Vertices of the tropical convex hull in homogeneous coordinates: We normalize by setting the first homogeneous coordinate to zero.
- PSEUDOVERTEX_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
- VISUAL () → Visual::TropicalPolytope
Visualize the tropical polytope.
Options
option list: Visual::Polygons::decorations Returns
Visual::TropicalPolytope - VISUAL_PLANAR () → Visual::TropicalPolytope
Visualize 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::TropicalPolytope
Visualize 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
- PseudoVertexPerm
UNDOCUMENTED
Properties of PseudoVertexPerm
User Functions
- tropical_complex (points) → PolyhedralComplex
- tropical_intersection (pc1, pc2) → fan::PolyhedralComplex
Computes the intersection of two polyhedral complexes.
- check_minimality (T, I, n) → Set
Checks the three criteria of Gaubert and Katz to be the type T of an apex of a minimal tropical halfspace. It is assumed that the points that the type refers to are given by 0,...,n-1 and that the index set I is a subset of 0,...,d-1 where d is the AMBIENT_DIM of the tropical polytope. If the input fulfills all criteria, the output set is empty. If the input doesn't fulfill the first criterion the whole set 0,...,d-1 is given back. If the input doesn't fulfill the second and third criterion, then the violating indices are stored.
- coarse_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) → Matrix
- 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) → Vector
Compute 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) → TropicalHypersurface
Constructs a tropical hypersurface defined by the linear hypersurfaces associated to the points.
- poly2trop (P) → TropicalPolytope
Takes an ordinary convex polytope and interprets it in tropical projective space.
- pseudovertices2poly (T) → Polytope
Takes 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) → Polytope
Given 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
- get_corners (input) → Matrix
- tropical_matroid_polytope (m, v) → TropicalPolytope
Produce the tropical matroid polytope from a matroid m. Each vertex corresponds to a basis of the matroid, the non-bases coordinates get value 0, the bases coordinates gets value v, default is -1.
- cornered_hull (T) → TropicalPolytope
Compute the cornered hull of a tropical polytope. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.
- cornered_hull_poly (T) → Polytope
Compute the cornered hull of a tropical polytope. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.
- dualize (points, generators) → Matrix
- minkowski_sum (lambda, P, mu, Q) → TropicalPolytope
Produces the tropical polytope lambda*P+mu*Q, where * and + are tropical scalar multiplication and tropical addition, respectively.
- cyclic (d, n) → TropicalPolytope
Produces a tropical cyclic d-polytope with n vertices. Cf. Josephine Yu & Florian Block, arXiv: math.MG/0503279.
- hypersimplex (k, d) → TropicalPolytope
Produce 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.
- ch2d_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 - minimal_tropical_halfspaces (T) → hash_set< Pair<Vector<Coord>,Set<Int> > >
Computes the minimal tropical halfspaces of a tropical polytope T.