Page 1 of 1

tropicalizing a polynomial g(x1,x2) in K[x0,x1,x2]

Posted: 11 Nov 2017, 08:04
by ren
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:

Code: Select all

tropical > $g = toTropicalPolynomial("max(x1,x2,0)"); tropical > print $g; x_0 + x_1 + 0
thanks in advance, Yue.

Re: tropicalizing a polynomial g(x1,x2) in K[x0,x1,x2]

Posted: 11 Nov 2017, 09:51
by ren
Oops, the solution is quite apparent:

Code: Select all

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

Re: tropicalizing a polynomial g(x1,x2) in K[x0,x1,x2]

Posted: 11 Nov 2017, 18:48
by gawrilow
toTropicalPolynomial can be called with an explicit list of variable names, in your case it would be:

Code: Select all

toTropicalPolynomial("max(x1,x2)", qw(x0 x1 x2));
Pressing F1 in the polymake shell (after having typed in the function name) would reveal this trick to you fully free of charge.

Re: tropicalizing a polynomial g(x1,x2) in K[x0,x1,x2]

Posted: 13 Nov 2017, 09:45
by joswig
Recall that polymake employs homogeneous polynomials for defining tropical hypersurfaces!