#16402: Fix homsets from FGP_Module to objects of other categories
--------------------------+------------------------------------------
   Reporter:  pbruin      |            Owner:
       Type:  defect      |           Status:  new
   Priority:  minor       |        Milestone:  sage-6.3
  Component:  categories  |         Keywords:  module homset category
  Merged in:              |          Authors:
  Reviewers:              |  Report Upstream:  N/A
Work issues:              |           Branch:
     Commit:              |     Dependencies:
   Stopgaps:              |
--------------------------+------------------------------------------
 Currently, a `Homset` whose domain is a `FGP_Module` (finitely generated
 module over a principal ideal domain) is always of type
 `FGP_Homset_class`, independently of whether the codomain is also a
 `FGP_Module`.  In particular, because `FGP_Module` does not have good
 support for categories (see #10513), this causes the homsets to always end
 up in the category of modules over the PID in question ("Category of
 modules over Integer Ring"):
 {{{
 sage: V = ZZ^2
 sage: W = V.quotient(V.span([[1, 0]]))
 sage: H = W.Hom(QQ); H
 Set of Morphisms from Finitely generated module V/W over Integer Ring with
 invariants (0) to Rational Field in Category of modules over Integer Ring
 sage: type(H)
 <class 'sage.modules.fg_pid.fgp_morphism.FGP_Homset_class_with_category'>
 }}}
 The correct category in this case is "Category of commutative additive
 groups".  (This is mathematically the same as the category of
 '''Z'''-modules, but the two categories are currently distinct in Sage.)

 This ticket fixes the above behaviour by making `FGP_Module._Hom_()` use
 `FGP_Homset_class` only in the case where the codomain is also a
 `FGP_Module`, and using the superclass `_Hom_()` method (with `category`
 parameter) otherwise.

 This is a prerequisite for #15618.

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