sympy/sympy — pull request #690 by smichr (2011-10-30 10:23:20+00:00)
Title: Xsub

This merges the xreplace and subs_cleanup branch with a nominal incorporation of xreplace into sympy.

```python
>>> eq=x*(y+x)+y + x
>>> eq.subs(x+y,2)
2*x + 2
>>> eq.subs(x+y,2,exact=True)
3*x + y
>>> eq = exp(2*x)+a*exp(x)
>>> eq.subs(exp(x),y)
a*y + y**2
>>> eq.subs(exp(x),y,exact=True)
a*y + exp(2*x)
```