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

User Functions

  •  
  •  
    •  
      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<Set>T
      SetI
      Integern
      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
      Matrixpoints
      Matrixgenerators
      Returns
      Array< Array<int>>
    •  
      discard_non_vertices (points) → Matrix

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

      Parameters
      Matrixpoints
      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
      TropicalPolytopeT
      PolytopeP
    •  
      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
      TropicalPolytopeP
      Vectorpoint
      Returns
      Vector
    •  
      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
      MatrixV
    •  
      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.

      Parameters
      PolytopeP
      Returns
      TropicalPolytope
    •  
      pseudovertices2poly (T) → Polytope

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

      Parameters
      TropicalPolytopeT
      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
      TropicalPolytopeP
      source object
      Returns
      Matrix<Float>
    •  
      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
      TropicalPolytopeT
      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
      Matrixpoints
      Matrixgenerators
      Returns
      Array<Array<Set>>
  •  
    •  
      get_corners (input) → Matrix

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

      Parameters
      Matrixinput
      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::Matroidm
      Rationalv
      value for the bases
      Returns
      TropicalPolytope
  •  
    •  
      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.

      Parameters
      TropicalPolytopeT
      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
      Matrixpoints
      Matrixgenerators
      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
      Scalarlambda
      TropicalPolytopeP
      Scalarmu
      TropicalPolytopeQ
      Returns
      TropicalPolytope
  •  
    •  
      cyclic (d, n) → TropicalPolytope

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

      Parameters
      intd
      the dimension
      intn
      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
      intk
      the number of -1 entries
      intd
      the dimension
      Returns
      TropicalPolytope
  •