make sure all cartesian product operations are minimized, so that we don't get exponential growth, also make sure chars are coerced to ints everywhere
move minimalization into core namespace, and reduce duplicate work in canonicalize-states