ACE> BnCode2Interval([1,1,3]); [[1, 1, 3], [1, 1, 2], [1, 2, 1], [1, 1, 1], [1, 0, 3], [1, 0, 2], [1, 2, 0], [1, 1, 0], [0, 1, 3], [0, 1, 2], [0, 2, 1], [0, 1, 1], [0, 0, 3], [0, 0, 2], [1, 0, 1], [0, 0, 1], [0, 2, 0], [0, 1, 0], [1, 0, 0], [0, 0, 0]] ACE> map(BnCode2Bar, "); [[-3, 2, -1], [3, 2, -1], [-2, 3, -1], [2, 3, -1], [-3, -1, 2], [3, -1, 2], [-2, -1, 3], [2, -1, 3], [-3, 2, 1], [3, 2, 1], [-2, 3, 1], [2, 3, 1], [-3, 1, 2], [3, 1, 2], [-1, 3, 2], [1, 3, 2], [-2, 1, 3], [2, 1, 3], [-1, 2, 3], [1, 2, 3]]in which the BnCode2Bar converts a code of B(n) into a signed permutation.
ACE> BnNcaOnPol(B[1,0,1], x1^3*x2^2*x3); 2 x1 x2 x3One has also the BnIdcaYang function which calculates a Yang-Baxter element of the Bn-idCoxeter algebra. The set BnIdcaYang(code), for all codes in B(n) is a linear basis of the B(n)-idCoxeter algebra, as a free module with coefficients in the xi's. This basis is defined by recursion:
ACE> BnIdcaYang([0,1]); (- x1 x3 + x2 x4) B[0, 1] B[0, 0] - ------------------------- x1 x3
Using a special rule, one can for instance easily compute the product of symplectic Schur functions. This is automatically recognized in the ToSp function which expresses any symmetric function in the symplectic Schur function basis:
ACE> ToSp(Sp[2,1]^3); 12 Sp[2, 2, 1, 1, 1] + 15 Sp[2, 2, 2, 1] + 20 Sp[1, 1, 1] + 43 Sp[2, 1] + Sp[2, 2, 2, 1, 1, 1] + 12 Sp[5, 2] + 6 Sp[5] + 42 Sp[2, 2, 1] + 18 Sp[4, 1, 1, 1] + 12 Sp[5, 1, 1] + 3 Sp[6, 1] + 30 Sp[4, 1] + 9 Sp[4, 3, 1, 1] + 8 Sp[4, 3, 2] + 48 Sp[3, 1, 1] + 24 Sp[3, 3, 1] + 36 Sp[4, 2, 1] + 15 Sp[4, 3] + 24 Sp[3, 2, 2] + 20 Sp[3] + 9 Sp[4, 2, 2, 1] + 4 Sp[4, 4, 1] + 4 Sp[5, 2, 2] + 42 Sp[3, 2] + 6 Sp[5, 3, 1] + 2 Sp[5, 4] + 6 Sp[1, 1, 1, 1, 1] + 2 Sp[6, 2, 1] + Sp[6, 3] + 6 Sp[5, 2, 1, 1] + 3 Sp[2, 1, 1, 1, 1, 1] + 12 Sp[1] + Sp[4, 1, 1, 1, 1, 1] + 2 Sp[3, 2, 1, 1, 1, 1] + Sp[6, 1, 1, 1] + 6 Sp[4, 2, 1, 1, 1] + 2 Sp[5, 1, 1, 1, 1] + 12 Sp[3, 1, 1, 1, 1] + 8 Sp[3, 3, 2, 1] + 30 Sp[2, 1, 1, 1] + 6 Sp[3, 2, 2, 1, 1] + 4 Sp[3, 2, 2, 2] + 4 Sp[3, 3, 1, 1, 1] + 2 Sp[2, 2, 2, 2, 1] + 36 Sp[3, 2, 1, 1] + 2 Sp[3, 3, 3]Moreover, the ToO function expresses any symmetric function in the orthogonal Schur function basis:
ACE> ToO(s[2,1]*O[3]); O[1, 1] + O[5, 1] + 3 O[3, 1] + 2 O[4] + 2 O[2] + O[4, 2] + O[2, 2] + O[4, 1, 1] + O[2, 1, 1] + O[3, 2, 1]
Tox_n
function converts
any symmetric function to the basis of monomials:
ACE> CLG_n(3); 3 ACE> Tox_n(s[2,1]*h2); 4 3 2 2 3 4 2 3 3 2 4 x3 x2 + 2 x3 x2 + 2 x3 x2 + x1 x3 + 2 x1 x3 + 2 x1 x3 + x3 x2 4 4 3 2 2 3 4 3 + x3 x1 + x2 x1 + 2 x2 x1 + 2 x2 x1 + x2 x1 + 4 x3 x2 x1 2 2 2 2 3 2 2 3 + 6 x3 x2 x1 + 6 x3 x2 x1 + 4 x3 x2 x1 + 6 x3 x2 x1 + 4 x3 x2 x1At the level of the Schur basis, it amounts to consider only partitions having at most 3 parts:
ACE> Tos_n(s[2,1]^2); s[4, 2] + s[4, 1, 1] + s[3, 3] + 2 s[3, 2, 1] + s[2, 2, 2]In the basis of product of complete symmetric functions, it amounts to reduce all products of complete functions having more than 3 terms:
ACE> Toh_n(h2^2*h1^2); 3 2 h2 + 2 h3 h2 h1 - h3 - 2 h4 h2 + h6
For instance, the ListCompo function generates compositions of a given weight:
ACE> ListCompo(4); [[4], [3, 1], [2, 2], [2, 1, 1], [1, 3], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1]]It accepts many options which make it very attractive to generate compositions having certain properties:
ACE> ListCompo(2, 'allowzeros', 'lg'=3); [[2, 0, 0], [1, 1, 0], [1, 0, 1], [0, 2, 0], [0, 1, 1], [0, 0, 2]]One has also the ListCompoFiner function which generates all compositions finer than a given composition, that is all compositions obtained by decomposing the parts of the initial composition. The result is a list of compositions, as shown below:
ACE> ListCompoFiner([2,1,3]); [[2, 1, 3], [1, 1, 1, 3], [2, 1, 2, 1], [1, 1, 1, 2, 1], [2, 1, 1, 2], [1, 1, 1, 1, 2], [2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]
ACE> FM_n(4); 4 ACE> x2XfixScal(q^2*x2^3*x4); 2 2 - q s[1, 1, 1] X[1, 2, 4, 3] + q s[1, 1, 1] X[2, 1, 3, 4] 2 2 + q s[1, 1] X[1, 4, 2, 3] + q s[1, 1] X[1, 3, 4, 2] 2 2 - q s[1, 1] X[3, 1, 2, 4] - q s[1, 1] X[2, 3, 1, 4] 2 2 2 - q s[1] X[1, 4, 3, 2] + q X[4, 1, 3, 2] + q X[3, 4, 1, 2] 2 + q X[2, 4, 3, 1]Furthermore, we also have generalized the Monk formula to describe the multiplicative structure of this module, as illustrated by the following example:
ACE> ToXfix(x3*X[3,1,4,2]); - X[3, 4, 1, 2] - X[4, 1, 3, 2] + s[1, 1, 1, 1] X[1, 2, 3, 4] - s[1, 1, 1] X[2, 1, 3, 4] + s[1] X[3, 1, 4, 2]The package is also able to convert any expression given in the basis of Schubert polynomials indexed by permutations in S(infinity) in terms of Schubert polynomials in S(n), with coefficients in the ring of symmetric functions in n variables. The following example illustrates this computation:
ACE> X2Xfix(X[3,2,1] + q*X[3,2,1] + z*X[4,5,1,3,2], 'collect'); (1 + q) X[3, 2, 1, 4] + z s[1, 1, 1] X[3, 4, 1, 2] - z s[1, 1, 1, 1] X[2, 4, 1, 3]
w[
word]
, where word is a sequence
of integers, with arbitrary coefficients.
The Sf2Free function converts a symmetric polynomial in n variables into an element of the free algebra. The correspondance amounts to develop each Schur function as a sum of tableaux (seen as special words) of a given shape. Thus, the symmetric function is first expressed in the basis of Schur functions and then each Schur function is converted:
ACE> Sf2Free(s[2,1], 3); w[2, 1, 1] + w[2, 1, 2] + w[3, 1, 1] + w[3, 1, 3] + w[2, 1, 3] + w[3, 2, 2] + w[3, 1, 2] + w[3, 2, 3]The Pol2Free function converts a polynomial into an element of the free algebra. The polynomial is first expressed in the basis of products of elementary symmetric functions on an alphabet flag (dual basis of the usual basis of monomials). Then, this product is seen as the noncommutative concatenation of elementary symmetric functions which are seen as sums of increasing words:
ACE> Pol2Free((x1+x2)*x1 + x2^2); w[2, 2] + w[1, 2] + w[1, 1]The FreeShuffle function computes the shuffle product of two elements of the free algebra:
ACE> FreeShuffle(w[1,2,1,1] + w[2,1,1,1], w[1,2,1]); 4 w[2, 1, 1, 1, 1, 2, 1] + 6 w[2, 1, 1, 1, 2, 1, 1] + 4 w[2, 1, 2, 1, 1, 1, 1] + 4 w[1, 2, 1, 1, 1, 2, 1] + 8 w[1, 2, 1, 1, 2, 1, 1] + 10 w[1, 2, 1, 2, 1, 1, 1] + 8 w[1, 2, 2, 1, 1, 1, 1] + 2 w[1, 1, 2, 1, 1, 2, 1] + 6 w[1, 1, 2, 1, 2, 1, 1] + 12 w[1, 1, 2, 2, 1, 1, 1] + 6 w[2, 1, 1, 2, 1, 1, 1]It is also possible to work in the plactic monoid, i.e. the free algebra of words modulo the plactic relations:
ACE> Free2Plax(w[1,2,1] + w[2,1,1] + z*w[1,3,2]); 2 w[2, 1, 1] + z w[3, 1, 2] ACE> Free2PlaxClass(w[1,2,1]); w[2, 1, 1] + w[1, 2, 1] ACE> Free2PlaxClass(w[2,1,1]); w[2, 1, 1] + w[1, 2, 1] ACE> Free2PlaxClass(w[1,3,2]); w[3, 1, 2] + w[1, 3, 2]The Free2NilFree is the inverse plaxification map which transforms a word into a reduced decomposition. The inverse plaxification map has the property to send a plactic class onto a nil plactic class:
ACE> Free2PlaxClass(w[1,2,1,2]); w[2, 1, 1, 2] + w[1, 2, 1, 2] + w[1, 2, 2, 1] ACE> Free2NilFree("); w[2, 1, 2, 2] + w[1, 1, 2, 1] + w[1, 2, 1, 2]The NilFree2Free function transforms each word seen as a reduced decomposition into a word, according to the plaxification map:
ACE> NilFree2Free(w[2, 1, 2, 2] + w[1, 1, 2, 1] + w[1, 2, 1, 2]); w[2, 1, 1, 2] + w[1, 2, 2, 1] + w[1, 2, 1, 2]
For instance, we have included the HekaYang function that computes the Yang-Baxter basis of this algebra (related to the Yang-Baxter equation), seen as a free module with coefficients in the xi's, q1, q2:
ACE> HekaYang([2,3,1]); (- x2 + x1) A[2, 1, 3] - ---------------------- + A[1, 2, 3] x1 (q1 + q2) 2 (- x3 x2 + x1 x2 + x3 x1 - x1 ) A[2, 3, 1] (x3 - x1) A[1, 3, 2] - ------------------------------------------ + -------------------- 2 2 x1 (q1 + q2) (q1 + q2) x1
ACE> Idca2Demazure(A[2,3,1]); A[2, 3, 1] + A[2, 1, 3] + A[1, 3, 2] + A[1, 2, 3] ACE> expand( IdcaOnPol(", x1^2*x2) ); 2 2 2 2 x2 x3 + x3 x2 x1 + x2 x1 + x1 x3 + x1 x2
The NcaOnX
function realizes the action of an element of the nilCoxeter
algebra on an expression in the Schubert basis.
The following example illustrates this action:
ACE> NcaOnX(q^4*A[1,3,2] - q^3*A[2,1], z*X[3,2,1] - X[2,1,3]); 4 3 3 z q X[3, 1, 2] - z q X[2, 3, 1] + q X[1, 2]
ACE> NcsfTransAlpha(Ps[3], 'direct', 'q'): ACE> map(simplify, ToR("*(1-q^3)/3, 'collect')); R[2, 1] q R[1, 2] - 1/3 --------- - 1/3 ------- + 1/3 R[1, 1, 1] + 1/3 R[3] q + 1 q + 1 ACE> map(simplify, ToR(NcsfInternal(", "), 'collect')); q R[2, 1] R[1, 2] 1/3 R[3] - 1/3 --------- - 1/3 ------- + 1/3 R[1, 1, 1] q + 1 q + 1The NCSF package gives a function to compute the transition matrices between the different bases of noncommutative symmetric functions. For instance:
ACE> NcsfMat(3, 'R', 'S'); [ 1 0 0 0 ] [ ] [ -1 1 0 0 ] [ ] [ -1 0 1 0 ] [ ] [ 1 -1 -1 1 ]The package can also handle quasi-symmetric functions. It provides the usual changes of basis (quasi-ribbon Schur functions, quasi-monomial functions, ...).
Because symmetric functions are quasi-symmetric functions, we also provide functions to give the expression of any symmetric function in terms of quasi-symmetric functions. For instance:
ACE> Sf2Qsf(s[2,1]*p3); F[5, 1] + F[4, 2] + F[2, 4] + F[1, 5] - F[2, 3, 1] - 2 F[2, 2, 2] - F[1, 3, 2] - 2 F[1, 2, 2, 1] - F[2, 1, 2, 1] - F[1, 2, 1, 2] + F[2, 1, 1, 1, 1] + F[1, 2, 1, 1, 1] + F[1, 1, 1, 2, 1] + F[1, 1, 1, 1, 2]
For instance, we can count the number of partitions of 5 with at most 3 parts and with the first part lesser than 3 and the second one lesser than 2:
ACE> ListPart(5, 'maxpart'=[3,2], 'maxlg'=3); [[3, 2], [3, 1, 1], [2, 2, 1]]In fact, we are also able to count the number of partitions whose diagram is contained into the diagram of a given partition:
ACE> ListPartIn([40,30,15,10,8,7,5,3,1], 'nb'); 9631414We also give a function to construct the order matrix on all partitions of n. The inverse matrix is known as the Moebius matrix:
ACE> ListPart(5); [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]
ACE> PartOrderMat(5); [ 1 0 0 0 0 0 0 ] [ ] [ 1 1 0 0 0 0 0 ] [ ] [ 1 1 1 0 0 0 0 ] [ ] [ 1 1 1 1 0 0 0 ] [ ] [ 1 1 1 1 1 0 0 ] [ ] [ 1 1 1 1 1 1 0 ] [ ] [ 1 1 1 1 1 1 1 ]The package also includes several functions to change the coding of partitions.
In the SFA package--Symmetric Functions on different Alphabets, we give the possibility of doing more formal computations (with respect to the SYMF package for instance) by implementing the structure of symmetric functions viewed as such operators. In other words, the objects, which are symmetric functions, contain their own alphabets, which are polynomials with coefficients in R.
For instance, the SFAExpand function expands, whenever possible, any expression in SFA. It is a direct implementation of the /\-ring structure. Expansion is made considering the shape of the alphabet of each symmetric function appearing in the argument:
ACE> SfAExpand( p[4,2](7+A1) ); 49 + 7 p[2](A1) + 7 p[4](A1) + p[4, 2](A1)Expansion is inductively propagated, thus enabling chains of plethysms:
ACE> SfAExpand( (p[3]/3 + p[2,1]/2 + p[1,1,1]/6)(p[2](6*A1^2) + k) ); 3 2 2 1/6 k + 1/2 k + 1/3 k + 3 k p[2, 2](A1) + 3 k p[2, 2](A1) + 3 k p[4, 4](A1) + 18 k p[2, 2, 2, 2](A1) + 2 p[6, 6](A1)
+ 18 p[4, 4, 2, 2](A1) + 36 p[2, 2, 2, 2, 2, 2](A1)The SfAVars function specifies which variables are considered for the SfAExpand function. Thus, after having specified that the xi's and the t variables must be considered:
ACE> SfAVars({ {x}, t }); {t, {x}}we can develop a Schur function as follows:
ACE> SfAExpand( s[3](x1+x2-t) ); 2 2 3 2 2 3 - t x2 - t x1 x2 - t x1 + x2 + x1 x2 + x1 x2 + x1
Perm2Interval
function
that computes the list of the Lehmer codes of all permutations that are smaller
than a given one, according to this order:
ACE> Perm2Interval([3,4,1,2]); [[2, 2, 0, 0], [2, 1, 0, 0], [2, 0, 1, 0], [2, 0, 0, 0], [1, 2, 0, 0], [1, 1, 0, 0], [1, 0, 1, 0], [1, 0, 0, 0], [0, 2, 1, 0], [0, 2, 0, 0], [0, 1, 1, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]]
ACE> map(Code2Perm, "); [[3, 4, 1, 2], [3, 2, 1, 4], [3, 1, 4, 2], [3, 1, 2, 4], [2, 4, 1, 3], [2, 3, 1, 4], [2, 1, 4, 3], [2, 1, 3, 4], [1, 4, 3, 2], [1, 4, 2, 3], [1, 3, 4, 2], [1, 3, 2, 4], [1, 2, 4, 3], [1, 2, 3, 4]]One can naturally associate to this interval the generating function of the lengths of permutations. For instance, the following expression:
ACE> Perm2Betti([3,4,1,2], 'q'); 4 3 2 q + 4 q + 5 q + 3 q + 1corresponds, in geometric terms, to the Poincaré polynomial of the Schubert variety X3412 of the manifold F4 of complete flags of Cn.
One can also list or count permutations satisfying certain properties. For instance, there are 103 vexillary permutations in the symmetric group S(5):
ACE> ListPerm(5, 'vexillary', 'nb'); 103among which, 15 have 7 inversions and for instance 9 have 8 inversions:
ACE> ListPerm(5, 'vexillary', 'nb', 'level'); [1, 4, 6, 11, 16, 18, 18, 15, 9, 4, 1]
SgaOnPol
function that realizes the action of an element
of this algebra on a polynomial, or SgaMult
which multiplies
two elements of the algebra:
ACE> K3:=A[1,2,3]+q*(A[2,1,3]+A[3,1,2])+q^2*(A[1,3,2]+A[2,3,1])+q^3*A[3,2,1]: ACE> G3:=A[1,2,3]-q*(A[2,1,3]+A[3,1,2])+q^2*A[3,2,1]: ACE> map(factor, SgaMult(expand(K3), expand(G3))); 2 2 (q + 1) (q + q + 1) (q - 1) A[1, 2, 3]One has also the possibility to generate a central idempotent of the symmetric group algebra corresponding to a given partition, as an element of this algebra. The Part2SgaCIdemp function is devoted to this purpose:
ACE> Part2SgaCIdemp([2,1,1]); 3/8 A[1, 2, 3, 4] - 1/8 A[1, 2, 4, 3] + 1/8 A[4, 1, 2, 3] - 1/8 A[1, 3, 2, 4] - 1/8 A[1, 4, 3, 2] - 1/8 A[3, 4, 1, 2] + 1/8 A[3, 1, 4, 2] + 1/8 A[4, 3, 1, 2] - 1/8 A[2, 1, 3, 4] + 1/8 A[2, 4, 1, 3] - 1/8 A[2, 1, 4, 3] + 1/8 A[2, 3, 4, 1] - 1/8 A[4, 2, 3, 1] - 1/8 A[3, 2, 1, 4] + 1/8 A[3, 4, 2, 1] - 1/8 A[4, 3, 2, 1] ACE> SgaMinus(", SgaMult(", ")); 0
Tox
function
which uses the so-called transition algorithm.
We can compute the complete table of
all Schubert polynomials of a given symmetric group using
the TableX function as shown in the following example for the
symmetric group S(3):
ACE> TableX(3); table([ [1, 2, 3] = 1 [2, 1, 3] = x1 [1, 3, 2] = x2 + x1 [2, 3, 1] = x2 x1
2 [3, 1, 2] = x1 2 [3, 2, 1] = x2 x1 ])The
TableY
function realizes the same calculation but works with codes
using another algorithm.
The same combinatorics may be used to define Schubert polynomials in two
sets of variables (double Schubert polynomials). The product of
a double Schubert polynomial and
a single variable is realized as follows
(it extends the formula known in geometry for the intersection of a
Schubert variety with a hyperplane):
ACE> ToXX(x4*XX[4,1,2,5,3,7,8,6]); - XX[4, 1, 5, 2, 3, 7, 8, 6] - XX[5, 1, 2, 4, 3, 7, 8, 6] + XX[4, 1, 2, 7, 3, 5, 8, 6] + XX[4, 1, 2, 6, 3, 7, 8, 5] + y5 XX[4, 1, 2, 5, 3, 7, 8, 6]Double Schubert polynomials are polynomials in two sets of variables which are the universal coefficients in the Newton interpolation of functions in several variables. For many applications, one needs to specialize the second set of variables to a permutation of the first one. The following example computes the table of double Schubert polynomials specialized to y1 = x3, y2 = x1, y3 = x2:
ACE> TableXX(3, [3,1,2]); table([ [1, 2, 3] = 1 [2, 1, 3] = x1 - x3 [1, 3, 2] = x2 - x3 [2, 3, 1] = (x1 - x3) (x2 - x3) [3, 1, 2] = 0 [3, 2, 1] = 0 ])The cohomology ring of the flag manifold is isomorphic to the ring of polynomials modulo the ideal generated by the symmetric polynomials without constant term. A geometrical linear basis of the cohomology ring is constituted by Schubert cycles, which are the images of Schubert polynomials in this ring. Thus Schubert polynomials allow an efficient ``Schubert calculus'' on flag manifolds.
Newton, Wronski, Muir, Pieri formulae and the Littlewood-Richardson rule constitute the heart of all algorithms for the classical changes of basis. For instance, iterating the Pieri formula on the Schur function corresponding to the empty partition, gives the expression of a product of elementary symmetric functions as a linear combination of Schur functions indexed by partitions:
ACE> Tos(h3^2*h2); s[3, 3, 2] + 2 s[4, 3, 1] + 3 s[5, 3] + s[4, 2, 2] + s[4, 4] + 2 s[5, 2, 1] + 3 s[6, 2] + s[6, 1, 1] + 2 s[7, 1] + s[8] ACE> Tos(h3*s[3,2,2,1]); s[3, 3, 2, 2, 1] + s[4, 2, 2, 2, 1] + s[4, 3, 2, 1, 1] + s[4, 3, 2, 2] + s[5, 2, 2, 1, 1] + s[5, 2, 2, 2] + s[5, 3, 2, 1] + s[6, 2, 2, 1]The product of a Schur function and a monomial symmetric function is given by the Muir formula:
ACE> Tos(m[2,2,1]*s[4,2,2,1]); s[5, 3, 3, 1, 1, 1] + s[6, 4, 3, 1] + s[5, 4, 4, 1] - s[6, 3, 3, 2] + s[6, 4, 2, 2] + s[4, 2, 2, 2, 2, 2] - s[6, 3, 3, 1, 1] + s[6, 4, 2, 1, 1] + 3 s[4, 2, 2, 1, 1, 1, 1, 1, 1] + 2 s[4, 3, 3, 1, 1, 1, 1] - 2 s[4, 4, 2, 1, 1, 1, 1] + s[4, 4, 4, 2] - 2 s[6, 2, 2, 1, 1, 1, 1] + s[4, 4, 4, 1, 1] - s[6, 2, 2, 2, 1, 1] + s[6, 2, 2, 2, 2] - s[4, 4, 2, 2, 1, 1] + s[4, 2, 2, 2, 1, 1, 1, 1] + s[4, 4, 2, 2, 2] + s[5, 2, 2, 1, 1, 1, 1, 1] - s[4, 4, 3, 1, 1, 1] - s[4, 3, 3, 2, 2] + s[4, 4, 3, 3] - s[4, 3, 3, 3, 1] - s[5, 3, 3, 3] - s[6, 3, 2, 1, 1, 1] + s[4, 3, 2, 1, 1, 1, 1, 1] - s[5, 4, 2, 1, 1, 1] - s[4, 2, 2, 2, 2, 1, 1] + s[4, 3, 3, 2, 1, 1]The general changes of basis divide calculations into elementary operations easily computed using these formulae. The package provides also some internal functions to compute specific plethysms. These special functions are called by the SfPlethysm function:
ACE> SfPlethysm(e4, e4, 'e', 'e', 's'); s[3, 2, 2, 2, 2, 2, 1, 1, 1] + s[4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] + s[4, 4, 4, 1, 1, 1, 1] + s[4, 2, 2, 2, 2, 2, 2] + s[3, 3, 3, 2, 2, 2, 1] + s[4, 3, 3, 2, 1, 1, 1, 1] + s[3, 3, 2, 2, 2, 2, 1, 1] + s[3, 2, 2, 2, 2, 2, 2, 1] + s[4, 3, 3, 1, 1, 1, 1, 1, 1] + s[4, 2, 2, 2, 2, 1, 1, 1, 1] + s[4, 2, 2, 2, 1, 1, 1, 1, 1, 1] + s[4, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1] + s[3, 3, 3, 2, 1, 1, 1, 1, 1] + s[3, 3, 3, 1, 1, 1, 1, 1, 1, 1] + s[3, 3, 2, 2, 1, 1, 1, 1, 1, 1] + s[3, 2, 2, 2, 2, 1, 1, 1, 1, 1] + s[2, 2, 2, 2, 2, 2, 1, 1, 1, 1] + s[3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1] + s[3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1] + s[4, 4, 3, 2, 2, 1] + s[4, 3, 3, 3, 3] + s[4, 3, 3, 2, 2, 1, 1] + s[3, 3, 3, 3, 2, 1, 1] + s[3, 3, 2, 2, 2, 1, 1, 1, 1] + s[4, 3, 2, 2, 2, 1, 1, 1] + s[3, 3, 3, 2, 2, 1, 1, 1]The SYMF package gives a function to compute the transition matrices between the different bases of the ring of symmetric functions. For instance:
ACE> SfMat(5, 's', 'm'); [ 1 1 1 1 1 1 1 ] [ ] [ 0 1 1 2 2 3 4 ] [ ] [ 0 0 1 1 2 3 5 ] [ ] [ 0 0 0 1 1 3 6 ] [ ] [ 0 0 0 0 1 2 5 ] [ ] [ 0 0 0 0 0 1 4 ] [ ] [ 0 0 0 0 0 0 1 ] ACE> ListPart(5); [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]
ACE> Tom(s[3,1,1]); m[3, 1, 1] + m[2, 2, 1] + 3 m[2, 1, 1, 1] + 6 m[1, 1, 1, 1, 1]
This library also gives, in the algebra of the symmetric group, the orthogonal idempotents corresponding to standard tableaux:
ACE> Word2Tab(w[3,1,2]); [[3], [1, 2]] ACE> StdTab2SgaIdemp("); 1/3 A[2, 1, 3] + 1/3 A[1, 2, 3] - 1/6 A[2, 3, 1] - 1/6 A[1, 3, 2] - 1/6 A[3, 1, 2] - 1/6 A[3, 2, 1]We have for instance, the
ListStdTab
function that computes the list
of all standard tableaux filled with n letters. The Part2ListStdTab
function generates all standard tableaux of a given shape.
This is done by generating all Yamanouchi words of a given weight:
ACE> Part2ListStdTab([4,2,1]); [[[3], [2, 5], [1, 4, 6, 7]], [[3], [2, 6], [1, 4, 5, 7]], [[3], [2, 7], [1, 4, 5, 6]], [[4], [2, 7], [1, 3, 5, 6]], [[5], [2, 7], [1, 3, 4, 6]], [[6], [2, 7], [1, 3, 4, 5]], [[7], [2, 6], [1, 3, 4, 5]], [[7], [3, 6], [1, 2, 4, 5]], [[7], [4, 6], [1, 2, 3, 5]], [[7], [5, 6], [1, 2, 3, 4]], [[6], [3, 7], [1, 2, 4, 5]], [[6], [4, 7], [1, 2, 3, 5]],
[[6], [5, 7], [1, 2, 3, 4]], [[5], [3, 7], [1, 2, 4, 6]], [[5], [4, 7], [1, 2, 3, 6]], [[4], [3, 7], [1, 2, 5, 6]], [[4], [2, 6], [1, 3, 5, 7]], [[5], [2, 6], [1, 3, 4, 7]], [[6], [2, 5], [1, 3, 4, 7]], [[7], [2, 5], [1, 3, 4, 6]], [[7], [3, 5], [1, 2, 4, 6]], [[7], [4, 5], [1, 2, 3, 6]], [[6], [3, 5], [1, 2, 4, 7]], [[6], [4, 5], [1, 2, 3, 7]], [[5], [3, 6], [1, 2, 4, 7]], [[5], [4, 6], [1, 2, 3, 7]], [[4], [3, 6], [1, 2, 5, 7]], [[4], [2, 5], [1, 3, 6, 7]], [[5], [2, 4], [1, 3, 6, 7]], [[6], [2, 4], [1, 3, 5, 7]], [[7], [2, 4], [1, 3, 5, 6]], [[7], [3, 4], [1, 2, 5, 6]], [[6], [3, 4], [1, 2, 5, 7]], [[5], [3, 4], [1, 2, 6, 7]], [[4], [3, 5], [1, 2, 6, 7]]]We have also the ListTab function which returns the list of all tableaux of a given shape and a given weight:
ACE> map(Tab2Mat, ListTab([3,2,2], [1,0,0,1,2,1,0,1,1])); [ 8 9 ] [ 8 9 ] [ 8 9 ] [ 6 9 ] [ 6 9 ] [ 5 9 ] [ ] [ ] [ ] [ ] [ ] [ ] [[ 5 6 ], [ 4 6 ], [ 5 5 ], [ 5 8 ], [ 4 8 ], [ 4 8 ], [ ] [ ] [ ] [ ] [ ] [ ] [ 1 4 5 ] [ 1 5 5 ] [ 1 4 6 ] [ 1 4 5 ] [ 1 5 5 ] [ 1 5 6 ] [ 6 9 ] [ 5 9 ] [ 6 8 ] [ 5 8 ] [ ] [ ] [ ] [ ] [ 5 5 ], [ 4 6 ], [ 5 5 ], [ 4 6 ]] [ ] [ ] [ ] [ ] [ 1 4 8 ] [ 1 5 8 ] [ 1 4 9 ] [ 1 5 9 ]The PermOnTab function plactically permutes rows in a product of rows (not necessarily a tableau, but the image of a tableau under a row-permutation). A simple plactic row-transposition transforms a two-row contre-tableau into the two-row tableau which is obtained from it by Schensted algorithm, or conversely. This transformation is also given by the ``jeu de taquin''.
ACE> PermOnTab([2,1], [[1,3,4,6], [2,5]]); [[3, 6], [1, 2, 4, 5]]
ACE> Tex(s[4,2,2,1,1,1]=SfJtMat([4,2,2,1,1,1]), 'TEX_MODE'='MATHS'); $s_{4, 2, 2, 1, 1, 1}=\pmatrix{S_{4}& S_{5}& S_{6}& S_{7}& S_{8}& S_{9}\cr\cr S_{1} & S_{2}& S_{3}& S_{4}& S_{5}& S_{6}\cr\cr 1& S_{1}& S_{2}& S_{3}& S_{4}& S_{5}\cr\cr 0& 0& 1& S_{1}& S_{2}& S_{3}\cr\cr 0& 0& 0& 1& S_{1}& S_{2}\cr\cr 0& 0& 0& 0& 1 & S_{1}}$
which can be included in a TEX file to produce a certain output not available in this Html documentation. One can also compute for example the plactic class corresponding to a given word as explained previously:
ACE> Tex(Free2PlaxClass(w[2,3,1,3,2,1,1]), 'TEX_MODE'='MATHS'); $3\,2\,1\,2\,1\,3\,1+3\,2\,1\,2\,3\,1\,1+3\,2\,2\,1\,3\,1\,1 +3\,2\,2\,3\,1\,1\,1+2\,1\,3\,3\,2\,1\,1+2\,1\,3\,3\,1\,2\,1 +2\,3\,1\,3\,1\,2\,1+2\,3\,3\,1\,1\,2\,1+2\,3\,1\,3\,2\,1\,1 +2\,3\,3\,1\,2\,1\,1+2\,3\,2\,3\,1\,1\,1+2\,3\,3\,2\,1\,1\,1 +2\,3\,2\,1\,3\,1\,1+3\,2\,2\,1\,1\,3\,1+2\,1\,3\,2\,1\,3\,1 +2\,1\,3\,2\,3\,1\,1+2\,1\,3\,1\,3\,2\,1+2\,3\,1\,1\,3\,2\,1 +2\,3\,1\,2\,3\,1\,1+2\,3\,1\,2\,1\,3\,1+2\,3\,2\,1\,1\,3\,1$and obtain another output not available in this Html documentation.
Let us see another example about tableaux. By running the next command, we obtain the TEX output corresponding to the list of tableaux (seen as lists of lists), of a given shape and a given evaluation, that is:
ACE> Tex(ListTab([4,2,1], [1$7]), 'TEX_MODE'='MATHS'); $[[[7], [5, 6], [1, 2, 3, 4]], [[7], [4, 6], [1, 2, 3, 5]], [ [7], [3, 6], [1, 2, 4, 5]], [[7], [2, 6], [1, 3, 4, 5]], [[7 ], [4, 5], [1, 2, 3, 6]], [[7], [3, 5], [1, 2, 4, 6]], [[7], [2, 5], [1, 3, 4, 6]], [[7], [3, 4], [1, 2, 5, 6]], [[7], [2 , 4], [1, 3, 5, 6]], [[6], [5, 7], [1, 2, 3, 4]], [[6], [4, 7], [1, 2, 3, 5]], [[6], [3, 7], [1, 2, 4, 5]], [[6], [2, 7] , [1, 3, 4, 5]], [[5], [4, 7], [1, 2, 3, 6]], [[5], [3, 7], [1, 2, 4, 6]], [[5], [2, 7], [1, 3, 4, 6]], [[4], [3, 7], [1 , 2, 5, 6]], [[4], [2, 7], [1, 3, 5, 6]], [[3], [2, 7], [1, 4, 5, 6]], [[6], [4, 5], [1, 2, 3, 7]], [[6], [3, 5], [1, 2, 4, 7]], [[6], [2, 5], [1, 3, 4, 7]], [[6], [3, 4], [1, 2, 5, 7]], [[6], [2, 4], [1, 3, 5, 7]], [[5], [4, 6], [1, 2, 3, 7] ], [[5], [3, 6], [1, 2, 4, 7]], [[5], [2, 6], [1, 3, 4, 7]], [[4], [3, 6], [1, 2, 5, 7]], [[4], [2, 6], [1, 3, 5, 7]], [[ 3], [2, 6], [1, 4, 5, 7]], [[5], [3, 4], [1, 2, 6, 7]], [[5] , [2, 4], [1, 3, 6, 7]], [[4], [3, 5], [1, 2, 6, 7]], [[4], [2, 5], [1, 3, 6, 7]], [[3], [2, 5], [1, 4, 6, 7]]]$But, this output is not very attractive. However, we can transform each tableau into the corresponding word and convert the list of words into a sum obtained by the next command:
ACE> Tex(convert(map(Tab2Word, ListTab([4,2,1], [1$7])), `+`), 'TEX_MODE'='MATHS');
If we want a two-dimensional representation of tableaux, we can tranform each tableau into the corresponding matrix and print 5 tableaux per row by the next command:
ACE> lt := map(Tab2Mat, ListTab([4,2,1], [1$7])): ACE> for i from 1 by 5 to nops(lt) do Tex([seq(op(j, lt), j=i..i+4)], 'TEX_MODE'='MATHS'); TexStr(``); od:
But this is not so attractive too because tableaux are not represented as matrices in your articles. The best thing would be to write TEX macros to dump tableaux:
TabMacros:=proc() TexStr(`\\def\\boxit#1#2{\\setbox1=\\hbox{\\kern#1{#2}\\kern#1}`); TexStr(`\\dimen1=\\ht1 \\advance\\dimen1 by #1 \\dimen2=\\dp1 \\advance\\dimen2 by #1`); TexStr(`\\setbox1=\\hbox{\\vrule height\\dimen1 depth\\dimen2\\box1\\vrule}`); TexStr(`\\setbox1=\\vbox{\\hrule\\box1\\hrule}`); TexStr(`\\advance\\dimen1 by .4pt \\ht1=\\dimen1 `); TexStr(`\\advance\\dimen2 by .4pt \\dp1=\\dimen2 \\box1\\relax}`); TexStr(`\\catcode``\\@=12`); TexStr(`\\newdimen\\squaresize \\squaresize=14pt`); TexStr(`\\newdimen\\thickness \\thickness=0.5pt`); TexStr(`\\def\\square#1{\\hbox{\\vrule width \\thickness`); TexStr(`\\vbox to \\squaresize{\\hrule height \\thickness\\vss`); TexStr(`\\hbox to \\squaresize{\\hss#1\\hss}`); TexStr(`\\vss\\hrule height\\thickness}`); TexStr(`\\unskip\\vrule width \\thickness}\\kern-\\thickness}`); TexStr(`\\def\\vsquare#1{\\vbox{\\square{$#1$}}\\kern-\\thickness}`); TexStr(`\\def\\blank{\\omit\\hskip\\squaresize}`); TexStr(`\\def\\tableau#1{`); TexStr(`\\vbox{\\smallskip\\offinterlineskip`); TexStr(`\\halign{&\\vsquare{##}\\cr #1}}}`); end:and then to have a function to dump a tableau:
`TeX/UserdefinedFun/Tab`:=proc() local tab, # the argument... i, j; # variables for loops... tab:=args[1]; TexCat(`\\tableau{`); for i from 1 to nops(tab) do for j from 1 to nops(op(i, tab))-1 do Texer(op(j, op(i, tab))); TexCat(` & `); od; Texer(op(nops(op(i, tab)), op(i, tab))); TexCat(`\\cr`); od; TexCat(`}\\quad`); end:Then, we have just to dump the macros by:
ACE> TabMacros();and each tableau by:
ACE> lt := ListTab([4,2,1], [1$7]): ACE> for i from 1 by 5 to nops(lt) do TexStr(`$$`); for j from 0 to 4 do Tex(Tab(op(i+j, lt))); od; TexStr(`$$`); od:to obtain the following output:
\def\boxit#1#2{\setbox1=\hbox{\kern#1{#2}\kern#1} \dimen1=\ht1 \advance\dimen1 by #1 \dimen2=\dp1 \advance\dimen2 by #1 \setbox1=\hbox{\vrule height\dimen1 depth\dimen2\box1\vrule} \setbox1=\vbox{\hrule\box1\hrule} \advance\dimen1 by .4pt \ht1=\dimen1 \advance\dimen2 by .4pt \dp1=\dimen2 \box1\relax} \catcode`\@=12 \newdimen\squaresize \squaresize=14pt \newdimen\thickness \thickness=0.5pt \def\square#1{\hbox{\vrule width \thickness \vbox to \squaresize{\hrule height \thickness\vss \hbox to \squaresize{\hss#1\hss} \vss\hrule height\thickness} \unskip\vrule width \thickness}\kern-\thickness} \def\vsquare#1{\vbox{\square{$#1$}}\kern-\thickness} \def\blank{\omit\hskip\squaresize} \def\tableau#1{ \vbox{\smallskip\offinterlineskip \halign{&\vsquare{##}\cr #1}}} $$ \tableau{7\cr5 & 6\cr1 & 2 & 3 & 4\cr}\quad \tableau{7\cr4 & 6\cr1 & 2 & 3 & 5\cr}\quad \tableau{7\cr3 & 6\cr1 & 2 & 4 & 5\cr}\quad \tableau{7\cr2 & 6\cr1 & 3 & 4 & 5\cr}\quad \tableau{7\cr4 & 5\cr1 & 2 & 3 & 6\cr}\quad $$ $$ \tableau{7\cr3 & 5\cr1 & 2 & 4 & 6\cr}\quad \tableau{7\cr2 & 5\cr1 & 3 & 4 & 6\cr}\quad \tableau{7\cr3 & 4\cr1 & 2 & 5 & 6\cr}\quad \tableau{7\cr2 & 4\cr1 & 3 & 5 & 6\cr}\quad \tableau{6\cr5 & 7\cr1 & 2 & 3 & 4\cr}\quad $$ $$ \tableau{6\cr4 & 7\cr1 & 2 & 3 & 5\cr}\quad \tableau{6\cr3 & 7\cr1 & 2 & 4 & 5\cr}\quad \tableau{6\cr2 & 7\cr1 & 3 & 4 & 5\cr}\quad \tableau{5\cr4 & 7\cr1 & 2 & 3 & 6\cr}\quad \tableau{5\cr3 & 7\cr1 & 2 & 4 & 6\cr}\quad $$ $$ \tableau{5\cr2 & 7\cr1 & 3 & 4 & 6\cr}\quad \tableau{4\cr3 & 7\cr1 & 2 & 5 & 6\cr}\quad \tableau{4\cr2 & 7\cr1 & 3 & 5 & 6\cr}\quad \tableau{3\cr2 & 7\cr1 & 4 & 5 & 6\cr}\quad
\tableau{6\cr4 & 5\cr1 & 2 & 3 & 7\cr}\quad $$ $$ \tableau{6\cr3 & 5\cr1 & 2 & 4 & 7\cr}\quad \tableau{6\cr2 & 5\cr1 & 3 & 4 & 7\cr}\quad \tableau{6\cr3 & 4\cr1 & 2 & 5 & 7\cr}\quad \tableau{6\cr2 & 4\cr1 & 3 & 5 & 7\cr}\quad \tableau{5\cr4 & 6\cr1 & 2 & 3 & 7\cr}\quad $$ $$ \tableau{5\cr3 & 6\cr1 & 2 & 4 & 7\cr}\quad \tableau{5\cr2 & 6\cr1 & 3 & 4 & 7\cr}\quad \tableau{4\cr3 & 6\cr1 & 2 & 5 & 7\cr}\quad \tableau{4\cr2 & 6\cr1 & 3 & 5 & 7\cr}\quad \tableau{3\cr2 & 6\cr1 & 4 & 5 & 7\cr}\quad $$ $$ \tableau{5\cr3 & 4\cr1 & 2 & 6 & 7\cr}\quad \tableau{5\cr2 & 4\cr1 & 3 & 6 & 7\cr}\quad \tableau{4\cr3 & 5\cr1 & 2 & 6 & 7\cr}\quad \tableau{4\cr2 & 5\cr1 & 3 & 6 & 7\cr}\quad \tableau{3\cr2 & 5\cr1 & 4 & 6 & 7\cr}\quad $$which gives a certain output, which is said to be more convenient in the postscript documentation.