Keep the gradient flowing

Refine module, proof of concept

The 0.6.5 release of SymPy is taking longer than expected because some bugs in the testing framework, so my query module is not merged into trunk (yet). In the meantime, I am implementing a refine module (very little code is available yet). The refine module implements a refine() function (better names accepted) that would work in a very similar way as Mathematica's Refine (http://documents.wolfram.com/mathematica/functions/Refine). It tries to simplify an expression based on it's assumptions. For example: [cc lang="python"] >>> refine(abs(x), Assume(x, positive=True)) x >>> refine(abs(x), Assume(x, negative=True)) -x [/cc] Initial code is in my git repo, branch queries.