SF: The Symmetric Functions Package

Help Texts for the Vanilla Edition of SF 2.4

  For a detailed introduction to the package, see
  A Maple Package for Symmetric Functions (PDF).

  After loading the vanilla edition of SF, each package function can be
  accessed using the calling sequence SF[functionname](arguments). In order
  to use the abbreviated form functionname(arguments), run the command
  'withSF()'. If there is a conflict between the names of one of the package
  functions and another name in the same session, a warning is printed.

  To use the abbreviated form for a subset of the procedures in the package
  (e.g., to avoid conflicts), run the command 'withSF(name1,name2,...)'.

  Note that the names e, h, p, s, cl, and e1, p1, h1, e2, h2, p2,.... play
  special roles as global variables in the package and should not be
  assigned values by the user.

  This document provides help texts for each of the functions in SF:


FUNCTION:  add_basis - add an orthogonal basis to the set of known bases

CALLING SEQUENCE:  add_basis(b,scp);       add_basis(b,scp,lterm);   
                   add_basis(b,scp,flag);  add_basis(b,scp,lterm,flag);

PARAMETERS:     b     = name of a new basis 
            scp,lterm = procedures that accepts partitions as input
              flag    = (optional) an unassigned name or string

SYNOPSIS:
  Let < , > be a scalar product of symmetric functions in which the power
  sums are orthogonal, and let 'scp' be a procedure such that scp(mu)
  computes the squared norm of the power sum indexed by mu. The standard
  scalar product is obtained by choosing scp=zee. See 'scalar' and 'zee'.

  By the Gram-Schmidt algorithm, there is a unique basis b[.] of the space
  of symmetric functions that is orthogonal w.r.t. < , > and satisfies

    b[lambda] = m[lambda] + a linear combination of previous m[mu]'s,  (*)

  where m[.] denotes the basis of monomial symmetric functions, and the
  mu's that appear in the above sum precede lambda in the conjugate of
  the lexicographic ordering used by 'Par'; i.e., if mu appears, then
  for some i, mu has more parts >=i than lambda, and the same number of
  parts >=j for j=1,...,i-1. This total ordering is a refinement of the
  dominance order, and has the property that the b[lambda]'s for lambda
  with <=n rows form a basis for the quotient of the ring of symmetric
  functions corresponding to symmetric polynomials in n variables.

  For example, the Schur functions s[lambda] are the orthogonal basis one
  obtains by this method for the standard scalar product.

  More generally, one may modify (*) so that the leading term of b[lambda]
  is any chosen (nonzero) scalar multiple of m[lambda], not necessarily 1.
  Such a choice is specified by a procedure 'lterm' designed so that
  lterm(lambda) returns the desired leading coefficient for b[lambda].

  If 'scp' and 'lterm' are as described, and 'b' is a name that has not
  been previously defined to be a symmetric function basis, then the
  procedure call  add_basis(b,scp,lterm)  will add 'b[]' to the list of
  known bases, and define it to be the orthogonal basis as above.

  If the 'lterm' argument is omitted, it defaults to 1.

  If the last argument (the third or fourth) is not of type 'procedure',
  this is interpreted as a flag indicating that the basis b is triangular
  with respect to all refinements of the dominance order (see 'dominate').
  This reduces the amount of computation that the Gram-Schmidt algorithm
  needs to perform in high degrees. All orthogonal bases likely to occur
  in applications have this feature.

  The effects of a call to add_basis are:

  (1) All predefined conversion procedures for symmetric functions, such
  as 'toe', 'top',... as well as procedures defined by previous calls to
  'add_basis' and 'dual_basis', will now be able to process symmetric
  function expressions that involve the new basis 'b'.

  (2) A new procedure, named to.b (i.e., the concatenation of "to" and b)
  is defined. Its purpose is to convert symmetric functions into the newly
  created b-basis. The possible calling sequences for this procedure are:

                      to.b(f);    or    to.b(f,<options>);

  where f is a symmetric function, and the optional arguments include
  (1) a basis name B indicating that f is expressed solely in terms of
  the elements of B, and (2) an equation of the form 'nrows'=n for some
  positive integer n, indicating that the calculation should be performed
  in the quotient of the ring of symmetric functions in which b[lambda]
  vanishes for all lambda with > n parts (or equivalently, e.m vanishes
  for all m>n). Also, to maintain backward compatibility with previous
  versions of SF, a list of partitions containing the support of f may be
  supplied as an optional argument. However, the new implementation obtains
  no advantage from this information and ignores it.

  The output is collected with respect to the elements of the basis 'b' and
  'normal' is applied to the coefficients.

  On the first occasion that an SF procedure does a computation involving
  b[lambda], it uses the Gram-Schmidt algorithm to expand b[lambda] as a
  polynomial in the elementary symmetric functions and caches the result
  in a remember table. This recursively involves computing (or retrieving
  from the cache) the expansions of b[mu] for all mu preceding lambda.
  Consequently (especially for scalar products defined over rational
  function fields), the first computation involving a given b[lambda] may
  be expensive, but subsequent computations will be cheap.

  An error condition is generated if 'b' is the name of a previously
  defined basis. Otherwise, a call to 'add_basis' returns 'Okay'.

EXAMPLES:

#Define the Hall-Littlewood symmetric functions
  Zee:= mu -> zee(mu,0,t);
  add_basis(HL,Zee,`this basis is triangular in dominance order`);
  toHL(s[2,2],s);               yields
                               HL[2,2] + t*HL[2,1,1] + (t^4+t^2)*HL[1,1,1,1]
  c:=scalar(HL[2,2],HL[2,2],Zee);
  factor(c);                    yields              1/(1+t)/(1-t)^2

