Power sum symmetric functions - Combinatorics

Skip to content
Back to top
View this page
Edit this page

# Power sum symmetric functions

class sage.combinat.sf.powersum.SymmetricFunctionAlgebra_power(Sym)

  Bases: `SymmetricFunctionAlgebra_multiplicative`

  A class for methods associated to the power sum basis of the symmetric functions.

  INPUT:

  - `self` – the power sum basis of the symmetric functions

  - `Sym` – an instance of the ring of symmetric functions

  class Element

    Bases: `Element`

    adams_operator(n)

      Return the image of the symmetric function `self` under the \(n\)-th Adams operator.

      The \(n\)-th Adams operator \(\mathbf{f}_n\) is defined to be the map from the ring of symmetric functions to itself that sends every symmetric function \(P(x_1, x_2, x_3, \ldots)\) to \(P(x_1^n, x_2^n, x_3^n, \ldots)\). This operator \(\mathbf{f}_n\) is a Hopf algebra endomorphism, and satisfies

      \[\mathbf{f}_n m_{(\lambda_1, \lambda_2, \lambda_3, \ldots)} = m_{(n\lambda_1, n\lambda_2, n\lambda_3, \ldots)}\]

      for every partition \((\lambda_1, \lambda_2, \lambda_3, \ldots)\) (where \(m\) means the monomial basis). Moreover, \(\mathbf{f}_n (p_r) = p_{nr}\) for every positive integer \(r\) (where \(p_k\) denotes the \(k\)-th powersum symmetric function).

      The \(n\)-th Adams operator is also called the \(n\)-th Frobenius endomorphism. It is not related to the Frobenius map which connects the ring of symmetric functions with the representation theory of the symmetric group.

      The \(n\)-th Adams operator is the \(n\)-th Adams operator of the \(\Lambda\)-ring of symmetric functions over the integers.

      The \(n\)-th Adams operator can also be described via plethysm: Every symmetric function \(P\) satisfies \(\mathbf{f}_n(P) = p_n \circ P = P \circ p_n\), where \(p_n\) is the \(n\)-th powersum symmetric function, and \(\circ\) denotes (outer) plethysm.

      INPUT:

      - `n` – positive integer

      OUTPUT:

      The result of applying the \(n\)-th Adams operator (on the ring of symmetric functions) to `self`.

      EXAMPLES:

      Sage

          sage: Sym = SymmetricFunctions(ZZ)
          sage: p = Sym.p()
          sage: p[3].adams_operator(2)
          p[6]
          sage: p[4,2,1].adams_operator(3)
          p[12, 6, 3]
          sage: p([]).adams_operator(4)
          p[]
          sage: p[3].adams_operator(1)
          p[3]
          sage: (p([3]) - p([2]) + p([])).adams_operator(3)
          p[] - p[6] + p[9]

      Python

          >>> from sage.all import *
          >>> Sym = SymmetricFunctions(ZZ)
          >>> p = Sym.p()
          >>> p[Integer(3)].adams_operator(Integer(2))
          p[6]
          >>> p[Integer(4),Integer(2),Integer(1)].adams_operator(Integer(3))
          p[12, 6, 3]
          >>> p([]).adams_operator(Integer(4))
          p[]
          >>> p[Integer(3)].adams_operator(Integer(1))
          p[3]
          >>> (p([Integer(3)]) - p([Integer(2)]) + p([])).adams_operator(Integer(3))
          p[] - p[6] + p[9]

      See also

      `plethysm()`

    eval_at_permutation_roots(rho)

      Evaluate at eigenvalues of a permutation matrix.

      Evaluate an element of the power sum basis at the eigenvalues of a permutation matrix with cycle structure \(\rho\).

      This function evaluates an element at the roots of unity

      \[\Xi_{\rho_1},\Xi_{\rho_2},\ldots,\Xi_{\rho_\ell}\]

      where

      \[\Xi_{m} = 1,\zeta_m,\zeta_m^2,\ldots,\zeta_m^{m-1}\]

      and \(\zeta_m\) is an \(m\) root of unity. These roots of unity represent the eigenvalues of permutation matrix with cycle structure \(\rho\).

      INPUT:

      - `rho` – a partition or a list of nonnegative integers

      OUTPUT: an element of the base ring

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: p([3,3]).eval_at_permutation_roots([6])
          0
          sage: p([3,3]).eval_at_permutation_roots([3])
          9
          sage: p([3,3]).eval_at_permutation_roots([1])
          1
          sage: p([3,3]).eval_at_permutation_roots([3,3])
          36
          sage: p([3,3]).eval_at_permutation_roots([1,1,1,1,1])
          25
          sage: (p[1]+p[2]+p[3]).eval_at_permutation_roots([3,2])
          5

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> p([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(6)])
          0
          >>> p([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(3)])
          9
          >>> p([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(1)])
          1
          >>> p([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(3),Integer(3)])
          36
          >>> p([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(1),Integer(1),Integer(1),Integer(1),Integer(1)])
          25
          >>> (p[Integer(1)]+p[Integer(2)]+p[Integer(3)]).eval_at_permutation_roots([Integer(3),Integer(2)])
          5

    expand(n, alphabet='x')

      Expand the symmetric function `self` as a symmetric polynomial in `n` variables.

      INPUT:

      - `n` – nonnegative integer

      - `alphabet` – (default: `'x'`) a variable for the expansion

      OUTPUT:

      A monomial expansion of `self` in the \(n\) variables labelled by `alphabet`.

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: a = p([2])
          sage: a.expand(2)
          x0^2 + x1^2
          sage: a.expand(3, alphabet=['a','b','c'])
          a^2 + b^2 + c^2
          sage: p([2,1,1]).expand(2)
          x0^4 + 2*x0^3*x1 + 2*x0^2*x1^2 + 2*x0*x1^3 + x1^4
          sage: p([7]).expand(4)
          x0^7 + x1^7 + x2^7 + x3^7
          sage: p([7]).expand(4,alphabet='t')
          t0^7 + t1^7 + t2^7 + t3^7
          sage: p([7]).expand(4,alphabet='x,y,z,t')
          x^7 + y^7 + z^7 + t^7
          sage: p(1).expand(4)
          1
          sage: p(0).expand(4)
          0
          sage: (p([]) + 2*p([1])).expand(3)
          2*x0 + 2*x1 + 2*x2 + 1
          sage: p([1]).expand(0)
          0
          sage: (3*p([])).expand(0)
          3

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> a = p([Integer(2)])
          >>> a.expand(Integer(2))
          x0^2 + x1^2
          >>> a.expand(Integer(3), alphabet=['a','b','c'])
          a^2 + b^2 + c^2
          >>> p([Integer(2),Integer(1),Integer(1)]).expand(Integer(2))
          x0^4 + 2*x0^3*x1 + 2*x0^2*x1^2 + 2*x0*x1^3 + x1^4
          >>> p([Integer(7)]).expand(Integer(4))
          x0^7 + x1^7 + x2^7 + x3^7
          >>> p([Integer(7)]).expand(Integer(4),alphabet='t')
          t0^7 + t1^7 + t2^7 + t3^7
          >>> p([Integer(7)]).expand(Integer(4),alphabet='x,y,z,t')
          x^7 + y^7 + z^7 + t^7
          >>> p(Integer(1)).expand(Integer(4))
          1
          >>> p(Integer(0)).expand(Integer(4))
          0
          >>> (p([]) + Integer(2)*p([Integer(1)])).expand(Integer(3))
          2*x0 + 2*x1 + 2*x2 + 1
          >>> p([Integer(1)]).expand(Integer(0))
          0
          >>> (Integer(3)*p([])).expand(Integer(0))
          3

    exponential_specialization(t=None, q=1)

      Return the exponential specialization of a symmetric function (when \(q = 1\)), or the \(q\)-exponential specialization (when \(q \neq 1\)).

      The exponential specialization \(ex\) at \(t\) is a \(K\)-algebra homomorphism from the \(K\)-algebra of symmetric functions to another \(K\)-algebra \(R\). It is defined whenever the base ring \(K\) is a \(\QQ\)-algebra and \(t\) is an element of \(R\). The easiest way to define it is by specifying its values on the powersum symmetric functions to be \(p_1 = t\) and \(p_n = 0\) for \(n > 1\). Equivalently, on the homogeneous functions it is given by \(ex(h_n) = t^n / n!\); see Proposition 7.8.4 of [EnumComb2].

      By analogy, the \(q\)-exponential specialization is a \(K\)-algebra homomorphism from the \(K\)-algebra of symmetric functions to another \(K\)-algebra \(R\) that depends on two elements \(t\) and \(q\) of \(R\) for which the elements \(1 - q^i\) for all positive integers \(i\) are invertible. It can be defined by specifying its values on the complete homogeneous symmetric functions to be

      \[ex_q(h_n) = t^n / [n]_q!,\]

      where \([n]_q!\) is the \(q\)-factorial. Equivalently, for \(q \neq 1\) and a homogeneous symmetric function \(f\) of degree \(n\), we have

      \[ex_q(f) = (1-q)^n t^n ps_q(f),\]

      where \(ps_q(f)\) is the stable principal specialization of \(f\) (see `principal_specialization()`). (See (7.29) in [EnumComb2].)

      The limit of \(ex_q\) as \(q \to 1\) is \(ex\).

      INPUT:

      - `t` – (default: `None`) the value to use for \(t\); the default is to create a ring of polynomials in `t`

      - `q` – (default: \(1\)) the value to use for \(q\). If `q` is `None`, then a ring (or fraction field) of polynomials in `q` is created.

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: x = p[8,7,3,1]
          sage: x.exponential_specialization()
          0
          sage: x = p[3] + 5*p[1,1] + 2*p[1] + 1
          sage: x.exponential_specialization(t=var("t"))                          # needs sage.symbolic
          5*t^2 + 2*t + 1

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> x = p[Integer(8),Integer(7),Integer(3),Integer(1)]
          >>> x.exponential_specialization()
          0
          >>> x = p[Integer(3)] + Integer(5)*p[Integer(1),Integer(1)] + Integer(2)*p[Integer(1)] + Integer(1)
          >>> x.exponential_specialization(t=var("t"))                          # needs sage.symbolic
          5*t^2 + 2*t + 1

      We also support the \(q\)-exponential_specialization:

      Sage

          sage: factor(p[3].exponential_specialization(q=var("q"), t=var("t")))   # needs sage.symbolic
          (q - 1)^2*t^3/(q^2 + q + 1)

      [Python]

          >>> from sage.all import *
          >>> factor(p[Integer(3)].exponential_specialization(q=var("q"), t=var("t")))   # needs sage.symbolic
          (q - 1)^2*t^3/(q^2 + q + 1)

    omega()

      Return the image of `self` under the omega automorphism.

      The omega automorphism is defined to be the unique algebra endomorphism \(\omega\) of the ring of symmetric functions that satisfies \(\omega(e_k) = h_k\) for all positive integers \(k\) (where \(e_k\) stands for the \(k\)-th elementary symmetric function, and \(h_k\) stands for the \(k\)-th complete homogeneous symmetric function). It furthermore is a Hopf algebra endomorphism and an involution, and it is also known as the omega involution. It sends the power-sum symmetric function \(p_k\) to \((-1)^{k-1} p_k\) for every positive integer \(k\).

      The images of some bases under the omega automorphism are given by

      \[\omega(e_{\lambda}) = h_{\lambda}, \qquad \omega(h_{\lambda}) = e_{\lambda}, \qquad \omega(p_{\lambda}) = (-1)^{|\lambda| - \ell(\lambda)} p_{\lambda}, \qquad \omega(s_{\lambda}) = s_{\lambda^{\prime}},\]

      where \(\lambda\) is any partition, where \(\ell(\lambda)\) denotes the length (`length()`) of the partition \(\lambda\), where \(\lambda^{\prime}\) denotes the conjugate partition (`conjugate()`) of \(\lambda\), and where the usual notations for bases are used (\(e\) = elementary, \(h\) = complete homogeneous, \(p\) = powersum, \(s\) = Schur).

      `omega_involution()` is a synonym for the `omega()` method.

      OUTPUT: the image of `self` under the omega automorphism

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: a = p([2,1]); a
          p[2, 1]
          sage: a.omega()
          -p[2, 1]
          sage: p([]).omega()
          p[]
          sage: p(0).omega()
          0
          sage: p = SymmetricFunctions(ZZ).p()
          sage: (p([3,1,1]) - 2 * p([2,1])).omega()
          2*p[2, 1] + p[3, 1, 1]

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> a = p([Integer(2),Integer(1)]); a
          p[2, 1]
          >>> a.omega()
          -p[2, 1]
          >>> p([]).omega()
          p[]
          >>> p(Integer(0)).omega()
          0
          >>> p = SymmetricFunctions(ZZ).p()
          >>> (p([Integer(3),Integer(1),Integer(1)]) - Integer(2) * p([Integer(2),Integer(1)])).omega()
          2*p[2, 1] + p[3, 1, 1]

    omega_involution()

      alias of `omega()`.

    principal_specialization(n=+Infinity, q=None)

      Return the principal specialization of a symmetric function.

      The principal specialization of order \(n\) at \(q\) is the ring homomorphism \(ps_{n,q}\) from the ring of symmetric functions to another commutative ring \(R\) given by \(x_i \mapsto q^{i-1}\) for \(i \in \{1,\dots,n\}\) and \(x_i \mapsto 0\) for \(i > n\). Here, \(q\) is a given element of \(R\), and we assume that the variables of our symmetric functions are \(x_1, x_2, x_3, \ldots\). (To be more precise, \(ps_{n,q}\) is a \(K\)-algebra homomorphism, where \(K\) is the base ring.) See Section 7.8 of [EnumComb2].

      The stable principal specialization at \(q\) is the ring homomorphism \(ps_q\) from the ring of symmetric functions to another commutative ring \(R\) given by \(x_i \mapsto q^{i-1}\) for all \(i\). This is well-defined only if the resulting infinite sums converge; thus, in particular, setting \(q = 1\) in the stable principal specialization is an invalid operation.

      INPUT:

      - `n` – (default: `infinity`) a nonnegative integer or `infinity`, specifying whether to compute the principal specialization of order `n` or the stable principal specialization.

      - `q` – (default: `None`) the value to use for \(q\); the default is to create a ring of polynomials in `q` (or a field of rational functions in `q`) over the given coefficient ring.

      We use the formulas from Proposition 7.8.3 of [EnumComb2]:

      \[ \begin{align}\begin{aligned}ps_{n,q}(p_\lambda) = \prod_i (1-q^{n\lambda_i}) / (1-q^{\lambda_i}),\\ps_{n,1}(p_\lambda) = n^{\ell(\lambda)},\\ps_q(p_\lambda) = 1 / \prod_i (1-q^{\lambda_i}),\end{aligned}\end{align} \]

      where \(\ell(\lambda)\) denotes the length of \(\lambda\), and where the products range from \(i=1\) to \(i=\ell(\lambda)\).

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: x = p[8,7,3,1]
          sage: x.principal_specialization(3, q=var("q"))                         # needs sage.symbolic
          (q^24 - 1)*(q^21 - 1)*(q^9 - 1)/((q^8 - 1)*(q^7 - 1)*(q - 1))

          sage: x = 5*p[1,1,1] + 3*p[2,1] + 1
          sage: x.principal_specialization(3, q=var("q"))                         # needs sage.symbolic
          5*(q^3 - 1)^3/(q - 1)^3 + 3*(q^6 - 1)*(q^3 - 1)/((q^2 - 1)*(q - 1)) + 1

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> x = p[Integer(8),Integer(7),Integer(3),Integer(1)]
          >>> x.principal_specialization(Integer(3), q=var("q"))                         # needs sage.symbolic
          (q^24 - 1)*(q^21 - 1)*(q^9 - 1)/((q^8 - 1)*(q^7 - 1)*(q - 1))

          >>> x = Integer(5)*p[Integer(1),Integer(1),Integer(1)] + Integer(3)*p[Integer(2),Integer(1)] + Integer(1)
          >>> x.principal_specialization(Integer(3), q=var("q"))                         # needs sage.symbolic
          5*(q^3 - 1)^3/(q - 1)^3 + 3*(q^6 - 1)*(q^3 - 1)/((q^2 - 1)*(q - 1)) + 1

      By default, we return a rational function in \(q\):

      Sage

          sage: x.principal_specialization(3)
          8*q^6 + 18*q^5 + 36*q^4 + 38*q^3 + 36*q^2 + 18*q + 9

      [Python]

          >>> from sage.all import *
          >>> x.principal_specialization(Integer(3))
          8*q^6 + 18*q^5 + 36*q^4 + 38*q^3 + 36*q^2 + 18*q + 9

      If `n` is not given we return the stable principal specialization:

      Sage

          sage: x.principal_specialization(q=var("q"))                            # needs sage.symbolic
          3/((q^2 - 1)*(q - 1)) - 5/(q - 1)^3 + 1

      Python

          >>> from sage.all import *
          >>> x.principal_specialization(q=var("q"))                            # needs sage.symbolic
          3/((q^2 - 1)*(q - 1)) - 5/(q - 1)^3 + 1

    scalar(x, zee=None)

      Return the standard scalar product of `self` and `x`.

      INPUT:

      - `x` – a power sum symmetric function

      - `zee` – (default: uses standard `zee` function) optional input specifying the scalar product on the power sum basis with normalization \(\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)\). `zee` should be a function on partitions.

      Note that the power-sum symmetric functions are orthogonal under this scalar product. With the default value of `zee`, the value of \(\langle p_{\lambda}, p_{\lambda} \rangle\) is given by the size of the centralizer in \(S_n\) of a permutation of cycle type \(\lambda\).

      OUTPUT:

      - the standard scalar product between `self` and `x`, or, if the optional parameter `zee` is specified, then the scalar product with respect to the normalization \(\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)\) with the power sum basis elements being orthogonal

      EXAMPLES:

      Sage

          sage: p = SymmetricFunctions(QQ).p()
          sage: p4 = Partitions(4)
          sage: matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4])
          [ 4  0  0  0  0]
          [ 0  3  0  0  0]
          [ 0  0  8  0  0]
          [ 0  0  0  4  0]
          [ 0  0  0  0 24]
          sage: p(0).scalar(p(1))
          0
          sage: p(1).scalar(p(2))
          2

          sage: zee = lambda x : 1
          sage: matrix( [[p[la].scalar(p[mu], zee) for la in Partitions(3)] for mu in Partitions(3)])
          [1 0 0]
          [0 1 0]
          [0 0 1]

      Python

          >>> from sage.all import *
          >>> p = SymmetricFunctions(QQ).p()
          >>> p4 = Partitions(Integer(4))
          >>> matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4])
          [ 4  0  0  0  0]
          [ 0  3  0  0  0]
          [ 0  0  8  0  0]
          [ 0  0  0  4  0]
          [ 0  0  0  0 24]
          >>> p(Integer(0)).scalar(p(Integer(1)))
          0
          >>> p(Integer(1)).scalar(p(Integer(2)))
          2

          >>> zee = lambda x : Integer(1)
          >>> matrix( [[p[la].scalar(p[mu], zee) for la in Partitions(Integer(3))] for mu in Partitions(Integer(3))])
          [1 0 0]
          [0 1 0]
          [0 0 1]

    verschiebung(n)

      Return the image of the symmetric function `self` under the \(n\)-th Verschiebung operator.

      The \(n\)-th Verschiebung operator \(\mathbf{V}_n\) is defined to be the unique algebra endomorphism \(V\) of the ring of symmetric functions that satisfies \(V(h_r) = h_{r/n}\) for every positive integer \(r\) divisible by \(n\), and satisfies \(V(h_r) = 0\) for every positive integer \(r\) not divisible by \(n\). This operator \(\mathbf{V}_n\) is a Hopf algebra endomorphism. For every nonnegative integer \(r\) with \(n \mid r\), it satisfies

      \[\mathbf{V}_n(h_r) = h_{r/n}, \quad \mathbf{V}_n(p_r) = n p_{r/n}, \quad \mathbf{V}_n(e_r) = (-1)^{r - r/n} e_{r/n}\]

      (where \(h\) is the complete homogeneous basis, \(p\) is the powersum basis, and \(e\) is the elementary basis). For every nonnegative integer \(r\) with \(n \nmid r\), it satisfes

      \[\mathbf{V}_n(h_r) = \mathbf{V}_n(p_r) = \mathbf{V}_n(e_r) = 0.\]

      The \(n\)-th Verschiebung operator is also called the \(n\)-th Verschiebung endomorphism. Its name derives from the Verschiebung (German for “shift”) endomorphism of the Witt vectors.

      The \(n\)-th Verschiebung operator is adjoint to the \(n\)-th Adams operator (see `adams_operator()` for its definition) with respect to the Hall scalar product (`scalar()`).

      The action of the \(n\)-th Verschiebung operator on the Schur basis can also be computed explicitly. The following (probably clumsier than necessary) description can be obtained by solving exercise 7.61 in Stanley’s [STA].

      Let \(\lambda\) be a partition. Let \(n\) be a positive integer. If the \(n\)-core of \(\lambda\) is nonempty, then \(\mathbf{V}_n(s_\lambda) = 0\). Otherwise, the following method computes \(\mathbf{V}_n(s_\lambda)\): Write the partition \(\lambda\) in the form \((\lambda_1, \lambda_2, \ldots, \lambda_{ns})\) for some nonnegative integer \(s\). (If \(n\) does not divide the length of \(\lambda\), then this is achieved by adding trailing zeroes to \(\lambda\).) Set \(\beta_i = \lambda_i + ns - i\) for every \(s \in \{ 1, 2, \ldots, ns \}\). Then, \((\beta_1, \beta_2, \ldots, \beta_{ns})\) is a strictly decreasing sequence of nonnegative integers. Stably sort the list \((1, 2, \ldots, ns)\) in order of (weakly) increasing remainder of \(-1 - \beta_i\) modulo \(n\). Let \(\xi\) be the sign of the permutation that is used for this sorting. Let \(\psi\) be the sign of the permutation that is used to stably sort the list \((1, 2, \ldots, ns)\) in order of (weakly) increasing remainder of \(i - 1\) modulo \(n\). (Notice that \(\psi = (-1)^{n(n-1)s(s-1)/4}\).) Then, \(\mathbf{V}_n(s_\lambda) = \xi \psi \prod_{i = 0}^{n - 1} s_{\lambda^{(i)}}\), where \((\lambda^{(0)}, \lambda^{(1)}, \ldots, \lambda^{(n - 1)})\) is the \(n\)-quotient of \(\lambda\).

      INPUT:

      - `n` – positive integer

      OUTPUT:

      The result of applying the \(n\)-th Verschiebung operator (on the ring of symmetric functions) to `self`.

      EXAMPLES:

      Sage

          sage: Sym = SymmetricFunctions(ZZ)
          sage: p = Sym.p()
          sage: p[3].verschiebung(2)
          0
          sage: p[4].verschiebung(4)
          4*p[1]

      Python

          >>> from sage.all import *
          >>> Sym = SymmetricFunctions(ZZ)
          >>> p = Sym.p()
          >>> p[Integer(3)].verschiebung(Integer(2))
          0
          >>> p[Integer(4)].verschiebung(Integer(4))
          4*p[1]

      The Verschiebung endomorphisms are multiplicative:

      Sage

          sage: all( all( p(lam).verschiebung(2) * p(mu).verschiebung(2)
          ....:           == (p(lam) * p(mu)).verschiebung(2)
          ....:           for mu in Partitions(4) )
          ....:      for lam in Partitions(4) )
          True

      [Python]

          >>> from sage.all import *
          >>> all( all( p(lam).verschiebung(Integer(2)) * p(mu).verschiebung(Integer(2))
          ...           == (p(lam) * p(mu)).verschiebung(Integer(2))
          ...           for mu in Partitions(Integer(4)) )
          ...      for lam in Partitions(Integer(4)) )
          True

      Testing the adjointness between the Adams operators \(\mathbf{f}_n\) and the Verschiebung operators \(\mathbf{V}_n\):

      Sage

          sage: Sym = SymmetricFunctions(QQ)
          sage: p = Sym.p()
          sage: all( all( p(lam).verschiebung(2).scalar(p(mu))
          ....:           == p(lam).scalar(p(mu).adams_operator(2))
          ....:           for mu in Partitions(2) )
          ....:      for lam in Partitions(4) )
          True

      Python

          >>> from sage.all import *
          >>> Sym = SymmetricFunctions(QQ)
          >>> p = Sym.p()
          >>> all( all( p(lam).verschiebung(Integer(2)).scalar(p(mu))
          ...           == p(lam).scalar(p(mu).adams_operator(Integer(2)))
          ...           for mu in Partitions(Integer(2)) )
          ...      for lam in Partitions(Integer(4)) )
          True

  antipode_on_basis(partition)

    Return the antipode of `self[partition]`.

    The antipode on the generator \(p_i\) (for \(i > 0\)) is \(-p_i\), and the antipode on \(p_\mu\) is \((-1)^{length(\mu)} p_\mu\).

    INPUT:

    - `self` – the power sum basis of the symmetric functions

    - `partition` – a partition

    OUTPUT:

    - the result of the antipode on `self(partition)`

    EXAMPLES:

    Sage

        sage: Sym = SymmetricFunctions(QQ)
        sage: p = Sym.p()
        sage: p.antipode_on_basis([2])
        -p[2]
        sage: p.antipode_on_basis([3])
        -p[3]
        sage: p.antipode_on_basis([2,2])
        p[2, 2]
        sage: p.antipode_on_basis([])
        p[]

    Python

        >>> from sage.all import *
        >>> Sym = SymmetricFunctions(QQ)
        >>> p = Sym.p()
        >>> p.antipode_on_basis([Integer(2)])
        -p[2]
        >>> p.antipode_on_basis([Integer(3)])
        -p[3]
        >>> p.antipode_on_basis([Integer(2),Integer(2)])
        p[2, 2]
        >>> p.antipode_on_basis([])
        p[]

  bottom_schur_function(partition, degree=None)

    Return the least-degree component of `s[partition]`, where `s` denotes the Schur basis of the symmetric functions, and the grading is not the usual grading on the symmetric functions but rather the grading which gives every \(p_i\) degree \(1\).

    This least-degree component has its degree equal to the Frobenius rank of `partition`, while the degree with respect to the usual grading is still the size of `partition`.

    This method requires the base ring to be a (commutative) \(\QQ\)-algebra. This restriction is unavoidable, since the least-degree component (in general) has noninteger coefficients in all classical bases of the symmetric functions.

    The optional keyword `degree` allows taking any homogeneous component rather than merely the least-degree one. Specifically, if `degree` is set, then the `degree`-th component will be returned.

    REFERENCES:

    [ClSt03]

    Peter Clifford, Richard P. Stanley, Bottom Schur functions. arXiv math/0311382v2.

    EXAMPLES:

    Sage

        sage: Sym = SymmetricFunctions(QQ)
        sage: p = Sym.p()
        sage: p.bottom_schur_function([2,2,1])
        -1/6*p[3, 2] + 1/4*p[4, 1]
        sage: p.bottom_schur_function([2,1])
        -1/3*p[3]
        sage: p.bottom_schur_function([3])
        1/3*p[3]
        sage: p.bottom_schur_function([1,1,1])
        1/3*p[3]
        sage: p.bottom_schur_function(Partition([1,1,1]))
        1/3*p[3]
        sage: p.bottom_schur_function([2,1], degree=1)
        -1/3*p[3]
        sage: p.bottom_schur_function([2,1], degree=2)
        0
        sage: p.bottom_schur_function([2,1], degree=3)
        1/3*p[1, 1, 1]
        sage: p.bottom_schur_function([2,2,1], degree=3)
        1/8*p[2, 2, 1] - 1/6*p[3, 1, 1]

    Python

        >>> from sage.all import *
        >>> Sym = SymmetricFunctions(QQ)
        >>> p = Sym.p()
        >>> p.bottom_schur_function([Integer(2),Integer(2),Integer(1)])
        -1/6*p[3, 2] + 1/4*p[4, 1]
        >>> p.bottom_schur_function([Integer(2),Integer(1)])
        -1/3*p[3]
        >>> p.bottom_schur_function([Integer(3)])
        1/3*p[3]
        >>> p.bottom_schur_function([Integer(1),Integer(1),Integer(1)])
        1/3*p[3]
        >>> p.bottom_schur_function(Partition([Integer(1),Integer(1),Integer(1)]))
        1/3*p[3]
        >>> p.bottom_schur_function([Integer(2),Integer(1)], degree=Integer(1))
        -1/3*p[3]
        >>> p.bottom_schur_function([Integer(2),Integer(1)], degree=Integer(2))
        0
        >>> p.bottom_schur_function([Integer(2),Integer(1)], degree=Integer(3))
        1/3*p[1, 1, 1]
        >>> p.bottom_schur_function([Integer(2),Integer(2),Integer(1)], degree=Integer(3))
        1/8*p[2, 2, 1] - 1/6*p[3, 1, 1]

  coproduct_on_generators(i)

    Return coproduct on generators for power sums \(p_i\) (for \(i > 0\)).

    The elements \(p_i\) are primitive elements.

    INPUT:

    - `self` – the power sum basis of the symmetric functions

    - `i` – positive integer

    OUTPUT: the result of the coproduct on the generator \(p(i)\)

    EXAMPLES:

    Sage

        sage: Sym = SymmetricFunctions(QQ)
        sage: p = Sym.powersum()
        sage: p.coproduct_on_generators(2)
        p[] # p[2] + p[2] # p[]

    Python

        >>> from sage.all import *
        >>> Sym = SymmetricFunctions(QQ)
        >>> p = Sym.powersum()
        >>> p.coproduct_on_generators(Integer(2))
        p[] # p[2] + p[2] # p[]

  eval_at_permutation_roots_on_generators(k, rho)

    Evaluate \(p_k\) at eigenvalues of permutation matrix.

    This function evaluates a symmetric function `p([k])` at the eigenvalues of a permutation matrix with cycle structure `\rho`.

    This function evaluates a \(p_k\) at the roots of unity

    \[\Xi_{\rho_1},\Xi_{\rho_2},\ldots,\Xi_{\rho_\ell}\]

    where

    \[\Xi_{m} = 1,\zeta_m,\zeta_m^2,\ldots,\zeta_m^{m-1}\]

    and \(\zeta_m\) is an \(m\) root of unity. This is characterized by \(p_k[ A , B ] = p_k[A] + p_k[B]\) and \(p_k[ \Xi_m ] = 0\) unless \(m\) divides \(k\) and \(p_{rm}[\Xi_m]=m\).

    INPUT:

    - `k` – nonnegative integer

    - `rho` – a partition or a list of nonnegative integers

    OUTPUT: an element of the base ring

    EXAMPLES:

    Sage

        sage: p = SymmetricFunctions(QQ).p()
        sage: p.eval_at_permutation_roots_on_generators(3, [6])
        0
        sage: p.eval_at_permutation_roots_on_generators(3, [3])
        3
        sage: p.eval_at_permutation_roots_on_generators(3, [1])
        1
        sage: p.eval_at_permutation_roots_on_generators(3, [3,3])
        6
        sage: p.eval_at_permutation_roots_on_generators(3, [1,1,1,1,1])
        5

    Python

        >>> from sage.all import *
        >>> p = SymmetricFunctions(QQ).p()
        >>> p.eval_at_permutation_roots_on_generators(Integer(3), [Integer(6)])
        0
        >>> p.eval_at_permutation_roots_on_generators(Integer(3), [Integer(3)])
        3
        >>> p.eval_at_permutation_roots_on_generators(Integer(3), [Integer(1)])
        1
        >>> p.eval_at_permutation_roots_on_generators(Integer(3), [Integer(3),Integer(3)])
        6
        >>> p.eval_at_permutation_roots_on_generators(Integer(3), [Integer(1),Integer(1),Integer(1),Integer(1),Integer(1)])
        5