#19016: Better hash for Element
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_work
           Type:         |    Milestone:  sage-6.9
  defect                 |   Resolution:
       Priority:         |    Merged in:
  blocker                |    Reviewers:
      Component:  misc   |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  754dc5794a1a7004c8844cf7cfb64220957c36a5
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/19016         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:37 nbruin]:
 > Replying to [comment:35 vdelecroix]:
 > > In other words, any (additive or multiplicative) magma element should
 be immutable or adopt an mutable/immutable framework... might be a lot of
 work to fix!
 >
 > No, worse: any magma should have a decidable equality notion and a hash
 that's compatible with it.

 Nope. To fix just these `test_zero` and `test_one` one way is to allow to
 hash the unit but no other elements... does it look reasonable from the
 point of view of this ticket? Whether we want to do better looks for me as
 a part #19038.


 New bad news: hashing of ideals. The `ResidueField` factory in
 `sage.rings.finite_rings.residue_field` uses as keys ideals that do not
 implement hashing. And I guess in most non trivial case having a hash
 value would be hard. For principal ideal, it is easy to test equality but
 much harder to implement a hash.

--
Ticket URL: <http://trac.sagemath.org/ticket/19016#comment:38>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to