sympy/sympy — pull request #1751 by mrocklin (2013-02-02 22:31:03+00:00)
Title: New assumptions context manager draft

A draft for a context manager for new assumptions. This is a historic [issue](https://code.google.com/p/sympy/issues/detail?id=1047) and I suspect that people have strong opinions.

It's also a long standing issue. Hopefully this gets the ball rolling.

Example

```Python
In [1]: from sympy.assumptions.assume import assume
In [2]: ask(Q.integer(x + 1)) # returns None

In [3]: with assume(Q.integer(x)):
...: print ask(Q.integer(x + 1))
...:
True
```

Discussion and ideas welcome.