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, ideal, polytope, topaz

User Functions

•

Basic properties

UNDOCUMENTED
•
evaluate (H, x) → Rational

Return value of a tropical polynomial at a given point.

Parameters
 Hypersurface H Vector x
Returns
 Rational
•
evaluate (H, X) → Vector<Rational>

Return values of a tropical polynomial at a collection of points.

Parameters
 Hypersurface H Matrix X
Returns
 Vector
•

Constructing a polyhedral complex

UNDOCUMENTED
•
tropical_complex (points) → PolyhedralComplex

Computes the tropical complex of points.

Parameters
 Matrix points
Returns
 PolyhedralComplex
•
tropical_intersection (pc1, pc2) → fan::PolyhedralComplex

Computes the intersection of two polyhedral complexes.

Parameters
 fan::PolyhedralComplex pc1 fan::PolyhedralComplex pc2
Returns
 fan::PolyhedralComplex
•

Other

UNDOCUMENTED
•
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.

Parameters
 Array T Set I Integer n
Returns
 Set
•
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

Parameters
 Matrix points Matrix generators
Returns
 Array< Array>
•
discard_non_vertices (points) → Matrix

Given points in the tropical projective space, discard all the non-vertices of the tropical convex hull.

Parameters
 Matrix points
Returns
 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
•
lifted_pluecker (V)

Compute tropical Pluecker vector from matrix representing points in tropical torus. Can be used to lift regular subdivision of ordinary product of simplices to matroid decomposition of hypersimplices.

Parameters
 Matrix V
•
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.
Parameters
 TropicalPolytope P Vector point
Returns
 Vector
•
norm (vector) → Scalar

Calculates the tropical norm of a vector in the tropical torus which is the difference between the maximal and minimal coordinate in any coordinate representation of the vector.

Parameters
 Vector vector
Returns
 Scalar
•
points2hypersurface (points) → Hypersurface

Constructs a tropical hypersurface defined by the linear hypersurfaces associated to the points. If the points are part of a min-tropical polytope then the output is a max-tropical hypersurface, and conversely.

Parameters
 Matrix points
Returns
 Hypersurface
•
poly2trop (P) → TropicalPolytope

Takes an ordinary convex polytope and interprets it in tropical projective space.

Parameters
 Polytope P
Returns
 TropicalPolytope
•
pseudovertices2poly (T) → Polytope

Takes a tropical polytope T and interprets it in ordinary Euclidean space.

Parameters
 TropicalPolytope T
Returns
 Polytope
•
pseudovertices_float_coords (P) → Matrix<Float>

Return the pseudovertex coordinates dehomogenized and converted to Matrix<Float>; to be used as "Coord" for visualization.

Parameters
 TropicalPolytope P source object
Returns
 Matrix
•
tdet (matrix) → Scalar

tropical determinant of a matrix with respect to MIN

Parameters
 Matrix matrix
Returns
 Scalar
•
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.

Parameters
 TropicalPolytope T
Returns
 Polytope
•
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

Parameters
 Matrix points Matrix generators
Returns
 Array>
•

Others

UNDOCUMENTED
•
get_corners (input) → Matrix

Compute the corners of a tropical polytope given by its vertices. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.

Parameters
 Matrix input points
Returns
 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.

Parameters
 matroid::Matroid m Rational v value for the bases
Returns
 TropicalPolytope
•

Producing a new tropical polytope from another

UNDOCUMENTED
•
cornered_hull (T) → TropicalPolytope

Compute the cornered hull of a tropical polytope. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.

Parameters
 TropicalPolytope T
Returns
 TropicalPolytope
•
cornered_hull_poly (T) → Polytope

Compute the cornered hull of a tropical polytope. Cf. M. Joswig, arXiv:0809.4694v2, Lemma 17.

Parameters
 TropicalPolytope T
Returns
 Polytope
•
dualize (points, generators) → Matrix

Dualizes 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.

Parameters
 Matrix points Matrix generators
Returns
 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.

Parameters
 Scalar lambda TropicalPolytope P Scalar mu TropicalPolytope Q
Returns
 TropicalPolytope
•

Producing a tropical hypersurface from scratch

UNDOCUMENTED
•

Create a tropical hyperplane as object of type Hypersurface.

Parameters
 Vector coefs coefficients of tropical linear form
Returns
 Hypersurface
•

Producing from scratch

UNDOCUMENTED
•
cyclic (d, n) → TropicalPolytope

Produces a tropical cyclic d-polytope with n vertices. Cf. Josephine Yu & Florian Block, arXiv: math.MG/0503279.

Parameters
 int d the dimension int n the number of generators
Returns
 TropicalPolytope
•
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.

Parameters
 int k the number of -1 entries int d the dimension
Returns
 TropicalPolytope
•

Producing tropical hypersurface from others

UNDOCUMENTED
•
hypersurface_union (H1, H2, internal) → Hypersurface

UNDOCUMENTED
Parameters
 Hypersurface H1 Hypersurface H2 Bool internal default 1: both input hyperplanes lie in the same space
Returns
 Hypersurface H1 cup H2
•

Tropical convex hulls

UNDOCUMENTED
•
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 generators Array> Types the types of the generators Graph G
Returns
 Array 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.

Parameters
 TropicalPolytope T
Returns
 hash_set< Pair,Set > >
•

Tropical operations

Functions for tropical arithmetic

Property Types

•
Max

UNDOCUMENTED

•
Min

types for tropical addition