#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:                     |
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Hello,

 I am not sure I am the best person to do the complete review. But...

 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.

 2. With your modifications the following changes. Old version:
 {{{
 sage: C12.<zeta12> = CyclotomicField(12)
 sage: C4.<zeta4> = CyclotomicField(4, embedding=zeta12**3)
 sage: PowerSeriesRing(C12, 'x').coerce_map_from(C4)
 Composite map:
   From: Cyclotomic Field of order 4 and degree 2
   To:   Power Series Ring in x over Cyclotomic Field of order 12 and
 degree 4
   Defn:   Generic morphism:
           From: Cyclotomic Field of order 4 and degree 2
           To:   Cyclotomic Field of order 12 and degree 4
           Defn: zeta4 -> zeta12^3
         then
           Conversion map:
           From: Cyclotomic Field of order 12 and degree 4
           To:   Power Series Ring in x over Cyclotomic Field of order 12
 and degree 4
 }}}
   Versus new version:
 {{{
 sage: PowerSeriesRing(C12, 'x').coerce_map_from(C4)
 Conversion map:
   From: Cyclotomic Field of order 4 and degree 2
   To:   Power Series Ring in x over Cyclotomic Field of order 12 and
 degree 4
 sage: timeit("mor(a)", number=5000, repeat=6)
 5000 loops, best of 6: 120 µs per loop
 }}}
   whereas for `PolynomialRing` the behavior is identical (similar to the
 "old version" above). Is it the kind of thing that you expected?

 Vincent

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