Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sagetrac-Stefan mannequin opened this issue Oct 16, 2013 · 3 comments
Open

Comments

@sagetrac-Stefan
Copy link
Mannequin

sagetrac-Stefan mannequin commented Oct 16, 2013

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

CC: @yuan-zhou @mkoeppe

Component: algebra

Keywords: field of fractions, hashing

Issue created by migration from https://trac.sagemath.org/ticket/15297

@sagetrac-Stefan sagetrac-Stefan mannequin added this to the sage-6.1 milestone Oct 16, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe
Copy link
Member

mkoeppe commented Sep 28, 2018

comment:5

Still broken even with #16268; see #26339.

@mkoeppe mkoeppe modified the milestones: sage-6.4, sage-8.4 Sep 28, 2018
@mkoeppe
Copy link
Member

mkoeppe commented May 2, 2020

comment:6

Still broken in 9.1.rc2

@mkoeppe mkoeppe modified the milestones: sage-8.4, sage-9.2 May 2, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Mar 27, 2021

comment:8

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.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 27, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 9, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant