[Haskell-cafe] Hashing over equivalence classes

Roman Cheplyaka roma at ro-che.info
Sat Mar 14 06:51:47 EDT 2009


Are there some known ways to define hashing (or any other) functions over
equivalence classes? I.e.

  a ~ b => hash(a) == hash(b)  

where (~) is some equivalence relation. For example, you might want to
hash lambda terms modulo alpha-equivalence or hash logical terms with
respect to commutativity of (&&) and (||).

Often we can choose 'canonical' element from each class and hash it.
But (at least, in theory) it's not necessary. So, are there (practical)
ways to define hash function without it?

-- 
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain


More information about the Haskell-Cafe mailing list