#13184: Some Homset are not unique parents
----------------------------------------+-----------------------------------
       Reporter:  caruso                |         Owner:  nthiery          
           Type:  defect                |        Status:  needs_review     
       Priority:  major                 |     Milestone:  sage-5.9         
      Component:  categories            |    Resolution:                   
       Keywords:  homset unique parent  |   Work issues:  sage fails to run
Report Upstream:  N/A                   |     Reviewers:                   
        Authors:  Xavier Caruso         |     Merged in:                   
   Dependencies:                        |      Stopgaps:                   
----------------------------------------+-----------------------------------
Changes (by chapoton):

  * status:  needs_work => needs_review


Old description:

> I guess it is a bug:
>
> {{{
> sage: k = GF(5)
> sage: H = Hom(k,k)
> sage: H2 = Hom(k,k)
> sage: H is H2
> False
> }}}
>
> I don't know what is the correct way to fix this problem.
>
> More precisely, in sage.categories.homset (l. 223-227), one can read:
>
> {{{
> try:
>     # Apparently X._Hom_ is supposed to be cached
>     return X._Hom_(Y, category)
> except (AttributeError, TypeError):
>      pass
> }}}
>
> However, in this particular case, k._Hom_ is apparently not cached. IMHO,
> caching should be the job of sage.categories.homset.Hom is all cases, but
> I might be wrong.
>
> ----
>
> Apply
>
> 1. [[attachment:trac_13184_sage_5.5.0.beta.patch]]
>
> to the sage library (version >= 5.5.0.beta)

New description:

 I guess it is a bug:

 {{{
 sage: k = GF(5)
 sage: H = Hom(k,k)
 sage: H2 = Hom(k,k)
 sage: H is H2
 False
 }}}

 I don't know what is the correct way to fix this problem.

 More precisely, in sage.categories.homset (l. 223-227), one can read:

 {{{
 try:
     # Apparently X._Hom_ is supposed to be cached
     return X._Hom_(Y, category)
 except (AttributeError, TypeError):
      pass
 }}}

 However, in this particular case, k._Hom_ is apparently not cached. IMHO,
 caching should be the job of sage.categories.homset.Hom is all cases, but
 I might be wrong.

 ----

 Apply

 1. [attachment:trac_13184_sage_5.9.beta.patch]

--

Comment:

 here is a rebased and slightly modified patch

 for the bot:

 apply trac_13184_sage_5.9.beta.patch

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13184#comment:11>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to