#15303: Coercion discovery fails to be transitive
-------------------------------------+-------------------------------------
Reporter: nbruin | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.13
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues: analyse recursion
Branch: | error
u/SimonKing/ticket/15303 | Commit:
Dependencies: #14711 | f837cbee8f81c4946a92193c73e86449c53515d9
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Aha!
With my current branch, the coerce map from `ZZ` to `QQbar` goes '''via
the universal cyclotomic field''', if one has created the universal field
before putting the coercion into the cache.
Obvious reason: With my patch, both registered coercions ''and''
registered embeddings are used for backtracking, in order to fix the
example of the ticket description. However, ''if'' there is a registered
coercion, then I guess it should have preference over the registered
embedding for backtracking. After all, the registered embedding is some
kind of "forward", not "back".
So, modified suggestion: We should not put both registered coercions and
registered embeddings into `codomain._coerce_from_backtracking`, but we
should have two separate containers, and should look for the coerce
embeddings only if no registered coercions are left.
Rationale: We suppose that registering coercions happens during
initialisation of the codomain, whereas registering an embedding will
happen ''after'' creation of the codomain. Since the backtracking starts
at the codomain, we should have a clear preference for using those maps
that are closely tied to the codomain---and these are the maps registered
during creation of the codomain.
--
Ticket URL: <http://trac.sagemath.org/ticket/15303#comment:21>
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.