F = gfanTropicalFunction(f)
This method tropicalizes a polynomial. The output is a piecewise linear function given in the form of a polyhedral fan.
For example, the tropicalization of $x*y + z^2$ is max$(x+y, 2z)$.


To evaluate the tropical function at a point $p$, as given by the polyhedral data above, we write it a linear combination of the appropriate ray and lineality vectors. The coefficients used are then combined in a linear combination with the given ray values.
For instance the point $p = (1, 7, 13)$ can be written as $3(1,1,2) + 2(2,0,1) + 5(0,2,1)$. The values on the these rays are $4, 2$ and $2$ respectively. Thus the tropical function evaluated at $p$ is $3*4 + 2*2 + 5*2 = 26$.
gfan Documentation
This program takes a polynomial and tropicalizes it. The output is piecewise linear function represented by a fan whose cones are the linear regions. Each ray of the fan gets the value of the tropical function assigned to it. In other words this program computes the normal fan of the Newton polytope of the input polynomial with additional information.Options:
exponents:
Tell program to read a list of exponent vectors instead.
The object gfanTropicalFunction is a method function with options.