I want to check whether inequality a<f
hold based on the following assumptions
a<b
b=d
d=e
e<f
What is the best way to verify whether inequality a<f
hold based on those assumption.
I can substitute equalizes and Simplify a<b
as follows
>>> from sympy import *
>>> a=Symbol('a')
>>> b=Symbol('b')
>>> c=Symbol('c')
>>> d=Symbol('d')
>>> f=a<b
>>> f.subs({b:c,c:d}).simplify()
a < d
Looking forward for suggestion
It's now possible to do this. However, it's important to note that currently this only works if you specify the variables involved are real when you create them.
from sympy import symbols, ask, Eq
a, b, c, d, e, f = symbols("a b c d e f", real=True)
assumptions = (a < b) & Eq(b, d) & Eq(d, e) & (e < f)
ask(a < f, assumptions) # True