#Define zonal polynomials
  Zee2:=mu -> zee(mu,2);
  add_basis(Z, Zee2, mu -> hooks(mu,2));
  toZ(p1^4,nrows=2);            yields    2/15*Z[2,2]+4/21*Z[3,1]+1/105*Z[4]
  top(Z[3]);                    yields             p1^3+6*p1*p2+8*p3

SEE ALSO:  dominate, dual_basis, scalar, zee


FUNCTION:  char2sf - convert (virtual) characters to symmetric functions

CALLING SEQUENCE:  char2sf(chi);
                   char2sf(chi,b);

PARAMETERS:  chi = a class function
              b  = (optional) a basis name

SYNOPSIS:
  For each partition lambda, the expression cl[lambda] denotes the class
  function on the symmetric group that takes on the value 1 for
  permutations of cycle-type lambda, and 0 otherwise. General class
  functions on the symmetric group S_n may be expressed as linear
  combinations of cl[lambda], where lambda ranges over partitions of n.

  The characteristic map is an isometric isomorphism between symmetric
  functions that are homogeneous of degree n and class functions on S_n.
  Under this map, the irreducible character indexed by lambda corresponds
  to the Schur function s[lambda].

  For any class function chi, char2sf(chi) returns the symmetric function
  corresponding to chi, expressed in terms of the power-sums p1,p2,....

  If a basis name b is supplied as a second argument, then the result is
  expressed in terms of this basis.

EXAMPLES:
   char2sf(cl[3,2,2,1]);              yields            1/24*p3*p2^2*p1
   char2sf(6*cl[1,1,1,1,1]-2*cl[2,2,1]+cl[5],s);
                                      yields              s[3, 1, 1]

SEE ALSO:  itensor, plethysm, sf2char, zee, combinat[Chi]


FUNCTION:  conjugate - conjugate a partition

CALLING SEQUENCE:  conjugate(lambda);

PARAMETERS:  lambda = a partition

SYNOPSIS:
  The conjugate of a partition lambda is the partition whose i-th part is
  the number of parts of lambda that are >=i. This amounts to reflecting
  the diagram of lambda across the main diagonal.

EXAMPLES: 
  conjugate([7,7,3,2,2,2,1]);       yields       [7, 6, 3, 2, 2, 2, 2]

SEE ALSO:  Par, dominate, nextPar, subPar


FUNCTION:  dominate - list/test partitions dominated by another partition

CALLING SEQUENCE:  dominate(mu);
                   dominate(mu,n);
                   dominate(mu,nu);

PARAMETERS:  mu,nu = partitions
               n   = (optional) a nonnegative integer

SYNOPSIS:
  If mu and nu are partitions, then mu dominates nu if
  mu[1]+...+mu[i] >= nu[1]+...+nu[i]  for i=1,2,...

  If mu is a partition of m, dominate(mu) returns a list consisting of all
  partitions of m dominated by mu. The first listed partition will be mu,
  but the remaining partitions will not be in a canonical order.

  If n is a nonnegative integer, then dominate(mu,n) does the same, but
  returns only partitions with at most n parts.

  If nu is a second partition, then dominate(mu,nu) returns true or false
  according to whether mu dominates nu.

EXAMPLES:
  dominate([2,2]);             yields       [[2,2], [2,1,1], [1,1,1,1]]
  dominate([3,2,1],[2,2,2]);   yields                 true
  pl:=dominate([3,2,1],4);     yields
                                     [[3,2,1], [2,2,2], [3,1,1,1], [2,2,1,1]]
  sort(pl,dominate);           yields
                                     [[3,2,1], [3,1,1,1], [2,2,2], [2,2,1,1]]

SEE ALSO:  Par, conjugate, subPar, nextPar


FUNCTION:  dual_basis - add a dual basis to the set of known bases

CALLING SEQUENCE:  dual_basis(b,oldb);
                   dual_basis(b,oldb,scp);

PARAMETERS:   b   = name of a new basis 
             oldb = name of a previously defined basis
             scp  = (optional) a procedure that accepts partitions as input

SYNOPSIS:
  Let < , > be a scalar product of symmetric functions in which the power
  sums are orthogonal, and let 'scp' be a procedure such that scp(mu)
  computes the squared norm of the power sum indexed by mu. The standard
  scalar product is obtained by choosing scp=zee. See 'scalar' and 'zee'.

  Assuming < , > is non-degenerate, every basis B[.] of the space of
  symmetric functions has a unique dual basis b[.] defined by the property
  that <b[lambda],B[mu]> = 1 for lambda=mu, and = 0 otherwise.

  For example, relative to the standard scalar product, the monomial
  symmetric functions m[.] are dual to the basis generated by the complete
  homogeneous symmetric functions h1,h2,....

  If 'oldb' is the name of any previously defined symmetric function basis
  (i.e., a member of the global variable `SF/Bases`), and 'b' is a name that
  has not been previously defined to be a symmetric function basis, then the
  procedure call  dual_basis(b,oldb,scp)  will add 'b[]' to the list of
  known bases, and define it to be the basis that is dual to 'oldb',
  relative to the scalar product defined by 'scp'. The effects of this are:

  (1) All predefined conversion procedures for symmetric functions, such
  as 'toe', 'top',... as well as procedures defined by previous calls to
  'dual_basis' and 'add_basis', will now be able to process symmetric
  function expressions that involve the new basis 'b'.

  (2) A new procedure, named to.b (i.e., the concatenation of "to" and b)
  is defined. Its purpose is to convert symmetric functions into the newly
  created b-basis. The possible calling sequences for this procedure are:

        to.b(f);   to.b(f,B);   to.b(f,parlist);   to.b(f,B,parlist);

  where: (i) f is a symmetric function, (ii) B is an optional name that
  may be used to indicate that f is expressed solely in terms of the
  basis B, and (iii) 'parlist' is an optional list of partitions that may
  be used to specify that the coefficient of b[lambda] is nonzero only for
  partitions lambda appearing in 'parlist'.

  If f is "sparse" with respect to 'b', specifying a partition list can
  greatly improve the speed of the algorithm.

  The output is collected with respect to the elements of the basis 'b' and
  'normal' is applied to the coefficients.

  An error condition is generated if 'b' is, or if 'oldb' is not, the name
  of a previously defined basis. Otherwise, the result returned by a call
  to 'dual_basis' is 'Okay'. If the last argument (the procedure defining
  the scalar product) is omitted, the standard scalar product is assumed.

