primeform function

Prime form of a set using Rahn's algorithm