term rewriting simpliciation