#16276: fixes PolynomialElement.mod()
-------------------------------------+-------------------------------------
Reporter: Bouillaguet | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Charles | Reviewers:
Bouillaguet | Work issues:
Report Upstream: N/A | Commit:
Branch: | 0061d17ca5e04465c1189d62aa032f98a0c120cf
u/Bouillaguet/ticket/16276 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by pbruin):
I don't think the approach in commit ff93a0a (Modify FLINT
implementation...) is the right one. While '''Z'''[''x''] is not a
Euclidean domain, it is undoubtedly useful for it to have a `quo_rem()`
method that does as much as it can. It is certainly more useful than
raising an exception, in my opinion.
If I understand it correctly (I haven't read the code, only the doctests),
the existing algorithm for `quo_rem(f, g)` effectively computes the
Hermite normal form of the matrix whose columns (or rows, if you use the
Sage convention) are the coefficient vectors of the polynomials `f` and
`x^i * g` for `0 <= i <= deg f - deg g`. One can do this more generally
for ''A''[''x''] with ''A'' a Euclidean domain. This is quite well-
defined mathematically, and reduces to the Euclidean algorithm in two
interesting cases: either (1) the polynomials are constant, or (2) the
base ring is a field.
So I think it would be better to change the documentation of `quo_rem()`
to clarify what it actually does, and to keep the code unchanged.
Hopefully this can be done while also keeping `mod` and `__mod__`
identical to each other and to the `rem` part of `quo_rem()`.
--
Ticket URL: <http://trac.sagemath.org/ticket/16276#comment:19>
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.
For more options, visit https://groups.google.com/d/optout.