Page 1 of 1

Can polymake help me translate my polytopes?

Posted: 11 Dec 2015, 19:47
by done-with-fish
I often find myself working with lattice polytopes whose vertices live in an affine hyperplane H of R^d defined by H={ x in R^d : <v,x>=1 } where v is some fixed integral vector. What is the best way to input these polytopes into polymake?

For example, suppose that the vertices of my polytope are the columns of

Code: Select all

A= -4 -2 -5 -3 3 2 3 2 2 1 3 2
The vertices of this polytope live in the hyperplane defined by the integral vector v=<1,1,1>. To input my data into polymake I need to translate this hyperplane defined by e=<1,0,0>.

Banging my head against the wall, I find that A = R*B where

Code: Select all

R= B= -4 2 -1 1 1 1 1 3 -1 0 0 1 0 1 2 -1 1 0 0 1 1
Since det R = -1 I find that my original polytope is the square and I can use the columns of B to define my polytope in polymake.

Can polymake automate this process?

Re: Can polymake help me translate my polytopes?

Posted: 16 Dec 2015, 11:17
by blorenz
Hi,

one way to do this is to add an additional homogenization first:

Code: Select all

$p = new Polytope(POINTS=>ones_vector() | transpose($A));
Many properties also work fine for non-full-dimensional polytopes. But you can also project the polytope down again while preserving the lattice (as long as it is bounded and integral):

Code: Select all

> $q = ambient_lattice_normalization($p); > print $q->VERTICES; 1 0 0 1 -1 0 1 0 1 1 -1 1
Alternatively you could also use smith_normal_form(M) directly.

Benjamin