common parents

32 views
Skip to first unread message

Martin R

unread,
Apr 2, 2026, 3:50:57 PM (8 days ago) Apr 2
to sage-devel
I don't understand the following.  It's all in a fresh session.

sage: R.<x,y> = ZZ[]
sage: S.<a,b> = ZZ[]
sage: coercion_model.common_parent(R, S)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[8], line 1
----> 1 coercion_model.common_parent(R, S)

File sage/structure/coerce.pyx:1110, in sage.structure.coerce.CoercionModel.common_parent()

File sage/structure/coerce.pyx:1444, in sage.structure.coerce.CoercionModel.canonical_coercion()

TypeError: no common canonical parent for objects with parents: 'Multivariate Polynomial Ring in x, y over Integer Ring' and 'Multivariate Polynomial Ring in a, b over Integer Ring'
sage: R.<x,y,z> = ZZ[]
sage: S.<z,t> = ZZ[]
sage: coercion_model.common_parent(R, S)
Multivariate Polynomial Ring in x, y, z, t over Integer Ring

Martin R

unread,
Apr 2, 2026, 4:03:52 PM (8 days ago) Apr 2
to sage-devel
Oh.  It's because the last variable in R coincides with the first variable in S.

What a mess.
Reply all
Reply to author
Forward
0 new messages