Bugfix concerning ticket #26421
In #26421 factorization of polynomials has been extended to previously untreated cases in which the polynomial's base ring is an integral domain.
The factorization is done over the field of fraction and excepted if it can be coerced into the base ring itself. Since the method base_change
of the class Factorzation
doesn't check if the unit of the factorization is coerced to a unit again, this implementation is too vastly:
sage: R.<t> = LaurentPolynomialRing(ZZ)
sage: P.<x> = R[]
sage: f = 2*x + 4
sage: f.is_irreducible()
True
sage: F = f.factor(); F
(2) * (x + 2)
sage: F.unit()
2
Change History (6)
Branch: |
→ u/soehms/factorization_integral_domain_29266
|
Authors: |
→ Sebastian Oehms
|
Commit: |
→ 004c1c4211af86c177b8fd537f6aad01cc593623
|
Status: |
new →
needs_review
|
Reviewers: |
→ Travis Scrimshaw
|
Commit: |
004c1c4211af86c177b8fd537f6aad01cc593623 →
a21db2793711b9bd10127911bc9a2c432dca9947
|
Status: |
needs_review →
positive_review
|
Branch: |
u/soehms/factorization_integral_domain_29266 →
a21db2793711b9bd10127911bc9a2c432dca9947
|
Resolution: |
→ fixed
|
Status: |
positive_review →
closed
|
Maybe a better place for the fix would be the method
base_change
of the classFactorization
. But since this leads to the failure of previous doctests (in casesis_unit
is not implemented), I preferred the implementation in methodfactor
.New commits:
29266 initial version