Symmetric Functions in Non-Commuting Variables¶
AUTHORS:
- Travis Scrimshaw (08-04-2013): Initial version
-
class
sage.combinat.ncsym.ncsym.
SymmetricFunctionsNonCommutingVariables
(R)¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.structure.parent.Parent
Symmetric functions in non-commutative variables.
The ring of symmetric functions in non-commutative variables, which is not to be confused with the
non-commutative symmetric functions
, is the ring of all bounded-degree noncommutative power series in countably many indeterminates (i.e., elements inof bounded degree) which are invariant with respect to the action of the symmetric group
on the indices of the indeterminates. It can be regarded as a direct limit over all
of rings of
-invariant polynomials in
non-commuting variables (that is,
-invariant elements of
).
This ring is implemented as a Hopf algebra whose basis elements are indexed by set parititions.
Let
be a set partition of the integers
. A monomial basis element indexed by
represents the sum of monomials
where
if and only if
and
are in the same part
for some
.
The
-th graded component of the ring of symmetric functions in non-commutative variables has its dimension equal to the number of set partitions of
. (If we work, instead, with finitely many – say,
– variables, then its dimension is equal to the number of set partitions of
where the number of parts is at most
.)
Note
All set partitions are considered standard, a set partition of
for some
, unless otherwise stated.
REFERENCES:
[BZ05] (1, 2) N. Bergeron, M. Zabrocki. The Hopf algebra of symmetric functions and quasisymmetric functions in non-commutative variables are free and cofree. (2005). Arxiv math/0509265v3. [BHRZ06] N. Bergeron, C. Hohlweg, M. Rosas, M. Zabrocki. Grothendieck bialgebras, partition lattices, and symmetric functions in noncommutative variables. Electronic Journal of Combinatorics. 13 (2006). [RS06] M. Rosas, B. Sagan. Symmetric functions in noncommuting variables. Trans. Amer. Math. Soc. 358 (2006). no. 1, 215-232. Arxiv math/0208168. [BRRZ08] N. Bergeron, C. Reutenauer, M. Rosas, M. Zabrocki. Invariants and coinvariants of the symmetric group in noncommuting variables. Canad. J. Math. 60 (2008). 266-296. Arxiv math/0502082 [BT13] (1, 2, 3, 4, 5, 6) N. Bergeron, N. Thiem. A supercharacter table decomposition via power-sum symmetric functions. Int. J. Algebra Comput. 23, 763 (2013). doi:10.1142/S0218196713400171. Arxiv 1112.4901. EXAMPLES:
We begin by first creating the ring of
and the bases that are analogues of the usual symmetric functions:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: m = NCSym.m() sage: e = NCSym.e() sage: h = NCSym.h() sage: p = NCSym.p() sage: m Symmetric functions in non-commuting variables over the Rational Field in the monomial basis
The basis is indexed by set partitions, so we create a few elements and convert them between these bases:
sage: elt = m(SetPartition([[1,3],[2]])) - 2*m(SetPartition([[1],[2]])); elt -2*m{{1}, {2}} + m{{1, 3}, {2}} sage: e(elt) 1/2*e{{1}, {2, 3}} - 2*e{{1, 2}} + 1/2*e{{1, 2}, {3}} - 1/2*e{{1, 2, 3}} - 1/2*e{{1, 3}, {2}} sage: h(elt) -4*h{{1}, {2}} - 2*h{{1}, {2}, {3}} + 1/2*h{{1}, {2, 3}} + 2*h{{1, 2}} + 1/2*h{{1, 2}, {3}} - 1/2*h{{1, 2, 3}} + 3/2*h{{1, 3}, {2}} sage: p(elt) -2*p{{1}, {2}} + 2*p{{1, 2}} - p{{1, 2, 3}} + p{{1, 3}, {2}} sage: m(p(elt)) -2*m{{1}, {2}} + m{{1, 3}, {2}} sage: elt = p(SetPartition([[1,3],[2]])) - 4*p(SetPartition([[1],[2]])) + 2; elt 2*p{} - 4*p{{1}, {2}} + p{{1, 3}, {2}} sage: e(elt) 2*e{} - 4*e{{1}, {2}} + e{{1}, {2}, {3}} - e{{1, 3}, {2}} sage: m(elt) 2*m{} - 4*m{{1}, {2}} - 4*m{{1, 2}} + m{{1, 2, 3}} + m{{1, 3}, {2}} sage: h(elt) 2*h{} - 4*h{{1}, {2}} - h{{1}, {2}, {3}} + h{{1, 3}, {2}} sage: p(m(elt)) 2*p{} - 4*p{{1}, {2}} + p{{1, 3}, {2}}
There is also a shorthand for creating elements. We note that we must use
p[[]]
to create the empty set partition due to python’s syntax.sage: eltm = m[[1,3],[2]] - 3*m[[1],[2]]; eltm -3*m{{1}, {2}} + m{{1, 3}, {2}} sage: elte = e[[1,3],[2]]; elte e{{1, 3}, {2}} sage: elth = h[[1,3],[2,4]]; elth h{{1, 3}, {2, 4}} sage: eltp = p[[1,3],[2,4]] + 2*p[[1]] - 4*p[[]]; eltp -4*p{} + 2*p{{1}} + p{{1, 3}, {2, 4}}
There is also a natural projection to the usual symmetric functions by letting the variables commute. This projection map preserves the product and coproduct structure. We check that Theorem 2.1 of [RS06] holds:
sage: Sym = SymmetricFunctions(QQ) sage: Sm = Sym.m() sage: Se = Sym.e() sage: Sh = Sym.h() sage: Sp = Sym.p() sage: eltm.to_symmetric_function() -6*m[1, 1] + m[2, 1] sage: Sm(p(eltm).to_symmetric_function()) -6*m[1, 1] + m[2, 1] sage: elte.to_symmetric_function() 2*e[2, 1] sage: Se(h(elte).to_symmetric_function()) 2*e[2, 1] sage: elth.to_symmetric_function() 4*h[2, 2] sage: Sh(m(elth).to_symmetric_function()) 4*h[2, 2] sage: eltp.to_symmetric_function() -4*p[] + 2*p[1] + p[2, 2] sage: Sp(e(eltp).to_symmetric_function()) -4*p[] + 2*p[1] + p[2, 2]
-
a_realization
()¶ Return the realization of the powersum basis of
self
.OUTPUT:
- The powersum basis of symmetric functions in non-commuting variables.
EXAMPLES:
sage: SymmetricFunctionsNonCommutingVariables(QQ).a_realization() Symmetric functions in non-commuting variables over the Rational Field in the powersum basis
-
class
coarse_powersum
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the
basis.
This basis was defined in [BZ05] as
where we sum over all strict coarsenings of the set partition
. An alternative description of this basis was given in [BT13] as
where we sum over all set partitions whose arcs are a subset of the arcs of the set partition
.
Note
In [BZ05], this basis was denoted by
. In [BT13], this basis was called the powersum basis and denoted by
. However it is a coarser basis than the usual powersum basis in the sense that it does not yield the usual powersum basis of the symmetric function under the natural map of letting the variables commute.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: cp = NCSym.cp() sage: cp[[1,3],[2,4]]*cp[[1,2,3]] cp{{1, 3}, {2, 4}, {5, 6, 7}} sage: cp[[1,2],[3]].internal_coproduct() cp{{1, 2}, {3}} # cp{{1, 2}, {3}} sage: ps = SymmetricFunctions(NCSym.base_ring()).p() sage: ps(cp[[1,3],[2]].to_symmetric_function()) p[2, 1] - p[3] sage: ps(cp[[1,2],[3]].to_symmetric_function()) p[2, 1]
-
class
SymmetricFunctionsNonCommutingVariables.
deformed_coarse_powersum
(NCSym, q=2)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the
basis.
This basis was defined in [BT13] as a
-deformation of the
basis:
where we sum over all set partitions whose arcs are a subset of the arcs of the set partition
.
INPUT:
q
– (default:2
) the parameter
EXAMPLES:
sage: R = QQ['q'].fraction_field() sage: q = R.gen() sage: NCSym = SymmetricFunctionsNonCommutingVariables(R) sage: rho = NCSym.rho(q)
We construct Example 3.1 in [BT13]:
sage: rnode = lambda A: sorted([a[1] for a in A.arcs()], reverse=True) sage: dimv = lambda A: sorted([a[1]-a[0] for a in A.arcs()], reverse=True) sage: lst = list(SetPartitions(4)) sage: S = sorted(lst, key=lambda A: (dimv(A), rnode(A))) sage: m = NCSym.m() sage: matrix([[m(rho[A])[B] for B in S] for A in S]) [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] [ 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0] [ 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1] [ 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0] [ 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0] [ 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0] [ 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0] [ 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0] [ 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0] [ 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1/q] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]
-
q
()¶ Return the deformation parameter
of
self
.EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: rho = NCSym.rho(5) sage: rho.q() 5 sage: R = QQ['q'].fraction_field() sage: q = R.gen() sage: NCSym = SymmetricFunctionsNonCommutingVariables(R) sage: rho = NCSym.rho(q) sage: rho.q() == q True
-
SymmetricFunctionsNonCommutingVariables.
dual
()¶ Return the dual Hopf algebra of the symmetric functions in non-commuting variables.
EXAMPLES:
sage: SymmetricFunctionsNonCommutingVariables(QQ).dual() Dual symmetric functions in non-commuting variables over the Rational Field
-
class
SymmetricFunctionsNonCommutingVariables.
elementary
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the elementary basis.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: e = NCSym.e()
-
class
Element
(M, x)¶ Bases:
sage.combinat.free_module.CombinatorialFreeModuleElement
An element in the elementary basis of
.
-
omega
()¶ Return the involution
applied to
self
.The involution
on
is defined by
.
OUTPUT:
- an element in the basis
self
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: e = NCSym.e() sage: h = NCSym.h() sage: elt = e[[1,3],[2]].omega(); elt 2*e{{1}, {2}, {3}} - e{{1, 3}, {2}} sage: elt.omega() e{{1, 3}, {2}} sage: h(elt) h{{1, 3}, {2}}
- an element in the basis
-
to_symmetric_function
()¶ The projection of
self
to the symmetric functions.Take a symmetric function in non-commuting variables expressed in the
basis, and return the projection of expressed in the elementary basis of symmetric functions.
The map
is given by
where
is the partition associated with
by taking the sizes of the parts.
OUTPUT:
- An element of the symmetric functions in the elementary basis
EXAMPLES:
sage: e = SymmetricFunctionsNonCommutingVariables(QQ).e() sage: e[[1,3],[2]].to_symmetric_function() 2*e[2, 1] sage: e[[1],[3],[2]].to_symmetric_function() e[1, 1, 1]
-
-
class
-
class
SymmetricFunctionsNonCommutingVariables.
homogeneous
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the homogeneous basis.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: h = NCSym.h() sage: h[[1,3],[2,4]]*h[[1,2,3]] h{{1, 3}, {2, 4}, {5, 6, 7}} sage: h[[1,2]].coproduct() h{} # h{{1, 2}} + 2*h{{1}} # h{{1}} + h{{1, 2}} # h{}
-
class
Element
(M, x)¶ Bases:
sage.combinat.free_module.CombinatorialFreeModuleElement
An element in the homogeneous basis of
.
-
omega
()¶ Return the involution
applied to
self
.The involution
on
is defined by
.
OUTPUT:
- an element in the basis
self
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: h = NCSym.h() sage: e = NCSym.e() sage: elt = h[[1,3],[2]].omega(); elt 2*h{{1}, {2}, {3}} - h{{1, 3}, {2}} sage: elt.omega() h{{1, 3}, {2}} sage: e(elt) e{{1, 3}, {2}}
- an element in the basis
-
to_symmetric_function
()¶ The projection of
self
to the symmetric functions.Take a symmetric function in non-commuting variables expressed in the
basis, and return the projection of expressed in the complete basis of symmetric functions.
The map
is given by
where
is the partition associated with
by taking the sizes of the parts.
OUTPUT:
- An element of the symmetric functions in the complete basis
EXAMPLES:
sage: h = SymmetricFunctionsNonCommutingVariables(QQ).h() sage: h[[1,3],[2]].to_symmetric_function() 2*h[2, 1] sage: h[[1],[3],[2]].to_symmetric_function() h[1, 1, 1]
-
-
class
-
class
SymmetricFunctionsNonCommutingVariables.
monomial
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the monomial basis.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: m = NCSym.m() sage: m[[1,3],[2]]*m[[1,2]] m{{1, 3}, {2}, {4, 5}} + m{{1, 3}, {2, 4, 5}} + m{{1, 3, 4, 5}, {2}} sage: m[[1,3],[2]].coproduct() m{} # m{{1, 3}, {2}} + m{{1}} # m{{1, 2}} + m{{1, 2}} # m{{1}} + m{{1, 3}, {2}} # m{}
-
class
Element
(M, x)¶ Bases:
sage.combinat.free_module.CombinatorialFreeModuleElement
An element in the monomial basis of
.
-
expand
(n, alphabet='x')¶ Expand
self
written in the monomial basis innon-commuting variables.
INPUT:
n
– an integeralphabet
– (default:'x'
) a string
OUTPUT:
- The symmetric function of
self
expressed in then
non-commuting variables described byalphabet
.
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: m[[1,3],[2]].expand(4) x0*x1*x0 + x0*x2*x0 + x0*x3*x0 + x1*x0*x1 + x1*x2*x1 + x1*x3*x1 + x2*x0*x2 + x2*x1*x2 + x2*x3*x2 + x3*x0*x3 + x3*x1*x3 + x3*x2*x3
One can use a different set of variables by using the optional argument
alphabet
:sage: m[[1],[2,3]].expand(3,alphabet='y') y0*y1^2 + y0*y2^2 + y1*y0^2 + y1*y2^2 + y2*y0^2 + y2*y1^2
-
to_symmetric_function
()¶ The projection of
self
to the symmetric functions.Take a symmetric function in non-commuting variables expressed in the
basis, and return the projection of expressed in the monomial basis of symmetric functions.
The map
is defined by
where
is the partition associated with
by taking the sizes of the parts and
is the multiplicity of
in
.
OUTPUT:
- an element of the symmetric functions in the monomial basis
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: m[[1,3],[2]].to_symmetric_function() m[2, 1] sage: m[[1],[3],[2]].to_symmetric_function() 6*m[1, 1, 1]
-
-
SymmetricFunctionsNonCommutingVariables.monomial.
coproduct_on_basis
(A)¶ Return the coproduct of a monomial basis element.
INPUT:
A
– a set partition
OUTPUT:
- The coproduct applied to the monomial symmetric function in
non-commuting variables indexed by
A
expressed in the monomial basis.
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: m[[1, 3], [2]].coproduct() m{} # m{{1, 3}, {2}} + m{{1}} # m{{1, 2}} + m{{1, 2}} # m{{1}} + m{{1, 3}, {2}} # m{} sage: m.coproduct_on_basis(SetPartition([])) m{} # m{} sage: m.coproduct_on_basis(SetPartition([[1,2,3]])) m{} # m{{1, 2, 3}} + m{{1, 2, 3}} # m{} sage: m[[1,5],[2,4],[3,7],[6]].coproduct() m{} # m{{1, 5}, {2, 4}, {3, 7}, {6}} + m{{1}} # m{{1, 5}, {2, 4}, {3, 6}} + 2*m{{1, 2}} # m{{1, 3}, {2, 5}, {4}} + m{{1, 2}} # m{{1, 4}, {2, 3}, {5}} + 2*m{{1, 2}, {3}} # m{{1, 3}, {2, 4}} + m{{1, 3}, {2}} # m{{1, 4}, {2, 3}} + 2*m{{1, 3}, {2, 4}} # m{{1, 2}, {3}} + 2*m{{1, 3}, {2, 5}, {4}} # m{{1, 2}} + m{{1, 4}, {2, 3}} # m{{1, 3}, {2}} + m{{1, 4}, {2, 3}, {5}} # m{{1, 2}} + m{{1, 5}, {2, 4}, {3, 6}} # m{{1}} + m{{1, 5}, {2, 4}, {3, 7}, {6}} # m{}
-
SymmetricFunctionsNonCommutingVariables.monomial.
dual_basis
()¶ Return the dual basis to the monomial basis.
OUTPUT:
- the
basis of the dual Hopf algebra
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m() sage: m.dual_basis() Dual symmetric functions in non-commuting variables over the Rational Field in the w basis
- the
-
SymmetricFunctionsNonCommutingVariables.monomial.
duality_pairing
(x, y)¶ Compute the pairing between an element of
self
and an element of the dual.INPUT:
x
– an element of symmetric functions in non-commuting variablesy
– an element of the dual of symmetric functions in non-commuting variables
OUTPUT:
- an element of the base ring of
self
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: m = NCSym.m() sage: w = m.dual_basis() sage: matrix([[m(A).duality_pairing(w(B)) for A in SetPartitions(3)] for B in SetPartitions(3)]) [1 0 0 0 0] [0 1 0 0 0] [0 0 1 0 0] [0 0 0 1 0] [0 0 0 0 1] sage: (m[[1,2],[3]] + 3*m[[1,3],[2]]).duality_pairing(2*w[[1,3],[2]] + w[[1,2,3]] + 2*w[[1,2],[3]]) 8
-
SymmetricFunctionsNonCommutingVariables.monomial.
from_symmetric_function
(f)¶ Return the image of the symmetric function
f
inself
.This is performed by converting to the monomial basis and extending the method
sum_of_partitions()
linearly. This is a linear map from the symmetric functions to the symmetric functions in non-commuting variables that does not preserve the product or coproduct structure of the Hopf algebra.See also
INPUT:
f
– an element of the symmetric functions
OUTPUT:
- An element of the
basis
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m() sage: mon = SymmetricFunctions(QQ).m() sage: elt = m.from_symmetric_function(mon[2,1,1]); elt 1/12*m{{1}, {2}, {3, 4}} + 1/12*m{{1}, {2, 3}, {4}} + 1/12*m{{1}, {2, 4}, {3}} + 1/12*m{{1, 2}, {3}, {4}} + 1/12*m{{1, 3}, {2}, {4}} + 1/12*m{{1, 4}, {2}, {3}} sage: elt.to_symmetric_function() m[2, 1, 1] sage: e = SymmetricFunctionsNonCommutingVariables(QQ).e() sage: elm = SymmetricFunctions(QQ).e() sage: e(m.from_symmetric_function(elm[4])) 1/24*e{{1, 2, 3, 4}} sage: h = SymmetricFunctionsNonCommutingVariables(QQ).h() sage: hom = SymmetricFunctions(QQ).h() sage: h(m.from_symmetric_function(hom[4])) 1/24*h{{1, 2, 3, 4}} sage: p = SymmetricFunctionsNonCommutingVariables(QQ).p() sage: pow = SymmetricFunctions(QQ).p() sage: p(m.from_symmetric_function(pow[4])) p{{1, 2, 3, 4}} sage: p(m.from_symmetric_function(pow[2,1])) 1/3*p{{1}, {2, 3}} + 1/3*p{{1, 2}, {3}} + 1/3*p{{1, 3}, {2}} sage: p([[1,2]])*p([[1]]) p{{1, 2}, {3}}
Check that
is the identity on
:
sage: all(m.from_symmetric_function(pow(la)).to_symmetric_function() == pow(la) ....: for la in Partitions(4)) True
-
SymmetricFunctionsNonCommutingVariables.monomial.
internal_coproduct_on_basis
(A)¶ Return the internal coproduct of a monomial basis element.
The internal coproduct is defined by
where we sum over all pairs of set partitions
and
whose infimum is
.
INPUT:
A
– a set partition
OUTPUT:
- an element of the tensor square of the
basis
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: m.internal_coproduct_on_basis(SetPartition([[1,3],[2]])) m{{1, 2, 3}} # m{{1, 3}, {2}} + m{{1, 3}, {2}} # m{{1, 2, 3}} + m{{1, 3}, {2}} # m{{1, 3}, {2}}
-
SymmetricFunctionsNonCommutingVariables.monomial.
product_on_basis
(A, B)¶ The product on monomial basis elements.
The product of the basis elements indexed by two set partitions
and
is the sum of the basis elements indexed by set partitions
such that
where
and
. Here
is the infimum of
and
and
is the
SetPartition.pipe()
operation. Equivalently we can describe allas matchings between the partitions of
and
where if
is matched with
, we take
instead of
and
in
.
INPUT:
A
,B
– set partitions
OUTPUT:
- an element of the
basis
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: A = SetPartition([[1], [2,3]]) sage: B = SetPartition([[1], [3], [2,4]]) sage: m.product_on_basis(A, B) m{{1}, {2, 3}, {4}, {5, 7}, {6}} + m{{1}, {2, 3, 4}, {5, 7}, {6}} + m{{1}, {2, 3, 5, 7}, {4}, {6}} + m{{1}, {2, 3, 6}, {4}, {5, 7}} + m{{1, 4}, {2, 3}, {5, 7}, {6}} + m{{1, 4}, {2, 3, 5, 7}, {6}} + m{{1, 4}, {2, 3, 6}, {5, 7}} + m{{1, 5, 7}, {2, 3}, {4}, {6}} + m{{1, 5, 7}, {2, 3, 4}, {6}} + m{{1, 5, 7}, {2, 3, 6}, {4}} + m{{1, 6}, {2, 3}, {4}, {5, 7}} + m{{1, 6}, {2, 3, 4}, {5, 7}} + m{{1, 6}, {2, 3, 5, 7}, {4}} sage: B = SetPartition([[1], [2]]) sage: m.product_on_basis(A, B) m{{1}, {2, 3}, {4}, {5}} + m{{1}, {2, 3, 4}, {5}} + m{{1}, {2, 3, 5}, {4}} + m{{1, 4}, {2, 3}, {5}} + m{{1, 4}, {2, 3, 5}} + m{{1, 5}, {2, 3}, {4}} + m{{1, 5}, {2, 3, 4}} sage: m.product_on_basis(A, SetPartition([])) m{{1}, {2, 3}}
TESTS:
We check that we get all of the correct set partitions:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial() sage: A = SetPartition([[1], [2,3]]) sage: B = SetPartition([[1], [2]]) sage: S = SetPartition([[1,2,3], [4,5]]) sage: AB = SetPartition([[1], [2,3], [4], [5]]) sage: L = sorted(filter(lambda x: S.inf(x) == AB, SetPartitions(5)), key=str) sage: map(list, L) == map(list, sorted(m.product_on_basis(A, B).support(), key=str)) True
-
SymmetricFunctionsNonCommutingVariables.monomial.
sum_of_partitions
(la)¶ Return the sum over all set partitions whose shape is
la
with a fixed coefficientdefined below.
Fix a partition
, we define
and
. Recall that
and
is the number of parts of length
of
. Thus we defined the coefficient as
Hence we can define a lift
from
to
by
where the sum is over all set partitions whose shape is
.
INPUT:
la
– an integer partition
OUTPUT:
- an element of the
basis
EXAMPLES:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m() sage: m.sum_of_partitions(Partition([2,1,1])) 1/12*m{{1}, {2}, {3, 4}} + 1/12*m{{1}, {2, 3}, {4}} + 1/12*m{{1}, {2, 4}, {3}} + 1/12*m{{1, 2}, {3}, {4}} + 1/12*m{{1, 3}, {2}, {4}} + 1/12*m{{1, 4}, {2}, {3}}
TESTS:
Check that
is the identity on
:
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m() sage: mon = SymmetricFunctions(QQ).monomial() sage: all(m.from_symmetric_function(mon[la]).to_symmetric_function() == mon[la] ....: for i in range(6) for la in Partitions(i)) True
-
class
-
class
SymmetricFunctionsNonCommutingVariables.
powersum
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the powersum basis.
The powersum basis is given by
where we sum over all coarsenings of the set partition
. If we allow our variables to commute, then
goes to the usual powersum symmetric function
whose (integer) partition
is the shape of
.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: p = NCSym.p() sage: x = p.an_element()**2; x 4*p{} + 8*p{{1}} + 4*p{{1}, {2}} + 6*p{{1}, {2, 3}} + 12*p{{1, 2}} + 6*p{{1, 2}, {3}} + 9*p{{1, 2}, {3, 4}} sage: x.to_symmetric_function() 4*p[] + 8*p[1] + 4*p[1, 1] + 12*p[2] + 12*p[2, 1] + 9*p[2, 2]
-
class
Element
(M, x)¶ Bases:
sage.combinat.free_module.CombinatorialFreeModuleElement
An element in the powersum basis of
.
-
to_symmetric_function
()¶ The projection of
self
to the symmetric functions.Take a symmetric function in non-commuting variables expressed in the
basis, and return the projection of expressed in the powersum basis of symmetric functions.
The map
is given by
where
is the partition associated with
by taking the sizes of the parts.
OUTPUT:
- an element of symmetric functions in the power sum basis
EXAMPLES:
sage: p = SymmetricFunctionsNonCommutingVariables(QQ).p() sage: p[[1,3],[2]].to_symmetric_function() p[2, 1] sage: p[[1],[3],[2]].to_symmetric_function() p[1, 1, 1]
-
-
SymmetricFunctionsNonCommutingVariables.powersum.
antipode_on_basis
(A)¶ Return the result of the antipode applied to a powersum basis element.
Let
be a set partition. The antipode given in [LM2011] is
where we sum over all ordered set partitions (i.e. set compositions) of
and
is the action of
on
defined in
SetPartition.ordered_set_partition_action()
.INPUT:
A
– a set partition
OUTPUT:
- an element in the basis
self
EXAMPLES:
sage: p = SymmetricFunctionsNonCommutingVariables(QQ).powersum() sage: p.antipode_on_basis(SetPartition([[1], [2,3]])) p{{1, 2}, {3}} sage: p.antipode_on_basis(SetPartition([])) p{} sage: F = p[[1,3],[5],[2,4]].coproduct() sage: F.apply_multilinear_morphism(lambda x,y: x.antipode()*y) 0
-
SymmetricFunctionsNonCommutingVariables.powersum.
coproduct_on_basis
(A)¶ Return the coproduct of a monomial basis element.
INPUT:
A
– a set partition
OUTPUT:
- The coproduct applied to the monomial symmetric function in
non-commuting variables indexed by
A
expressed in the monomial basis.
EXAMPLES:
sage: p = SymmetricFunctionsNonCommutingVariables(QQ).powersum() sage: p[[1, 3], [2]].coproduct() p{} # p{{1, 3}, {2}} + p{{1}} # p{{1, 2}} + p{{1, 2}} # p{{1}} + p{{1, 3}, {2}} # p{} sage: p.coproduct_on_basis(SetPartition([[1]])) p{} # p{{1}} + p{{1}} # p{} sage: p.coproduct_on_basis(SetPartition([])) p{} # p{}
-
SymmetricFunctionsNonCommutingVariables.powersum.
internal_coproduct_on_basis
(A)¶ Return the internal coproduct of a powersum basis element.
The internal coproduct is defined by
INPUT:
A
– a set partition
OUTPUT:
- an element of the tensor square of
self
EXAMPLES:
sage: p = SymmetricFunctionsNonCommutingVariables(QQ).powersum() sage: p.internal_coproduct_on_basis(SetPartition([[1,3],[2]])) p{{1, 3}, {2}} # p{{1, 3}, {2}}
-
SymmetricFunctionsNonCommutingVariables.powersum.
primitive
(A, i=1)¶ Return the primitive associated to
A
inself
.Fix some
. Let
be an atomic set partition of
, then the primitive
given in [LM2011] is
where we sum over all ordered set partitions of
such that
and
is the action of
on
defined in
SetPartition.ordered_set_partition_action()
. Ifis not atomic, then
.
See also
INPUT:
A
– a set partitioni
– (default: 1) index in the base set forA
specifying which set of primitives this belongs to
OUTPUT:
- an element in the basis
self
EXAMPLES:
sage: p = SymmetricFunctionsNonCommutingVariables(QQ).powersum() sage: elt = p.primitive(SetPartition([[1,3], [2]])); elt -p{{1, 2}, {3}} + p{{1, 3}, {2}} sage: elt.coproduct() -p{} # p{{1, 2}, {3}} + p{} # p{{1, 3}, {2}} - p{{1, 2}, {3}} # p{} + p{{1, 3}, {2}} # p{} sage: p.primitive(SetPartition([[1], [2,3]])) 0 sage: p.primitive(SetPartition([])) p{}
-
class
-
SymmetricFunctionsNonCommutingVariables.
q
()¶ Old name for the
-basis. Deprecated in trac ticket #18371.
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: NCSym.q() doctest:...: DeprecationWarning: q is deprecated, use instead cp or coarse_powersum. See http://trac.sagemath.org/18371 for details. Symmetric functions in non-commuting variables over the Rational Field in the coarse_powersum basis
-
class
SymmetricFunctionsNonCommutingVariables.
supercharacter
(NCSym, q=2)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the supercharacter
basis.
This basis was defined in [BT13] as a
-deformation of the supercharacter basis.
where we sum over all set partitions
and
is the evaluation of the supercharacter
on the superclass
.
Note
The supercharacters considered in [BT13] are coarser than those considered by Aguiar et. al.
INPUT:
q
– (default:2
) the parameter
EXAMPLES:
sage: R = QQ['q'].fraction_field() sage: q = R.gen() sage: NCSym = SymmetricFunctionsNonCommutingVariables(R) sage: chi = NCSym.chi(q) sage: chi[[1,3],[2]]*chi[[1,2]] chi{{1, 3}, {2}, {4, 5}} sage: chi[[1,3],[2]].coproduct() chi{} # chi{{1, 3}, {2}} + (2*q-2)*chi{{1}} # chi{{1}, {2}} + (3*q-2)*chi{{1}} # chi{{1, 2}} + (2*q-2)*chi{{1}, {2}} # chi{{1}} + (3*q-2)*chi{{1, 2}} # chi{{1}} + chi{{1, 3}, {2}} # chi{} sage: chi2 = NCSym.chi() sage: chi(chi2[[1,2],[3]]) ((-q+2)/q)*chi{{1}, {2}, {3}} + 2/q*chi{{1, 2}, {3}} sage: chi2 Symmetric functions in non-commuting variables over the Fraction Field of Univariate Polynomial Ring in q over Rational Field in the supercharacter basis with parameter q=2
-
q
()¶ Return the deformation parameter
of
self
.EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: chi = NCSym.chi(5) sage: chi.q() 5 sage: R = QQ['q'].fraction_field() sage: q = R.gen() sage: NCSym = SymmetricFunctionsNonCommutingVariables(R) sage: chi = NCSym.chi(q) sage: chi.q() == q True
-
class
SymmetricFunctionsNonCommutingVariables.
x_basis
(NCSym)¶ Bases:
sage.combinat.ncsym.bases.NCSymBasis_abstract
The Hopf algebra of symmetric functions in non-commuting variables in the
basis.
This basis is defined in [BHRZ06] by the formula:
and has the following properties:
EXAMPLES:
sage: NCSym = SymmetricFunctionsNonCommutingVariables(QQ) sage: x = NCSym.x() sage: x[[1,3],[2,4]]*x[[1,2,3]] x{{1, 3}, {2, 4}, {5, 6, 7}} sage: x[[1,2],[3]].internal_coproduct() x{{1}, {2}, {3}} # x{{1, 2}, {3}} + x{{1, 2}, {3}} # x{{1}, {2}, {3}} + x{{1, 2}, {3}} # x{{1, 2}, {3}}
-
-
sage.combinat.ncsym.ncsym.
matchings
(A, B)¶ Iterate through all matchings of the sets
and
.
EXAMPLES:
sage: from sage.combinat.ncsym.ncsym import matchings sage: list(matchings([1, 2, 3], [-1, -2])) [[[1], [2], [3], [-1], [-2]], [[1], [2], [3, -1], [-2]], [[1], [2], [3, -2], [-1]], [[1], [2, -1], [3], [-2]], [[1], [2, -1], [3, -2]], [[1], [2, -2], [3], [-1]], [[1], [2, -2], [3, -1]], [[1, -1], [2], [3], [-2]], [[1, -1], [2], [3, -2]], [[1, -1], [2, -2], [3]], [[1, -2], [2], [3], [-1]], [[1, -2], [2], [3, -1]], [[1, -2], [2, -1], [3]]]
-
sage.combinat.ncsym.ncsym.
nesting
(la, nu)¶ Return the nesting number of
la
inside ofnu
.If we consider a set partition
as a set of arcs
where
and
are in the same part of
. Define
and this corresponds to the number of arcs of
strictly contained inside of
.
EXAMPLES:
sage: from sage.combinat.ncsym.ncsym import nesting sage: nu = SetPartition([[1,4], [2], [3]]) sage: mu = SetPartition([[1,4], [2,3]]) sage: nesting(set(mu).difference(nu), nu) 1
sage: lst = list(SetPartitions(4)) sage: d = {} sage: for i, nu in enumerate(lst): ....: for mu in nu.coarsenings(): ....: if set(nu.arcs()).issubset(mu.arcs()): ....: d[i, lst.index(mu)] = nesting(set(mu).difference(nu), nu) sage: matrix(d) [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 1 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]