Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » BasicList » IndexedVariable
next | previous | forward | backward | up | index | toc

IndexedVariable -- the class of all indexed variables

Description

Indexed variables provide the possibility of producing polynomial rings R[x_0, x_1, ..., x_(n-1)] in n variables, where n is not known in advance. If x is an symbol, and i is an integer, then x_i produces an indexed variable. After this has been done, an assignment x_i=v will assign another value to it. A new sequence of indexed variables of length n assigned to the symbol x can be produced with x_1 .. x_n and that sequence can be used in constructing a polynomial ring.
i1 : ZZ/101[t_0 .. t_4]

      ZZ
o1 = ---[t ..t ]
     101  0   4

o1 : PolynomialRing
i2 : (t_0 -  2*t_1)^3

      3     2          2     3
o2 = t  - 6t t  + 12t t  - 8t
      0     0 1      0 1     1

      ZZ
o2 : ---[t ..t ]
     101  0   4
Warning: the values of the indexed variables t_i are stored in a global location, behind the scenes, so may not get garbage collected, even if t is a local variable.

Menu

Methods that use an indexed variable:

  • IndexedVariable <- Thing -- see <- -- assignment with left side evaluated
  • IndexedVariable ? IndexedVariable -- see ? -- comparison operator
  • Symbol ? IndexedVariable -- see ? -- comparison operator
  • baseName(IndexedVariable) -- see baseName -- the base name of a generator
  • IndexedVariable .. IndexedVariable -- sequences of consecutive indexed variables
  • IndexedVariable ..< IndexedVariable -- sequences of consecutive indexed variables
  • IndexedVariable _ Ring -- get a ring variable by name
  • promote(IndexedVariable,type of RingElement) (missing documentation)
  • value(IndexedVariable) -- retrieve the value of an indexed variable

For the programmer

The object IndexedVariable is a type, with ancestor classes BasicList < Thing.


The source of this document is in Macaulay2Doc/doc_rings.m2:282:0.