# cayley -- constructs the Cayley sum of polytopes

## Synopsis

• Usage:
cayley(P1,P2),
cayley(P1,P2,k),
cayley(P1,P2,P3),
cayley(P1,P2,P3,k),
cayley(L),
cayley(L,k),
cayley(M1,M2),
cayley(M1,M2,k),
cayley(M1,M2,M3),
cayley(M1,M2,M3,k)
• Inputs:
• P1, ,
• P2, ,
• P3, ,
• M1, ,
• M2, ,
• M3, ,
• k, an integer,
• L, a list,
• Outputs:

## Description

Given polytopes P and Q the function computes the cayley sum of P and Q.

 i1 : P=convexHull(matrix{{0,1}}); i2 : Q=convexHull(matrix{{0,2}}); i3 : C=cayley(P,Q) o3 = C o3 : Polyhedron i4 : vertices C o4 = | 0 1 0 2 | | 0 0 1 1 | 2 4 o4 : Matrix QQ <--- QQ

One can also construct the Cayley polytope of order k by specifying the positive integer k.

 i5 : C=cayley(P,Q,3) o5 = C o5 : Polyhedron i6 : vertices C o6 = | 0 1 0 2 | | 0 0 3 3 | 2 4 o6 : Matrix QQ <--- QQ

You can also compute the Cayley sum of several polytopes of any order, by placing the polytopes in a list.

 i7 : C=cayley({P,Q,Q,P,P},2) o7 = C o7 : Polyhedron i8 : vertices C o8 = | 0 1 0 2 0 2 0 1 0 1 | | 0 0 2 2 0 0 0 0 0 0 | | 0 0 0 0 2 2 0 0 0 0 | | 0 0 0 0 0 0 2 2 0 0 | | 0 0 0 0 0 0 0 0 2 2 | 5 10 o8 : Matrix QQ <--- QQ

• isCayley -- checks if a polytope is Cayley

## Ways to use cayley :

• "cayley(List)"
• "cayley(List,ZZ)"
• "cayley(Matrix,Matrix)"
• "cayley(Matrix,Matrix,Matrix)"
• "cayley(Matrix,Matrix,Matrix,ZZ)"
• "cayley(Matrix,Matrix,ZZ)"
• "cayley(Polyhedron,Polyhedron)"
• "cayley(Polyhedron,Polyhedron,Polyhedron)"
• "cayley(Polyhedron,Polyhedron,Polyhedron,ZZ)"
• "cayley(Polyhedron,Polyhedron,ZZ)"

## For the programmer

The object cayley is .