#10513: Coercion and category framework for modules
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:  robertwb
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  coercion           |   Resolution:
       Keywords:  coercion,          |    Merged in:
  category framework, modules        |    Reviewers:
        Authors:  Simon King, Peter  |  Work issues:
  Bruin                              |       Commit:
Report Upstream:  N/A                |  2d7f0759c12fbeeb45d42c2d6160f8d925a22252
         Branch:                     |     Stopgaps:
  u/pbruin/10513-coercion_and_categories_for_modules|
   Dependencies:  #16507             |
-------------------------------------+-------------------------------------

Comment (by pbruin):

 Replying to [comment:27 jpflori]:
 > Replying to [comment:26 pbruin]:> > Any ticket opened to implement such
 a coercion?
 > > I'm not sure if this is desired; the absence of these particular maps
 may have been an (unintended) consequence of implementing the new coercion
 model in the simplest possible way, but it may have been intentional as
 well, I don't remember.
 > I was asking because it used to be possible to use the `in` keyword when
 the classes were using the old coercion model.
 After looking at this again, I think the reason was as follows: a cone
 ''C'' is a certain type of subset of a vector space ''V'', and ''C''
 contains a largest maximal linear subspace ''S''.  Now to test if an
 element ''x'' of ''C'' is in ''S'', the coercion framework checks if
 ''S''(''x'') == ''x'', but when trying to comparing these two elements it
 cannot find a common parent for the toric lattice and the linear subspace.
 This seems to be because of the following method in
 `ToricLattice_generic`:
 {{{
 #!python
 # We need to override this function, otherwise e.g. the sum of elements of
 # different lattices of the same dimension will live in ZZ^n.
 def construction(self):
     r"""
     Return the functorial construction of ``self``.

     OUTPUT:

     - ``None``, we do not think of toric lattices as constructed from
       simpler objects since we do not want to perform arithmetic involving
       different lattices.

     [...]
     """
     return None
 }}}
 The reason why it used to work with the old coercion model might have been
 a peculiarity of some `_coerce_impl()` method.  Trying to fix this (so
 that we can use `... in ...` again) will probably lead to all kind of
 other problems, so I'd prefer not to do that on this ticket.

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