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:

Status badges


Check this:

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


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

and even

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

(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 pelegm

  • Component changed from PLEASE CHANGE to symbolics

comment:2 Changed 5 years ago by rws

  • Milestone changed from sage-7.5 to sage-wishlist
Note: See TracTickets for help on using tickets.