What is the most efficient way to "look up" a face in the face lattice of a polyhedron?

asked 2016-08-16 04:06:34 -0500

done_with_fish gravatar image

updated 2016-08-16 18:16:58 -0500

Say I have a polyhedron p with face lattice L = p.face_lattice(). I want to define x as the element of L defined as the convex hull of vertices <0 1 3> of p. What is the most efficient way to define x?

For example, consider

sage: p = polytopes.simplex(3)
sage: for v in p.vertices():
    print '\tIndex {}:'.format(v.index()), v
....:     
    Index 0: A vertex at (0, 0, 0, 1)
    Index 1: A vertex at (0, 0, 1, 0)
    Index 2: A vertex at (0, 1, 0, 0)
    Index 3: A vertex at (1, 0, 0, 0)

We see that p has four vertices.

The vertices indexed by 0, 1, and 3 are the vertices of a face of p. This is confirmed:

sage: L = p.face_lattice()
sage: list(L)
[<>,
 <0>,
 <1>,
 <2>,
 <3>,
 <0,1>,
 <0,2>,
 <1,2>,
 <0,3>,
 <1,3>,
 <2,3>,
 <0,1,2>,
 <0,1,3>,
 <0,2,3>,
 <1,2,3>,
 <0,1,2,3>]

I want to define x as the face in p.face_lattice() given by these vertices. Of course, I could do this by hand with x = list(L)[12], but I want a way to automate this.

edit retag flag offensive close merge delete

Comments

Please provide a polyhedron p so that other users have a starting point to try and answer your question.

slelievre gravatar imageslelievre ( 2016-08-16 17:34:15 -0500 )edit

@slelievre Thanks for the suggestion. I've updated my question with an example.

done_with_fish gravatar imagedone_with_fish ( 2016-08-16 18:16:25 -0500 )edit