I have a problem where you have a tree data structure of some symbolic expression, and then I need to expand certain pieces of the tree using rewrite rules