Opened 9 years ago

Last modified 2 weeks ago

#15297 new defect

Elements from a Field of Fractions that compare equal should have equal hashes

Reported by: Stefan Owned by:
Priority: major Milestone: sage-9.8
Component: algebra Keywords: field of fractions, hashing
Cc: Yuan Zhou, Matthias Köppe Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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

Change History (12)

comment:1 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:2 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:3 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:4 Changed 7 years ago by Matthias Köppe

Cc: Yuan Zhou Matthias Köppe added

comment:5 Changed 4 years ago by Matthias Köppe

Milestone: sage-6.4sage-8.4

Still broken even with #16268; see #26339.

comment:6 Changed 2 years ago by Matthias Köppe

Milestone: sage-8.4sage-9.2

Still broken in 9.1.rc2

comment:7 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:8 Changed 19 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

comment:9 Changed 14 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:10 Changed 10 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

comment:11 Changed 5 months ago by Matthias Köppe

Milestone: sage-9.6sage-9.7

comment:12 Changed 2 weeks ago by Matthias Köppe

Milestone: sage-9.7sage-9.8
Note: See TracTickets for help on using tickets.