#14793: Unique representation for homsets
-------------------------------+--------------------------------------------
       Reporter:  nthiery      |         Owner:  nthiery  
           Type:  enhancement  |        Status:  new      
       Priority:  major        |     Milestone:  sage-5.12
      Component:  categories   |    Resolution:           
       Keywords:               |   Work issues:           
Report Upstream:  N/A          |     Reviewers:           
        Authors:  Simon King   |     Merged in:           
   Dependencies:               |      Stopgaps:           
-------------------------------+--------------------------------------------

Comment (by SimonKing):

 Replying to [comment:17 nbruin]:
 > The base ring can (in principle at least) be pretty much anything, and
 the way you're proposing to retrieve it seems to work OK (it seems the
 character is always there)

 I'm afraid it does not work. The problem is: We need the homset to finish
 initialisation of the parent, and Python decides to try and create the
 homset rather early in the reconstruction of the parent. Hence, when we
 need the character or the base ring or any other information, it is simply
 not available yet.

 I tried to provide a `__reduce__` method for `HeckeModule_generic`, which
 solved the problem of pickling modular symbols. But then, a different
 problem arose: An infinite loop when pickling an abelian variety (to be
 precise: of `ModularAbelianVariety_modsym`). And it is not clear to me how
 to write a `__reduce__` method for abelian varieties such that the loop
 does not occur.

 Probable I should provide the code that I have so far. In about 24 hours,
 I guess...

 And a different approach: We should try to understand why
 {{{
 sage: M = ModularSymbols(6)
 sage: loads(dumps(M)) == M
 True
 }}}
 works, while
 {{{
 sage:
 
sage.modular.hecke.morphism.is_HeckeModuleMorphism_matrix(ModularSymbols(6).hecke_operator(7).matrix_form().hecke_module_morphism())
 True
 sage: M = ModularSymbols(6)
 sage: loads(dumps(M)) == M
 True
 }}}
 crashes.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14793#comment:18>
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/groups/opt_out.


Reply via email to