Coverage for local/lib/python2.7/site-packages/sage/combinat/sf/kfpoly.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
r""" Kostka-Foulkes Polynomials
Based on the algorithms in John Stembridge's SF package for Maple which can be found at http://www.math.lsa.umich.edu/~jrs/maple.html . """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>, # 2007 John Stembridge # # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ #*****************************************************************************
r""" Returns the Kostka-Foulkes polynomial `K_{\mu, \nu}(t)`.
INPUT:
- ``mu``, ``nu`` -- partitions - ``t`` -- an optional parameter (default: ``None``)
OUTPUT:
- the Koskta-Foulkes polynomial indexed by partitions ``mu`` and ``nu`` and evaluated at the parameter ``t``. If ``t`` is ``None`` the resulting polynomial is in the polynomial ring `\ZZ['t']`.
EXAMPLES::
sage: KostkaFoulkesPolynomial([2,2],[2,2]) 1 sage: KostkaFoulkesPolynomial([2,2],[4]) 0 sage: KostkaFoulkesPolynomial([2,2],[1,1,1,1]) t^4 + t^2 sage: KostkaFoulkesPolynomial([2,2],[2,1,1]) t sage: q = PolynomialRing(QQ,'q').gen() sage: KostkaFoulkesPolynomial([2,2],[2,1,1],q) q """ raise ValueError("mu must be a partition") raise ValueError("nu must be a partition")
raise ValueError("mu and nu must be partitions of the same size")
r""" Returns the Kostka-Foulkes polynomial `K_{\mu, \nu}(t)` by generating all rigging sequences for the shape `\mu`, and then selecting those of content `\nu`.
INPUT:
- ``mu``, ``nu`` -- partitions - ``t`` -- an optional parameter (default: ``None``)
OUTPUT:
- the Koskta-Foulkes polynomial indexed by partitions ``mu`` and ``nu`` and evaluated at the parameter ``t``. If ``t`` is ``None`` the resulting polynomial is in the polynomial ring `\mathbb{Z}['t']`.
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import kfpoly sage: kfpoly([2,2], [2,1,1]) t sage: kfpoly([4], [2,1,1]) t^3 sage: kfpoly([4], [2,2]) t^2 sage: kfpoly([1,1,1,1], [2,2]) 0 """ return 0
r""" Return a dictionary corresponding to `s_\mu` in Hall-Littlewood `P` basis.
INPUT:
- ``mu`` -- a partition - ``t`` -- an optional parameter (default: the generator from `\ZZ['t']` )
OUTPUT:
- a dictionary with the coefficients `K_{\mu\nu}(t)` for `\nu` smaller in dominance order than `\mu`
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import * sage: schur_to_hl([1,1,1]) {[1, 1, 1]: 1} sage: a = schur_to_hl([2,1]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1], t^2 + t) ([2, 1], 1) sage: a = schur_to_hl([3]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1], t^3) ([2, 1], t) ([3], 1) sage: a = schur_to_hl([4]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1], t^6) ([2, 1, 1], t^3) ([2, 2], t^2) ([3, 1], t) ([4], 1) sage: a = schur_to_hl([3,1]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1], t^5 + t^4 + t^3) ([2, 1, 1], t^2 + t) ([2, 2], t) ([3, 1], 1) sage: a = schur_to_hl([2,2]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1], t^4 + t^2) ([2, 1, 1], t) ([2, 2], 1) sage: a = schur_to_hl([2,1,1]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1], t^3 + t^2 + t) ([2, 1, 1], 1) sage: a = schur_to_hl([1,1,1,1]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1], 1) sage: a = schur_to_hl([2,2,2]) sage: for mc in sorted(six.iteritems(a)): print(mc) ([1, 1, 1, 1, 1, 1], t^9 + t^7 + t^6 + t^5 + t^3) ([2, 1, 1, 1, 1], t^4 + t^2) ([2, 2, 1, 1], t) ([2, 2, 2], 1) """
r""" Generate all possible rigging sequences for a fixed partition ``part``.
INPUT:
- ``part`` -- a partition
OUTPUT:
- a list of riggings associated to the partition ``part``
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import * sage: riggings([3]) [[[1, 1, 1]], [[2, 1]], [[3]]] sage: riggings([2,1]) [[[2, 1], [1]], [[3], [1]]] sage: riggings([1,1,1]) [[[3], [2], [1]]] sage: riggings([2,2]) [[[2, 2], [1, 1]], [[3, 1], [1, 1]], [[4], [1, 1]], [[4], [2]]] sage: riggings([2,2,2]) [[[3, 3], [2, 2], [1, 1]], [[4, 2], [2, 2], [1, 1]], [[5, 1], [2, 2], [1, 1]], [[6], [2, 2], [1, 1]], [[5, 1], [3, 1], [1, 1]], [[6], [3, 1], [1, 1]], [[6], [4], [2]]] """
r""" Generate all possible partitions of `n` that can precede `\mu, \nu` in a rigging sequence.
INPUT:
- ``n`` -- a positive integer - ``mu``, ``nu`` -- partitions
OUTPUT:
- a list of partitions
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import * sage: compat(4, [1], [2,1]) [[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]] sage: compat(3, [1], [2,1]) [[1, 1, 1], [2, 1], [3]] sage: compat(2, [1], []) [[2]] sage: compat(3, [1], []) [[2, 1], [3]] sage: compat(3, [2], [1]) [[3]] sage: compat(4, [1,1], []) [[2, 2], [3, 1], [4]] sage: compat(4, [2], []) [[4]] """
""" Return ``True`` if ``sum(mu[:i+1]) >= snu[i]`` for all ``0 <= i < len(snu)``; otherwise, it returns ``False``.
INPUT:
- ``mup`` -- a partition conjugate to ``mu`` - ``snu`` -- a sequence of positive integers
OUTPUT:
- a boolean value
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import * sage: dom([3,2,1],[2,4,5]) True sage: dom([3,2,1],[2,4,7]) False sage: dom([3,2,1],[2,6,5]) False sage: dom([3,2,1],[4,4,4]) False """ return not snu # True if and only if snu is empty
# Special case for the largest columns
r""" Return the weight of a rigging.
INPUT:
- ``rg`` -- a rigging, a list of partitions - ``t`` -- an optional parameter, (default: the generator from `\ZZ['t']`)
OUTPUT:
- a polynomial in the parameter ``t``
EXAMPLES::
sage: from sage.combinat.sf.kfpoly import weight sage: weight([[2,1], [1]]) 1 sage: weight([[3], [1]]) t^2 + t sage: weight([[2,1], [3]]) t^4 sage: weight([[2, 2], [1, 1]]) 1 sage: weight([[3, 1], [1, 1]]) t sage: weight([[4], [1, 1]], 2) 16 sage: weight([[4], [2]], t=2) 4 """
|