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

Questions and problems about using polymake go here.
JensFischer
Posts: 1
Joined: 21 Mar 2024, 16:14

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

Postby JensFischer » 21 Mar 2024, 16:21

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?

User avatar
joswig
Main Author
Posts: 288
Joined: 24 Dec 2010, 11:10

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

Postby joswig » 24 Mar 2024, 12:15

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.

User avatar
gawrilow
Main Author
Posts: 425
Joined: 25 Dec 2010, 17:40

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

Postby gawrilow » 25 Mar 2024, 01:28

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?

JensFischer
Posts: 1
Joined: 21 Mar 2024, 16:14

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

Postby JensFischer » 25 Mar 2024, 10:10

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?
Last edited by JensFischer on 25 Mar 2024, 10:11, edited 1 time in total.

User avatar
joswig
Main Author
Posts: 288
Joined: 24 Dec 2010, 11:10

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

Postby joswig » 03 Apr 2024, 11:35

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.


Return to “Helpdesk”