Ticket #11636 (closed defect: invalid)

Opened 23 months ago

Last modified 21 months ago

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: Work issues:
Report Upstream: N/A Reviewers: William Stein
Authors: Merged in:
Dependencies: Stopgaps:

Description (last modified by was) (diff)

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

comment:1 Changed 23 months ago by was

  • Description modified (diff)

comment:2 Changed 23 months ago by was

  • Description modified (diff)

comment:3 Changed 23 months ago by jdemeyer

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

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 23 months ago by was

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

Thanks jdmeyer!!!!

comment:5 Changed 23 months ago by jdemeyer

  • Reviewers set to William Stein

comment:6 Changed 21 months 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.