Opened 8 months ago
Last modified 4 months ago
#27255 new defect
conversion in multivariate polynomial ring fails
Reported by: | dkrenn | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | algebra | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #22333 | Stopgaps: |
Description
Trying to "group" the coefficients like
sage: P.<a, b, n> = QQ[] sage: N = PolynomialRing(QQ, 'n') sage: AB = PolynomialRing(N, 'a, b') sage: AB(a*n + a*n^2)
fails with
TypeError: not a constant polynomial
but the result should be
(n + n^2)*a
As an interesting side note, the Laurent polynomial ring can do it:
sage: L = LaurentPolynomialRing(QQ, 'a, b, n') sage: LN = LaurentPolynomialRing(QQ, 'n') sage: LAB = LaurentPolynomialRing(LN, 'a, b') sage: LAB(L(a*n + a*n^2)) (n + n^2)*a
The Laurent polynomial ring can do this since #21855. And #22333 is about reusing this code, so there is a good chance that #22333 fixes this as well.
Change History (4)
comment:1 Changed 8 months ago by
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 8 months ago by
comment:3 Changed 7 months ago by
- Milestone changed from sage-8.7 to sage-8.8
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
comment:4 Changed 4 months ago by
- Milestone sage-8.8 deleted
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
This might be fixed by #25558 (which is work in progress).