Translation, canonicalization, and more unordered_map stuff.
Implement add_leaf_situation.