Ask Your Question
1

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

asked 2016-08-20 10:40:32 -0500

done_with_fish gravatar image

updated 2016-08-23 14:06:19 -0500

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 flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-08-30 12:33:01 -0500

done_with_fish gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-20 10:40:32 -0500

Seen: 102 times

Last updated: Aug 30 '16