[sage-devel] Re: bug in exquo?

2022-10-12 Thread 'Martin R' via sage-devel
Easy fix at https://trac.sagemath.org/ticket/34653, please review! Martin On Thursday, 13 October 2022 at 00:05:37 UTC+2 Martin R wrote: > OK, I think now I am down to what's quite clearly a bug: > > sage: P. = PolynomialRing(SR) > sage: R. = PolynomialRing(P, sparse=False); R > Univariate Polyn

[sage-devel] Re: bug in exquo?

2022-10-12 Thread 'Martin R' via sage-devel
OK, I think now I am down to what's quite clearly a bug: sage: P. = PolynomialRing(SR) sage: R. = PolynomialRing(P, sparse=False); R Univariate Polynomial Ring in z over Multivariate Polynomial Ring in x, y over Symbolic Ring sage: A = -x*z^2 + x*z sage: B = -x sage: A // B z^2 - z sage: P. = Pol

[sage-devel] Re: bug in exquo?

2022-10-12 Thread 'Martin R' via sage-devel
Possibly related: sage: P. = PolynomialRing(SR) sage: R. = PolynomialRing(P); R Univariate Polynomial Ring in z over Multivariate Polynomial Ring in x, y over Symbolic Ring sage: num = -x*z^2 + x*z sage: den = x*z^2 + (-x-1)*z + 1 sage: num.gcd(den) z - 1 sage: P. = PolynomialRing(SR) sage: R. =

Re: [sage-devel] missing coercion?

2022-10-12 Thread 'Martin R' via sage-devel
Ah, thank you! On Wednesday, 12 October 2022 at 23:19:09 UTC+2 David Roe wrote: > It's the difference between conversion and coercion. > > P = PolynomialRing(GF(2), "z", sparse=True); Q = PolynomialRing(ZZ, "z", > sparse=False) > sage: P.convert_map_from(Q) > Conversion map: > From: Univariate

Re: [sage-devel] missing coercion?

2022-10-12 Thread David Roe
It's the difference between conversion and coercion. P = PolynomialRing(GF(2), "z", sparse=True); Q = PolynomialRing(ZZ, "z", sparse=False) sage: P.convert_map_from(Q) Conversion map: From: Univariate Polynomial Ring in z over Integer Ring To: Sparse Univariate Polynomial Ring in z over Fini

Re: [sage-devel] missing coercion?

2022-10-12 Thread 'Martin R' via sage-devel
Sorry, I don't understand your last sentence. We have sage: P = PolynomialRing(GF(2), "z", sparse=True); Q = PolynomialRing(ZZ, "z", sparse=False) sage: P.has_coerce_map_from(Q) False How does this fit with "And of course you can convert even when Q is not sparse."? Martin On Wednesda

Re: [sage-devel] missing coercion?

2022-10-12 Thread David Roe
Yes, that's expected. sage: P = PolynomialRing(GF(2), "z", sparse=True); Q = PolynomialRing(ZZ, "z", sparse=True) sage: P.has_coerce_map_from(Q) True And of course you can convert even when Q is not sparse. David On Wed, Oct 12, 2022 at 4:58 PM 'Martin R' via sage-devel < sage-devel@googlegroups

[sage-devel] missing coercion?

2022-10-12 Thread 'Martin R' via sage-devel
I have no idea whether the following is to be expected: sage: P = PolynomialRing(GF(2), "z", sparse=False); Q = PolynomialRing(ZZ, "z") sage: P.has_coerce_map_from(Q) True sage: P = PolynomialRing(GF(2), "z", sparse=True); Q = PolynomialRing(ZZ, "z") sage: P.has_coerce_map_from(Q) Fal

[sage-devel] bug in exquo?

2022-10-12 Thread 'Martin R' via sage-devel
I am not sure whether the following is to be expected. Martin sage: R. = SR[] sage: S. = R[] sage: (x*z).quo_rem(S(x)) --- TypeError Traceback (most recent call last) File ~/sage-develop/src/sa