Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coercion issues #20

Closed
williamstein opened this issue Sep 12, 2006 · 2 comments
Closed

coercion issues #20

williamstein opened this issue Sep 12, 2006 · 2 comments

Comments

@williamstein
Copy link
Contributor

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"

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/20

@williamstein

This comment has been minimized.

@williamstein
Copy link
Contributor Author

comment:2

This is fixed in sage-1.5:

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)
gen1
sage: huge_power_ring(gen2)
x

tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
* Remove travis config

* Modify the name of the github workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant