If you look at the code, you'll see it's a one-liner:
return self.parent()([a.subs(in_dict, **kwds) for a in self.list()])
So it does the substitution on the elements and then forces the result back
into the parent, which is FreeModule(R,3). Your ring T has a conversion
back into R because both are polynomial rings in 3 variables over QQ. If
you change your codomain to `T.<t,t0,t1,t2>` you'll see an error that shows
what's going on.
So the code is definitely doing what it is programmed to do. I think it's
more designed to work with modules over the Symbolic ring, though. You
could look into the revision history with "blame" to see if it ever did
anything else. I suspect you recall it working according to your intent
when used over SR (where it would work).
The problem with giving the result back that you probably intend is that
`subs` would somehow have to figure out you want the answer to lie in
`FreeModule(T,3)` and construct that parent.
On Sunday, 21 December 2025 at 08:14:42 UTC-8 Enrique Artal wrote:
> Not really, but it may help. I do not see why it idoes not work.
>
> El domingo, 21 de diciembre de 2025 a las 14:53:44 UTC+1,
> [email protected] escribió:
>
>> On Sun, Dec 21, 2025 at 5:48 AM Enrique Artal <[email protected]>
>> wrote:
>>
>>> I think that this code has been successful once:
>>> R.<x, y> = QQ[]
>>> T.<t> = QQ[]
>>> sb = {x: t, y: t^2}
>>> X = vector(R.gens())
>>> X.subs(sb)
>>>
>>> This one works:
>>>
>>> R.<x, y, z> = QQ[]
>>> T.<t, t0, t1> = QQ[]
>>> F = (y * z - x^2)^2 - x^3 * z
>>> sb = {x:t^2, y:t^3 + t^4, z:1}
>>> X = vector(R.gens())
>>> X.subs(sb)
>>>
>>> But the result is (x^2, x^4 + x^3, 1)
>>>
>>> What am I doing wrong
>>>
>>
>> Do you need the ring T?
>>
>>
>> R.<x, y, z, t> = QQ[]
>>
>> sb = {x:t^2, y:t^3 + t^4, z:1}
>>
>> X = vector([x,y,z])
>> X.subs(x=t^2, y=t^3 + t^4, z=1)
>>
>> works for me.
>>
>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/sage-support/3820340c-b09a-45bb-958b-f8403f094269n%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/sage-support/3820340c-b09a-45bb-958b-f8403f094269n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/sage-support/ca30072f-60a7-42ec-a1d6-481fc7436b84n%40googlegroups.com.