# contains -- checks if the first argument contains the second argument

## Synopsis

• Usage:
b = contains(C,X)
b = contains(P,X)
b = contains(F,C)
b = contains(L,C)
b = contains(L,P)
• Inputs:
• Outputs:
• b, , true if the first argument contains the second argument, false otherwise.

## Description

contains determines if the first argument contains the second argument. Both arguments have to lie in the same ambient space. When the first argument is a Cone or Polyhedron, it tests if the equations of the first argument are satisfied by the generating points/rays of the second argument.

For example, we can check if the 3 dimensional crosspolytope contains the hypercube or the other way around:

 ```i1 : P = hypercube 3 o1 = P o1 : Polyhedron``` ```i2 : Q = crossPolytope 3 o2 = Q o2 : Polyhedron``` ```i3 : contains(Q,P) o3 = false``` ```i4 : contains(P,Q) o4 = true```

We can also check if the hypercube lies in the positive orthant.

 `i5 : C = coneFromVData matrix {{1,0,0},{0,1,0},{0,0,1}};` ```i6 : contains(C,P) o6 = false``` ```i7 : P = affineImage(P,matrix{{1},{1},{1}}) o7 = P o7 : Polyhedron``` ```i8 : contains(C,P) o8 = true```

## Ways to use contains :

• contains(Cone,Cone)
• contains(Cone,Matrix)
• contains(Cone,Polyhedron)
• contains(Fan,Cone)
• contains(List,Cone)
• contains(List,Polyhedron)
• contains(Polyhedron,Cone)
• contains(Polyhedron,Matrix)
• contains(Polyhedron,Polyhedron)