next | previous | forward | backward | up | index | toc

# areCompatible -- checks if the intersection of two cones/polyhedra is a face of each

## Synopsis

• Usage:
(b,X) = areCompatible(X1,X2)
• Inputs:
• X1, , or
• X2, , or
• Outputs:
• b, , true if the intersection is a face of each cone, and false otherwise.
• C, , or , the intersection of both if they are of the same type and compatible, otherwise the empty polyhedron.

## Description

areCompatible is an extension of commonFace for two Cones and for two Polyhedra. It also checks if the intersection X of X1 and X2 is a face of each and the answer is given by b. Furthermore, the intersection is given for further calculations if the two cones/polyhedra lie in the same ambient space. Otherwise, the empty polyhedron in the ambient space of X1 is given. Note that the input arguments must either both be polyhedra or both be cones.

For example, consider the following three cones
 i1 : C1 = posHull matrix {{1,0},{0,1}}; i2 : C2 = posHull matrix {{1,-1},{0,-1}}; i3 : C3 = posHull matrix {{1,-1},{2,-1}};

These might form a fan, but if we check if they are compatible, we see they are not:
 i4 : areCompatible(C1,C2) o4 = (true, {ambient dimension => 2 }) dimension of lineality space => 0 dimension of the cone => 1 number of facets => 1 number of rays => 1 o4 : Sequence i5 : areCompatible(C2,C3) o5 = (true, {ambient dimension => 2 }) dimension of lineality space => 0 dimension of the cone => 1 number of facets => 1 number of rays => 1 o5 : Sequence i6 : areCompatible(C3,C1) o6 = (false, {ambient dimension => 2 }) dimension of lineality space => 0 dimension of the cone => 2 number of facets => 2 number of rays => 2 o6 : Sequence

## Ways to use areCompatible :

• "areCompatible(Cone,Cone)"
• "areCompatible(Polyhedron,Polyhedron)"

## For the programmer

The object areCompatible is .