#14084: Wrong domain of the fraction field construction functor
------------------------------+---------------------------------------------
       Reporter:  SimonKing   |         Owner:  roed        
           Type:  defect      |        Status:  needs_review
       Priority:  major       |     Milestone:  sage-5.7    
      Component:  padics      |    Resolution:              
       Keywords:              |   Work issues:              
Report Upstream:  N/A         |     Reviewers:              
        Authors:  Simon King  |     Merged in:              
   Dependencies:              |      Stopgaps:              
------------------------------+---------------------------------------------

Comment (by SimonKing):

 Replying to [comment:20 nbruin]:
 > I think we really need another way to cache whether a ring is a field
 then.

 Another instance of a weak cache perhaps? But if I recall correctly, I
 played with weak caches of the "is_Field" function -- and the speed was
 not competitive.

 Also note that changing the category of the ring has indirect advantages:
 There may be more parent and element methods become available when passing
 to a sub-category.

 I would say the change of category is allowed when one could have chosen
 that category during initialisation, and if the only reason for ''not''
 doing so during initialisation is efficiency: I have seen applications
 involving matrix spaces, for which it really did not matter whether the
 matrix space is a vector space or an algebra or just a set -- I just don't
 remember the ticket number. Hence, in these applications, one would
 ''postpone'' the initialisation of the category of a matrix space, and
 only do it when necessary.

 And in the case of ring versus field, I could imagine that there are
 examples in which one just needs to know that a given parent is a ring. In
 these applications, it would be a waste of time to determine during
 creation of the parent whether it actually is a field or not (which may
 involve primality tests). Hence, for efficiency, one should postpone the
 test of "being a field" until it is really needed.

 > Also, this discussion is not of direct relevance to this ticket, so
 perhaps we should take the discussion to sage-devel instead.

 +1.

 The "change of category" has not been introduced here, and not in #13370
 either. In fact, in the good old times, it was possible to have `P in
 Fields()` and `P not in IntegralDomains()`. Hence, I think of the
 refinement of categories as a progress.

 I therefore suggest to use a new ticket, if someone finds a more
 satisfying solution of the "speed versus immutability problem".

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