How should assumptions be used? More precisely why the following code does
what it does

In [18]: global_assumptions.clear()

In [19]: x = Symbol('x', positive=True)

In [20]: ask(Q.positive(x)) # Why does it return None?

In [21]: x > 0
Out[21]: True

In [22]: global_assumptions # It's empty but I already declared x as
positive
Out[22]: AssumptionsContext()

In [23]: ask(Q.positive(x))

In [24]: global_assumptions.add(Q.positive(x))

In [25]: ask(Q.positive(x))
Out[25]: True

Why setting a symbol to positive does not create a global assumption? What
are assumption used for actually when there are all the is_something flags?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to