So one thing I thought of that could be a problem is this:

ZZ['x'] --> ZZ['x,y']['x']

or more generally anytime there are repeated variable names. Actually, in 
this case, I feel the default should be to go into the base ring rather 
than the final ring, but another option would be to just error out and say 
it is ambiguous.

Best,
Travis


On Tuesday, January 14, 2020 at 11:13:51 PM UTC+10, David Roe wrote:
>
>
>
> On Tue, Jan 14, 2020 at 2:31 AM Vincent Delecroix <20100.d...@gmail.com 
> <javascript:>> wrote:
>
>> Maybe you want
>>
>> sage: T(S.flattening_morphism()(f))
>> a*x + b*x + a*y + b*y
>>
>>
>> Le 14/01/2020 à 08:22, Travis Scrimshaw a écrit :
>> > Hi everyone,
>> >     I wanted to know if this is a deliberate behavior or a bug:
>> > 
>> > sage: R.<x,y> = ZZ[]
>> > sage: S.<a,b> = R[]
>> > sage: T = ZZ['a,b,x,y']
>> > sage: f = (x+y)*(a+b)
>> > sage: T(f)
>> > ...
>> > TypeError: not a constant polynomial
>> > 
>> > I understand that there should not be a coercion from S to T, but I feel
>> > like we should be able to have conversions (anytime the variables of S 
>> are
>> > a subset of those of T). I have a vague recollection that this used to
>> > work, but I wouldn't know the last version I tried to do this. What do 
>> you
>> > think?
>>
>
> I agree that T(f) should work.
> David
>  
>
>> > 
>> > Thanks,
>> > 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-...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/d8edc2b6-4732-f523-ba1c-71001a3aac99%40gmail.com
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/fbb0a228-daaa-4b67-9aef-368005972c1c%40googlegroups.com.

Reply via email to