This function allows one to access the labels of the basis elements of a labeled free module. For instance, if F is a labeled free module of r, then its basis is labeled by a list L. This function takes an integer i between 0 and outputs the i’th element of L.
i1 : S=ZZ/101[x_{0,0,0}..x_{2,1,1}]; |
i2 : A=labeledModule(S^3); o2 : free S-module with labeled basis |
i3 : fromOrdinal(0,A) o3 = 0 |
i4 : B=labeledModule(S^2); o4 : free S-module with labeled basis |
i5 : C=symmetricPower(2,B) 3 o5 = S o5 : free S-module with labeled basis |
i6 : fromOrdinal(0,C) o6 = {0, 0} o6 : List |
i7 : f=map(A,C,(i,j)->x_(flatten {fromOrdinal(j,A)}|fromOrdinal(i,C))) o7 = | x_{0, 0, 0} x_{1, 0, 0} x_{2, 0, 0} | | x_{0, 0, 1} x_{1, 0, 1} x_{2, 0, 1} | | x_{0, 1, 1} x_{1, 1, 1} x_{2, 1, 1} | 3 3 o7 : Matrix S <--- S |