24
24
25
25
from sage .combinat .partition import _Partitions
26
26
from sage .combinat .partitions import ZS1_iterator
27
+ from sage .combinat .skew_partition import SkewPartitions
28
+ from sage .combinat .skew_tableau import SemistandardSkewTableaux
27
29
from sage .rings .polynomial .polynomial_ring import polygen
28
30
from sage .rings .integer_ring import ZZ
29
31
30
32
31
33
def KostkaFoulkesPolynomial (mu , nu , t = None ):
32
34
r"""
33
35
Return the Kostka-Foulkes polynomial `K_{\mu, \nu}(t)`.
36
+ Here, `\mu` is a partition or a skew partition, whereas
37
+ `\nu` is a partition of the same size.
38
+
39
+ The Kostka-Foulkes polynomial is defined to be the sum
40
+ of the monomials `t^{\operatorname{charge}(T)}` over all
41
+ semistandard tableaux `T` of shape `\lambda / \mu``,
42
+ where `\operatorname{charge}(T)` denotes the charge
43
+ of the reading word of `T`
44
+ (see :meth:`sage.combinat.words.finite_word.FiniteWord_class.charge`).
34
45
35
46
INPUT:
36
47
37
- - ``mu``, ``nu`` -- partitions
48
+ - ``mu`` -- partition or skew partition
49
+ - ``nu`` -- partition
38
50
- ``t`` -- an optional parameter (default: ``None``)
39
51
40
52
OUTPUT:
41
53
42
- - the Koskta -Foulkes polynomial indexed by partitions ``mu`` and ``nu`` and
54
+ - the Kostka -Foulkes polynomial indexed by ``mu`` and ``nu`` and
43
55
evaluated at the parameter ``t``. If ``t`` is ``None`` the resulting
44
- polynomial is in the polynomial ring `\ZZ['t' ]`.
56
+ polynomial is in the polynomial ring `\ZZ[t ]`.
45
57
46
58
EXAMPLES::
47
59
@@ -56,13 +68,15 @@ def KostkaFoulkesPolynomial(mu, nu, t=None):
56
68
sage: q = PolynomialRing(QQ,'q').gen()
57
69
sage: KostkaFoulkesPolynomial([2,2],[2,1,1],q)
58
70
q
71
+ sage: KostkaFoulkesPolynomial([[3,2],[1]],[2,2],q)
72
+ q + 1
59
73
60
74
TESTS::
61
75
62
76
sage: KostkaFoulkesPolynomial([2,4],[2,2])
63
77
Traceback (most recent call last):
64
78
...
65
- ValueError: mu must be a partition
79
+ ValueError: mu must be a partition or a skew partition
66
80
sage: KostkaFoulkesPolynomial([2,2],[2,4])
67
81
Traceback (most recent call last):
68
82
...
@@ -73,7 +87,9 @@ def KostkaFoulkesPolynomial(mu, nu, t=None):
73
87
ValueError: mu and nu must be partitions of the same size
74
88
"""
75
89
if mu not in _Partitions :
76
- raise ValueError ("mu must be a partition" )
90
+ if mu in SkewPartitions ():
91
+ return kfpoly_skew (mu , nu , t )
92
+ raise ValueError ("mu must be a partition or a skew partition" )
77
93
if nu not in _Partitions :
78
94
raise ValueError ("nu must be a partition" )
79
95
if sum (mu ) != sum (nu ):
@@ -94,7 +110,7 @@ def kfpoly(mu, nu, t=None):
94
110
95
111
OUTPUT:
96
112
97
- - the Koskta -Foulkes polynomial indexed by partitions ``mu`` and ``nu`` and
113
+ - the Kostka -Foulkes polynomial indexed by partitions ``mu`` and ``nu`` and
98
114
evaluated at the parameter ``t``. If ``t`` is ``None`` the resulting polynomial
99
115
is in the polynomial ring `\ZZ['t']`.
100
116
@@ -127,6 +143,47 @@ def kfpoly(mu, nu, t=None):
127
143
128
144
return sum (f (rg ) for rg in riggings (mu ))
129
145
146
+ def kfpoly_skew (lamu , nu , t = None ):
147
+ r"""
148
+ Return the Kostka-Foulkes polynomial `K_{\lambda / \mu, \nu}(t)`
149
+ by summing `t^{\operatorname{charge}(T)}` over all semistandard
150
+ tableaux `T` of shape `\lambda / \mu``.
151
+
152
+ INPUT:
153
+
154
+ - ``lamu`` -- skew partition `\lambda / \mu`
155
+ - ``nu`` -- partition `\nu`
156
+ - ``t`` -- an optional parameter (default: ``None``)
157
+
158
+ OUTPUT:
159
+
160
+ - the Kostka-Foulkes polynomial indexed by ``mu`` and ``nu`` and
161
+ evaluated at the parameter ``t``. If ``t`` is ``None`` the
162
+ resulting polynomial is in the polynomial ring `\ZZ['t']`.
163
+
164
+ EXAMPLES::
165
+
166
+ sage: from sage.combinat.sf.kfpoly import kfpoly_skew
167
+ sage: kfpoly_skew([[3,3], [1,1]], [2,1,1])
168
+ t
169
+ sage: kfpoly_skew([[3,3], [1,1]], [2,1,1], 5)
170
+ 5
171
+ sage: kfpoly_skew([[5], [1]], [2,2])
172
+ t^2
173
+
174
+ TESTS::
175
+
176
+ sage: from sage.combinat.sf.kfpoly import kfpoly, kfpoly_skew
177
+ sage: all(kfpoly_skew(SkewPartition([b,[]]), c) == kfpoly(b,c)
178
+ ....: for n in range(6) for b in Partitions(n)
179
+ ....: for c in Partitions(n))
180
+ True
181
+ """
182
+ if t is None :
183
+ t = polygen (ZZ , 't' )
184
+
185
+ return t .parent ().sum (t ** (T .to_word ().charge ())
186
+ for T in SemistandardSkewTableaux (lamu , nu ))
130
187
131
188
def schur_to_hl (mu , t = None ):
132
189
r"""
0 commit comments