Opened 9 years ago

Last modified 8 years ago

## #11309 closed defect

# Sage sees -x +y > 0, -y + x >= 0, and x -y > 0 as equivalent — at Version 1

Reported by: | tnv | Owned by: | burcin |
---|---|---|---|

Priority: | major | Milestone: | sage-5.1 |

Component: | symbolics | Keywords: | inequality equality relational sd31 __richcmp__ sd40.5 |

Cc: | kini, kcrisman, tnv | Merged in: | |

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description (last modified by )

-x + y > 0 and x - y > 0 are treated the same in Sage.

sage: version() 'Sage Version 4.6.2, Release Date: 2011-02-25' sage: (-x +y < 0) in [x -y < 0] True Set([-x +y >= 0,x -y >= 0]) {-x + y >= 0}

and they have the same Hash

sage: var('x,y') (x, y) sage: hash(-x + y > 0 ) 1221566266 sage: hash(-x + y >= 0 ) 1221566266 sage: hash(x - y >= 0 ) 1221566266 sage: hash(-y + x >= 0 ) 1221566266 sage: hash(x - y > 0 ) 1221566266

It seems to me that Sage treats > , >= , == the same (see http://trac.sagemath.org/sage_trac/ticket/7660). If this is true then it's a serious problem and needs to be addressed.

**Note:**See TracTickets for help on using tickets.