## Synopsis

• Usage:
• Inputs:
• n, an integer, the number of vertices (if a ring is specified, n is the number of variables.
• m, an integer, the dimension of the new facet
• P, a list, A list of lists of integers. Each list of integers is a facet of the complex and the order is a shelling.
• R, a ring, A polynomial ring.
• Outputs:
• p, a list, A list of lists of integers. Each list of integers is a facet of the complex and the order is a shelling.

## Description

This function randomly chooses a facet of size m+1 and checks whether the facet can be shellably added to the shelling. If it can be shellably added to the shelling, it is added to the shelling and the new shelling is returned. Otherwise, the process repeats up to 20 times.

This function can be used to randomly construct non-pure shellable complexes. A new m-simplex can only be glued to previous simplices of dimension at least m. If all previous simplices are smaller, then the addition will fail.

 i1 : P={{1,2,3}} o1 = {{1, 2, 3}} o1 : List i2 : P=randomAddition(6,2,P) o2 = {{1, 2, 3}, {0, 1, 2}} o2 : List i3 : P=randomAddition(6,1,P) o3 = {{1, 2, 3}, {0, 1, 2}, {0, 1}} o3 : List

## Caveat

If the input is not a shellable simplicial complex, the new complex will not be shellable. The function does not check whether the input is shellable.