Creating a polynomial ring where the variables are code generated
Hi, The standard way to create a multivariate polynomial ring over ZZ
is as follows.
sage: R.<x,y> = PolynomialRing(ZZ)
I want to create a polynomial ring over ZZ
where the variables are generated by code.
sage: n = 5
sage: lstx = list(var('x_%d' % i) for i in range(n))
sage: lstx
[x_0, x_1, x_2, x_3, x_4]
My attempts at creating the desired ring whose variables are the elements of lstx
result in error. Any help will be appreciated.