Polymake 3.1: Empty polytope has dimension 1

Questions and problems about using polymake go here.
mkoeppe
Posts: 17
Joined: 27 Jun 2016, 19:44

Polymake 3.1: Empty polytope has dimension 1

Postby mkoeppe » 28 Mar 2017, 20:56

Code: Select all

Welcome to polymake version 3.1 [...] Application polytope currently uses following third-party software packages: 4ti2, bliss, cdd, latte, libnormaliz, lrs, permlib, ppl, singular, sketch, sympol, threejs, tikz, tosimplex polytope > $p = new Polytope(VERTICES=>[], LINEALITY_SPACE=>[], AFFINE_HULL=>[[-1, 0, 0]], FACETS=>[]); polytope > print $p->COMBINATORIAL_DIM; 1 polytope > print $p->DIM; 1 polytope > print $p->VERTICES; polytope > print $p->LINEALITY_SPACE; polytope > print $p->FACETS; polytope > print $p->AFFINE_HULL; -1 0 0
In version 3.0r2, the same input gave dimension -1, which is what I expected.

Context: This is from a doctest in a polyhedral computation backend for SageMath using polymake (https://trac.sagemath.org/ticket/22683), based on Simon King's pexpect interface to polymake (https://trac.sagemath.org/ticket/22452).
I built polymake from the minimal tarball, within Sage.

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

Re: Polymake 3.1: Empty polytope has dimension 1

Postby joswig » 28 Mar 2017, 22:17

Error confirmed. Will be fixed soon.

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

Re: Polymake 3.1: Empty polytope has dimension 1

Postby joswig » 28 Mar 2017, 22:36

Wait! The input data is not consistent. The polytope apparently is supposed to live in 2-space. If the affine hull of the polytope is given by just on linear equation it must be 1-dimensional. The corresponding rule, which is actually triggered, is correct.

Please use "input properties" instead:

Code: Select all

> $p = new Polytope(POINTS=>[], INPUT_LINEALITY=>[], EQUATIONS=>[[-1, 0, 0]], INEQUALITIES=>[]); > print $p->DIM; -1
works for me.

mkoeppe
Posts: 17
Joined: 27 Jun 2016, 19:44

Re: Polymake 3.1: Empty polytope has dimension 1

Postby mkoeppe » 28 Mar 2017, 22:59

Wait! The input data is not consistent. The polytope apparently is supposed to live in 2-space. If the affine hull of the polytope is given by just on linear equation it must be 1-dimensional. The corresponding rule, which is actually triggered, is correct.

Please use "input properties" instead:

Code: Select all

> $p = new Polytope(POINTS=>[], INPUT_LINEALITY=>[], EQUATIONS=>[[-1, 0, 0]], INEQUALITIES=>[]); > print $p->DIM; -1
works for me.
Am I not supposed to be able to enter a known minimal H-description, consisting of AFFINE_HULL and FACETS, to avoid computation?

Another example:

Code: Select all

polytope > $p = new Polytope(CONE_AMBIENT_DIM=>3, AFFINE_HULL=>[], FACETS=>[]); polytope > print $p->AFFINE_HULL; polytope > print $p->FACETS; polytope > print $p->LINEALITY_SPACE; polytope > print $p->VERTICES; polytope > print $p->FEASIBLE; polytope > print $p->DIM; 2

mkoeppe
Posts: 17
Joined: 27 Jun 2016, 19:44

Re: Polymake 3.1: Empty polytope has dimension 1

Postby mkoeppe » 28 Mar 2017, 23:24

Anyway, "just another special case". I'll work around it.

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

Re: Polymake 3.1: Empty polytope has dimension 1

Postby joswig » 29 Mar 2017, 09:41

Anyway, "just another special case". I'll work around it.
I think this is the wrong conclusion. The point is that your "AFFINE_HULL" does not fit the description of the empty polytope.

Please try the following:

Code: Select all

> $p = new Polytope(EQUATIONS=>[[-1, 0, 0]], INEQUALITIES=>[]); > $p->FACETS; > $p->properties();

The second command does not produce any output; it is just there to trigger the computation of the FACETS etc. The third command reveals how polymake thinks of your empty polytope. Whichever subset of those properties you are providing is legal, e.g.,

Code: Select all

> $p = new Polytope(AFFINE_HULL=>[], FACETS=>[], CONE_DIM=>3);
works.

Of course, you can make as many work arounds as you like, even if they are not necessary. ;-)

mkoeppe
Posts: 17
Joined: 27 Jun 2016, 19:44

Re: Polymake 3.1: Empty polytope has dimension 1

Postby mkoeppe » 29 Mar 2017, 19:46

Anyway, "just another special case". I'll work around it.
I think this is the wrong conclusion. The point is that your "AFFINE_HULL" does not fit the description of the empty polytope.

Please try the following:

Code: Select all

> $p = new Polytope(EQUATIONS=>[[-1, 0, 0]], INEQUALITIES=>[]); > $p->FACETS; > $p->properties();

The second command does not produce any output; it is just there to trigger the computation of the FACETS etc. The third command reveals how polymake thinks of your empty polytope. Whichever subset of those properties you are providing is legal, e.g.,

Code: Select all

> $p = new Polytope(AFFINE_HULL=>[], FACETS=>[], CONE_DIM=>3);
works.
Yes, I've done these experiments and am using the first set of code for the case of empty polyhedra, as it works for both 3.0 and 3.1. (The code is here: https://trac.sagemath.org/ticket/22683 and here https://trac.sagemath.org/ticket/22658 -- in case someone would like to take a look.)

However, my point is:

(*) For non-empty polyhedra, a polyhedron is the set of points that satisfy the equations in AFFINE_HULL and the inequalities in FACETS.

In version 3.0, (*) was true also for the empty polyhedron; polymake did signal an empty polytope using one inconsistent equation "0x = -1" in AFFINE_HULL.

This has changed in version 3.1. (*) is no longer true for the empty polyhedron.
So the empty polyhedron is now a "special case".

I shall trust you that introducing this special case makes other things more natural in the theory underlying polymake.


Return to “Helpdesk”