change_ring for ideals

51 views
Skip to first unread message

Travis Scrimshaw

unread,
Oct 16, 2023, 12:03:32 AM10/16/23
to sage-devel
Hi everyone,
   Is there some reason why a generic change_ring() was not implemented for all ideals? This leads to a bug with univariate Laurent polynomials:

sage: L.<t> = LaurentPolynomialRing(QQ)
sage: I = L.ideal(0)
sage: I + I
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'Ideal_1poly_field' object has no attribute 'change_ring'

I imagine that just calling "return self.ring().parent().ideal(self.gens())" would work in general (and I think should for that matter).

This was noticed on PR #36368, where the author is working around it by implementing this for the class in question.

Best,
Travis

Dima Pasechnik

unread,
Oct 16, 2023, 2:53:05 AM10/16/23
to sage-devel


On Mon, 16 Oct 2023, 05:03 'Travis Scrimshaw' via sage-devel, <sage-...@googlegroups.com> wrote:
Hi everyone,
   Is there some reason why a generic change_ring() was not implemented for all ideals? This leads to a bug with univariate Laurent polynomials:

I guess it was not implemented because the backend used here is not Singular (where it's built-in)



sage: L.<t> = LaurentPolynomialRing(QQ)
sage: I = L.ideal(0)
sage: I + I
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'Ideal_1poly_field' object has no attribute 'change_ring'

I imagine that just calling "return self.ring().parent().ideal(self.gens())" would work in general (and I think should for that matter).

This was noticed on PR #36368, where the author is working around it by implementing this for the class in question.

Best,
Travis

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f373c92a-1f68-42ab-aec0-a22305173bacn%40googlegroups.com.

Travis Scrimshaw

unread,
Oct 16, 2023, 10:42:43 PM10/16/23
to sage-devel
Then I will write a PR that implements the generic version I described.

This is now #36472, but I am getting a problem with large looping in p-adics that I cannot figure out. I haven't run other tests, but I think the only issues are localized to that code.

Best,
Travis
Reply all
Reply to author
Forward
0 new messages