Page 1 of 1

Creating order polytopes from face lattices

Posted: 12 Mar 2024, 16:03
by HigherMoonTheory
I'm trying to create an order polytope from the face lattice of a polytope. I'm using the following code:

$polygon = n_gon(3);
$lattice = $polygon->HASSE_DIAGRAM;
$orderpoly = order_polytope($lattice);

I get an error message:

ERROR: no matching overloaded instance of Polymake::polytope::order_polytope(Lattice<BasicDecoration, Sequential>)

What am I doing wrong?

Re: Creating order polytopes from face lattices

Posted: 13 Mar 2024, 13:46
by blorenz
There is an issue in our code that order_polytope only accepts a specific variant of the lattice type, you can convert it like this to work around that bug:

Code: Select all

polytope > $polygon = n_gon(3); polytope > $lattice = $polygon->HASSE_DIAGRAM; polytope > $l = new Lattice<BasicDecoration>(DECORATION=>$lattice->DECORATION,ADJACENCY=>$lattice->ADJACENCY,TOP_NODE=>$lattice->TOP_NODE, BOTTOM_NODE=>$lattice->BOTTOM_NODE); polytope > $orderpoly = order_polytope($l);

It will be fixed in the next polymake release, then your original code should also work.

Best
Benjamin

Re: Creating order polytopes from face lattices

Posted: 13 Mar 2024, 15:58
by HigherMoonTheory
Great, thank you!