Rule generator for partitions. Incomplete.