Opened 10 years ago

Closed 10 years ago

Last modified 10 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:

Description

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 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by jdemeyer

comment:1 Changed 10 years ago by jdemeyer

  • Status changed from new to needs_review

comment:2 Changed 10 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:3 Changed 10 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 10 years ago by was

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

devel/sage/sage/rings/polynomial/polynomial_quotient_ring.py

e.g.,

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

comment:5 Changed 10 years ago by jdemeyer

  • Milestone changed from sage-4.5.3 to sage-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 10 years ago by was

  • Resolution set to duplicate
  • Status changed from needs_work to closed

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

comment:7 Changed 10 years ago by mvngu

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