#15297: Elements from a Field of Fractions that compare equal should have equal
hashes
-----------------------+-----------------------------------------------
Reporter: Stefan | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.13
Component: algebra | Keywords: field of fractions, hashing
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-----------------------+-----------------------------------------------
Sage can't guarantee that {{{p == q}}} implies {{{hash(p) == hash(q)}}},
but it is not unreasonable to strive to make this work in case {{{p,q}}}
belong to the same ring or field.
This ticket deals with Fields of Fractions. The proposed solution from
this post appears to do the trick:
https://groups.google.com/forum/#!topic/sage-devel/TOp_5LCBBR4
Example:
{{{
sage: R.<x> = ZZ['x']
sage: F = R.fraction_field()
sage: p = 1/(1-x)
sage: q = (-1)/(x-1)
sage: p == q
True
sage: hash(p) == hash(q)
False
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15297>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.