Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#11636 closed defect (invalid)

Do not use PARI's hash_GEN() for gen.__hash__ -- it is buggy

Reported by: was Owned by: was
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords:
Cc: Merged in:
Authors: Reviewers: William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

Please revert #9667, since PARI's hash_GEN hash's equal hermite normal forms to different values. It does not have valid semantics for Python. Alternatively, figure out what the bug is in hash_GEN.

This problem is very serious, because it leads to major mathematically incorrect problems/confusion, potentially all over the place, and is hard to track down.

For example, this caused #11611, and #11611 should be closed when this is done.

To this right will require a simple doctest illustrating the problem so this doesn't get broke again. #11611 provides such a thing.

Change History (6)

comment:1 Changed 8 years ago by was

  • Description modified (diff)

comment:2 Changed 8 years ago by was

  • Description modified (diff)

comment:3 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-4.7.2 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

William, I have a patch for #11611. The issue is not hash_GEN(), it is a problem with how integers are converted from Sage to PARI. So I would close this ticket here as "invalid" unless you think there are further issues.

comment:4 Changed 8 years ago by was

  • Resolution set to invalid
  • Status changed from needs_review to closed

Thanks jdmeyer!!!!

comment:5 Changed 8 years ago by jdemeyer

  • Reviewers set to William Stein

comment:6 Changed 8 years ago by jdemeyer

See #11854 for a follow-up (it turns out that #11611 does not fully fix the problem).

Note: See TracTickets for help on using tickets.