EXAMPLES:
#Define the basis of monomial symmetric functions
  dual_basis(m,h);
  tom(s[2,2,1],s,dominate([2,2,1]));
                             yields   m[2,2,1]+2*m[2,1,1,1]+5*m[1,1,1,1,1]
  tos(m[2,2]+m[3,1],m);      yields      s[3,1]-2*s[2,1,1]+3*s[1,1,1,1]

  Zee:= mu -> zee(mu,0,t);
  dual_basis(S,s,Zee);
  toe(S[2,1]);               yields  (-t+t^2)*e1^3+(1-t^3)*e2*e1+(-1+t^3)*e3
  toS(e2*e1*(1-t)^2*(1-t^2),e);
                             yields       t*S[3]+(t+1)*S[2,1]+S[1,1,1]

SEE ALSO:  add_basis, scalar, zee


FUNCTION:  evalsf - plethystic evaluation of symmetric functions

CALLING SEQUENCE:  evalsf(f,a);

PARAMETERS:  f = a symmetric function
             a = an expression or symmetric function

SYNOPSIS:
  Let a be a symmetric function whose coefficients are rational functions
  in some set of variables. For positive integers j, let a<j> denote the
  result of substituting x = x^j, y = y^j,... and p.i = p.(i*j) for each
  variable x,y,... and each power-sum p.i appearing in the power-sum 
  expansion of a.

  If f is any symmetric function, evalsf(f,a) returns the expression
  obtained by converting f into a polynomial in the power-sums p1,p2,...,
  and then substituting p1 = a<1>, p2 = a<2>, etc. The output is
  collected with respect to the power-sums and 'normal' is applied to
  the coefficients.

  If a is a symmetric function with constant coefficients, then evalsf(f,a)
  is identical to plethysm(f,a). 

  If a is a rational function of some set of ordinary variables (i.e., a
  symmetric function of degree 0), then a<j> is obtained by substituting
  x = x^j for each variable x that appears in a. In particular,

  (1) evalsf(f,1/(1-q)) is the "principal specialization" of f.
  (2) evalsf(f,a+b+c)   is equivalent to evaluating f as a symmetric
      function of the variables a,b,c.

EXAMPLES:
  f:=evalsf(e3,x+y+z+w);
  expand(f);                 yields      x*y*z + x*y*w + x*z*w + y*z*w
  f:=evalsf(s[2,2],1/(1-q));
  factor(f);                 yields      q^2/(1-q)^4/(q^2+q+1)/(q+1)^2
  f:=evalsf(h2,(a-b)/(1-q));
  factor(f);                 yields       (a-b)*(a-q*b)/(1-q)^2/(1+q)
  f:=evalsf(h2,e3);
  tos(f);                    yields          s[2,2,2] + s[2,1,1,1,1]
  f:=evalsf(e3,(1+t)*p1);
  tos(f);                    yields  t*(1+t)*s[2,1] + (1+t+t^2+t^3)*s[1,1,1] 

SEE ALSO:  plethysm, theta


FUNCTION:  hooks - hook lengths of a partition

CALLING SEQUENCE:  hooks(lambda);
                   hooks(lambda,a);
                   hooks(lambda,q,t);

PARAMETERS:  lambda = a partition
             a,q,t  = (optional) expressions

SYNOPSIS:
  If lambda is a partition, the hook lengths of lambda are the numbers
  lambda[i] - i + mu[j] - j + 1, where mu is the conjugate of lambda
  (see 'conjugate'), and (i,j) ranges over all cells of the diagram of
  lambda; i.e., 1 <= j <= lambda[i] and 1 <= i <= nops(lambda).

  The arm and leg lengths of cell (i,j) are lambda[i] - j and mu[j] - i.

  For any partition lambda, hooks(lambda) returns the list of hook lengths
  of lambda, sorted into non-increasing order. If one or two additional
  (optional) arguments are supplied, then the procedure returns one of the
  following hook-related polynomials:

  With one extra argument a, the result is the product of

               a * arm_length[i,j] + leg_length[i,j] + 1

  over all cells of the diagram.

  With two extra arguments, say q and t, the result is the product of

             1 - q^arm_length[i,j] * t^(1+leg_length[i,j])

  over all cells of the diagram.

  Note that hooks(lambda,q,q) is the product of 1 - q^hook_length[i,j].

EXAMPLES:
### Compute the number of  standard tableaux of shape [3,2,1]:
  hk:=hooks([3,2,1]);    yields               [5, 3, 3, 1, 1, 1]
  6!/convert(hk,`*`);    yields                      16 

  hooks([3,2,1],z);      yields                (2*z+3)*(z+2)^2
  hooks([3,1,1,1],q,t);  yields  (1-q^2*t^4)*(1-q*t)*(1-t)^2*(1-t^3)*(1-t^2)

SEE ALSO:  Par, conjugate


FUNCTION:  itensor - inner tensor product of symmetric functions

CALLING SEQUENCE:  itensor(f,g);    itensor(f,g,b1,b2);
                   itensor(f,g,b);  itensor(f,g,b1,b2,b);

PARAMETERS:    f,g   = symmetric functions
             b,b1,b2 = (optional) basis names

SYNOPSIS:
  Let f and g be symmetric functions that are homogeneous of degree n. Via
  the characteristic map (see 'sf2char') there are virtual characters of
  the symmetric group S_n corresponding to f and g. The tensor (i.e.,
  pointwise) product of these two characters is therefore also a virtual
  character corresponding to some symmetric function, the "inner tensor
  product" (a.k.a. Kronecker product) of f and g. This product is linear
  in both arguments, and is zero if f and g are of unequal degrees.

  itensor(f,g) returns the inner tensor product of the symmetric functions
  f and g. The output is collected with respect to the power-sums and
  'normal' is applied to the coefficients. If there is an odd number of
  arguments (3 or 5), with the last being a basis name b, then the output
  is expressed in terms of the basis b. If there are 4 or 5 arguments,
  with the third and fourth being basis names b1 and b2, then f and g are
  assumed to be expressed solely in terms of the bases b1 and b2,
  respectively. In particular, if (say) b1 is not one of the predefined
  bases, this requires f to be linear in elements of the basis b1.

EXAMPLES:
  itensor(s[2,1],s[3,2]);        yields                  0
  itensor(s[2,1],s[2,1],s);      yields         s[3]+s[2,1]+s[1,1,1]
  itensor(s[2,2],h2^2,s,h);      yields           1/2*p2^2+1/2*p1^4
  itensor(e5,s[3,2],e,s,s);      yields               s[2,2,1]

SEE ALSO:  char2sf, sf2char, plethysm


FUNCTION:  jt_matrix - Jacobi-Trudi matrix of a (possibly skew) partition

CALLING SEQUENCE:  jt_matrix(lambda);
                   jt_matrix(lambda,mu);
                   jt_matrix(lambda,mu,b);

PARAMETERS:  lambda,mu = partitions
                 b     = (optional) a name

SYNOPSIS:
  If lambda is a partition with l parts, the Jacobi-Trudi matrix associated
  to lambda is an l x l matrix whose [i,j] entry is the complete homogeneous
  symmetric function h.(lambda[i]-i+j). The determinant of this matrix is
  the Schur function s[lambda]. 

  More generally, if mu is a second partition, then the Jacobi-Trudi matrix 
  associated to the "skew shape" lambda/mu is the matrix whose [i,j] entry
  is h.(lambda[i]-mu[j]-i+j). Its determinant is the skew Schur function
  indexed by lambda/mu. In particular, the determinant is 0 unless mu is a
  subpartition of lambda.

  jt_matrix(lambda) returns the Jacobi-Trudi matrix associated to lambda.

  jt_matrix(lambda,mu) does the same for the skew shape lambda/mu.

  If a third argument 'b', is present, then the matrix returned uses b as
  the base name for the entries of the matrix rather than (the default) h.

EXAMPLES:
  jt_matrix([4,2,1]);           yields   
                                   array([[h4,h5,h6], [h1,h2,h3], [0,1,h1]])
  jt_matrix([5,3,2],[3,2],q);   yields
                                    array([[q2,q4,q7], [0,q1,q4], [0,0,q2]])

SEE ALSO:  conjugate, skew, subPar, tos


FUNCTION:  nextPar - generate the next partition in lexicographic order

CALLING SEQUENCE:  nextPar(mu);

PARAMETERS:  mu = a partition

SYNOPSIS:
  In the lexicographic ordering of partitions, mu precedes nu if there is
  some i >= 1 such that mu[1]=nu[1], ..., mu[i-1]=nu[i-1], and mu[i]>nu[i].

  Given a partition mu of size m, nextPar(mu) generates the next partition
  of m after mu in lexicographic order. If there is no such partition
  (i.e., mu=[1,...,1]), then NULL is returned.

  Note that this generates partitions of m in the same order as Par(m),
  but enables programming of significantly faster and more space-efficient
  loops for large m. For example,

    mu:=[20]; while mu<>NULL do f(mu); mu:=nextPar(mu) od;

  would apply procedure f to each partition of 20.

EXAMPLES:
  nextPar([4,1,1,1,1]);         yields               [3,3,2]
  nextPar([3,3,2]);             yields              [3,3,1,1]

SEE ALSO:  Par, conjugate, dominate, subPar


FUNCTION:  omega - apply the omega automorphism to a symmetric function

CALLING SEQUENCE:  omega(f);
                   omega(f,b1);
                   omega(f,b1,b2);

PARAMETERS:    f   = a symmetric function
             b1,b2 = (optional) names of bases

