Skip to content
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

Assumptions system #18355

Open
proy87 opened this issue Jan 16, 2020 · 3 comments
Open

Assumptions system #18355

proy87 opened this issue Jan 16, 2020 · 3 comments

Comments

@proy87
Copy link

proy87 commented Jan 16, 2020

How can I assume that x>2?
I need to rewrite Abs(x-2) as x-2 and also make assumption on the variable.

@sylee957
Copy link
Member

The only predicate to describe such assumption is Q.is_true, but I don't think that any work is done about that.

>>> from sympy import *

>>> x = Symbol('x', real=True)
>>> refine(Abs(x - 2), assumptions=Q.is_true(x>2))
Abs(x - 2)

@petschge
Copy link
Sponsor

I also just got bit by that issue as documented in the now closed #20636.

@oscarbenjamin
Copy link
Contributor

I think that there are other issues corresponding to this with more discussion. Handling inequalities in the assumptions system is definitely high priority but it's not easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants