TPLib (Tropical Polyhedra Library) is a library written in OCaml which allows to manipulate tropical polyhedra.

You can download it here and build it from source:

make install

You can also install it with the package manager OPAM:

opam install tplib

The main operations which TPLib provides are:

You can call these operations by using TPLib as a library, or directly from the command-line.


To compute the extreme rays of a tropical cone from a list of inequalities, call:

compute_ext_rays <dim> < my_inequalities

where <dim> stands for the dimension of the ambiant space, and my_inequalities is a file containing a set of inequalities. For instance, the list


encode the following two inequalities over :