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 4>`

of `p`

. What is the most efficient way to define `x`

?

1 | initial version |

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 4>`

of `p`

. What is the most efficient way to define `x`

?

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 `

of ~~4>~~3>`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.

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.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.