Added support for permutation of prime ideals

To easily test out theories about the ordering of the prime ideals,
I've added support for permutations.