> That does EXACTLY what I want, but now I run into a bug:
>
> R1 = ZZ['x0','x1']
> x = R1(1)
> R2 = ZZ[tuple('x'+str(i) for i in range(967))]
> y = R2('x0')
> x*y
>
> gives a RuntimeError: maximum recursion depth exceeded.
>
> The 967 is the smallest number in the Notebook that gives an error; o
> Does this what you want?
>
> sage: R=ZZ['x1','x2','x3']
> sage: S=ZZ[R.gens()+('x4','x5')]
> sage: M=matrix(R,[1,2,3])
> sage: M.change_ring(S)
> [1 2 3]
>
> Variable names actually matter in sage, so there is automatically a
> coercion from R into S.
>
>
> That does EXACTLY what I want, but n
On Friday, January 13, 2017 at 6:14:29 PM UTC-8, Stefan wrote:
>
> What I'd like: extend R with a few extra variables. I also have a matrix
> over R that I'd like to interpret as a matrix over
> R-with-a-few-extra-variables.
> What I get: only the ring S has the method extend_variables. Neither R