#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):
Replying to [comment:17 nthiery]:
> For robust results, one should always specify the category.
But that's the issue: The category ''is'' specified:
Hypothetical dialogue (I'm sorry it has to be this academic--I don't
presently have an actual example).
{{{
sage: QQ.category()
Category of Commutative Rings
sage: QQ.is_finitely_generated()
False
}}}
Sage confirms that at this point, it's considering `QQ` as a commutative
ring and as such is not finitely generated.
{{{
sage: QQ in Fields()
True
sage: QQ.category()
Category of Fields
sage: QQ.is_finitely_generated()
True
}}}
Since the category here is `Fields` the question about finite generation
should be considered there. Since it's a prime field I don't see how any
other answer than `True` could be considered there.
This suggests to me that the concept of finite generation is not well-
behaved w.r.t. restricting to ''full subcategories''. I don't think that
disqualifies it as a reasonable thing to ask. Instead, it suggests to me
that it's not safe to implicitly change categories to full subcategories,
since that change can affect what the answers to certain perfectly
reasonable questions are.
It's important to keep in mind that by insisting on unique parents, sage
is deviating from what most computer algebra systems choose to do. It
makes the immutability of parents extremely important, because mutations
can have extremely non-local consequences. Hence, every time immutability
is violated one has to argue extremely carefully that the effect is
immaterial. Changing categories sounds like a very dangerous thing to me.
Normally I'm not a fan of discussions about hypothetical code. However,
here I think this issue is worth serious thinking because we're touching
on fundamental infrastructure in sage:
The parent you get back when you ask for its construction can either be a
fresh one, or one that is already referenced somewhere, or one that was
already deleted but not yet found by the garbage collector (perhaps
because it got trapped in a permanent cache somewhere), depending on what
happened before.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14084#comment:18>
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.