#11490: Add a thematic tutorial on coercion and categories
---------------------------------------------------------+------------------
       Reporter:  SimonKing                              |         Owner:  
mvngu                              
           Type:  enhancement                            |        Status:  
needs_review                       
       Priority:  major                                  |     Milestone:  
sage-5.7                           
      Component:  documentation                          |    Resolution:       
                              
       Keywords:  categories coercion thematic tutorial  |   Work issues:       
                              
Report Upstream:  N/A                                    |     Reviewers:  
Vincent Delecroix, Travis Scrimshaw
        Authors:  Simon King                             |     Merged in:       
                              
   Dependencies:  #14084                                 |      Stopgaps:       
                              
---------------------------------------------------------+------------------

Comment (by SimonKing):

 By the way, it is a bit ironical:
 {{{
 sage: Q.gen()
 Traceback (most recent call last):
 ...
 RuntimeError: NewFrac(Univariate Polynomial Ring in x over Integer Ring)
 still using old coercion framework
 }}}

 I think that this error is totally misleading. Clearly, the new coercion
 model is used, is it not?

 The test against the old coercion model simply asks whether
 `P._element_constructor` is not None:
 {{{
 cdef inline check_old_coerce(parent.Parent p):
     if p._element_constructor is not None:
         raise RuntimeError, "%s still using old coercion framework" % p
 }}}

 Since `P._element_constructor` now seems to coincide with
 `P._element_constructor_`, this test is simply wrong. Similarly:
 {{{
 sage: edit(Q.gen,'vim')
 sage: def check_old_coerce(p):
 ....:     if p._element_constructor is not None:
 ....:         raise RuntimeError, "%s still using old coercion framework"
 % p
 ....:
 sage: check_old_coerce(QQ[['x']])
 Traceback (most recent call last):
 ...
 RuntimeError: Power Series Ring in x over Rational Field still using old
 coercion framework
 sage: check_old_coerce(SymmetricFunctionAlgebra(QQ))
 Traceback (most recent call last)
 ...
 RuntimeError: Symmetric Functions over Rational Field in the Schur basis
 still using old coercion framework
 }}}

 I think it is time to remove this test. But not on this ticket, of course.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11490#comment:44>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to