#11309: Sage sees - x + y > 0, - y + x >= 0, and x - y > 0 as equivalent
--------------------------------------------------------------------------+-
Reporter: tnv |
Owner: burcin
Type: defect |
Status: positive_review
Priority: major |
Milestone: sage-5.1
Component: symbolics |
Resolution:
Keywords: inequality equality relational sd31 __richcmp__ sd40.5 |
Work issues:
Report Upstream: N/A |
Reviewers: Karl-Dieter Crisman, ThanhVu Nguyen
Authors: Keshav Kini, Burcin Erocal |
Merged in:
Dependencies: |
Stopgaps:
--------------------------------------------------------------------------+-
Comment (by kini):
Did you forget to rebuild Sage after applying the patches?
{{{
[1] fs-boone@zhenghe /opt/sage/devel/sage $ hg qapplied
trac_13057-no-intersphinx.patch
trac_11309-fix-comparison-of-comparisons.patch
trac_11309-equate-flipped-comparisons.patch
[1] fs-boone@zhenghe /opt/sage/devel/sage $ sage -b &> /dev/null
[1] fs-boone@zhenghe /opt/sage/devel/sage $ sage -q
sage: var('y')
y
sage: (- x + y == 0) == (0 == -x + y)
True
sage: (-x + y == 0) == (0 == -x + y)
True
sage: (x < y) == (y > x)
True
sage: -(x < 5)
-x < -5
sage:
}}}
Personally I don't see why `x * (y < z)` should even be simplified to
anything other than `x * (y < z)`. `y < z` is a mathematical object which
does not live in a space which has a multiplication operation - it lives
in the space of logical predicates. But that is something to address in a
different ticket. Testing the title of this ticket:
{{{
sage: Set([-x + y > 0, -y + x >= 0, x - y > 0])
{-x + y > 0, x - y >= 0, x - y > 0}
sage: len(_)
3
}}}
So the patches do at least address and solve the issue in the ticket's
name.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11309#comment:54>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.