by Anne Schilling and Mike Zabrocki
This Sage notebook is a demonstration of the new symmetric function functionality that will soon be merged into sage. Comments are welcome!
We create the ring of symmetric functions over the rationals and build the Schur, homogeneous, elementrary and power sum bases.
{{{id=1| Sym = SymmetricFunctions(QQ) s = Sym.schur() h = Sym.homogeneous() e = Sym.elementary() m = Sym.monomial() p = Sym.powersum() /// }}} {{{id=2| s[2] /// s[2] }}}We can multiply two Schur functions:
{{{id=3| s[2,1]*s[2] /// s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] }}}Or we can multiply different bases. Sage automatically coerces into one of the bases.
{{{id=4| p(s[2,1]*p[2]) /// 1/3*p[2, 1, 1, 1] - 1/3*p[3, 2] }}} {{{id=21| f = s[2,1] + s[1] + s[[]]; f.expand(3) /// x0^2*x1 + x0*x1^2 + x0^2*x2 + 2*x0*x1*x2 + x1^2*x2 + x0*x2^2 + x1*x2^2 + x0 + x1 + x2 + 1 }}} {{{id=22| g = f.expand(3); m.from_polynomial(g) /// m[] + m[1] + 2*m[1, 1, 1] + m[2, 1] }}}For a graded Hopf algebra we have a product, a coproduct, an antipode. The antipode and coproduct play nicely with the product.
{{{id=5| show(s[2,1].coproduct()) ///Hall-Littlewood symmetric functions form a basis of the ring of symmetric functions over $\mathbb{Q}[t]$
{{{id=24| Sym = SymmetricFunctions(FractionField(QQ['t'])) HL = Sym.hall_littlewood() HL /// Hall-Littlewood polynomials over Fraction Field of Univariate Polynomial Ring in t over Rational Field }}} {{{id=25| HL.base_ring() /// Fraction Field of Univariate Polynomial Ring in t over Rational Field }}} {{{id=26| Qp = HL.Qp() s = Sym.schur() s[1]*Qp[2,1] /// s[2, 1, 1] + s[2, 2] + (t+1)*s[3, 1] + t*s[4] }}}Now we specialize the parameter $t$:
{{{id=28| t = Sym.base_ring().gen() HL = Sym.hall_littlewood(t=t^2) /// }}} {{{id=30| Qp = HL.Qp() s = Sym.schur() s[1]*Qp[2,1] /// s[2, 1, 1] + s[2, 2] + (t^2+1)*s[3, 1] + t^2*s[4] }}} {{{id=31| HL = Sym.hall_littlewood(t=1) Qp = HL.Qp() s[1]*Qp[2,1] /// s[2, 1, 1] + s[2, 2] + 2*s[3, 1] + s[4] }}} {{{id=32| h = Sym.homogeneous() h(Qp[3,2,1].plethysm((1-t)*s[1])) /// (t^6-3*t^5+3*t^4-t^3)*h[1, 1, 1, 1, 1, 1] + (-3*t^6+7*t^5-3*t^4-3*t^3+2*t^2)*h[2, 1, 1, 1, 1] + (2*t^6-3*t^5-2*t^4+4*t^3-t)*h[2, 2, 1, 1] + (t^6-2*t^5+t^4-t^3+2*t^2-t)*h[3, 1, 1, 1] + (-t^6+t^5+t^4-t^2-t+1)*h[3, 2, 1] }}}The bases $P$ and $Q'$ are dual to each other:
{{{id=35| HL = Sym.hall_littlewood() P = HL.P() Qp = HL.Qp() /// }}} {{{id=36| M = matrix( [[P(la).scalar(Qp(mu)) for la in Partitions(4)] for mu in Partitions(4)] ) M /// [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] }}}{{{id=38| Sym = SymmetricFunctions(FractionField(QQ['q,t'])) Mac = Sym.macdonald() Ht = Mac.Ht() s = Sym.schur() s(Ht[2,1]) /// q*t*s[1, 1, 1] + (q+t)*s[2, 1] + s[3] }}} {{{id=61| (q,t) = Sym.base_ring().gens() /// }}} {{{id=39| f = Ht[3]+Ht[2,1]+Ht[1,1,1]; f /// McdHt[1, 1, 1] + McdHt[2, 1] + McdHt[3] }}} {{{id=40| f.nabla(q=1/q,t=1/t).nabla() /// McdHt[1, 1, 1] + McdHt[2, 1] + McdHt[3] }}} {{{id=41| s[3,2].nabla() /// (q^6*t^4+q^5*t^5+q^4*t^6)*s[1, 1, 1, 1, 1] + (q^6*t^3+2*q^5*t^4+2*q^4*t^5+q^3*t^6+q^4*t^4)*s[2, 1, 1, 1] + (q^5*t^3+2*q^4*t^4+q^3*t^5)*s[2, 2, 1] + (q^5*t^3+q^4*t^4+q^3*t^5+q^4*t^3+q^3*t^4)*s[3, 1, 1] + (q^4*t^3+q^3*t^4)*s[3, 2] + q^3*t^3*s[4, 1] }}}
$k$-Schur functions form a basis of the subspace spanned by $<h_1,\ldots,h_k>$.
{{{id=45| Sym = SymmetricFunctions(QQ) s = Sym.schur() ks = Sym.kschur(3,t=1) ks /// 3-Schur functions with t=1 }}} {{{id=47| ks.realization_of() /// 3-bounded Symmetric Functions over Rational Field }}}
When $t=1$, then the $k$-bounded subspace is in fact a subring.
{{{id=48| ks[2,1]*ks[2,1] /// ks3[2, 2, 1, 1] + ks3[2, 2, 2] + ks3[3, 1, 1, 1] }}} {{{id=49| ks(s([3,2,1])) /// Traceback (most recent call last): File "For general $t$ we can also build the $k$-Schur functions living in the $k$-bounded subspace given by $\mathcal{L} \{ s_\lambda^{(k)}[X;t] \} = \mathcal{L} \{ s_\lambda[X/(1-t)] \} = \mathcal{L} \{ Q'_\lambda[X;t] \} = \mathcal{L} \{ H_\lambda[X;q,t] \}$ where everywhere $\lambda_1 \le k$.
{{{id=53| Sym = SymmetricFunctions(FractionField(QQ['q,t'])) Mac = Sym.macdonald() H = Mac.H() ks = Sym.kschur(3) s = Sym.s() /// }}} {{{id=54| ks(H[3,3]) /// q^6*ks3[1, 1, 1, 1, 1, 1] + (q^5*t+q^5+q^4*t+q^4)*ks3[2, 1, 1, 1, 1] + (q^4+q^3*t+q^3+q^2)*ks3[2, 2, 1, 1] + (q^4*t+q^3*t+q^3+q^2*t)*ks3[2, 2, 2] + (q^4*t+q^3*t^2+2*q^3*t+q^3+q^2*t)*ks3[3, 1, 1, 1] + (q^2*t+q^2+q*t+q)*ks3[3, 2, 1] + ks3[3, 3] }}} {{{id=55| ks(H[3,2,1]) /// q^4*ks3[1, 1, 1, 1, 1, 1] + (q^4*t^2+q^3*t+q^3+q^2)*ks3[2, 1, 1, 1, 1] + (q^3*t^2+q^2*t+q^2+q)*ks3[2, 2, 1, 1] + (q^3*t^2+q^2*t^2+q^2*t+q)*ks3[2, 2, 2] + (q^3*t^3+q^3*t^2+q^2*t^2+q^2*t+q*t+q)*ks3[3, 1, 1, 1] + (q^2*t^2+q*t^2+q*t+1)*ks3[3, 2, 1] + t*ks3[3, 3] }}} {{{id=56| H(ks[3,1]) /// (q^2/(q^2*t^5-q*t^3-q*t^2+1))*McdH[1, 1, 1, 1] + ((-q^3*t^2-q^3*t+q^2*t^2+q)/(q^4*t^6-q^3*t^5-q^3*t^3-q^2*t^4+q^2*t^2+q*t^3+q*t-1))*McdH[2, 1, 1] + ((-q*t+q)/(q^3*t^4-2*q^2*t^3-q^2*t^2+q*t^2+2*q*t-1))*McdH[2, 2] + (1/(q^3*t^3-q^2*t^2-q*t+1))*McdH[3, 1] }}} {{{id=9| ks(ks[3,2]+s[2]) /// ks3[2] + ks3[3, 2] }}} {{{id=57| /// }}} {{{id=63| /// }}}