#20607: bug in LaurentPolynomial.factor
-------------------------------------+-------------------------------------
Reporter: mmarco | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: commutative | Resolution:
algebra | Merged in:
Keywords: laurent | Reviewers:
polynomials | Work issues:
Authors: Miguel Marco | Commit:
Report Upstream: N/A | 653446429df8f6187b4de63ef6fad9642408bc93
Branch: | Stopgaps:
u/mmarco/bug_in_laurentpolynomial_factor|
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by mmarco):
In the case of Laurent Polynonials, the variables are units. So we cannot
enforce the unit to live in the base ring. Consider, for instance, the
element `2*L^2 + 2*L` in the LaurentPolynomialRing of 1 variable over the
integers. Its factorization is `L * 2 * (L+1)`, where:
- `L` is the unit. It doesn't live in the base ring (which is `ZZ`)
- `2` is a factor that happens to live in the base ring, but is not a
unit.
- `L + 1` is a factor that doesn't live in the base ring and is not a
unit.
As you say, all these `if/else` wouldn't be necessary if the factorization
of polynomials would return the unit as an element of the polynomial ring
(and hence, they would have a .dict() method that would prevent this bug.
My proposal for #20214 would automatically make this patch unnecessary,
but it seems that my opinion is not shared by many people there.
--
Ticket URL: <http://trac.sagemath.org/ticket/20607#comment:6>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.