Order
AskHandlers related to order relations: positive, negative, etc.
-
class sympy.assumptions.handlers.order.AskNegativeHandler[source]
This is called by ask() when key=’negative’
Test that an expression is less (strict) than zero.
Examples:
>>> from sympy import ask, Q, pi
>>> ask(Q.negative(pi+1)) # this calls AskNegativeHandler.Add
False
>>> ask(Q.negative(pi**2)) # this calls AskNegativeHandler.Pow
False
-
static Add(expr, assumptions)[source]
Positive + Positive -> Positive,
Negative + Negative -> Negative
-
static Pow(expr, assumptions)[source]
Real ** Even -> NonNegative
Real ** Odd -> same_as_base
NonNegative ** Positive -> NonNegative
-
class sympy.assumptions.handlers.order.AskNonZeroHandler[source]
Handler for key ‘zero’
Test that an expression is not identically zero
-
class sympy.assumptions.handlers.order.AskPositiveHandler[source]
Handler for key ‘positive’
Test that an expression is greater (strict) than zero