# Is there a function to map faces of a cone its dual?

Suppose C is a full dimensional pointed rational polyhedral cone with vertex at the origin. Then there is a correspondence between faces of C and faces of C.dual() given by

F -> Fd := { y in C.dual() | <y, x> = 0 for all x in F }


This correspondence satisfies

dim(F)+dim(Fd)=dim(C)


I want to define the function (or dictionary) in sage that maps each face in C.face_lattice() to its corresponding face in C.dual().face_lattice(). Does this function exist in sage?

edit retag close merge delete

Sort by » oldest newest most voted

As far as I know, there is no such function in Sage yet. But the following ticket contains a discussion about this issue: Ticket 17215.

It may eventually be implemented...

more

In case someone finds it useful, I wrote a function whose input is a cone C and whose output is a dictionary that maps each face of C to its dual face of C.dual().

def cone_dual_face_dct(C):
d = C.dim()
M = C.lattice().dual()
c = C.face_lattice()
cv = C.dual().face_lattice()
faces = {i+1: list(C.faces(i+1)) for i in xrange(d-1)}
dual_faces = {i+1: list(C.dual().faces(i+1)) for i in xrange(d-1)}
dct = {c.bottom(): cv.top(), c.top(): cv.bottom()}
for i in faces:
for f in faces[i]:
eqs = zero_matrix(f.nrays(), 1).augment(f.rays().matrix())
fd = Polyhedron(eqns=eqs).intersection(C.dual().polyhedron())
fd = Cone(fd, M)
for x in dual_faces[d-i]:
if fd.is_equivalent(x):
dct[f] = x
dual_faces[d-i].remove(x)
break
else:
raise TypeError('Face {} has no match in dual cone!'.format(f))
return dct


I'm sure this could be improved and I would welcome edits.

more