# Why is this polar polytope incorrect?

I have a polytope

sage: P = Polyhedron([
....: [-1, -1, -1, -1, -1],
....: [-1, -1, -1, -1, 6],
....: [-1, -1, -1, 6, -1],
....: [-1, -1, 6, -1, -1],
....: [-1, 6, -1, -1, -1],
....: [5/2, -1, -1, -1, -1]
....: ])


The polar can be constructed manually with

sage: Pd = Polyhedron(ieqs=[vector([1]+v)for v in P.vertices_list()])
sage: Pd.vertices()
(A vertex at (1, 0, 0, 0, 0),
A vertex at (0, 1, 0, 0, 0),
A vertex at (-2, -1, -1, -1, -1),
A vertex at (0, 0, 0, 0, 1),
A vertex at (0, 0, 0, 1, 0),
A vertex at (0, 0, 1, 0, 0))


This yields a result different from P.polar()

sage: P.polar().vertices()
(A vertex at (12/7, 6/7, 6/7, 6/7, 6/7),
A vertex at (0, 0, 0, 0, -6/7),
A vertex at (-12/7, 0, 0, 0, 0),
A vertex at (0, 0, 0, -6/7, 0),
A vertex at (0, -6/7, 0, 0, 0),
A vertex at (0, 0, -6/7, 0, 0))


Why am I getting different results? Is this a bug?

edit retag close merge delete

Sort by » oldest newest most voted

I am not an expert of polytopes, but I see that the documentation of P.polar() says that the "original vertices are translated so that their barycenter is at the origin".

I can confirm this by doing:

sage: Pcentred = P - P.center()
sage: Pcentred = - Pcentred           # I don't know why, but Sage .polar() method does this
sage: Pd = Polyhedron(ieqs=[vector([1]+v) for v in Pcentred.vertices_list()])
sage: Pd.vertices()
(A vertex at (12/7, 6/7, 6/7, 6/7, 6/7),
A vertex at (0, 0, 0, 0, -6/7),
A vertex at (-12/7, 0, 0, 0, 0),
A vertex at (0, 0, 0, -6/7, 0),
A vertex at (0, -6/7, 0, 0, 0),
A vertex at (0, 0, -6/7, 0, 0))

more

I guess this has the advantage of working for any polytope (the polar is only defined for polytopes containing the origin, I think).

( 2016-09-20 09:47:46 -0500 )edit