Macaulay2 » Documentation
Packages » PALPInterface :: palpNVertices
next | previous | forward | backward | up | index | toc

palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope

Description

The dual $P^* = \{ y : \langle x, y \rangle \ge -1 \text{ for all } x \in P \}$ is taken with respect to the origin. It is a lattice polytope exactly when $P$ is reflexive, and only then do these functions give an answer.

i1 : ws = {10, 1, 2, 3, 4};
i2 : palpNVertices ws

o2 = | 0 1 0 0  -2 -1 |
     | 1 0 0 -1 -3 -2 |
     | 0 0 1 -2 -4 -2 |

              3       6
o2 : Matrix ZZ  <-- ZZ
i3 : numColumns palpNPoints ws

o3 = 11

Since $P^{**} = P$, applying palpNVertices twice gives back the vertices of $P$, possibly in another order. In particular, given the vertices of a reflexive polytope in $N$, such as the rays of a fan, this is how to find its dual in $M$.

i4 : B = palpNVertices ws;

              3       6
o4 : Matrix ZZ  <-- ZZ
i5 : set entries transpose palpNVertices B === set entries transpose palpMVertices ws

o5 = true

The result agrees with polar.

i6 : P = convexHull palpMVertices ws;
i7 : set entries transpose palpNVertices ws === set entries transpose lift(vertices polar P, ZZ)

o7 = true

A polytope that is not reflexive gives null, even when the origin is its only interior lattice point, as for this simplex. Its dual, a rational polytope, is still available as polar convexHull M.

i8 : M = matrix{{1, 0, 0, -1}, {0, 1, 0, -1}, {0, 0, 1, -2}}

o8 = | 1 0 0 -1 |
     | 0 1 0 -1 |
     | 0 0 1 -2 |

              3       4
o8 : Matrix ZZ  <-- ZZ
i9 : interiorLatticePoints convexHull M

o9 = {0}

o9 : List
i10 : palpNVertices M === null

o10 = true
i11 : palpNPoints M === null

o11 = true

Caveat

Like palpMPoints, palpNPoints slows down quickly with the dimension. palpNVertices stays fast.

See also

Ways to use palpNVertices:

  • palpNVertices(List)
  • palpNVertices(Matrix)
  • palpNVertices(WeightSystem)

For the programmer

The object palpNVertices is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/PALPInterface.m2:1743:0.