Opened 5 years ago
Last modified 5 years ago
#22025 new enhancement
minus of real x should be known to be at most abs(x)
Reported by: | pelegm | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-wishlist |
Component: | symbolics | Keywords: | abs |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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)
Change History (2)
comment:1 Changed 5 years ago by
- Component changed from PLEASE CHANGE to symbolics
comment:2 Changed 5 years ago by
- Milestone changed from sage-7.5 to sage-wishlist
Note: See
TracTickets for help on using
tickets.