#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 nbruin):

 I think we really need another way to cache whether a ring is a field
 then. What you describe is indeed the case:
 {{{
 sage: R=ZZ.quo(7)
 sage: R in IntegralDomains() ##1
 False
 sage: R in Fields()
 True
 sage: R in IntegralDomains() ##2
 True
 }}}
 you can see that the call `R in Fields()` has mutated the parent in an
 essential way. The kind of call that people HAVE to use to look at the
 category field because it is not trustworthy by itself even can change
 depending on what happens with the parent elsewhere!

 Whether `##1` is a bug or not depends on how you interpret the question:
 Are we asking the mathematical truth (which in general might be
 undecidable) or are we asking what sage knows about the object by
 construction? The first would of course be nicer, but computer algebra
 systems often settle for the second.

 The important thing here is to illustrate how easy it is to mutate parents
 in a significant way if you start mucking with their category.

 Personally I think it's fine if `ZZ.quo(7)` doesn't advertise itself as a
 `field by construction`. People can ask for `GF(7)` instead, which luckily
 does give back a non-identical parent:
 {{{
 sage: R=ZZ.quo(7)
 sage: R2=GF(7)
 sage: id(R)
 85206256
 sage: id(R2)
 17095856
 }}}
 By the way:
 {{{
 sage: R.category()
 Join of Category of commutative rings and Category of subquotients of
 monoids and Category of quotients of semigroups and Category of finite
 enumerated sets
 sage: R2.category()
 Join of Category of subquotients of monoids and Category of quotients of
 semigroups and Category of finite fields
 }}}
 I have to say those values do a good job of dissuading people from ever
 looking at them!

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

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