#13378: Do not cache the non-existence of coerce/convert map too often, and do 
not
pretend that there is a conversion where it doesn't make sense at all
----------------------------------------------------+-----------------------
       Reporter:  SimonKing                         |         Owner:  robertwb
           Type:  defect                            |        Status:  new     
       Priority:  major                             |     Milestone:  sage-5.3
      Component:  coercion                          |    Resolution:          
       Keywords:  coercion conversion object cache  |   Work issues:          
Report Upstream:  N/A                               |     Reviewers:          
        Authors:                                    |     Merged in:          
   Dependencies:                                    |      Stopgaps:          
----------------------------------------------------+-----------------------

Comment (by nbruin):

 > ZZ has no parent, it ''is'' a parent. Elements have a parent, but
 parents have a category.
 Ah yes, keeping that distinction strict is probably a good idea, even if
 it's
 not always desirable from a strictly mathematical point of view:
 {{{
 sage: I=ZZ.ideal(3)
 sage: I(6)
 TypeError: 'Ideal_pid' object is not callable
 sage: parent(I)
 Monoid of ideals of Integer Ring
 sage: category(I)
 Category of ring ideals in Integer Ring
 }}}
 so an ideal is an element and not a parent (although mathematically it's
 also a
 a non-unitary ring and at the very least a ZZ-module). What's that
 category
 doing on `I` though? Do elements have a parent ''as well as'' a category?
 {{{
 sage: V=FreeModule(ZZ,1)
 sage: W=V.span([3*V.0])
 sage: parent(W)
 <class 'sage.modules.free_module.FreeModule_submodule_pid_with_category'>
 sage: category(W)
 Category of modules with basis over Integer Ring
 }}}
 And here we're not getting a parent "... of submodules of V", whatever the
 ...
 should be.

 Along these lines, by the way:
 {{{
 sage: NumberField(x^2+1,name='i').ideal(3)
 Fractional ideal (3)
 sage: QQ.ideal(3)
 Principal ideal (1) of Rational Field
 }}}
 illustrating the usual schism between algebraists and number theorists.

 I don't think I'm really trying to make any point here. I'm just checking
 to
 what degree Sage agrees with my mathematical intuition.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13378#comment:5>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to