index v -- yields the numeric index of the variable 'v' in its ring. Variables are indexed starting at 0, and ending at n-1, where n is the number of variables in the ring of 'v'.
i1 : R = ZZ/101[a..d,t] |
i2 : index a |
i3 : index t |
If the ring element 'v' is not a variable, an error is generated.
The symbol index is also as a key used in GeneralOrderedMonoids to store a table which is used to map generator names to the position of the generator in the list of generators.
Ways to use index :