#14982: When a parent is equipped with an embedding, consider coercions that 
don't
go through the embedding
-------------------------------------+-------------------------------------
       Reporter:  mmezzarobba        |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  coercion           |   Resolution:
       Keywords:  embedding          |    Merged in:
        Authors:  Marc Mezzarobba,   |    Reviewers:
  Vincent Delecroix                  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  d99564520a5fd599c0fea62b86d0bdbfbd35c1a4
  u/mmezzarobba/14982-coerce_embeddings|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by mmezzarobba):

 * status:  needs_info => needs_review


Comment:

 Replying to [comment:56 vdelecroix]:
 > 1. Is this really the example you wanted to show {{{MatrixSpace(L, 2,
 2).coerce_map_from(L)}}}. Wouldn't be better to test {{{MatrixSpace(K, 2,
 2).coerce_map_from(L)}}}? Idem for the one with {{{PowerSeriesRing}}} that
 follows.

 Yes, I think it is, because I wanted to illustrate that the way coercions
 are discovered in the presence of an embedding makes it difficult to work
 with structures that have the “embedded” parent as a base ring, even if
 the parent into which it is embedded plays no role in the construction.
 But I wrote this comment more than 1½ years ago, so I'm not sure I
 remember correctly!

 > 2. With your modifications the following changes.
 >   [...]
 >   whereas for `PolynomialRing` the behavior is identical (similar to the
 "old version" above). Is it the kind of thing that you expected?

 Sorry, I'm not sure I understand the question. Let me try to answer it
 anyway: the goal of these patches is to make the coercion discovery
 algorithm ''consider'' paths that don't start with the embedding. These
 paths may or may not be selected depending on each particular case.

 > {{{
 > sage: timeit("mor(a)", number=5000, repeat=6)
 > 5000 loops, best of 6: 120 µs per loop
 > }}}

 Are these lines a copy-paste error, or did you observe a speed regression
 with some coercions? (On my machine, applying the morphism returned by
 `PowerSeriesRing(C12, 'x').coerce_map_from(C4)` takes almost exactly as
 much time before and after my patches.)

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