'Sympy: Evaluate sign of an expression, given variables' relations

A simple example:

expr = a - b

Given a < b, we know that expr < 0 and vice versa. Can I do this with sympy? Of course on a much more complex expression.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source