Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent
The abstract algebra of non-commutative symmetric functions.
We construct the abstract algebra of non-commutative symmetric functions over the rational numbers:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: NCSF
Non-Commutative Symmetric Functions over the Rational Field
sage: S = NCSF.complete()
sage: R = NCSF.ribbon()
sage: S[2,1]*R[1,2]
S[2, 1, 1, 2] - S[2, 1, 3]
NCSF is the unique free (non-commutative!) graded connected algebra with one generator in each degree:
sage: NCSF.category()
Join of Category of graded hopf algebras over Rational Field and Category of monoids with realizations and Category of coalgebras over Rational Field with realizations
sage: [S[i].degree() for i in range(10)]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
We use the Sage standard renaming idiom to get shorter outputs:
sage: NCSF.rename("NCSF")
sage: NCSF
NCSF
NCSF has many representations as a concrete algebra. Each of them has a distinguished basis, and its elements are expanded in this basis. Here is the Psi representation:
sage: Psi = NCSF.Psi()
sage: Psi
NCSF in the Psi basis
Elements of Psi are linear combinations of basis elements indexed by compositions:
sage: Psi.an_element()
2*Psi[] + 2*Psi[1] + 3*Psi[1, 1]
The basis itself is accessible through:
sage: Psi.basis()
Lazy family (Term map from Compositions of non-negative integers...
sage: Psi.basis().keys()
Compositions of non-negative integers
To construct an element one can therefore do:
sage: Psi.basis()[Composition([2,1,3])]
Psi[2, 1, 3]
As this is rather cumbersome, the following abuses of notation are allowed:
sage: Psi[Composition([2, 1, 3])]
Psi[2, 1, 3]
sage: Psi[[2, 1, 3]]
Psi[2, 1, 3]
sage: Psi[2, 1, 3]
Psi[2, 1, 3]
or even:
sage: Psi[(i for i in [2, 1, 3])]
Psi[2, 1, 3]
Unfortunately, due to a limitation in Python syntax, one cannot use:
sage: Psi[] # not implemented
Instead, you can use:
sage: Psi[[]]
Psi[]
Now, we can construct linear combinations of basis elements:
sage: Psi[2,1,3] + 2 * (Psi[4] + Psi[2,1])
2*Psi[2, 1] + Psi[2, 1, 3] + 2*Psi[4]
Algebra structure
To start with, Psi is a graded algebra, the grading being induced by the size of compositions. The one is the basis element indexed by the empty composition:
sage: Psi.one()
Psi[]
sage: S.one()
S[]
sage: R.one()
R[]
As we have seen above, the Psi basis is multiplicative; that is multiplication is induced by linearity from the concatenation of compositions:
sage: Psi[1,3] * Psi[2,1]
Psi[1, 3, 2, 1]
sage: (Psi.one() + 2 * Psi[1,3]) * Psi[2, 4]
2*Psi[1, 3, 2, 4] + Psi[2, 4]
Hopf algebra structure
Psi is further endowed with a coalgebra structure. The coproduct is an algebra morphism, and therefore determined by its values on the generators; those are primitive:
sage: Psi[1].coproduct()
Psi[] # Psi[1] + Psi[1] # Psi[]
sage: Psi[2].coproduct()
Psi[] # Psi[2] + Psi[2] # Psi[]
The coproduct, being cocommutative on the generators, is cocommutative everywhere:
sage: Psi[1,2].coproduct()
Psi[] # Psi[1, 2] + Psi[1] # Psi[2] + Psi[1, 2] # Psi[] + Psi[2] # Psi[1]
The algebra and coalgebra structures on Psi combine to form a bialgebra structure, which cooperates with the grading to form a connected graded bialgebra. Thus, as any connected graded bialgebra, Psi is a Hopf algebra. Over QQ (or any other \(\QQ\)-algebra), this Hopf algebra Psi is isomorphic to the tensor algebra of its space of primitive elements.
The antipode is an anti-algebra morphism; in the Psi basis, it sends the generators to their opposites and changes their sign if they are of odd degree:
sage: Psi[3].antipode()
-Psi[3]
sage: Psi[1,3,2].antipode()
-Psi[2, 3, 1]
sage: Psi[1,3,2].coproduct().apply_multilinear_morphism(lambda be,ga: Psi(be)*Psi(ga).antipode())
0
The counit is defined by sending all elements of positive degree to zero:
sage: S[3].degree(), S[3,1,2].degree(), S.one().degree()
(3, 6, 0)
sage: S[3].counit()
0
sage: S[3,1,2].counit()
0
sage: S.one().counit()
1
sage: (S[3] - 2*S[3,1,2] + 7).counit()
7
sage: (R[3] - 2*R[3,1,2] + 7).counit()
7
Other concrete representations
Todo
demonstrate how to customize the basis names
NCSF admits many other concrete realizations:
sage: Phi = NCSF.Phi()
sage: ribbon = NCSF.ribbon()
sage: complete = NCSF.complete()
sage: elementary = NCSF.elementary()
sage: monomial = NCSF.monomial()
To change from one basis to another, one simply does:
sage: Phi(Psi[1])
Phi[1]
sage: Phi(Psi[3])
-1/4*Phi[1, 2] + 1/4*Phi[2, 1] + Phi[3]
In general, one can mix up different bases in computations:
sage: Phi[1] * Psi[1]
Phi[1, 1]
Some of the changes of basis are easy to guess:
sage: ribbon(complete[1,3,2])
R[1, 3, 2] + R[1, 5] + R[4, 2] + R[6]
This is the sum of all fatter compositions. Using the usual Moebius function for the boolean lattice, the inverse change of basis is given by the alternating sum of all fatter compositions:
sage: complete(ribbon[1,3,2])
S[1, 3, 2] - S[1, 5] - S[4, 2] + S[6]
The analogue of the elementary basis is the sum over all finer compositions than the ‘complement’ of the composition in the ribbon basis:
sage: Composition([1,3,2]).complement()
[2, 1, 2, 1]
sage: ribbon(elementary([1,3,2]))
R[1, 1, 1, 1, 1, 1] + R[1, 1, 1, 2, 1] + R[2, 1, 1, 1, 1] + R[2, 1, 2, 1]
By Moebius inversion on the composition poset, the ribbon basis element corresponding to a composition \(I\) is then the alternating sum over all compositions fatter than the complement composition of \(I\) in the elementary basis:
sage: elementary(ribbon[2,1,2,1])
L[1, 3, 2] - L[1, 5] - L[4, 2] + L[6]
Todo
explain the other changes of bases!
Here is how to fetch the conversion morphisms:
sage: f = complete.coerce_map_from(elementary); f
Generic morphism:
From: NCSF in the Elementary basis
To: NCSF in the Complete basis
sage: g = elementary.coerce_map_from(complete); g
Generic morphism:
From: NCSF in the Complete basis
To: NCSF in the Elementary basis
sage: f.category()
Category of hom sets in Category of modules with basis over Rational Field
sage: f(elementary[1,2,2])
S[1, 1, 1, 1, 1] - S[1, 1, 1, 2] - S[1, 2, 1, 1] + S[1, 2, 2]
sage: g(complete[1,2,2])
L[1, 1, 1, 1, 1] - L[1, 1, 1, 2] - L[1, 2, 1, 1] + L[1, 2, 2]
sage: h = f*g; h
Composite map:
From: NCSF in the Complete basis
To: NCSF in the Complete basis
Defn: Generic morphism:
From: NCSF in the Complete basis
To: NCSF in the Elementary basis
then
Generic morphism:
From: NCSF in the Elementary basis
To: NCSF in the Complete basis
sage: h(complete[1,3,2])
S[1, 3, 2]
We revert back to the original name from our custom short name NCSF:
sage: NCSF
NCSF
sage: NCSF.rename()
sage: NCSF
Non-Commutative Symmetric Functions over the Rational Field
TESTS:
sage: TestSuite(Phi).run()
sage: TestSuite(Psi).run()
sage: TestSuite(complete).run()
Todo
Bases: sage.categories.realizations.Category_realization_of_parent
Category of bases of non-commutative symmetric functions.
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.Bases()
Category of bases of Non-Commutative Symmetric Functions over the Rational Field
sage: R = N.Ribbon()
sage: R in N.Bases()
True
alias of Bases.ElementMethods
alias of Bases.ParentMethods
Return the super categories of the category of bases of the non-commutative symmetric functions.
OUTPUT:
TESTS:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.Bases().super_categories()
[Category of bases of Non-Commutative Symmetric Functions or Quasisymmetric functions over the Rational Field,
Category of realizations of graded modules with internal product over Rational Field]
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The Hopf algebra of non-commutative symmetric functions in the Complete basis.
The Complete basis is defined in Definition 3.4 of [NCSF1], where it is denoted by \((S^I)_I\). It is a multiplicative basis, and is connected to the elementary generators \(\Lambda_i\) of the ring of non-commutative symmetric functions by the following relation: Define a non-commutative symmetric function \(S_n\) for every nonnegative integer \(n\) by the power series identity
with \(\Lambda_0\) denoting \(1\). For every composition \((i_1, i_2, \ldots, i_k)\), we have \(S^{(i_1, i_2, \ldots, i_k)} = S_{i_1} S_{i_2} \cdots S_{i_k}\).
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: S = NCSF.Complete(); S
Non-Commutative Symmetric Functions over the Rational Field in the Complete basis
sage: S.an_element()
2*S[] + 2*S[1] + 3*S[1, 1]
The following are aliases for this basis:
sage: NCSF.complete()
Non-Commutative Symmetric Functions over the Rational Field in the Complete basis
sage: NCSF.S()
Non-Commutative Symmetric Functions over the Rational Field in the Complete basis
alias of Complete.Element
Return the dual basis to the complete basis of non-commutative symmetric functions. This is the Monomial basis of quasi-symmetric functions.
OUTPUT:
EXAMPLES:
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: S.dual()
Quasisymmetric functions over the Rational Field in the Monomial basis
The internal product of two non-commutative symmetric complete functions.
See internal_product() for a thorough documentation of this operation.
INPUT:
OUTPUT:
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: S = N.complete()
sage: S.internal_product_on_basis([2,2],[1,2,1])
2*S[1, 1, 1, 1] + S[1, 1, 2] + S[2, 1, 1]
sage: S.internal_product_on_basis([2,2],[1,2])
0
Return the image of the complete non-commutative symmetric function in the symmetric functions in non-commuting variables under the embedding \(\mathcal{I}\) which fixes the symmetric functions.
This map is defined by
and extended as an algebra homomorphism.
EXAMPLES:
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: S.to_ncsym_on_basis(Composition([2]))
1/2*m{{1}, {2}} + m{{1, 2}}
sage: S.to_ncsym_on_basis(Composition([1,2,1]))
1/2*m{{1}, {2}, {3}, {4}} + 1/2*m{{1}, {2}, {3, 4}} + m{{1}, {2, 3}, {4}}
+ m{{1}, {2, 3, 4}} + 1/2*m{{1}, {2, 4}, {3}} + 1/2*m{{1, 2}, {3}, {4}}
+ 1/2*m{{1, 2}, {3, 4}} + m{{1, 2, 3}, {4}} + m{{1, 2, 3, 4}}
+ 1/2*m{{1, 2, 4}, {3}} + 1/2*m{{1, 3}, {2}, {4}} + 1/2*m{{1, 3}, {2, 4}}
+ 1/2*m{{1, 3, 4}, {2}} + 1/2*m{{1, 4}, {2}, {3}} + m{{1, 4}, {2, 3}}
sage: S.to_ncsym_on_basis(Composition([]))
m{}
TESTS:
Check that the image under \(\mathcal{I}\) fixes the symmetric functions:
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial()
sage: mon = SymmetricFunctions(QQ).monomial()
sage: all(S[c].to_ncsym().to_symmetric_function() == S[c].to_symmetric_function()
....: for i in range(5) for c in Compositions(i))
True
We also check that the \(NCSym\) monomials agree on the homogeneous and complete basis:
sage: h = SymmetricFunctions(QQ).h()
sage: all(m.from_symmetric_function(h[i]) == S[i].to_ncsym() for i in range(6))
True
The commutative image of a complete non-commutative symmetric function basis element. This is obtained by sorting the composition.
INPUT:
OUTPUT:
EXAMPLES:
sage: S=NonCommutativeSymmetricFunctions(QQ).S()
sage: S.to_symmetric_function_on_basis([2,1,3])
h[3, 2, 1]
sage: S.to_symmetric_function_on_basis([])
h[]
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The Hopf algebra of non-commutative symmetric functions in the Elementary basis.
The Elementary basis is defined in Definition 3.4 of [NCSF1], where it is denoted by \((\Lambda^I)_I\). It is a multiplicative basis, and is obtained from the elementary generators \(\Lambda_i\) of the ring of non-commutative symmetric functions through the formula \(\Lambda^{(i_1, i_2, \ldots, i_k)} = \Lambda_{i_1} \Lambda_{i_2} \cdots \Lambda_{i_k}\) for every composition \((i_1, i_2, \ldots, i_k)\).
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: L = NCSF.Elementary(); L
Non-Commutative Symmetric Functions over the Rational Field in the Elementary basis
sage: L.an_element()
2*L[] + 2*L[1] + 3*L[1, 1]
The following are aliases for this basis:
sage: NCSF.elementary()
Non-Commutative Symmetric Functions over the Rational Field in the Elementary basis
sage: NCSF.L()
Non-Commutative Symmetric Functions over the Rational Field in the Elementary basis
alias of Elementary.Element
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The immaculate basis of the non-commutative symmetric functions. This basis first appears in Berg, Bergeron, Saliola, Serrano and Zabrocki’s [BBSSZ2012]. It can be described as the family \((\mathfrak{S}_{\alpha})\), where \(\alpha\) runs over all compositions, and \(\mathfrak{S}_{\alpha}\) denotes the immaculate function corresponding to \(\alpha\) (see immaculate_function()).
Warning
This basis contains only the immaculate functions indexed by compositions (i.e., finite sequences of positive integers). To obtain the remaining immaculate functions (sensu lato), use the immaculate_function() method. Calling the immaculate basis with a list which is not a composition will currently return garbage!
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: I = NCSF.I()
sage: I([1,3,2])*I([1])
I[1, 3, 2, 1] + I[1, 3, 3] + I[1, 4, 2] + I[2, 3, 2]
sage: I([1])*I([1,3,2])
I[1, 1, 3, 2] - I[2, 2, 1, 2] - I[2, 2, 2, 1] - I[2, 2, 3] - I[3, 2, 2]
sage: I([1,3])*I([1,1])
I[1, 3, 1, 1] + I[1, 4, 1] + I[2, 3, 1] + I[2, 4]
sage: I([3,1])*I([2,1])
I[3, 1, 2, 1] + I[3, 2, 1, 1] + I[3, 2, 2] + I[3, 3, 1] + I[4, 1, 1, 1] + I[4, 1, 2] + 2*I[4, 2, 1] + I[4, 3] + I[5, 1, 1] + I[5, 2]
sage: R = NCSF.ribbon()
sage: I(R[1,3,1])
I[1, 3, 1] + I[2, 2, 1] + I[2, 3] + I[3, 1, 1] + I[3, 2]
sage: R(I(R([2,1,3])))
R[2, 1, 3]
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The monomial basis defined in Tevlin’s paper [Tev2007]. It is the basis denoted by \((M^I)_I\) in that paper.
The Monomial basis is well-defined only when the base ring is a \(\QQ\)-algebra.
TESTS:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: nM = NCSF.monomial(); nM
Non-Commutative Symmetric Functions over the Rational Field in the Monomial basis
sage: nM([1,1])*nM([2])
3*nM[1, 1, 2] + nM[1, 3] + nM[2, 2]
sage: R = NCSF.ribbon()
sage: nM(R[1,3,1])
11*nM[1, 1, 1, 1, 1] + 8*nM[1, 1, 2, 1] + 8*nM[1, 2, 1, 1] + 5*nM[1, 3, 1] + 8*nM[2, 1, 1, 1] + 5*nM[2, 2, 1] + 5*nM[3, 1, 1] + 2*nM[4, 1]
Bases: sage.categories.realizations.Category_realization_of_parent
Category of multiplicative bases of non-commutative symmetric functions.
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBases()
Category of multiplicative bases of Non-Commutative Symmetric Functions over the Rational Field
The complete basis is a multiplicative basis, but the ribbon basis is not:
sage: N.Complete() in N.MultiplicativeBases()
True
sage: N.Ribbon() in N.MultiplicativeBases()
False
alias of MultiplicativeBases.ParentMethods
Return the super categories of the category of multiplicative bases of the non-commutative symmetric functions.
OUTPUT:
TESTS:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBases().super_categories()
[Category of bases of Non-Commutative Symmetric Functions over the Rational Field]
Bases: sage.categories.realizations.Category_realization_of_parent
Category of multiplicative bases on grouplike elements of non-commutative symmetric functions.
Here, a “multiplicative basis on grouplike elements” means a multiplicative basis whose generators \((f_1, f_2, f_3, \ldots )\) satisfy
with \(f_0 = 1\). (In other words, the generators are to form a divided power sequence in the sense of a coalgebra.) This does not mean that the generators are grouplike, but means that the element \(1 + f_1 + f_2 + f_3 + \cdots\) in the completion of the ring of non-commutative symmetric functions with respect to the grading is grouplike.
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBasesOnGroupLikeElements()
Category of multiplicative bases on group like elements of Non-Commutative Symmetric Functions over the Rational Field
The complete basis is a multiplicative basis, but the ribbon basis is not:
sage: N.Complete() in N.MultiplicativeBasesOnGroupLikeElements()
True
sage: N.Ribbon() in N.MultiplicativeBasesOnGroupLikeElements()
False
alias of MultiplicativeBasesOnGroupLikeElements.ParentMethods
Return the super categories of the category of multiplicative bases of group-like elements of the non-commutative symmetric functions.
OUTPUT:
TESTS:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBasesOnGroupLikeElements().super_categories()
[Category of multiplicative bases of Non-Commutative Symmetric Functions over the Rational Field]
Bases: sage.categories.realizations.Category_realization_of_parent
Category of multiplicative bases of the non-commutative symmetric functions whose generators are primitive elements.
An element \(x\) of a bialgebra is primitive if \(\Delta(x) = x \otimes 1 + 1 \otimes x\), where \(\Delta\) is the coproduct of the bialgebra.
Given a multiplicative basis and knowing the coproducts and antipodes of its generators, one can compute the coproduct and the antipode of any element, since they are respectively algebra morphisms and anti-morphisms. See antipode_on_generators() and coproduct_on_generators().
Todo
this could be generalized to any free algebra.
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBasesOnPrimitiveElements()
Category of multiplicative bases on primitive elements of Non-Commutative Symmetric Functions over the Rational Field
The Phi and Psi bases are multiplicative bases whose generators are primitive elements, but the complete and ribbon bases are not:
sage: N.Phi() in N.MultiplicativeBasesOnPrimitiveElements()
True
sage: N.Psi() in N.MultiplicativeBasesOnPrimitiveElements()
True
sage: N.Complete() in N.MultiplicativeBasesOnPrimitiveElements()
False
sage: N.Ribbon() in N.MultiplicativeBasesOnPrimitiveElements()
False
alias of MultiplicativeBasesOnPrimitiveElements.ParentMethods
Return the super categories of the category of multiplicative bases of primitive elements of the non-commutative symmetric functions.
OUTPUT:
TESTS:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: N.MultiplicativeBasesOnPrimitiveElements().super_categories()
[Category of multiplicative bases of Non-Commutative Symmetric Functions over the Rational Field]
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The Hopf algebra of non-commutative symmetric functions in the Phi basis.
The Phi basis is defined in Definition 3.4 of [NCSF1], where it is denoted by \((\Phi^I)_I\). It is a multiplicative basis, and is connected to the elementary generators \(\Lambda_i\) of the ring of non-commutative symmetric functions by the following relation: Define a non-commutative symmetric function \(\Phi_n\) for every positive integer \(n\) by the power series identity
with \(\Lambda_0\) denoting \(1\). For every composition \((i_1, i_2, \ldots, i_k)\), we have \(\Phi^{(i_1, i_2, \ldots, i_k)} = \Phi_{i_1} \Phi_{i_2} \cdots \Phi_{i_k}\).
The \(\Phi\)-basis is well-defined only when the base ring is a \(\QQ\)-algebra. The elements of the \(\Phi\)-basis are known as the “power-sum non-commutative symmetric functions of the second kind”.
The generators \(\Phi_n\) are related to the (first) Eulerian idempotents in the descent algebras of the symmetric groups (see [NCSF1], 5.4 for details).
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: Phi = NCSF.Phi(); Phi
Non-Commutative Symmetric Functions over the Rational Field in the Phi basis
sage: Phi.an_element()
2*Phi[] + 2*Phi[1] + 3*Phi[1, 1]
alias of Phi.Element
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The Hopf algebra of non-commutative symmetric functions in the Psi basis.
The Psi basis is defined in Definition 3.4 of [NCSF1], where it is denoted by \((\Psi^I)_I\). It is a multiplicative basis, and is connected to the elementary generators \(\Lambda_i\) of the ring of non-commutative symmetric functions by the following relation: Define a non-commutative symmetric function \(\Psi_n\) for every positive integer \(n\) by the power series identity
where
and where \(\Lambda_0\) denotes \(1\). For every composition \((i_1, i_2, \ldots, i_k)\), we have \(\Psi^{(i_1, i_2, \ldots, i_k)} = \Psi_{i_1} \Psi_{i_2} \cdots \Psi_{i_k}\).
The \(\Psi\)-basis is a basis only when the base ring is a \(\QQ\)-algebra (although the \(\Psi^I\) can be defined over any base ring). The elements of the \(\Psi\)-basis are known as the “power-sum non-commutative symmetric functions of the first kind”. The generators \(\Psi_n\) correspond to the Dynkin (quasi-)idempotents in the descent algebras of the symmetric groups (see [NCSF1], 5.2 for details).
Another (equivalent) definition of \(\Psi_n\) is
where \(R\) denotes the ribbon basis of \(NCSF\), and where \(1^i\) stands for \(i\) repetitions of the integer \(1\).
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: Psi = NCSF.Psi(); Psi
Non-Commutative Symmetric Functions over the Rational Field in the Psi basis
sage: Psi.an_element()
2*Psi[] + 2*Psi[1] + 3*Psi[1, 1]
Checking the equivalent definition of \(\Psi_n\):
sage: def test_psi(n):
....: NCSF = NonCommutativeSymmetricFunctions(ZZ)
....: R = NCSF.R()
....: Psi = NCSF.Psi()
....: a = R.sum([(-1) ** i * R[[1]*i + [n-i]]
....: for i in range(n)])
....: return Psi(a) == Psi[n]
sage: test_psi(2)
True
sage: test_psi(3)
True
sage: test_psi(4)
True
alias of Psi.Element
The internal product of two elements of the Psi basis.
See internal_product() for a thorough documentation of this operation.
This is an implementation using [NCSF2] Lemma 3.10. It is fast when the length of \(I\) is small, but can get very slow otherwise. Therefore it is not being used by default for internally multiplying Psi functions.
INPUT:
OUTPUT:
AUTHORS:
EXAMPLES:
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: Psi = N.Psi()
sage: Psi.internal_product_on_basis_by_bracketing([2,2],[1,2,1])
0
sage: Psi.internal_product_on_basis_by_bracketing([1,2,1],[2,1,1])
4*Psi[1, 2, 1]
sage: Psi.internal_product_on_basis_by_bracketing([2,1,1],[1,2,1])
4*Psi[2, 1, 1]
sage: Psi.internal_product_on_basis_by_bracketing([1,2,1], [1,1,1,1])
0
sage: Psi.internal_product_on_basis_by_bracketing([3,1], [1,2,1])
-Psi[1, 2, 1] + Psi[2, 1, 1]
sage: Psi.internal_product_on_basis_by_bracketing([1,2,1], [3,1])
0
sage: Psi.internal_product_on_basis_by_bracketing([2,2],[1,2])
0
sage: Psi.internal_product_on_basis_by_bracketing([4], [1,2,1])
-Psi[1, 1, 2] + 2*Psi[1, 2, 1] - Psi[2, 1, 1]
TESTS:
The internal product computed by this method is identical with the one obtained by coercion to the complete basis:
sage: S = N.S()
sage: def psi_int_test(n):
....: for I in Compositions(n):
....: for J in Compositions(n):
....: a = S(Psi.internal_product_on_basis_by_bracketing(I, J))
....: b = S(Psi[I]).internal_product(S(Psi[J]))
....: if a != b:
....: return False
....: return True
sage: all( psi_int_test(i) for i in range(4) )
True
sage: psi_int_test(4) # long time
True
sage: psi_int_test(5) # long time
True
Bases: sage.combinat.free_module.CombinatorialFreeModule, sage.misc.bindable_class.BindableClass
The Hopf algebra of non-commutative symmetric functions in the Ribbon basis.
The Ribbon basis is defined in Definition 3.12 of [NCSF1], where it is denoted by \((R_I)_I\). It is connected to the complete basis of the ring of non-commutative symmetric functions by the following relation: For every composition \(I\), we have
where the sum is over all compositions \(J\) which are coarser than \(I\) and \(\ell(I)\) denotes the length of \(I\). (See the proof of Proposition 4.13 in [NCSF1].)
The elements of the Ribbon basis are commonly referred to as the ribbon Schur functions.
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: R = NCSF.Ribbon(); R
Non-Commutative Symmetric Functions over the Rational Field in the Ribbon basis
sage: R.an_element()
2*R[] + 2*R[1] + 3*R[1, 1]
The following are aliases for this basis:
sage: NCSF.ribbon()
Non-Commutative Symmetric Functions over the Rational Field in the Ribbon basis
sage: NCSF.R()
Non-Commutative Symmetric Functions over the Rational Field in the Ribbon basis
alias of Ribbon.Element
Return the application of the antipode to a basis element of the ribbon basis self.
INPUT:
OUTPUT:
EXAMPLES:
sage: R = NonCommutativeSymmetricFunctions(QQ).ribbon()
sage: R.antipode_on_basis(Composition([2,1]))
-R[2, 1]
sage: R[3,1].antipode() # indirect doctest
R[2, 1, 1]
sage: R[[]].antipode() # indirect doctest
R[]
We check that the implementation of the antipode at hand does not contradict the generic one:
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: all( S(R[I].antipode()) == S(R[I]).antipode()
....: for I in Compositions(4) )
True
Return the dual basis to the ribbon basis of the non-commutative symmetric functions. This is the Fundamental basis of the quasi-symmetric functions.
OUTPUT:
EXAMPLES:
sage: R=NonCommutativeSymmetricFunctions(QQ).ribbon()
sage: R.dual()
Quasisymmetric functions over the Rational Field in the Fundamental basis
Return the product of two ribbon basis elements of the non-commutative symmetric functions.
INPUT:
OUTPUT:
EXAMPLES:
sage: R = NonCommutativeSymmetricFunctions(QQ).ribbon()
sage: R[1,2,1] * R[3,1]
R[1, 2, 1, 3, 1] + R[1, 2, 4, 1]
sage: ( R[1,2] + R[3] ) * ( R[3,1] + R[1,2,1] )
R[1, 2, 1, 2, 1] + R[1, 2, 3, 1] + R[1, 3, 2, 1] + R[1, 5, 1] + R[3, 1, 2, 1] + R[3, 3, 1] + R[4, 2, 1] + R[6, 1]
TESTS:
sage: R[[]] * R[3,1]
R[3, 1]
sage: R[1,2,1] * R[[]]
R[1, 2, 1]
sage: R.product_on_basis(Composition([2,1]), Composition([1]))
R[2, 1, 1] + R[2, 2]
Return the commutative image of a ribbon basis element of the non-commutative symmetric functions.
INPUT:
OUTPUT:
EXAMPLES:
sage: R=NonCommutativeSymmetricFunctions(QQ).R()
sage: R.to_symmetric_function_on_basis(Composition([3,1,1]))
s[3, 1, 1]
sage: R.to_symmetric_function_on_basis(Composition([4,2,1]))
s[4, 2, 1] + s[5, 1, 1] + s[5, 2]
sage: R.to_symmetric_function_on_basis(Composition([]))
s[]
Gives a realization of the algebra of non-commutative symmetric functions. This particular realization is the complete basis of non-commutative symmetric functions.
OUTPUT:
EXAMPLES:
sage: NonCommutativeSymmetricFunctions(ZZ).a_realization()
Non-Commutative Symmetric Functions over the Integer Ring in the Complete basis
Return the dual to the non-commutative symmetric functions.
OUTPUT:
EXAMPLES:
sage: NCSF = NonCommutativeSymmetricFunctions(QQ)
sage: NCSF.dual()
Quasisymmetric functions over the Rational Field