#15303: Coercion discovery fails to be transitive
----------------------------+-------------------------
       Reporter:  nbruin    |        Owner:
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-5.13
      Component:  coercion  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+-------------------------

Comment (by nbruin):

 The problem is that in the present implementation, both coercions are
 stored on `A`, so if a coercion from `B` to `C` is requested, it hard to
 realize that `A` should even be considered.

 As far as I understand, the coercion model should behave as a digraph on
 the parents, where a coercion between parents exists if there is a path
 from one to the other. In that model, coercion existence should be
 transitive, so the behaviour described is a bug.

 One way to work around it is, at least for coercion discovery, to store
 the coercion always on the codomain. By #14711 this can now happen without
 the implication that the codomain will keep the domain alive. We would
 have to store it in a place where it can be used for coercion discovery,
 though.

 If it is desirable to keep the current lifetime implications for
 `register_embedding` (and it probably is) then we should ensure this
 separately, either by also storing the embedding map on the domain or by
 just having a direct reference from the domain to the codomain.

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