Equivalence relation with a corresponding hash function.