The hash function should be invariant under alpha-renaming. Using de Bruijn notation seems to be possible, but it requires alpha-converting the whole tree when a binding is created, and has the unhappy consequence that a substructure of an abt is not a well-formed abs (since the de Bruijn indices are broken). So, is there a good (neat, elegant and/or efficient) way to construct such a function? By the way, is there any study on this matter? Any help is appreciated!
Asked
Active
Viewed 85 times
1 Answers
1
I found a paper published two years later. Hashing modulo alpha-equivalence. This provides an asymptotically faster way to achieve the goal, improving from $O(n^2)$ to $O(n \log^2 n)$.
Trebor
- 230
- 1
- 10