Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > variables > numbered variables
next | previous | forward | backward | up | index | toc

numbered variables

One way to get many variables suitable for use as indeterminates in a polynomial ring is with the function vars. It converts a list or sequence of integers into symbols. It prefers to hand out symbols whose name consists of a single letter, but there are only 52 such symbols, so it also uses symbols such as x55 and X44.
i1 : vars (0 .. 9,40,100,-100)

o1 = (a, b, c, d, e, f, g, h, i, j, O, x48, X100)

o1 : Sequence
These variables can be used to make polynomial rings.
i2 : ZZ[vars(0 .. 10)]

o2 = ZZ[a..k]

o2 : PolynomialRing