This function allows one to move from the labels of the basis elements of a labeled free module of rank $r$ to the the integers $\{0,1, \dots, r-1\}$. More specifically, if $F$ is a labeled free module where we have labeled the basis with the list $L$, then this function an element $l\in L$ to the ordinal $j$ such that $l$ is the $j$'th element of $L$.
i1 : S=ZZ/101[x_{0,0,0}..x_{2,1,1}]; |
i2 : C=symmetricPower(2,labeledModule(S^3)) 6 o2 = S o2 : free S-module with labeled basis |
i3 : basisList C o3 = {{0, 0}, {0, 1}, {1, 1}, {0, 2}, {1, 2}, {2, 2}} o3 : List |
i4 : toOrdinal({0,0},C) o4 = 0 |
i5 : toOrdinal({1,2},C) o5 = 4 |
The object toOrdinal is a method function.