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.


>>> from sympy import ask, Q, pi
>>> ask(Q.negative(pi+1)) # this calls AskNegativeHandler.Add
>>> ask(Q.negative(pi**2)) # this calls AskNegativeHandler.Pow
static Add(assumptions)[source]

Positive + Positive -> Positive, Negative + Negative -> Negative

static Pow(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