Detour: weak similarity measures on the types.

Building up the sets of isomorphisms from primitive cycles is rather
long and complicated. This is a shortcut that will work on small
problem sizes.

Splits the types into buckets according to a weak model of similarity.