#16830: Can't multiply a linear morphism defined by a matrix by an element of 
the
base field
----------------------------------+-------------------
       Reporter:  nthiery         |        Owner:
           Type:  defect          |       Status:  new
       Priority:  major           |    Milestone:
      Component:  linear algebra  |   Resolution:
       Keywords:                  |    Merged in:
        Authors:                  |    Reviewers:
Report Upstream:  N/A             |  Work issues:
         Branch:                  |       Commit:
   Dependencies:                  |     Stopgaps:
----------------------------------+-------------------

Comment (by nthiery):

 Replying to [comment:2 nbruin]:
 > That looks like the category machinery is not cooperating with
 > coercion properly. The scalar multiplication should be there
 > according to the categories:

 Well, categories are doing nothing here but stating the math. This
 issue is really about the concrete class VectorSpaceMorphism for
 morphisms defined by a matrix which is responsible for implementing
 multiplication by scalars, and apparently does not.

 > By the way, going up the inheritance in the code:
 > {{{
 > sage: sage.modules.vector_space_homspace.VectorSpaceHomspace.mro()
 > [sage.modules.vector_space_homspace.VectorSpaceHomspace,
 >  sage.modules.free_module_homspace.FreeModuleHomspace,
 >  sage.categories.homset.HomsetWithBase,
 >  sage.categories.homset.Homset,
 >  sage.structure.parent.Set_generic,
 >  sage.structure.parent.Parent,
 >  sage.structure.category_object.CategoryObject,
 >  sage.structure.sage_object.SageObject,
 >  object]
 > }}}
 > and reading the code, it's completely unclear how `parent(phi)` got
 those module categories attached to it. It would have to happen somewhere
 in `sage.modules.vector_space_homspace.VectorSpaceHomspace,
 sage.modules.free_module_homspace.FreeModuleHomspace` but none of those
 classes have an `__init__`.

 The setting of the category for a homset is handled generically in
 Homset.__init__.

 Cheers,
                                 Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/16830#comment:3>
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