Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#9666 closed enhancement (duplicate)

Implement __hash__ for NumberFieldIdeal

Reported by: jdemeyer Owned by: davidloeffler
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: number fields Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue


I propose to use a HNF Z-basis of number field ideals to compute the hash of an ideal.

Attachments (1)

9666.patch (893 bytes) - added by jdemeyer 13 years ago.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by jdemeyer

Attachment: 9666.patch added

comment:1 Changed 13 years ago by jdemeyer

Status: newneeds_review

comment:2 Changed 13 years ago by jdemeyer

Status: needs_reviewneeds_work

comment:3 Changed 13 years ago by was

You need to add a doctest that illustrates use of the hash function, on both 32 and 64-bit computers.

comment:4 Changed 13 years ago by was

When I ran the test suite there were a bunch of failures in



File "/mnt/usb1/scratch/wstein/build/sage-4.5.2.rc0/devel/sage/sage/rings/polynomial/", line 1141:
    sage: D.selmer_group([K.ideal(2, -a+1), K.ideal(3, a+1), K.ideal(a)], 3)
    [2, -a - 1, -a]
    [2, -a - 1, a]

comment:5 Changed 13 years ago by jdemeyer

Milestone: sage-4.5.3sage-4.6

Apologies. I did not expect the hash to have influence on this, I should have tested better.

I will postpone this to the release after the PARI upgrade, i.e. sage-4.6.1 or something.

comment:6 Changed 12 years ago by was

Resolution: duplicate
Status: needs_workclosed

The same is fixed correctly in #9400. So I'm closing this as a dupe of that.

comment:7 Changed 12 years ago by mvngu

Milestone: sage-4.6sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.