GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
>>> reduce_inequalities([x < oo, x >= 0, -oo < x])
And(-oo < x, x < oo) <--- wrong
>>> And(*[x < oo, x >= 0, -oo < x]).as_set().as_relational(x)
And(0 <= x, x < oo) <--- right
Correct logic of reduce_rational_inequalities
We must use Intersection instead of Union, of course.
XXX: Not sure about reduce_rational_inequalities(, x) == False
Can you elaborate on the issue a little more
I indicated in the OP that the wrong answer is obtained when the inequalities are run through reduce_inequalities and showed what the right answer should be. I see that @skirpichev was able to find a solution.