Skip to main content

Posts

Showing posts from June, 2010

Rings in M2 with "my variables"

M2 can easily create a ring with many variables

R = ZZ[vars(0..10)]

But I need my variables to be called x1, ..., x10 (in particular, not x_i)

l = apply(10, i-> value concatenate("x",toString i))

I make strings "xi" and applying value turns the strings into symbols, the correct input for a ring:

R = ZZ[l]
gens R