Description
halfspaces returns the defining affine halfspaces. For a polyhedron
P the output is
(M,v), where the source of
M has the dimension of the ambient space of
P and
v is a one column matrix in the target space of
M such that
P = {p in H  M*p =< v} where
H is the intersection of the defining affine hyperplanes.
For a cone
C the output is the matrix
M that is the same matrix as before but
v is omitted since it is 0, so
C = {c in H  M*c =< 0} and
H is the intersection of the defining linear hyperplanes.
i1 : R = matrix {{1,1,2,2},{2,3,1,3},{3,2,3,1}};
3 4
o1 : Matrix ZZ < ZZ

i2 : V = matrix {{1,1},{0,0},{0,0}};
3 2
o2 : Matrix ZZ < ZZ

i3 : C = posHull R
o3 = {ambient dimension => 3 }
dimension of lineality space => 0
dimension of the cone => 3
number of facets => 4
number of rays => 4
o3 : Cone

i4 : halfspaces C
o4 =  2 1 1 
 1 1 1 
 1 1 1 
 5 1 1 
4 3
o4 : Matrix ZZ < ZZ

Now we take this cone over a line and get a polyhedron.
i5 : P = convexHull(V,R)
o5 = {ambient dimension => 3 }
dimension of lineality space => 0
dimension of polyhedron => 3
number of facets => 6
number of rays => 4
number of vertices => 2
o5 : Polyhedron

i6 : halfspaces P
o6 = ( 0 1 3 ,  0 )
 2 1 1   2 
 1 1 1   1 
 0 3 1   0 
 1 1 1   1 
 5 1 1   5 
o6 : Sequence
