one other thing. You should come up with a better term for "set". Redex? I don't know. Something that can be used to unambiguously refer to the thing that a rule is being applied to.