This commit introduced a new module in sympy: the refine module. The purpose of this module is to simplify expressions when they are bound to assumptions. For example, if you know that x>0, then you can simplify abs(x) to x. This code was traditionally embedded into the core, but now this will be part of an external module (sympy.refine) upon which the core has no dependencies. In a not very original move, I named the main function in this module refine(). It's syntax is very straightforward: first argument is an expression and second argument are assumptions. Some examples (from isympy): In : refine(1+abs(x), Assume(x, Q.positive)) Out: 1 + x In : refine(exp(I*x*pi), Assume(x, Q.odd)) Out: -1 In : refine(exp(I*x*pi), Assume(x, Q.even)) Out: 1 Right now the module lacks some rules, but the design (very similar to the query module) will make adding these rules an easy task.