#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 | 74821fe5409c3104b5d6eb7407a8287d54170df9
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by SimonKing):
I wonder: Do we really insist on making the example from the ticket
description work?
There are typical parents (e.g., CC) that have numerous registered coerce
embeddings from other parents (e.g., from number fields). If we try to
find a coercion from P into CC, it would normally not help to first search
for a coercion from P into a number field instead.
So, perhaps we could say that registered embeddings should be ignored in
backtracking (as they are now). If one wants something like the example
from the ticket description, one should ''not'' use
`.register_embedding()`, but do something like this:
{{{
C.coerce_map_from(B) # returns None, since we have no A yet
A.register_coercion(BtoA)
AtoC.register_as_coercion() # should increase the cache version number
according to the Lemma
C.coerce_map_from(B) # now returns a coercion via A, because the cached
absence of a coercion
# will be ignored after the increment of the version
number
}}}
Do you agree on this change of aim?
--
Ticket URL: <http://trac.sagemath.org/ticket/15303#comment:45>
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.