Opened 9 years ago
Closed 8 years ago
#20 closed defect (fixed)
coercion issues
Reported by: | was | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | basic arithmetic | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by was)
From David Harvey: Further to our discussion of a few days ago, I found something quite confusing, not sure what the correct behaviour should be. sage: poly_ring1.<gen1> = PolynomialRing(QQ) sage: poly_ring2.<gen2> = PolynomialRing(QQ) sage: huge_ring.<x> = PolynomialRing(poly_ring1) sage: huge_ring(gen1) gen1 sage: huge_ring(gen2) x In the first example gen1 is getting coerced into a constant polynomial because it belongs to the coefficient ring, and in the second example it's "renaming the variable". I suppose that makes sense, although I'm a bit uneasy about the second one. BUT it's not consistent with the behaviour for power series: sage: power_ring1.<gen1> = PowerSeriesRing(QQ) sage: power_ring2.<gen2> = PowerSeriesRing(QQ) sage: huge_power_ring.<x> = PowerSeriesRing(power_ring1) sage: huge_power_ring(gen1) x sage: huge_power_ring(gen2) x Is this a bug? Response: from william: "Yes"
Change History (2)
comment:1 Changed 8 years ago by was
- Description modified (diff)
comment:2 Changed 8 years ago by was
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
This is fixed in sage-1.5: