One characterization of Schur functions is that they are upper triangularly related to the monomial symmetric functions and orthogonal with respect to the Hall scalar product. We can use the class SymmetricFunctionAlgebra_orthotriang to obtain the Schur functions from this definition.
sage: from sage.combinat.sf.sfa import zee
sage: from sage.combinat.sf.orthotriang import SymmetricFunctionAlgebra_orthotriang
sage: m = SFAMonomial(QQ)
sage: s = SymmetricFunctionAlgebra_orthotriang(QQ, m, zee, 's', 'Schur functions')
sage: s([2,1])^2
s[2, 2, 1, 1] + s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + s[4, 2]
sage: s2 = SFASchur(QQ)
sage: s2([2,1])^2
s[2, 2, 1, 1] + s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + s[4, 2]
Bases: sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic
EXAMPLES:
sage: from sage.combinat.sf.sfa import zee
sage: from sage.combinat.sf.orthotriang import SymmetricFunctionAlgebra_orthotriang
sage: m = SFAMonomial(QQ)
sage: s = SymmetricFunctionAlgebra_orthotriang(QQ, m, zee, 's', 'Schur functions')
TESTS:
sage: TestSuite(s).run(elements = [s[1,1]+2*s[2], s[1]+3*s[1,1]])
sage: TestSuite(s).run(skip = ["_test_associativity", "_test_prod"]) # long time (7s on sage.math, 2011)
Note: s.an_element() is of degree 4; so we skip _test_associativity and _test_prod which involve (currently?) expensive calculations up to degree 12.
Bases: sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element
Create a combinatorial module element. This should never be called directly, but only through the parent combinatorial free module’s __call__() method.
TESTS:
sage: F = CombinatorialFreeModule(QQ, ['a','b','c'])
sage: B = F.basis()
sage: f = B['a'] + 3*B['c']; f
B['a'] + 3*B['c']
sage: f == loads(dumps(f))
True