1 | initial version |

Assuming that your cones are compact, you can just use contaiment of all the vertices as follows

```
sage: def polyhedron_contains(P, Q):
....: return all(P.contains(v) for v in Q.vertices())
sage: P1 = Polyhedron([(0,0,0), (3,0,0), (0,3,0), (0,0,3), (3,3,3)])
sage: P2 = Polyhedron( [(1,2,1), (1,0,0), (1,1,1), (1,1,2)])
polyhedron_contains(P1,P2)
True
```

2 | No.2 Revision |

Assuming that your cones ~~are compact, ~~only contains the vertex 0, you can just use contaiment ~~of all ~~the ~~vertices as follows~~following

```
sage: def polyhedron_contains(P, Q):
....: return all(P.contains(v) for v in
```~~Q.vertices())
~~Q.rays())
sage: P1 = ~~Polyhedron([(0,0,0), (3,0,0), (0,3,0), (0,0,3), (3,3,3)])
~~Polyhedron(rays = [(1,0,0), (0,1,0), (0,0,1)])
sage: P2 = Polyhedron( rays = [(1,2,1), (1,0,0), (1,1,1), (1,1,2)])
sage: polyhedron_contains(P1,P2)
True

3 | No.3 Revision |

Assuming that your cones only contains the vertex 0, you can ~~just ~~use ~~contaiment the following~~containment as follows

```
sage: def polyhedron_contains(P, Q):
....: return all(P.contains(v) for v in Q.rays())
sage: P1 = Polyhedron(rays = [(1,0,0), (0,1,0), (0,0,1)])
sage: P2 =
```~~Polyhedron( rays ~~Polyhedron(rays = [(1,2,1), (1,0,0), (1,1,1), (1,1,2)])
sage: polyhedron_contains(P1,P2)
True

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.