Bug in SpecializationMorphism?

44 views
Skip to first unread message

Matthias Volk

unread,
Dec 17, 2020, 11:44:39 AM12/17/20
to sage-...@googlegroups.com
Dear all,

I found some unexpected/inconsistent behavior when specializing a polynomial in a tower of polynomial rings to a special value. Consider the case when the base of the tower is QQ:

sage: K.<t> = QQ[]
sage: R.<x> = K[]
sage: f = x + t
sage: f1 = f.specialization({t: 1}); f1
x + 1
sage: f1.parent()
Univariate Polynomial Ring in x over Rational Field

On the other hand, if the base of the tower is QQbar, the specialized polynomial remains a polynomial in x and t:

sage: K.<t> = QQbar[]
sage: R.<x> = K[]
sage: f = x + t
sage: f1 = f.specialization({t: 1}); f1
x + 1
sage: f1.parent()
Univariate Polynomial Ring in x over Univariate Polynomial Ring in t over Algebraic Field

Note that the value is substituted correctly, but unlike for QQ f1's parent is R and not QQbar["x"] as I would expect.

I can see that this happens because a different SpecializationMorphism is constructed in the two cases. I believe the difference lies in line 547 of src/sage/rings/polynomial/flatten.py (https://git.sagemath.org/sage.git/tree/src/sage/rings/polynomial/flatten.py?h=9.2#n547), where for QQ the list "new" is empty (when dealing with the ring K) while for QQbar the list "new" contains the variable t. This causes the tower to be reconstructed differently.

Is this behavior a bug? I tried searching on trac, but could not find anything.

My version of sage is: SageMath version 9.2, Release Date: 2020-10-24
OS: Linux x86_64

Best regards,
Matthias

Travis Scrimshaw

unread,
Dec 23, 2020, 6:15:28 PM12/23/20
to sage-devel
The fact that this behavior is inconsistent is a bug IMO. Judging from the examples and my natural expectation, the QQ example is the behavior we want. Could you open a trac ticket for this?

Best,
Travis

Matthias Volk

unread,
Dec 25, 2020, 6:01:53 AM12/25/20
to sage-...@googlegroups.com
Thanks! I opened a ticket here: https://trac.sagemath.org/ticket/31105

Best,
Matthias
> --
> 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/07cb69f2-b33d-49b9-9535-bb113c8917f6n%40googlegroups.com <https://groups.google.com/d/msgid/sage-devel/07cb69f2-b33d-49b9-9535-bb113c8917f6n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages