Page 1 of 1

"ERROR: Cannot draw zero cycle at ... "

Posted: 21 Mar 2024, 16:21
by JensFischer
Hello, when trying to draw a tropical hypersurface based on the commands

Code: Select all

$quadric = toTropicalPolynomial("max(2*x,1+x+y,2+2*y,1+y+z,2*z,4)"); $TQuadric = new Hypersurface<Max>(POLYNOMIAL=>$quadric); $TQuadric->VISUAL;
I encounter the error "polymake: ERROR: Cannot draw zero cycle at /usr/share/polymake/bundled/atint/apps/tropical/rules/visual.rules "

What does this error mean?

Re: "ERROR: Cannot draw zero cycle at ... "

Posted: 24 Mar 2024, 12:15
by joswig
polymake uses homogeneous polynomials throughout. Please replace the first line of your code by

Code: Select all

$quadric = toTropicalPolynomial("max(2*x,w+x+y,2*w+2*y,w+y+z,2*z,4*w)");
See this tutorial and these jupyter notebooks for more examples.

Re: "ERROR: Cannot draw zero cycle at ... "

Posted: 25 Mar 2024, 01:28
by gawrilow
polymake uses homogeneous polynomials throughout.
Couldn't we detect such errors early enough, in toTropicalPolynomial() or in Hypersurface constructor, and produce a more comprehensible message?

Re: "ERROR: Cannot draw zero cycle at ... "

Posted: 25 Mar 2024, 10:10
by JensFischer
I used as a basis of my code the example which was given here
https://github.com/micjoswig/polymake-n ... aces.ipynb
under the line [3], namely,

Code: Select all

$F = toTropicalPolynomial("min(8+4w, 4+3w+x, 2+3w+y, 1+2w+2x, 2w+x+y, 1+2w+2y, 2+w+3x, w+2x+y, w+x+2y, 4+w+3y, 8+4x, 4+3x+y, 2x+2y, 2+x+3y, 4y)");
Why do I have to include the "w" everywhere to replace "1"? The choice where I put "w" implies different polynomials, right? The resulting polynomial p(x,y,z,w) gives then by "projection" to p(X,Y,Z,1) my polynomial in homogenous coordinates in projective 4 space? Is that the idea?

Re: "ERROR: Cannot draw zero cycle at ... "

Posted: 03 Apr 2024, 11:35
by joswig
Sorry, the correct homogenization of your example is the following.

Code: Select all

$quadric = toTropicalPolynomial("max(2*x,1+x+y,2+2*y,1+y+z,2*z,4+2*w)"); $TQuadric = new Hypersurface<Max>(POLYNOMIAL=>$quadric); $TQuadric->VISUAL;
My previous explanation is valid: the input needs to be homogeneous, i.e., each monomial must have the same degree, here 2. In your original input all monomials did have degree 2, expect for the last one. The extra variable w takes up the "missing" degrees.

Please recheck my example from the ETC book, which is homogeneous of degree 4.

But Ewgenij is right, the input should be checked. The next polymake release 4.12, coming soon, will have that fix.