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:

```
./configure
make
make install
```

You can also install it with the package manager OPAM:

```
opam install tplib
```

The main operations which TPLib provides are:

- conversion between external representations (with half-spaces) and internal representations (with vertices/rays), see (Allamigeon, Gaubert, & Goubault, 2013)
- computing the minimal external representation, see (Allamigeon & Katz, 2013)
- computing the polyhedral complex associated with the polytope, see (Develin & Sturmfels, 2004)

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

```
[-oo,2,-1,4,-oo,2,2,-oo,4,2]
[1,-oo,4,5,4,-oo,4,-oo,5,4]
```

encode the following two inequalities over :

- Allamigeon, X., Gaubert, S. & Goubault, E. (2013).
**Computing the Vertices of Tropical Polyhedra using Directed Hypergraphs**.*Discrete & Computational Geometry*,*49*(2), 247–279. - Allamigeon, X. & Katz, R. D. (2013).
**Minimal external representations of tropical polyhedra**.*Journal of Combinatorial Theory, Series A*,*120*(4), 907–940. - Develin, M. & Sturmfels, B. (2004).
**Tropical convexity**.*Documenta Mathematica*,*9*, 1–27.