SYNOPSIS:
  The omega automorphism is an involution on the ring of symmetric functions
  in which h.i -> e.i, e.i -> h.i, p.i -> (-1)^(i-1) * p.i, and
  s[lambda] -> s[lambda'], where lambda' denotes the conjugate of lambda.

  If f is any symmetric function, omega(f) applies this automorphism to f.

  If a second argument b1 is specified, then the procedure assumes that f
  is expressed solely in terms of base b1. In particular, if b1 is not one
  of the predefined bases, this requires f to be linear in elements of the
  basis b1.

  If a third argument b2 is specified, the result is expressed in terms of
  the basis b2. If no such argument is specified, the result may involve
  any convenient mix of functions from various bases.

EXAMPLES:
  omega(h3*p4+e2);                       yields    -e3*p4+h2
  dual_basis(m,h); dual_basis(F,e);
  omega(m[3,2],m);                       yields    -p5-p3*p2
  omega(m[3,2],m,F);                     yields     F[3, 2]

SEE ALSO:  conjugate, theta


FUNCTION:  Par - list partitions

CALLING SEQUENCE:  Par(n);  Par(n,l);  Par(n,k,l);

PARAMETERS:  n = a nonnegative integer
             l = (optional) maximum number of parts allowed
             k = (optional) maximum part size allowed

SYNOPSIS:
  A partition of n is defined to be a non-increasing list of positive
  integers with sum n. The members of the list are called parts.

  Par(n) returns a list consisting of all partitions of n.

  Par(n,l) returns a list of all partitions of n with at most l parts.

  Par(n,k,l) returns a list of all partitions of n with at most l parts
  such that every part is <= k.

  In all cases, the list of partitions is arranged in lexicographic order;
  i.e., mu precedes nu if we have mu[1]=nu[1], ..., mu[i-1]=nu[i-1],
  and mu[i]>nu[i] for some i >= 1. This total ordering is a refinement of
  the dominance partial order (see 'dominate').

EXAMPLES:
  Par(4);            yields      [[4], [3,1], [2,2], [2,1,1], [1,1,1,1]]
  Par(7,2);          yields            [[7], [6,1], [5,2], [4,3]]
  Par(9,4,3);        yields            [[4,4,1], [4,3,2], [3,3,3]]

SEE ALSO:  conjugate, dominate, nextPar, subPar


FUNCTION:  plethysm - plethysm of symmetric functions

CALLING SEQUENCE:  plethysm(f,g);    plethysm(f,g,b1,b2);
                   plethysm(f,g,b);  plethysm(f,g,b1,b2,b);

PARAMETERS:    f,g    =  symmetric functions
             b,b1,b2  =  (optional) basis names

SYNOPSIS:
  The plethysm operation on symmetric functions f and g is the (unique)
  binary operation f[g] satisfying the following properties:

    (1) (f+g)[h] = f[h]+g[h],     (2) (f*g)[h] = (f[h])*(g[h]),
    (3)   p.j[f] = f[p.j],        (4) p.i[p.j] = p.(i*j),

  where p.i denotes the i-th power-sum symmetric function.

  If f and g are characters of representations of general linear groups,
  then f[g] is the character of the composition of the representations. If
  f and g correspond to symmetric group characters (via the characteristic
  map--see 'sf2char'), then the plethysm f[g] corresponds to the induction
  of a character of the wreath product of two symmetric groups.

  plethysm(f,g) returns the plethysm of symmetric functions f and g.
  The output is collected with respect to the power-sums and 'normal' is
  applied to the coefficients.

  If there is an odd number of arguments (3 or 5), with the last being a
  basis name b, then the output is expressed in terms of the basis b.
  If there are 4 or 5 arguments, with the the third and fourth being basis
  names b1 and b2, then f and g are assumed to be expressed solely in terms
  of the bases b1 and b2, respectively. In particular, if (say) b1 is not
  one of the predefined bases, this requires f to be linear in the elements
  of the basis b1.

  Reference:
    I. Macdonald, "Symmetric Functions and Hall polynomials", Section I.8.

EXAMPLES:
  plethysm(h3,h2,s);              yields       s[6]+s[4,2]+s[2,2,2]
  plethysm(p3,s[2,1]);            yields         1/3*p3^3-1/3*p9
  plethysm(p3,s[2,1],p,s);        yields         1/3*p3^3-1/3*p9
  plethysm(e3,e2,e,e,e);          yields   e4*e1^2-e1*e5-2*e4*e2+e6+e3^2

SEE ALSO:  char2sf, evalsf, itensor, sf2char


FUNCTION:  scalar - scalar product of symmetric functions

CALLING SEQUENCE:  scalar(f,g);       scalar(f,g,b1,b2);
                   scalar(f,g,scp);   scalar(f,g,b1,b2,scp);

PARAMETERS:   f,g  = symmetric functions
             b1,b2 = (optional) names of bases
              scp  = (optional) a procedure that accepts partitions as input

SYNOPSIS:
  Let < , > be a scalar product of symmetric functions in which the power
  sums are orthogonal, and let 'scp' be a procedure such that scp(mu)
  computes the squared norm of the power sum indexed by mu. The standard
  scalar product is obtained by choosing scp=zee.

  If f and g are symmetric functions and 'scp' is as described, then
  scalar(f,g,scp) computes the scalar product of f and g. If the last
  argument 'scp' is omitted, then by default the standard scalar product
  is computed. Hence scalar(f,g) is equivalent to scalar(f,g,zee).

  If two additional arguments b1 and b2 are specified, then f and g are
  assumed to be expressed solely in terms of the bases b1 and b2, resp.
  In particular, if (say) b1 is not one of the predefined bases, this
  requires f to be linear in the members of b1.

EXAMPLES:
  scalar(s[3,2],h2*h1^3);            yields                3
  scalar(s[3,1,1],e3*e2,s,e);        yields                0
  Zee:=mu -> zee(mu,q^2,q);
  c:=scalar(s[2,1],s[2,1],Zee);
  normal(c);                         yields          q^3+2*q^2+2*q+1
  dual_basis(m,h);
  c:=scalar(m[3,1]+m[2,1],p3*(1+p1),m,p,Zee);
  normal(c);                         yields           3*q*(q^3+1)

SEE ALSO:  add_basis, dual_basis, skew, zee


FUNCTION:  sf2char - convert symmetric functions to (virtual) characters

CALLING SEQUENCE:  sf2char(f);
                   sf2char(f,b);

PARAMETERS:  f = a symmetric function
             b = (optional) a basis name

SYNOPSIS:
  The characteristic map is an isometric isomorphism between symmetric
  functions that are homogeneous of degree n and class functions on the
  symmetric group S_n (i.e., functions constant on conjugacy classes).

  Under this map, the Schur function s[lambda] corresponds to the
  irreducible character of S_n indexed by lambda, and the power sum indexed
  by lambda corresponds to the function that takes on the value zee(lambda)
  for all permutations of cycle-type lambda, and 0 otherwise.

  For any symmetric function f, sf2char(f) returns the class function
  corresponding to f. The result is expressed as a linear combination of
  expressions of the form cl[lambda], where cl[lambda] denotes the class
  function that takes the value 1 at cycle-type lambda, and 0 otherwise.
  In particular, the coefficient of cl[1,1,1,...] is the degree of the
  (possibly virtual) character corresponding to f.

  A basis name b may be optionally given as a second argument to specify
  that f is expressed solely in terms of the basis b. If b is not one of
  the predefined bases, this requires f to be linear in elements of b.

EXAMPLES:
  sf2char((p1+p2)^2);        yields        8*cl[2,2]+4*cl[2,1]+2*cl[1,1]
  sf2char(s[3,1],s);         yields    3*cl[1,1,1,1]+cl[2,1,1]-cl[2,2]-cl[4]

SEE ALSO:  char2sf, itensor, plethysm, zee, combinat[Chi]


FUNCTION:  skew - skew operation on symmetric functions

CALLING SEQUENCE:  skew(f,g);      skew(f,g,b1,b2);
                   skew(f,g,scp);  skew(f,g,b1,b2,scp);

PARAMETERS:   f,g  = symmetric functions
             b1,b2 = (optional) names of bases
              scp  = (optional) a procedure that accepts partitions as input

SYNOPSIS:
  Let < , > be a scalar product of symmetric functions in which the power
  sums are orthogonal, and let 'scp' be a procedure such that scp(mu)
  computes the squared norm of the power sum indexed by mu. The standard
  scalar product is obtained by choosing scp=zee. See 'scalar' and 'zee'.

  For each symmetric function f, there is a linear operator Skew(f) on
  symmetric functions that is adjoint (via < , >) to multiplication by f.
  That is, <Skew(f)g,h>=<g,f*h> for all symmetric functions f, g, h.

  If f and g are symmetric functions and 'scp' is as described, then
  skew(f,g,scp) returns Skew(f)g (relative to < , >). The output is
  collected with respect to the power-sums and 'normal' is applied to
  the coefficients.

  If the last argument 'scp' is omitted, then by default the adjoint is
  computed relative to the standard scalar product. Hence skew(f,g) is
  equivalent to skew(f,g,zee).

  If two additional arguments b1 and b2 are specified, then f and g
  are assumed to be expressed solely in terms of the bases b1 and b2,
  respectively. In particular, if (say) b1 is not one of the predefined
  bases, this requires f to be linear in the members of b1.

  If lambda and mu are partitions, then the skew Schur function indexed by
  the pair lambda/mu is  skew(s[mu],s[lambda]). However, it is generally
  faster to compute skew Schur functions via the Jacobi-Trudi identity:
  linalg[det](jt_matrix(lambda,mu)).

EXAMPLES:
  skew(e3,s[4,2]);              yields                    0
  f:=skew(p2,h6,p,h);
  toh(f);                       yields                   h4
  Zee:= mu -> zee(mu,0,t);
  f:=skew(p2,s[4,2],Zee);
  tos(f);                       yields       s[4]/(1-t^2) + s[2,2]/(1-t^2)

SEE ALSO:  jt_matrix, scalar, zee


FUNCTION:  stdeg - degree with respect to the standard grading

CALLING SEQUENCE:  stdeg(f);  stdeg(f,B);

PARAMETERS:  f = a symmetric function
             B = (optional) a name

SYNOPSIS:
  The standard grading of the ring of symmetric functions assigns the
  degrees 1,2,... to each variable of the form b1,b2,..., and degree n
  to each variable of the form b[mu] with mu a partition of n.

  Given a symmetric function f, stdeg(f) returns the degree of f in the
  standard grading. Any variables appearing f that do not belong to a
  basis known to SF (as specified by the global variable `SF/Bases`) are
  assigned the degree 0.

  If B is a name of type 'string', then stdeg(f,B) computes the degree of
  f under the assumption that f is expressed entirely in terms of the
  variables B1,B2,...; (i.e., all other variables are given degree 0).
  Given a name B[] of type 'indexed', stdeg(f,B[]) computes the degree of
  f under the assumption that f is expressed entirely in terms of the
  variables B[mu], where mu ranges over partitions.

  Note that stdeg acts as a front-end to Maple's degree function, and
  so inherits all of its peculiarities. In particular, (1) reliable results
  cannot be obtained unless f is expanded or collected with respect to the
  variables of some basis (e.g., (1+p1)^2 - p1^2 and s[2]-h2 are reported
  to have degree 2), and (2) versions of Maple prior to V.5 report that 0
  has degree 0, while current versions report -infinity.

  There are no restrictions on basis names of indexed type, but basis names
  of string type must consist of a single letter.

EXAMPLES:
  stdeg(s[4,2]*p2-h6);                    yields           8
  stdeg(s[4,2]*p2-h6,s[]);                yields           6
  stdeg(t*p3^3+p4^2,p);                   yields           9

SEE ALSO:  varset


FUNCTION:  subPar - list all subpartitions of a partition

CALLING SEQUENCE:  subPar(lambda);  subPar(lambda,n);

PARAMETERS:  lambda = a partition
               n    = (optional) a nonnegative integer

SYNOPSIS:
  If lambda and mu are partitions, then mu is a subpartition of lambda if
  nops(mu) <= nops(lambda) and mu[i] <= lambda[i] for i=1,...,nops(mu).

  subPar(lambda) returns a list consisting of all subpartitions of lambda.

  subPar(lambda,n) returns a list consisting of all partitions of n that
  are subpartitions of lambda.

  In both cases, the list of partitions is arranged in lexicographic order;
  i.e., mu precedes nu if we have mu[1]=nu[1], ..., mu[i-1]=nu[i-1],
  and mu[i]>nu[i] for some i >= 1.

EXAMPLES:
  subPar([2,2]);       yields         [[2,2], [2,1], [2], [1,1], [1], []]
  subPar([4,3,2],7);   yields          [[4,3], [4,2,1], [3,3,1], [3,2,2]]

SEE ALSO:  Par, conjugate, dominate, nextPar


FUNCTION:  theta - apply the theta automorphism to a symmetric function

CALLING SEQUENCE:  theta(f,a);  theta(f,q,t);

PARAMETERS:   f   = a symmetric function
            a,q,t = arbitrary names or expressions

SYNOPSIS:
  There are two types of "theta" automorphisms of the ring of symmetric
  functions that are of use in computations with Jack symmetric functions
  and Macdonald's symmetric functions. Both can be defined by their action
  on the power-sums p1,p2,p3,...

  In the first form, theta(f,a) applies to the symmetric function f the
  automorphism in which p.j is mapped to a*p.j.

  In the second form, theta(f,q,t) applies to the symmetric function f the
  automorphism in which p.j is mapped to (1-q^j)/(1-t^j)*p.j. Note that
  this is equivalent to evalsf(f,(1-q)*p1/(1-t)).

  In both cases, the output is expressed in terms of (collected) power-sums
  with 'normal' applied to the coefficients.

EXAMPLES:
  theta(s[3,1,1],z);         yields  1/20*z^5*p1^5-1/4*z^3*p2^2*p1+1/5*z*p5
  f:=theta(s[3,1],q^2,q);
  factor(scalar(f,s[3,1]));  yields              (q^2+q+1)^2

SEE ALSO:  evalsf, omega


FUNCTION:  toe - convert a symmetric function to the e-basis

CALLING SEQUENCE:  toe(f);  toe(f,b);

PARAMETERS:  f = a symmetric function
             b = (optional) a basis name

SYNOPSIS:
  If f is any symmetric function, toe(f) will convert f into a polynomial
  in the elementary symmetric functions e1,e2,e3,..., with the result
  collected in 'distributed' form with respect to e1,e2,e3,..., and with
  'normal' applied to the coefficients.

  If a second argument b is specified, then f is assumed to be expressed
  solely in terms of the basis b. In particular, if b is not one of the
  predefined bases, this requires f to be linear in the members of b.

EXAMPLES:
  toe(h1*e2*p2+s[2,1]*s[2]);   yields   2*e2*e1^3-e3*e1^2-3*e2^2*e1+e3*e2
  toe(s[3,1]+s[2,2],s);        yields          e2*e1^2-2*e1*e3+e4

SEE ALSO:  add_basis, dual_basis, toh, top, tos


FUNCTION:  toh - convert a symmetric function to the h-basis

CALLING SEQUENCE:  toh(f);  toh(f,b);

PARAMETERS:  f = a symmetric function
             b = (optional) a basis name

SYNOPSIS:
  If f is any symmetric function, toh(f) will convert f into a polynomial
  in the complete homogeneous symmetric functions h1,h2,h3,..., with the
  result collected in 'distributed' form with respect to h1,h2,h3,..., and
  with 'normal' applied to the coefficients.

  If a second argument b is specified, then f is assumed to be expressed 
  solely in terms of the basis b. In particular, if b is not one of the 
  predefined bases, this requires f to be linear in the members of b.

EXAMPLES:
  toh(e2^2+p2^2-2*e4);      yields          -4*h1*h3+3*h2^2+2*h4
  toh(s[4,3],s);            yields              h4*h3-h5*h2

SEE ALSO:  add_basis, dual_basis, toe, top, tos


FUNCTION:  top - convert a symmetric function to the p-basis

CALLING SEQUENCE:  top(f);  top(f,b);

PARAMETERS:  f = a symmetric function
             b = (optional) a basis name

SYNOPSIS:
  If f is any symmetric function, top(f) will convert f into a polynomial
  in the power-sum symmetric functions p1,p2,p3,..., with the result
  collected in 'distributed' form with respect to p1,p2,p3,..., and with
  'normal' applied to the coefficients.

  If a second argument b is specified, then f is assumed to be expressed 
  solely in terms of the basis b. In particular, if b is not one of the 
  predefined bases, this requires f to be linear in the members of b.

EXAMPLES:
  top(s[3,1,1],s);         yields        1/20*p1^5-1/4*p2^2*p1+1/5*p5
  top(36*h3*e3);           yields      p1^6+4*p3*p1^3-9*p2^2*p1^2+4*p3^2

SEE ALSO:  add_basis, dual_basis, toe, toh, tos


FUNCTION:  tos - convert a symmetric function to the Schur function basis

CALLING SEQUENCE:  tos(f);  tos(f,<options>);

PARAMETERS:     f     = a symmetric function
            <options> = any of the following (in any order):
                        (1) a basis name
                        (2) an equation of the form 'nrows=<integer>'

SYNOPSIS:
  If f is any symmetric function, tos(f) will convert f into a linear
  combination of the Schur functions s[lambda], with 'normal' applied to
  the coefficients.

  If a name b is supplied as one of the optional arguments, then f is
  assumed to be expressed solely in terms of the basis b. In particular,
  if b is not one of the predefined bases, this requires f to be linear
  in the elements of b.

  If n is a positive integer and an equation of the form 'nrows=n' is
  supplied as one of the optional arguments, then the calculation will be
  performed in a quotient of the full ring of symmetric functions; namely,
  the quotient in which the elementary symmetric functions e.m for m > n
  vanish. This quotient has a basis consisting of Schur functions s[lambda]
  for lambda varying over partitions with at most n rows (or parts). These
  Schur functions are the irreducible polynomial characters of GL(n).

  Note: To maintain backward compatibility with previous versions of SF,
  a list of partitions containing the support of f may also be supplied as
  an optional argument. However, the new implementation of 'tos' obtains
  no advantage from this information and ignores it.

EXAMPLES:
  tos(h3*p2);                     yields             s[5]+s[3,2]-s[3,1,1]
  tos(s[2,1]*s[2,2], s);          yields
                     s[4,3]+s[4,2,1]+s[3,3,1]+s[3,2,2]+s[3,2,1,1]+s[2,2,2,1]

#Compute the expansion of a skew Schur function in 3 variables:

  f:=linalg[det](jt_matrix([5,4,2,1],[3,2]));
  tos(f,h,nrows=3);                yields
                   s[5,2]+s[5,1,1]+2*s[4,3]+3*s[4,2,1]+2*s[3,3,1]+2*s[3,2,2]

SEE ALSO:  add_basis, dual_basis, jt_matrix, toe, toh, top


FUNCTION:  varset - variable set of a symmetric function

CALLING SEQUENCE:  varset(f);  varset(f,B);

PARAMETERS:  f = a symmetric function
             B = (optional) a name, or a list or set of names

SYNOPSIS:
  If f is a symmetric function, varset(f) returns a table whose entries
  describe the set of basic symmetric functions that occur syntactically
  in f. There will be a table entry corresponding to each member of 
  `SF/Bases`, the global variable that specifies the known bases.

  If 'b[]' is a name of type 'indexed' in `SF/Bases`, there will be a table
  entry indexed by 'b' consisting of a list of all partitions lambda such
  that b[lambda] appears in f.

  If 'b' is a name of type 'string' in `SF/Bases`, there will be a table
  entry indexed by 'b' equal to the largest integer d such that b.d appears
  in f (or 0, if b1,b2,... do not occur in f).

  If B is any list or set of basis names (of string or indexed type),
  varset(f,B) does the same, using B in place of `SF/Bases`.

  If B is any basis name of type 'string' or 'indexed', varset(f,B) returns
  only the table entry corresponding to the basis B (either an integer or
  a list), not the table itself. 

  There are no restrictions on basis names of indexed type, but basis names
  of string type must consist of a single letter.

EXAMPLES:
  varset((p1+p3)^3+p7^2,p);                yields           7
  f:=s[3,2]*s[2]*m[2,1]+h3*h1^2;
  varset(f);                               yields 
                                  table([(e)=0,(h)=3,(p)=0,(s)=[[3,2], [2]]])
  T:=varset(f,{h,m[]}): T[m];              yields        [[2,1]]

SEE ALSO:  stdeg


FUNCTION:  zee - squared norm of power sums

CALLING SEQUENCE:  zee(lambda);
                   zee(lambda,a);
                   zee(lambda,q,t);

PARAMETERS:  lambda = a partition
             a,q,t  = (optional) names or expressions

SYNOPSIS:
  If lambda is a partition with m[i] parts equal to i, then zee(lambda) is
  defined to be 1^m[1] * m[1]! * 2^m[2] * m[2]! * ... This is equal to the
  size of the centralizer of any permutation of cycle-type lambda, and also
  equals the squared norm of the power-sum symmetric function corresponding
  to lambda, relative to the standard scalar product.

  The procedure also accepts additional arguments that are useful for
  defining commonly used variations of the standard scalar product.
  See the help for 'add_basis', 'dual_basis', 'scalar' and 'skew'.

  With two arguments, zee(lambda,a) returns a^nops(lambda) * zee(lambda).

  With three arguments, zee(lambda,q,t) returns the product of zee(lambda)
  and (1-q^lambda[i])/(1-t^lambda[i]), for i=1,2,...

EXAMPLES:
  zee([3,3,2]);                        yields          36
  zee([3,3,2],x);                      yields        36*x^3
  Zee:= mu -> zee(mu,q^2,q);        
  c:=scalar(s[2,2],s[2,2],Zee);
  normal(c);                           yields    q^4+q^3+2*q^2+q+1

SEE ALSO:  Par, add_basis, dual_basis, scalar, skew

© 2005 John R. Stembridge