The command "toTropicalPolynomial" tropicalizes x1 to x_0 and x2 to x_1:

Code: Select all

```
tropical > $g = toTropicalPolynomial("max(x1,x2,0)");
tropical > print $g;
x_0 + x_1 + 0
```

How can I tropicalize a polynomial g(x1,x2) in a polynomial ring K[x0,x1,x2]? I have two polynomials f(x0,x1) and g(x1,x2) in K[x0,x1,x2] and want to visualize the intersection of their hypersurfaces in R^3.

The command "toTropicalPolynomial" tropicalizes x1 to x_0 and x2 to x_1:
thanks in advance, Yue.

The command "toTropicalPolynomial" tropicalizes x1 to x_0 and x2 to x_1:

Code: Select all

```
tropical > $g = toTropicalPolynomial("max(x1,x2,0)");
tropical > print $g;
x_0 + x_1 + 0
```

Oops, the solution is quite apparent:

Code: Select all

`$g = toTropicalPolynomial("max(x1,x2,0+0*x0)");`

toTropicalPolynomial can be called with an explicit list of variable names, in your case it would be:
Pressing F1 in the polymake shell (after having typed in the function name) would reveal this trick to you fully free of charge.

Code: Select all

` toTropicalPolynomial("max(x1,x2)", qw(x0 x1 x2));`

Recall that polymake employs homogeneous polynomials for defining tropical hypersurfaces!

Powered by phpBB® Forum Software © phpBB Limited