#14125: module_morphism is too liberal on inverting
------------------------------+---------------------------------------------
   Reporter:  darij           |             Owner:  jason, was              
       Type:  defect          |            Status:  new                     
   Priority:  minor           |         Milestone:  sage-5.8                
  Component:  linear algebra  |          Keywords:  module morphism, inverse
Work issues:                  |   Report Upstream:  N/A                     
  Reviewers:                  |           Authors:                          
  Merged in:                  |      Dependencies:                          
   Stopgaps:                  |  
------------------------------+---------------------------------------------
 Not saying this is an actual issue, since it seems to depend on bad user
 input.

 Since I don't know how to reliably do function declarations in the
 console, I'm making a py file and then importing it:

 PY file:

 {{{
 def diag_func(p):
       if len(p)==0: return 1
       else: return p[0]
 }}}

 Console:

 {{{
 sage: attach ../diagbug.py #file quoted above
 sage: X = CombinatorialFreeModule(ZZ, Partitions(), prefix='x'); x =
 X.basis();
 sage: Y = CombinatorialFreeModule(ZZ, Partitions(), prefix='y'); y =
 Y.basis()
 sage: xty = X.module_morphism(diagonal=diag_func, codomain=Y)
 sage: ytx = ~xty
 sage: ytx(y[Partition([3,2,1])])
 1/3*x[[3, 2, 1]]
 sage: ytx(y[Partition([3,2,1])]).parent()
 Free module generated by Partitions over Integer Ring
 }}}

 Since I'm working over ZZ, I'd have expected the
 "ytx(y[Partition([3,2,1])])" to throw an error, but definitely I'd have
 expected the parent to not be defined over ZZ.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14125>
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