#7711: integral() does not reduce coefficients in finite field
---------------------------------------+------------------------------------
Reporter: zimmerma | Owner: malb
Type: defect | Status: needs_info
Priority: major | Milestone: sage-5.0
Component: commutative algebra | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Paul Zimmermann
Authors: Alex Ghitza | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Comment (by AlexGhitza):
Replying to [comment:20 was]:
> Does this patch break a major fundamental design decision in both Sage
and Magma, namely that / is a constructor for elements of the fraction
field. E.g., 3/1 has parent QQ.
Hi William, can you have a look at the docstring for p.integral() as it
stands now and tell me whether you think it complies with this design
decision? Here is an example:
{{{
sage: S.<x> = ZZ[]
sage: p = 2*x
sage: p.integral()
x^2
sage: p.integral().parent()
Univariate Polynomial Ring in x over Integer Ring
}}}
Behind the scenes Sage performed 2/2 and decided that the answer was 1 in
ZZ rather than 1 in QQ, so this seems to break the convention. Also, the
answer has a different parent than (3*x).integral(), which is the type of
inconsistency that Paul was pointing out before. So should this stay the
way it is, or should this be changed to be more consistent?
But it gets a tiny bit more complicated than this. Suppose your
coefficients are not ZZ, but rather ZZ[y], where y is a vector of 200
variables. The integral of 2*x is still x^2, but where do we want this
x^2 to live? Possible answers are (a) ZZ[y][x], (b) Frac(ZZ[y])[x], (c)
QQ[y][x].
The current behavior is (a) for 2*x and (b) for 3*x, and I am currently
leaning toward changing both to (c). This is the question that I need
some input on.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7711#comment:22>
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.