Skip to content

minus of real x should be known to be at most abs(x) #22025

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

Open
pelegm opened this issue Dec 5, 2016 · 0 comments
Open

minus of real x should be known to be at most abs(x) #22025

pelegm opened this issue Dec 5, 2016 · 0 comments

Comments

@pelegm
Copy link
Contributor

pelegm commented Dec 5, 2016

Check this:

sage: assume(x, 'real')
sage: bool(x <= abs(x))
True

but

sage: bool(-x <= abs(x))
False

and even

sage: bool(-x <= abs(-x))
False

(so this is a bit inconsistent).

Solve works here, but the set of solutions is not well simplified:

sage: solve(x <= abs(x), x)
#0: solve_rat_ineq(ineq=_SAGE_VAR_x <= abs(_SAGE_VAR_x))
[[x == 0], [0 < x], [x < 0]]
sage: solve(-x <= abs(x), x)
#0: solve_rat_ineq(ineq=-_SAGE_VAR_x <= abs(_SAGE_VAR_x))
[[x == 0], [x < 0], [0 < x]]

(so it also gives a debug message; see #22018)

Component: symbolics

Keywords: abs

Issue created by migration from https://trac.sagemath.org/ticket/22025

@pelegm pelegm added this to the sage-7.5 milestone Dec 5, 2016
@rwst rwst removed this from the sage-7.5 milestone Jan 14, 2017
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

2 participants