New issue
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
Integer comparison #23518
Comments
This one works: In [13]: M*(N - 1) >= 0
Out[13]: True Probably ask should handle things like this but there isn't a general solver for systems of inequalities that it could use. |
That is indeed interesting (I'm guessing because
(N works too) More tidbits:
which of course means that solving |
So I'm currently working on this issue and I think I have a solution, however, I'm having an issue with making the test function. My test function looks like # sympy/simplify/tests/test_simplify.py
def test_issue_23518():
M = Symbol("M", positive=True, integer=True)
N = Symbol("N", positive=True, integer=True)
expr = M*N >= N
expr = expr.simplify() # (X)
assert expr == True Unfortunately when I try to run the On the other hand, if I make a testing file on the root directory of the project that looks like: # testing.py
from sympy import *
M = Symbol("M", positive=True, integer=True)
N = Symbol("N", positive=True, integer=True)
expr = M*N >= N
expr = expr.simplify()
assert expr == True The code runs fine without any assertion errors. May I please know what is going wrong here and how to remedy the situation? |
…omparison(sympy#23518) � Conflicts: � doc/src/guides/solving/index.md
…into IntegerComparison(sympy#23518)
Running the following code I expect the result of statement 5 to be True:
This doesn't work as well, but
ask
is said to be WIP:Which assumption am I missing on the symbols?
The text was updated successfully, but these errors were encountered: