sympy/sympy — pull request #1135 by smichr (2012-03-18 01:56:36+00:00)
Title: 3109c

The commits after the 3109 commits are precipitated by the creation and use of a signsimp function that is added to simplify.py.

Sign simplification is one of the most fundamental simplifications that a routine should attempt before doing any other simplification. I tried to write my own version but found the one added to cse was already much better. So the signsimp function just calls the two cse processors and does a little clean up to remove hollow simplification (so `exp(y-x)` goes to `exp(-(x-y))` after simplification and back to its original form if this change didn't cause any simplification to occur).

Also, I wonder if we can clean up the use of simplify and simplified in matrices.py . It's confusing to know which word to use to say you want to simplification to be used (and there was one test that had used the wrong keyword). The way I've done it now is to not have two keywords: set simplify to True if you want simplification (defaulting to sympy's simplify) or pass your own function to use that instead. There is no need for two words (`simplified` to use simplification, defaulting to sympy's simplify and `simplify` to define a different function). The use of `simplified` now raises a deprecation warning.

Also, it was noted in a recent discussion about the asymmetry of how expressions are parsed ( http://tinyurl.com/7tmnm47 ) it was noted that sympification could perhaps be modified to keep signs from slipping into the leading term of a Mul and causing cut-and-paste expressions to become very different than what was copied. That modification (which will affect any string sympification) is now added.