#9016: make morphisms hashable
---------------------------------+------------------------------------------
       Reporter:  burcin         |         Owner:  AlexGhitza     
           Type:  defect         |        Status:  needs_info     
       Priority:  major          |     Milestone:  sage-5.6       
      Component:  categories     |    Resolution:                 
       Keywords:                 |   Work issues:                 
Report Upstream:  N/A            |     Reviewers:  Robert Bradshaw
        Authors:  Burcin Erocal  |     Merged in:                 
   Dependencies:                 |      Stopgaps:                 
---------------------------------+------------------------------------------

Comment (by tscrim):

 This looks good for the most part. I think Robert was thinking the
 `hash((domain, codomaim))` was the hash for the individual morphism, as
 opposed to that being the hash for the homset (as it currently is). The
 morphism's hash is from the image of the generators which I believe is
 sufficient. (This breaks down if you look at a large amount of maps from
 different domains to the same image in the same codomain and same number
 of generators, but this seems like something extremely unlikely to occur
 in practice. We could also hash in the parent to take care of this...)

 However this does not pass the doctests on my (virtual) machine which runs
 with 32-bit instead of 64-bit (which the patchbot runs on). Here are my
 hash values:
 {{{
 rings/morphism.pyx
  line 542: 1975065480
  line 959: 467020541
  line 1147: -664373037
  line 1554: -644670332
  line 1699: 1917770400

 categories/map.pyx
  line 1047: 433071207
  line 1290: -1460497211
 }}}
 Also, I don't believe you need `# indirect doctest` for the `hash()`, but
 this isn't that important.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9016#comment:14>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to