Creating order polytopes from face lattices

Questions and problems about using polymake go here.
HigherMoonTheory
Posts: 2
Joined: 12 Mar 2024, 15:58

Creating order polytopes from face lattices

Postby HigherMoonTheory » 12 Mar 2024, 16:03

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?

blorenz
Developer
Posts: 141
Joined: 10 Jan 2011, 17:21

Re: Creating order polytopes from face lattices

Postby blorenz » 13 Mar 2024, 13:46

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

HigherMoonTheory
Posts: 2
Joined: 12 Mar 2024, 15:58

Re: Creating order polytopes from face lattices

Postby HigherMoonTheory » 13 Mar 2024, 15:58

Great, thank you!


Return to “Helpdesk”