>So the question becomes, how do I (for a given set of functions)>process the s-expressions generated so that they are all in their>simplest form?

Depending on the constructs you have in your parse tree, this problem
might not be computable. So finding the simplest form might not be possible,
and you might have to stick with just finding a simpler form.