packages feed

jackpolynomials 1.4.5.0 → 1.4.6.0

raw patch · 10 files changed

+444/−202 lines, 10 files

Files

CHANGELOG.md view
@@ -156,4 +156,16 @@ 
 * new function `qtSkewKostkaPolynomials`, to get skew qt-Kostka polynomials
 
+1.4.6.0
+-------
+* new module `Combinatorics` 
+
+* new function `semiStandardTableauxWithGivenShapeAndWeight`, to get all 
+semistandard tableaux with a given shape and a given weight
+
+* new function `skewTableauxWithGivenShapeAndWeight`, to get all 
+semistandard skew tableaux with a given shape and a given weight
+
+* new function `skewGelfandTsetlinPatterns`, to get Gelfand-Tsetlin patterns
+defined by a skew partition
 
README.md view
@@ -13,12 +13,13 @@ allows to compute these polynomials. It also allows to compute other 
 symmetric polynomials: Kostka-Foulkes polynomials, t-Schur polynomials, 
 Hall-Littlewood polynomials, Kostka-Macdonald polynomials, and Macdonald 
-polynomials.
+polynomials. In addition, it provides some functions to compute Kostka 
+numbers and to enumerate Gelfand-Tsetlin patterns.
 
 ___
 
-Evaluation of the Jack polynomial with parameter `2` associated to the integer 
-partition `[3, 1]`, at `x1 = 1` and `x2 = 1`:
+Evaluation of the Jack polynomial with Jack parameter `2`, associated to the 
+integer partition `[3, 1]`, at `x1 = 1` and `x2 = 1`:
 
 ```haskell
 import Math.Algebra.Jack
@@ -26,6 +27,12 @@ -- 48 % 1
 ```
 
+The last argument, here `'J'`, is used to specify the choice of the Jack 
+polynomial, because there are four possible Jack polynomials for a given 
+Jack parameter and a given integer partition: the $J$-polynomial, 
+the $P$-polynomial, the $Q$-polynomial and the $C$-polynomial, each 
+corresponding to a certain normalization. 
+
 The non-evaluated Jack polynomial:
 
 ```haskell
@@ -40,7 +47,10 @@ 
 The first argument, here `2`, is the number of variables of the polynomial.
 
+Jack polynomials are generalized by skew Jack polynomials, which are available 
+in the package as of version `1.4.5.0`.
 
+
 ### Symbolic Jack parameter
 
 As of version `1.2.0.0`, it is possible to get Jack polynomials with a 
@@ -77,7 +87,7 @@ Note that if you use the function `jackSymbolicPol` to get a 
 `ParametricSpray Double` object in the output, it is not guaranted that you 
 will visually get some polynomials in the Jack parameter for the coefficients, 
-because the arithmetic operations are not exact with the `Double` type
+because the arithmetic operations are not exact with the `Double` type.
 
 
 ### Showing symmetric polynomials
@@ -117,9 +127,9 @@ ### Hall inner product
 
 As of version 1.4.1.0, the package provides an implementation of the Hall 
-inner product with parameter. It is known that the Jack polynomials with 
-Jack parameter $\alpha$ are orthogonal for the Hall inner product with 
-parameter $\alpha$. 
+inner product with Jack parameter, aka the Jack scalar product. It is known 
+that the Jack polynomials with Jack parameter $\alpha$ are orthogonal for 
+the Hall inner product with Jack parameter $\alpha$. 
 
 There is a function `hallInnerProduct` as well as a function 
 `symbolicHallInnerProduct`. The latter allows to get the Hall inner product 
@@ -237,6 +247,16 @@ `SimpleParametricSpray a` spray but by a `ParametricSpray a` spray, because 
 its coefficients are not polynomials in the two parameters $q$ and $t$, but 
 ratios of polynomials.
+
+
+### Combinatorics
+
+The module `Math.Algebra.Combinatorics` appeared in version 1.4.6.0.
+It provides some functions to compute Kostka numbers, possibly skew, 
+to enumerate the semistandard Young tableaux with a given shape and 
+a given weight, possibly skew, and to enumerate Gelfand-Tsetlin patterns.
+The reason to include this module in the package is that these functions
+are used to compute the symmetric polynomials.
 
 
 ## References
jackpolynomials.cabal view
@@ -1,7 +1,7 @@ name:                jackpolynomials
-version:             1.4.5.0
+version:             1.4.6.0
 synopsis:            Jack, zonal, Schur, and other symmetric polynomials
-description:         This library can compute Jack polynomials, zonal polynomials, Schur polynomials, flagged Schur polynomials, factorial Schur polynomials, t-Schur polynomials, Hall-Littlewood polynomials, Macdonald polynomials, Kostka-Foulkes polynomials, and Kostka-Macdonald polynomials.
+description:         This library can compute Jack polynomials, zonal polynomials, Schur polynomials, flagged Schur polynomials, factorial Schur polynomials, t-Schur polynomials, Hall-Littlewood polynomials, Macdonald polynomials, Kostka-Foulkes polynomials, and Kostka-Macdonald polynomials. It also provides some functions to compute Kostka numbers and to enumerate Gelfand-Tsetlin patterns.
 homepage:            https://github.com/stla/jackpolynomials#readme
 license:             GPL-3
 license-file:        LICENSE
@@ -18,6 +18,7 @@   hs-source-dirs:      src
   exposed-modules:     Math.Algebra.Jack.HypergeoPQ
                      , Math.Algebra.SymmetricPolynomials
+                     , Math.Algebra.Combinatorics
                      , Math.Algebra.Jack
                      , Math.Algebra.JackPol
                      , Math.Algebra.JackSymbolicPol
+ src/Math/Algebra/Combinatorics.hs view
@@ -0,0 +1,172 @@+{-|
+Module      : Math.Algebra.Combinatorics
+Description : 
+Copyright   : (c) Stéphane Laurent, 2024
+License     : GPL-3
+Maintainer  : laurent_step@outlook.fr
+
+This module provides some functions to compute Kostka numbers with a Jack
+parameter, possibly skew, some functions to enumerate semistandard tableaux,
+possibly skew, with a given shape and a given weight, and a function to 
+enumerate the Gelfand-Tsetlin patterns defined by a skew partition.
+-}
+
+module Math.Algebra.Combinatorics
+  (
+  -- * Kostka numbers
+    kostkaNumbers
+  , symbolicKostkaNumbers
+  , skewKostkaNumbers
+  , symbolicSkewKostkaNumbers
+  -- * Tableaux
+  , semiStandardTableauxWithGivenShapeAndWeight
+  , skewTableauxWithGivenShapeAndWeight
+  -- * Gelfand-Tsetlin patterns
+  , skewGelfandTsetlinPatterns
+  ) where
+import qualified Data.Foldable                    as DF
+import           Data.Map.Strict                  ( 
+                                                    Map
+                                                  )
+import qualified Data.Map.Strict                  as DM
+import           Data.Tuple.Extra                 ( 
+                                                    second  
+                                                  )
+import           Math.Algebra.Hspray              (
+                                                    RatioOfQSprays
+                                                  , unitRatioOfSprays
+                                                  )
+import           Math.Algebra.Jack.Internal       ( 
+                                                    Partition
+                                                  , _isPartition
+                                                  , _kostkaNumbers
+                                                  , _symbolicKostkaNumbers
+                                                  , isSkewPartition
+                                                  , skewJackInMSPbasis
+                                                  , skewSymbolicJackInMSPbasis
+                                                  , _skewGelfandTsetlinPatterns
+                                                  , _skewTableauxWithGivenShapeAndWeight
+                                                  , _semiStandardTableauxWithGivenShapeAndWeight
+                                                  )
+import           Math.Combinat.Tableaux.Skew      (
+                                                    SkewTableau (..)
+                                                  )
+
+-- | Kostka numbers \(K_{\lambda,\mu}(\alpha)\) with Jack parameter, or 
+-- Kostka-Jack numbers, for a given weight of the 
+-- partitions \(\lambda\) and \(\mu\) and a given Jack parameter 
+-- \(\alpha\) (these are the standard Kostka numbers when
+-- \(\alpha=1\)). This returns a map whose keys represent the 
+-- partitions \(\lambda\) and the value attached to a partition \(\lambda\)
+-- represents the map \(\mu \mapsto K_{\lambda,\mu}(\alpha)\) where the 
+-- partition \(\mu\) is included in the keys of this map if and only if 
+-- \(K_{\lambda,\mu}(\alpha) \neq 0\). The Kostka-Jack number 
+-- \(K_{\lambda,\mu}(\alpha)\) is the coefficient of the monomial symmetric 
+-- polynomial \(m_\mu\) in the expression of the \(P\)-Jack polynomial 
+-- \(P_\lambda(\alpha)\) as a linear combination of monomial symmetric 
+-- polynomials.
+kostkaNumbers :: 
+     Int      -- ^ weight of the partitions
+  -> Rational -- ^ Jack parameter
+  -> Map Partition (Map Partition Rational)
+kostkaNumbers weight alpha 
+  | weight < 0 = 
+      error "kostkaNumbers: negative weight."
+  | weight == 0 =
+      DM.singleton [] (DM.singleton [] 1)
+  | otherwise =
+      _kostkaNumbers weight weight alpha 'P'
+
+-- | Kostka numbers \(K_{\lambda,\mu}(\alpha)\) with symbolic Jack parameter \(\alpha\) 
+-- for a given weight of the partitions \(\lambda\) and \(\mu\). This returns a map 
+-- whose keys represent the 
+-- partitions \(\lambda\) and the value attached to a partition \(\lambda\)
+-- represents the map \(\mu \mapsto K_{\lambda,\mu}(\alpha)\) where the 
+-- partition \(\mu\) is included in the keys of this map if and only if 
+-- \(K_{\lambda,\mu}(\alpha) \neq 0\).
+symbolicKostkaNumbers :: 
+     Int  -- ^ weight of the partitions
+  -> Map Partition (Map Partition RatioOfQSprays)
+symbolicKostkaNumbers weight
+  | weight < 0 = 
+      error "symbolicKostkaNumbers: negative weight."
+  | weight == 0 =
+      DM.singleton [] (DM.singleton [] unitRatioOfSprays)
+  | otherwise =
+      _symbolicKostkaNumbers weight weight 'P'
+
+-- | Skew Kostka numbers \(K_{\lambda/\mu, \nu}(\alpha)\) with a given Jack 
+-- parameter \(\alpha\) and a given skew partition \(\lambda/\mu\). For \(\alpha=1\)
+-- these are the ordinary skew Kostka numbers.
+-- The function returns a map whose keys represent the partitions \(\nu\). 
+-- The skew Kostka-Jack number \(K_{\lambda/\mu, \nu}(\alpha)\)
+-- is the coefficient of the monomial symmetric 
+-- polynomial \(m_\nu\) in the expression of the skew \(P\)-Jack polynomial 
+-- \(P_{\lambda/\mu}(\alpha)\) as a linear combination of monomial symmetric 
+-- polynomials.
+skewKostkaNumbers ::
+     Rational  -- ^ Jack parameter
+  -> Partition -- ^ outer partition of the skew partition
+  -> Partition -- ^ inner partition of the skew partition
+  -> Map Partition Rational
+skewKostkaNumbers alpha lambda mu 
+  | not (isSkewPartition lambda mu) =
+      error "skewKostkaNumbers: invalid skew partition."
+  | otherwise = 
+      DM.map snd (skewJackInMSPbasis alpha 'P' lambda mu)
+
+-- | Skew Kostka numbers \(K_{\lambda/\mu, \nu}(\alpha)\) with symbolic Jack 
+-- parameter \(\alpha\) for a given skew partition \(\lambda/\mu\). 
+-- This returns a map whose keys represent the partitions \(\nu\).
+symbolicSkewKostkaNumbers ::
+     Partition -- ^ outer partition of the skew partition
+  -> Partition -- ^ inner partition of the skew partition
+  -> Map Partition RatioOfQSprays
+symbolicSkewKostkaNumbers lambda mu 
+  | not (isSkewPartition lambda mu) =
+      error "symbolicSkewKostkaNumbers: invalid skew partition."
+  | otherwise = 
+      DM.map snd (skewSymbolicJackInMSPbasis 'P' lambda mu)
+
+-- | Skew Gelfand-Tsetlin patterns defined by a skew partition and a weight vector.
+skewGelfandTsetlinPatterns :: 
+     Partition -- ^ outer partition of the skew partition
+  -> Partition -- ^ inner partition of the skew partition
+  -> [Int]     -- ^ weight
+  -> [[Partition]]
+skewGelfandTsetlinPatterns lambda mu weight 
+  | not (isSkewPartition lambda mu) =
+     error "skewGelfandTsetlinPatterns: invalid skew partition."
+  | otherwise = 
+      map (map DF.toList) (_skewGelfandTsetlinPatterns lambda mu weight)
+
+-- | Skew semistandard tableaux with a given shape (a skew partition) and
+-- a given weight vector. The weight is the vector whose @i@-th element is the 
+-- number of occurrences of @i@ in the tableau.
+skewTableauxWithGivenShapeAndWeight :: 
+     Partition -- ^ outer partition of the skew partition
+  -> Partition -- ^ inner partition of the skew partition
+  -> [Int]     -- ^ weight
+  -> [SkewTableau Int] 
+skewTableauxWithGivenShapeAndWeight lambda mu weight 
+  | not (isSkewPartition lambda mu) =
+     error "skewTableauxWithGivenShapeAndWeight: invalid skew partition."
+  | otherwise = 
+      map (SkewTableau . (map (second DF.toList)))
+        (_skewTableauxWithGivenShapeAndWeight lambda mu weight)
+
+-- | Semistandard tableaux with a given shape (an integer partition) and
+-- a given weight vector. The weight is the vector whose @i@-th element is the 
+-- number of occurrences of @i@ in the tableau.
+semiStandardTableauxWithGivenShapeAndWeight :: 
+     Partition   -- ^ shape, integer partition
+  -> [Int]       -- ^ weight
+  -> [[[Int]]]
+semiStandardTableauxWithGivenShapeAndWeight lambda weight 
+  | not (_isPartition lambda) =
+      error "semiStandardTableauxWithGivenShapeAndWeight: invalid partition."
+  | any (< 0) weight =
+      []
+  | otherwise = 
+      map (map DF.toList) 
+        (_semiStandardTableauxWithGivenShapeAndWeight lambda weight)
src/Math/Algebra/Jack.hs view
@@ -12,7 +12,21 @@ {-# LANGUAGE BangPatterns        #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 module Math.Algebra.Jack
-  (Partition, jack', zonal', schur', skewSchur', jack, zonal, schur, skewSchur)
+  (
+  -- * The `Partition` type  
+    Partition
+  -- * Evaluation of Jack polynomials
+  , jack
+  , jack'
+  -- * Evaluation of zonal polynomials
+  , zonal
+  , zonal'
+  -- * Evaluation of Schur and skew Schur polynomials
+  , schur
+  , schur'
+  , skewSchur
+  , skewSchur'
+  )
   where
 import           Prelude 
   hiding ((*), (+), (-), (/), (^), (*>), product, fromIntegral, fromInteger)
@@ -31,7 +45,7 @@                                             , isSkewPartition, _fromInt )
 import Math.Algebra.Hspray                  ( (.^) )
 
--- | Evaluation of Jack polynomial
+-- | Evaluation of a Jack polynomial.
 jack' 
   :: [Rational] -- ^ values of the variables
   -> Partition  -- ^ partition of integers
@@ -40,7 +54,7 @@   -> Rational
 jack' = jack
 
--- | Evaluation of Jack polynomial
+-- | Evaluation of a Jack polynomial.
 jack :: forall a. (Eq a, AlgField.C a)
   => [a]       -- ^ values of the variables
   -> Partition -- ^ partition of integers
@@ -112,28 +126,32 @@                         | otherwise =
                             jck' nu' (arr // [(_N_lambda_nu_m, Just ss)]) 
 
--- | Evaluation of zonal polynomial
+-- | Evaluation of a zonal polynomial. The zonal polynomials are the 
+-- Jack \(C\)-polynomials with Jack parameter \(\alpha=2\).
 zonal' 
   :: [Rational] -- ^ values of the variables
-  -> Partition  -- ^ partition of integers
+  -> Partition  -- ^ integer partition 
   -> Rational
 zonal' = zonal
 
--- | Evaluation of zonal polynomial
+-- | Evaluation of a zonal polynomial. The zonal polynomials are the 
+-- Jack \(C\)-polynomials with Jack parameter \(\alpha=2\).
 zonal :: (Eq a, AlgField.C a)
   => [a]       -- ^ values of the variables
   -> Partition -- ^ partition of integers
   -> a
 zonal x lambda = jack x lambda (fromInteger 2) 'C'
 
--- | Evaluation of Schur polynomial
+-- | Evaluation of a Schur polynomial. The Schur polynomials are the 
+-- Jack \(P\)-polynomials with Jack parameter \(\alpha=1\).
 schur'
   :: [Rational] -- ^ values of the variables
-  -> Partition  -- ^ partition of integers 
+  -> Partition  -- ^ integer partition 
   -> Rational
 schur' = schur
 
--- | Evaluation of Schur polynomial
+-- | Evaluation of a Schur polynomial. The Schur polynomials are the 
+-- Jack \(P\)-polynomials with Jack parameter \(\alpha=1\).
 schur :: forall a. AlgRing.C a 
   => [a]       -- ^ values of the variables
   -> Partition -- ^ partition of integers 
src/Math/Algebra/Jack/Internal.hs view
@@ -43,6 +43,9 @@   , inverseKostkaNumbers
   , skewSymbolicJackInMSPbasis 
   , skewJackInMSPbasis
+  , _skewGelfandTsetlinPatterns
+  , _skewTableauxWithGivenShapeAndWeight
+  , _semiStandardTableauxWithGivenShapeAndWeight
   )
   where
 import           Prelude 
@@ -129,6 +132,7 @@ import           Math.Combinat.Tableaux.GelfandTsetlin       (
                                                                 GT
                                                               , kostkaGelfandTsetlinPatterns
+                                                              , kostkaGelfandTsetlinPatterns'
                                                               , kostkaNumbersWithGivenLambda
                                                              )
 import           Math.Combinat.Tableaux.LittlewoodRichardson ( _lrRule )
@@ -408,7 +412,7 @@ --         let nu' = fromPartition nu in
 --           (
 --             nu'
---           , skewGelfandTsetlinPatterns lambda mu nu'
+--           , _skewGelfandTsetlinPatterns lambda mu nu'
 --           )        
 --         ) nus))
 --     mapOfPairs = DM.map (map pairing) mapOfPatterns
@@ -496,7 +500,7 @@         let nu' = fromPartition nu in
           (
             nu'
-          , skewGelfandTsetlinPatterns lambda mu nu'
+          , _skewGelfandTsetlinPatterns lambda mu nu'
           )        
         ) nus))
     mapOfPairs = DM.map (map pairing) mapOfPatterns
@@ -577,7 +581,7 @@         let nu' = fromPartition nu in
           (
             S.fromList nu'
-          , skewGelfandTsetlinPatterns lambda mu nu'
+          , _skewGelfandTsetlinPatterns lambda mu nu'
           )        
         ) nus))
     mapOfPairs = HM.map (map pairing) mapOfPatterns
@@ -609,10 +613,8 @@ 
 sandwichedPartitions :: Int -> Seq Int -> Seq Int -> [Seq Int]
 sandwichedPartitions weight mu lambda = 
-  recursiveFun weight (lambda `S.index` 0) mu' lambda
+  recursiveFun weight (lambda `S.index` 0) mu lambda
   where
-    mu' = mu >< (S.replicate (S.length lambda - S.length mu) 0)
-    dropTrailingZeros = S.dropWhileR (== 0)
     recursiveFun :: Int -> Int -> Seq Int -> Seq Int -> [Seq Int]
     recursiveFun d h0 a_as b_bs
       | d < 0 || d < DF.sum a_as || d > DF.sum b_bs = []
@@ -620,17 +622,17 @@       | otherwise = 
           concatMap 
             (\h -> 
-              [h :<| dropTrailingZeros hs | hs <- recursiveFun (d-h) h as bs]
+              [h :<| hs | hs <- recursiveFun (d-h) h as bs]
             )
-            [max 0 a .. min h0 b]
+            [max 1 a .. min h0 b]
           where
             a = a_as `S.index` 0
             b = b_bs `S.index` 0
             as = S.drop 1 a_as
             bs = S.drop 1 b_bs
 
-skewGelfandTsetlinPatterns :: Partition -> Partition -> [Int] -> [[Seq Int]]
-skewGelfandTsetlinPatterns lambda mu weight 
+_skewGelfandTsetlinPatterns :: Partition -> Partition -> [Int] -> [[Seq Int]]
+_skewGelfandTsetlinPatterns lambda mu weight 
   | any (< 0) weight =
       []
   | wWeight /= wLambda - wMu = 
@@ -642,33 +644,35 @@         then map (\pattern -> [pattern `S.index` i | i <- indices]) patterns
         else map DF.toList patterns
   where
-    wWeight = sum weight
     lambda' = S.fromList lambda
+    ellLambda = S.length lambda'
     wLambda = DF.sum lambda'
     mu' = S.fromList mu
+    ellMu = S.length mu'
     wMu = DF.sum mu'
+    weight' = S.filter (/= 0) (S.fromList weight)
+    wWeight = DF.sum weight'
+    mu'' = mu' >< (S.replicate (ellLambda - ellMu) 0)
     recursiveFun :: Seq Int -> Seq Int -> [Seq (Seq Int)]
     recursiveFun kappa w =
-      if d == wMu 
+      if ellW == 0 
         then
-          if ellKappa >= ellMu && 
-              and (S.zipWith (>=) kappa mu') && 
-                ellKappa <= ellMu + 1 && 
-                  and (S.zipWith (>=) (mu') (S.drop 1 kappa))
-            then [S.fromList [mu', kappa]]
-            else [] 
+          [S.singleton mu']
         else 
-          concatMap
-            (\nu -> [list |> kappa | list <- recursiveFun nu hw])
-              (sandwichedPartitions d (S.drop 1 kappa |> 0) kappa)
+          if ellW < ellLambda && or (S.zipWith (<) mu' (S.drop ellW kappa))
+            then []
+            else 
+              concatMap
+                (\nu -> [list |> kappa | list <- recursiveFun nu hw])
+                  parts
         where
-          ellKappa = S.length kappa
-          ellMu = S.length mu'
-          d = DF.sum kappa - w `S.index` 0
-          hw = S.drop 1 w
-    weight' = S.filter (/= 0) (S.fromList weight)
-    patterns = recursiveFun lambda' (S.reverse weight')
-    indices = map (subtract 1) (scanl1 (+) (1 : map (min 1) (reverse weight)))
+          ellW = S.length w 
+          d = DF.sum kappa - w `S.index` (ellW - 1)
+          lower = S.zipWith max mu'' (S.drop 1 kappa |> 0) 
+          parts = sandwichedPartitions d lower kappa 
+          hw = S.take (ellW - 1) w
+    patterns = recursiveFun lambda' weight'
+    indices = map (subtract 1) (scanl1 (+) (1 : map (min 1) weight))
 
 skewGelfandTsetlinPatternToTableau :: [Seq Int] -> [(Int, Seq Int)]
 skewGelfandTsetlinPatternToTableau pattern = 
@@ -693,11 +697,11 @@     skewTableau = 
       S.zip mu' (DF.foldl' growTableau startingTableau skewPartitions)
 
-skewTableauxWithGivenShapeAndWeight :: 
+_skewTableauxWithGivenShapeAndWeight :: 
   Partition -> Partition -> [Int] -> [[(Int, Seq Int)]]
-skewTableauxWithGivenShapeAndWeight lambda mu weight = 
+_skewTableauxWithGivenShapeAndWeight lambda mu weight = 
   map skewGelfandTsetlinPatternToTableau 
-      (skewGelfandTsetlinPatterns lambda mu weight) 
+      (_skewGelfandTsetlinPatterns lambda mu weight) 
 
 _skewKostkaFoulkesPolynomial :: 
   (Eq a, AlgRing.C a) => Partition -> Partition -> Partition -> Spray a
@@ -706,7 +710,7 @@     then sumOfSprays sprays
     else zeroSpray
   where
-    tableaux = skewTableauxWithGivenShapeAndWeight lambda mu nu
+    tableaux = _skewTableauxWithGivenShapeAndWeight lambda mu nu
     word skewT = mconcat (map S.reverse (snd (unzip skewT))) 
     mm = lone' 1 
     sprays = map (mm . charge . word) tableaux
@@ -749,15 +753,12 @@     growTableau j tableau skewPart =
       DF.foldr (S.adjust' (flip (|>) j)) tableau (skewPartitionRows skewPart)
 
-semiStandardTableauxWithGivenShapeAndWeight :: 
-  Partition -> Partition -> [[Seq Int]]
-semiStandardTableauxWithGivenShapeAndWeight lambda mu =
-  if lambda' `dominates` mu'
-    then map gtPatternToTableau (kostkaGelfandTsetlinPatterns lambda' mu')
-    else []
+_semiStandardTableauxWithGivenShapeAndWeight :: 
+  Partition -> [Int] -> [[Seq Int]]
+_semiStandardTableauxWithGivenShapeAndWeight lambda weight =
+  map gtPatternToTableau (kostkaGelfandTsetlinPatterns' lambda' weight)
   where
     lambda' = toPartitionUnsafe lambda
-    mu' = toPartitionUnsafe mu
 
 -- length lambda = length as = length bs; as <= bs; last bs >= length lambda
 flaggedSemiStandardYoungTableaux :: Partition -> [Int] -> [Int] -> [[[Int]]] 
@@ -838,7 +839,7 @@             in
       (
         nu''
-      , map pairing (skewGelfandTsetlinPatterns lambda' mu' nu'')
+      , map pairing (_skewGelfandTsetlinPatterns lambda' mu' nu'')
       )
     ) 
     nus)
@@ -946,7 +947,7 @@     then sumOfSprays sprays
     else zeroSpray
   where
-    tableaux = semiStandardTableauxWithGivenShapeAndWeight lambda mu
+    tableaux = _semiStandardTableauxWithGivenShapeAndWeight lambda mu
     mm = lone' 1 
     sprays =
       map (mm . charge . (mconcat . (map S.reverse))) tableaux 
src/Math/Algebra/JackPol.hs view
@@ -5,15 +5,31 @@ License     : GPL-3
 Maintainer  : laurent_step@outlook.fr
 
-Computation of symbolic Jack polynomials, zonal polynomials, Schur polynomials and skew Schur polynomials. 
+Computation of Jack polynomials, skew Jack polynomials, zonal polynomials, 
+skew zonal polynomials, Schur polynomials and skew Schur polynomials. 
 See README for examples and references.
 -}
 
 {-# LANGUAGE BangPatterns        #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 module Math.Algebra.JackPol
-  ( jackPol', skewJackPol', zonalPol', skewZonalPol', schurPol', skewSchurPol'
-  , jackPol, skewJackPol, zonalPol, skewZonalPol, schurPol, skewSchurPol )
+  ( 
+  -- * Jack and skew Jack polynomials
+    jackPol
+  , jackPol'
+  , skewJackPol
+  , skewJackPol'
+  -- * Zonal and skew zonal polynomials
+  , zonalPol
+  , zonalPol'
+  , skewZonalPol
+  , skewZonalPol'
+  -- * Schur and skew Schur polynomials
+  , schurPol
+  , schurPol'
+  , skewSchurPol 
+  , skewSchurPol'
+  )
   where
 import           Prelude 
   hiding ((*), (+), (-), (/), (^), (*>), product, sum, fromIntegral, fromInteger)
@@ -38,19 +54,19 @@                                             , fromList )
 import           Math.Combinat.Permutations ( permuteMultiset )
 
--- | Jack polynomial
+-- | Jack polynomial.
 jackPol' 
   :: Int       -- ^ number of variables
-  -> Partition -- ^ partition of integers
+  -> Partition -- ^ integer partition 
   -> Rational  -- ^ Jack parameter
   -> Char      -- ^ which Jack polynomial, @'J'@, @'C'@, @'P'@ or @'Q'@
   -> QSpray
 jackPol' = jackPol
 
--- | Jack polynomial
+-- | Jack polynomial.
 jackPol :: forall a. (Eq a, AlgField.C a)
   => Int       -- ^ number of variables
-  -> Partition -- ^ partition of integers
+  -> Partition -- ^ integer partition 
   -> a         -- ^ Jack parameter
   -> Char      -- ^ which Jack polynomial, @'J'@, @'C'@, @'P'@ or @'Q'@
   -> Spray a
@@ -121,7 +137,7 @@                         | otherwise =
                             jck' nu' (arr // [(_N_lambda_nu_m, Just ss)]) 
 
--- | Skew Jack polynomial
+-- | Skew Jack polynomial.
 skewJackPol :: 
     (Eq a, AlgField.C a) 
   => Int       -- ^ number of variables
@@ -155,7 +171,7 @@                 (repeat coeff))
         ) (DM.assocs msCombo)
 
--- | Skew Jack polynomial
+-- | Skew Jack polynomial.
 skewJackPol' :: 
      Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -165,14 +181,16 @@   -> QSpray
 skewJackPol' = skewJackPol
 
--- | Zonal polynomial
+-- | Zonal polynomial. The zonal polynomials are the 
+-- Jack \(C\)-polynomials with Jack parameter \(\alpha=2\).
 zonalPol' 
   :: Int       -- ^ number of variables
   -> Partition -- ^ partition of integers
   -> QSpray
 zonalPol' = zonalPol
 
--- | Zonal polynomial
+-- | Zonal polynomial. The zonal polynomials are the 
+-- Jack \(C\)-polynomials with Jack parameter \(\alpha=2\).
 zonalPol :: (Eq a, AlgField.C a) 
   => Int       -- ^ number of variables
   -> Partition -- ^ partition of integers
@@ -180,7 +198,7 @@ zonalPol n lambda = 
   jackPol n lambda (fromInteger 2) 'C'
 
--- | Skew zonal polynomial
+-- | Skew zonal polynomial.
 skewZonalPol' 
   :: Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -188,7 +206,7 @@   -> QSpray
 skewZonalPol' = skewZonalPol
 
--- | Zonal polynomial
+-- | Skew zonal polynomial.
 skewZonalPol :: (Eq a, AlgField.C a) 
   => Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -197,14 +215,16 @@ skewZonalPol n lambda mu = 
   skewJackPol n lambda mu (fromInteger 2) 'C'
 
--- | Schur polynomial
+-- | Schur polynomial. The Schur polynomials are the 
+-- Jack \(P\)-polynomials with Jack parameter \(\alpha=1\).
 schurPol' 
   :: Int       -- ^ number of variables
   -> Partition -- ^ partition of integers
   -> QSpray 
 schurPol' = schurPol
 
--- | Schur polynomial
+-- | Schur polynomial. The Schur polynomials are the 
+-- Jack \(P\)-polynomials with Jack parameter \(\alpha=1\).
 schurPol :: forall a. (Eq a, AlgRing.C a)
   => Int       -- ^ number of variables
   -> Partition -- ^ partition of integers
src/Math/Algebra/JackSymbolicPol.hs view
@@ -5,14 +5,21 @@ License     : GPL-3
 Maintainer  : laurent_step@outlook.fr
 
-Computation of Jack polynomials with a symbolic Jack parameter. 
-See README for examples and references.
+Computation of Jack polynomials and skew Jack polynomials with a 
+symbolic Jack parameter. See README for examples and references.
 -}
 
 {-# LANGUAGE BangPatterns        #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 module Math.Algebra.JackSymbolicPol
-  ( jackSymbolicPol, jackSymbolicPol', skewJackSymbolicPol, skewJackSymbolicPol' )
+  ( 
+  -- * Jack polynomial with symbolic Jack parameter
+    jackSymbolicPol
+  , jackSymbolicPol'
+  -- * Skew Jack polynomial with symbolic Jack parameter
+  , skewJackSymbolicPol
+  , skewJackSymbolicPol'
+  )
   where
 import           Prelude 
   hiding ((/), (^), (*>), product, fromIntegral, fromInteger, recip)
@@ -40,18 +47,18 @@ import           Math.Combinat.Permutations ( permuteMultiset )
 
 
--- | Jack polynomial with symbolic Jack parameter
+-- | Jack polynomial with a symbolic Jack parameter.
 jackSymbolicPol' 
   :: Int       -- ^ number of variables
-  -> Partition -- ^ partition of integers
+  -> Partition -- ^ integer partition 
   -> Char      -- ^ which Jack polynomial, @'J'@, @'C'@, @'P'@ or @'Q'@
   -> ParametricQSpray
 jackSymbolicPol' = jackSymbolicPol
 
--- | Jack polynomial with symbolic Jack parameter
+-- | Jack polynomial with a symbolic Jack parameter.
 jackSymbolicPol :: forall a. (Eq a, AlgField.C a) 
   => Int       -- ^ number of variables
-  -> Partition -- ^ partition of integers
+  -> Partition -- ^ integer partition 
   -> Char      -- ^ which Jack polynomial, @'J'@, @'C'@, @'P'@ or @'Q'@
   -> ParametricSpray a
 jackSymbolicPol n lambda which =
@@ -118,6 +125,7 @@                         | otherwise =
                             jck' nu' (arr // [(_N_lambda_nu_m, Just ss)]) 
 
+-- | Skew Jack polynomial with a symbolic Jack parameter.
 skewJackSymbolicPol :: 
     (Eq a, AlgField.C a) 
   => Int       -- ^ number of variables
@@ -150,6 +158,7 @@                 (repeat rOS))
         ) (DM.assocs msCombo)
 
+-- | Skew Jack polynomial with a symbolic Jack parameter.
 skewJackSymbolicPol' :: 
      Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
src/Math/Algebra/SymmetricPolynomials.hs view
@@ -1,6 +1,6 @@ {-|
-Module      : Math.Algebra.Jack.SymmetricPolynomials
-Description : Some utilities for Jack polynomials.
+Module      : Math.Algebra.SymmetricPolynomials
+Description : More symmetric polynomials.
 Copyright   : (c) Stéphane Laurent, 2024
 License     : GPL-3
 Maintainer  : laurent_step@outlook.fr
@@ -9,7 +9,7 @@ A considerably shorter expression is obtained by writing the polynomial as 
 a linear combination of the monomial symmetric polynomials instead, which is 
 always possible since Jack polynomials are symmetric. This is the initial 
-motivation of this module. But now it contains more stuff dealing with 
+motivation of this module. But now it contains much more stuff dealing with 
 symmetric polynomials.
 -}
 {-# LANGUAGE FlexibleContexts    #-}
@@ -56,11 +56,6 @@   , symbolicHallInnerProduct
   , symbolicHallInnerProduct'
   , symbolicHallInnerProduct''
-  -- * Kostka numbers
-  , kostkaNumbers
-  , symbolicKostkaNumbers
-  , skewKostkaNumbers
-  , symbolicSkewKostkaNumbers
   -- * Kostka-Foulkes polynomials
   , kostkaFoulkesPolynomial
   , kostkaFoulkesPolynomial'
@@ -171,7 +166,6 @@                                                   , RatioOfQSprays
                                                   , constantRatioOfSprays
                                                   , zeroRatioOfSprays
-                                                  , unitRatioOfSprays
                                                   , prettyRatioOfQSpraysXYZ
                                                   , showNumSpray
                                                   , showQSpray
@@ -192,8 +186,6 @@                                                   , sprayToMap
                                                   , comboToSpray 
                                                   , _inverseKostkaMatrix
-                                                  , _kostkaNumbers
-                                                  , _symbolicKostkaNumbers
                                                   , _inverseSymbolicKostkaMatrix
                                                   , _kostkaFoulkesPolynomial
                                                   , _skewKostkaFoulkesPolynomial
@@ -217,8 +209,6 @@                                                   , macdonaldJinMSPbasis
                                                   , inverseKostkaNumbers
                                                   , skewSchurLRCoefficients
-                                                  , skewJackInMSPbasis
-                                                  , skewSymbolicJackInMSPbasis
                                                   )
 import           Math.Algebra.JackPol             ( 
                                                     schurPol
@@ -562,7 +552,7 @@     f lambda coeff1 coeff2 = 
       multabFunc (zlambda' lambda) (coeff1 AlgRing.* coeff2)
 
--- | Hall inner product with Jack parameter, aka Jack-scalar product. It 
+-- | Hall inner product with Jack parameter, aka Jack scalar product. It 
 -- makes sense only for symmetric sprays, and the symmetry is not checked. 
 hallInnerProduct :: 
   (Eq a, AlgField.C a)
@@ -572,7 +562,7 @@   -> a 
 hallInnerProduct = _hallInnerProduct psCombination (AlgRing.*)
 
--- | Hall inner product with parameter. Same as @hallInnerProduct@ but 
+-- | Hall inner product with Jack parameter. Same as @hallInnerProduct@ but 
 -- with other constraints on the base ring of the sprays.
 hallInnerProduct' :: 
   (Eq a, AlgMod.C Rational a, AlgRing.C a)
@@ -582,7 +572,7 @@   -> a 
 hallInnerProduct' = _hallInnerProduct psCombination' (AlgRing.*)
 
--- | Hall inner product with parameter. Same as @hallInnerProduct@ but 
+-- | Hall inner product with Jack parameter. Same as @hallInnerProduct@ but 
 -- with other constraints on the base ring of the sprays. It is applicable 
 -- to @Spray Int@ sprays.
 hallInnerProduct'' :: 
@@ -600,7 +590,7 @@     qspray1 = asQSpray spray1
     qspray2 = asQSpray spray2
 
--- | Hall inner product with parameter for parametric sprays, because the
+-- | Hall inner product with Jack parameter for parametric sprays, because the
 -- type of the parameter in @hallInnerProduct@ is strange. For example, a
 -- @ParametricQSpray@ spray is a @Spray RatioOfQSprays@ spray, and it makes
 -- more sense to compute the Hall product with a @Rational@ parameter then 
@@ -619,7 +609,7 @@   -> b 
 hallInnerProduct''' = _hallInnerProduct psCombination (AlgMod.*>) 
 
--- | Hall inner product with parameter for parametric sprays. Same as 
+-- | Hall inner product with Jack parameter for parametric sprays. Same as 
 -- @hallInnerProduct'''@ but with other constraints on the types. It is 
 -- applicable to @SimpleParametricQSpray@ sprays, while @hallInnerProduct'''@ 
 -- is not.
@@ -641,7 +631,7 @@     spray1' = HM.map constantSpray spray1
     spray2' = HM.map constantSpray spray2
 
--- | Hall inner product with symbolic parameter. See README for some examples.
+-- | Hall inner product with symbolic Jack parameter. See README for some examples.
 symbolicHallInnerProduct :: 
   (Eq a, AlgField.C a) => Spray a -> Spray a -> Spray a
 symbolicHallInnerProduct =
@@ -651,14 +641,14 @@         (_psCombination (\spray_a r -> fromRational r *^ spray_a)) (^*^)
     ) 
 
--- | Hall inner product with symbolic parameter. Same as @symbolicHallInnerProduct@ 
+-- | Hall inner product with symbolic Jack parameter. Same as @symbolicHallInnerProduct@ 
 -- but with other type constraints.
 symbolicHallInnerProduct' :: 
   (Eq a, AlgMod.C Rational (Spray a), AlgRing.C a) 
   => Spray a -> Spray a -> Spray a
 symbolicHallInnerProduct' =  _symbolicHallInnerProduct (hallInnerProduct')
 
--- | Hall inner product with symbolic parameter. Same as @symbolicHallInnerProduct@ 
+-- | Hall inner product with symbolic Jack parameter. Same as @symbolicHallInnerProduct@ 
 -- but with other type constraints. It is applicable to @Spray Int@ sprays.
 symbolicHallInnerProduct'' :: forall a. Real a => Spray a -> Spray a -> QSpray
 symbolicHallInnerProduct'' spray1 spray2 = 
@@ -848,69 +838,6 @@   => Spray a -> Map Partition a
 schurCombination' = _schurCombination (flip (AlgMod.*>))
 
--- | Kostka numbers \(K_{\lambda,\mu}(\alpha)\) for a given weight of the 
--- partitions \(\lambda\) and \(\mu\) and a given Jack parameter 
--- \(\alpha\) (these are the standard Kostka numbers when
--- \(\alpha=1\)). This returns a map whose keys represent the 
--- partitions \(\lambda\) and the value attached to a partition \(\lambda\)
--- represents the map \(\mu \mapsto K_{\lambda,\mu}(\alpha)\) where the 
--- partition \(\mu\) is included in the keys of this map if and only if 
--- \(K_{\lambda,\mu}(\alpha) \neq 0\).
-kostkaNumbers :: 
-     Int      -- ^ weight of the partitions
-  -> Rational -- ^ Jack parameter
-  -> Map Partition (Map Partition Rational)
-kostkaNumbers weight alpha 
-  | weight < 0 = 
-      error "kostkaNumbers: negative weight."
-  | weight == 0 =
-      DM.singleton [] (DM.singleton [] 1)
-  | otherwise =
-      _kostkaNumbers weight weight alpha 'P'
-
--- | Kostka numbers \(K_{\lambda,\mu}(\alpha)\) with symbolic Jack parameter \(\alpha\) 
--- for a given weight of the partitions \(\lambda\) and \(\mu\). This returns a map 
--- whose keys represent the 
--- partitions \(\lambda\) and the value attached to a partition \(\lambda\)
--- represents the map \(\mu \mapsto K_{\lambda,\mu}(\alpha)\) where the 
--- partition \(\mu\) is included in the keys of this map if and only if 
--- \(K_{\lambda,\mu}(\alpha) \neq 0\).
-symbolicKostkaNumbers :: Int -> Map Partition (Map Partition RatioOfQSprays)
-symbolicKostkaNumbers weight
-  | weight < 0 = 
-      error "symbolicKostkaNumbers: negative weight."
-  | weight == 0 =
-      DM.singleton [] (DM.singleton [] unitRatioOfSprays)
-  | otherwise =
-      _symbolicKostkaNumbers weight weight 'P'
-
--- | Skew Kostka numbers \(K_{\lambda/\mu, \nu}(\alpha)\) with a given Jack 
--- parameter \(\alpha\) and a given skew partition \(\lambda/\mu\). 
--- This returns a map whose keys represent the partitions \(\nu\).
-skewKostkaNumbers ::
-     Rational  -- ^ Jack parameter
-  -> Partition -- ^ outer partition of the skew partition
-  -> Partition -- ^ inner partition of the skew partition
-  -> Map Partition Rational
-skewKostkaNumbers alpha lambda mu 
-  | not (isSkewPartition lambda mu) =
-     error "skewKostkaNumbers: invalid skew partition."
-  | otherwise = 
-      DM.map snd (skewJackInMSPbasis alpha 'P' lambda mu)
-
--- | Skew Kostka numbers \(K_{\lambda/\mu, \nu}(\alpha)\) with symbolic Jack 
--- parameter \(\alpha\) for a given skew partition \(\lambda/\mu\). 
--- This returns a map whose keys represent the partitions \(\nu\).
-symbolicSkewKostkaNumbers ::
-     Partition -- ^ outer partition of the skew partition
-  -> Partition -- ^ inner partition of the skew partition
-  -> Map Partition RatioOfQSprays
-symbolicSkewKostkaNumbers lambda mu 
-  | not (isSkewPartition lambda mu) =
-     error "symbolicSkewKostkaNumbers: invalid skew partition."
-  | otherwise = 
-      DM.map snd (skewSymbolicJackInMSPbasis 'P' lambda mu)
-
 -- | monomial symmetric polynomials in Jack polynomials basis
 msPolynomialsInJackBasis :: 
   (Eq a, AlgField.C a)
@@ -1031,10 +958,12 @@   -> QSpray
 skewKostkaFoulkesPolynomial' = skewKostkaFoulkesPolynomial 
 
--- | qt-Kostka polynomials, aka Kostka-Macdonald polynomials. They are usually
--- denoted by \(K(\lambda, \mu)\) for two integer partitions \(\lambda\) and
--- \(\mu\). For a given partition \(\mu\), the function returns the polynomials
--- \(K(\lambda, \mu)\) for all partitions \(\lambda\) of the same weight as 
+-- | qt-Kostka polynomials, aka Kostka-Macdonald polynomials. These are bivariate
+-- symmetric polynomials usually denoted by \(K_{\lambda, \mu}(q,t)\) for two 
+-- integer partitions \(\lambda\) and \(mu\), and \(q\) and \(t\) denote the 
+-- variables. One obtains the Kostka-Foulkes polynomials by substituting \(q\) 
+-- with \(0\). For a given partition \(\mu\), the function returns the polynomials
+-- \(K_{\lambda, \mu}(q,t)\) for all partitions \(\lambda\) of the same weight as 
 -- \(\mu\).
 qtKostkaPolynomials :: 
   (Eq a, AlgField.C a) 
@@ -1071,22 +1000,26 @@       )
       DM.empty psCombo
 
--- | qt-Kostka polynomials, aka Kostka-Macdonald polynomials. They are usually
--- denoted by \(K(\lambda, \mu)\) for two integer partitions \(\lambda\) and
--- \(mu\). For a given partition \(\mu\), the function returns the polynomials
--- \(K(\lambda, \mu)\) for all partitions \(\lambda\) of the same weight as 
+-- | qt-Kostka polynomials, aka Kostka-Macdonald polynomials. These are bivariate
+-- symmetric polynomials usually denoted by \(K_{\lambda, \mu}(q,t)\) for two 
+-- integer partitions \(\lambda\) and \(mu\), and \(q\) and \(t\) denote the 
+-- variables. One obtains the Kostka-Foulkes polynomials by substituting \(q\) 
+-- with \(0\). For a given partition \(\mu\), the function returns the polynomials
+-- \(K_{\lambda, \mu}(q,t)\) for all partitions \(\lambda\) of the same weight as 
 -- \(\mu\).
 qtKostkaPolynomials' :: 
      Partition 
   -> Map Partition QSpray
 qtKostkaPolynomials' = qtKostkaPolynomials
 
--- | Skew qt-Kostka polynomials. They are usually
--- denoted by \(K(\lambda/\mu, \nu)\) for two integer partitions \(\lambda\) and
--- \(\mu\) defining a skew partition and an integer partition \(\nu\). 
--- For given partitions \(\lambda\) and \(\mu\), the function returns the polynomials
--- \(K(\lambda/\mu, \nu)\) for all partitions \(\nu\) of the same weight as 
--- the skew partition.
+-- | Skew qt-Kostka polynomials. These are bivariate
+-- symmetric polynomials usually denoted by \(K_{\lambda/\mu, \nu}(q,t)\) for two 
+-- integer partitions \(\lambda\) and \(mu\) defining a skew partition, an 
+-- integer partition \(\nu\), and \(q\) and \(t\) denote the 
+-- variables. One obtains the skew Kostka-Foulkes polynomials by substituting \(q\) 
+-- with \(0\). For given partitions \(\lambda\) and \(\mu\), the function returns 
+-- the polynomials \(K_{\lambda/\mu, \nu}(q,t)\) for all partitions \(\nu\) of the 
+-- same weight as the skew partition.
 qtSkewKostkaPolynomials :: 
   (Eq a, AlgField.C a) 
   => Partition -- ^ outer partition of the skew partition
@@ -1112,12 +1045,14 @@                 (DM.intersectionWith (.^) lrCoeffs (qtKostkaPolynomials nu'))
         )
 
--- | Skew qt-Kostka polynomials. They are usually
--- denoted by \(K(\lambda/\mu, \nu)\) for two integer partitions \(\lambda\) and
--- \(\mu\) defining a skew partition and an integer partition \(\nu\). 
--- For given partitions \(\lambda\) and \(\mu\), the function returns the polynomials
--- \(K(\lambda/\mu, \nu)\) for all partitions \(\nu\) of the same weight as 
--- the skew partition.
+-- | Skew qt-Kostka polynomials. These are bivariate
+-- symmetric polynomials usually denoted by \(K_{\lambda/\mu, \nu}(q,t)\) for two 
+-- integer partitions \(\lambda\) and \(mu\) defining a skew partition, an 
+-- integer partition \(\nu\), and \(q\) and \(t\) denote the 
+-- variables. One obtains the skew Kostka-Foulkes polynomials by substituting \(q\) 
+-- with \(0\). For given partitions \(\lambda\) and \(\mu\), the function returns 
+-- the polynomials \(K_{\lambda/\mu, \nu}(q,t)\) for all partitions \(\nu\) of the 
+-- same weight as the skew partition.
 qtSkewKostkaPolynomials' :: 
      Partition -- ^ outer partition of the skew partition
   -> Partition -- ^ inner partition of the skew partition
@@ -1125,7 +1060,9 @@ qtSkewKostkaPolynomials' = qtSkewKostkaPolynomials
 
 -- | Hall-Littlewood polynomial of a given partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in a single parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). When substituting \(t\) with \(0\) in the 
+-- Hall-Littlewood \(P\)-polynomials, one obtains the Schur polynomials.
 hallLittlewoodPolynomial :: 
   (Eq a, AlgRing.C a) 
   => Int       -- ^ number of variables
@@ -1152,7 +1089,9 @@             (\mu c -> c *^ (HM.map constantSpray (schurPol n mu))) coeffs)
 
 -- | Hall-Littlewood polynomial of a given partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in a single parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). When substituting \(t\) with \(0\) in the 
+-- Hall-Littlewood \(P\)-polynomials, one obtains the Schur polynomials.
 hallLittlewoodPolynomial' :: 
      Int       -- ^ number of variables
   -> Partition -- ^ integer partition
@@ -1174,7 +1113,9 @@       _transitionMatrixHallLittlewoodSchur which weight
 
 -- | Skew Hall-Littlewood polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in a single parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). When substituting \(t\) with \(0\) in the skew
+-- Hall-Littlewood \(P\)-polynomials, one obtains the skew Schur polynomials.
 skewHallLittlewoodPolynomial :: (Eq a, AlgRing.C a)
   => Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -1196,7 +1137,9 @@         else skewHallLittlewoodQ n (S.fromList lambda) (S.fromList mu)
   
 -- | Skew Hall-Littlewood polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in one parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). When substituting \(t\) with \(0\) in the skew
+-- Hall-Littlewood \(P\)-polynomials, one obtains the skew Schur polynomials.
 skewHallLittlewoodPolynomial' :: 
      Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -1235,8 +1178,9 @@       | (rho, c) <- chi_lambda_mu_rhos, c /= 0
       ]
 
--- | t-Schur polynomial. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in a single parameter.
+-- | t-Schur polynomial. This is a multivariate symmetric polynomial whose 
+-- coefficients are polynomial in a single parameter usually denoted by \(t\).
+-- One obtains the Schur polynomials by substituting \(t\) with \(0\). 
 tSchurPolynomial ::
   (Eq a, AlgField.C a)
   => Int        -- ^ number of variables
@@ -1252,8 +1196,9 @@         (\i j -> AlgRing.fromInteger i AlgField./ AlgRing.fromInteger j)
           n lambda []
 
--- | t-Schur polynomial. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in one parameter.
+-- | t-Schur polynomial. This is a multivariate symmetric polynomial whose 
+-- coefficients are polynomial in a single parameter usually denoted by \(t\).
+-- One obtains the Schur polynomials by substituting \(t\) with \(0\). 
 tSchurPolynomial' ::
      Int        -- ^ number of variables
   -> Partition  -- ^ integer partition
@@ -1267,7 +1212,9 @@       _tSkewSchurPolynomial (%) n lambda []
 
 -- | Skew t-Schur polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in one parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). One obtains the skew Schur polynomials by substituting 
+-- \(t\) with \(0\). 
 tSkewSchurPolynomial ::
   (Eq a, AlgField.C a)
   => Int       -- ^ number of variables
@@ -1285,7 +1232,9 @@           n lambda mu
 
 -- | Skew t-Schur polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial whose coefficients are polynomial in one parameter.
+-- symmetric polynomial whose coefficients are polynomial in a single parameter
+-- usually denoted by \(t\). One obtains the skew Schur polynomials by substituting 
+-- \(t\) with \(0\). 
 tSkewSchurPolynomial' ::
      Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -1294,7 +1243,8 @@ tSkewSchurPolynomial' = _tSkewSchurPolynomial (%)
 
 -- | Macdonald polynomial. This is a symmetric multivariate polynomial 
--- depending on two parameters usually denoted by @q@ and @t@.
+-- depending on two parameters usually denoted by \(q\) and \(t\).
+-- Substituting \(q\) with \(0\) yields the Hall-Littlewood polynomials.
 --
 -- >>> macPoly = macdonaldPolynomial 3 [2, 1] 'P'
 -- >>> putStrLn $ prettySymmetricParametricQSpray ["q", "t"] macPoly
@@ -1321,7 +1271,8 @@         else macdonaldPolynomialQ n lambda
 
 -- | Macdonald polynomial. This is a symmetric multivariate polynomial 
--- depending on two parameters usually denoted by @q@ and @t@.
+-- depending on two parameters usually denoted by \(q\) and \(t\).
+-- Substituting \(q\) with \(0\) yields the Hall-Littlewood polynomials.
 macdonaldPolynomial' ::  
      Int        -- ^ number of variables
   -> Partition  -- ^ integer partition
@@ -1330,7 +1281,8 @@ macdonaldPolynomial' = macdonaldPolynomial
 
 -- | Skew Macdonald polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial with two parameters.
+-- symmetric polynomial with two parameters usually denoted by \(q\) and \(t\).
+-- Substituting \(q\) with \(0\) yields the skew Hall-Littlewood polynomials.
 skewMacdonaldPolynomial :: (Eq a, AlgField.C a)
   => Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
@@ -1352,7 +1304,8 @@         else skewMacdonaldPolynomialQ n lambda mu
 
 -- | Skew Macdonald polynomial of a given skew partition. This is a multivariate 
--- symmetric polynomial with two parameters.
+-- symmetric polynomial with two parameters usually denoted by \(q\) and \(t\).
+-- Substituting \(q\) with \(0\) yields the skew Hall-Littlewood polynomials.
 skewMacdonaldPolynomial' :: 
      Int       -- ^ number of variables
   -> Partition -- ^ outer partition of the skew partition
tests/Main.hs view
@@ -3,11 +3,20 @@ import qualified Algebra.Module                 as AlgMod
 import qualified Data.HashMap.Strict            as HM
 import qualified Data.IntMap.Strict             as IM
+import           Data.List                      ( 
+                                                  (\\)
+                                                )
 import qualified Data.Map.Strict                as DM
 import           Data.Matrix                    ( 
                                                   fromLists
                                                 )
 import Data.Ratio                               ( (%) )
+import           Math.Algebra.Combinatorics     ( 
+                                                  kostkaNumbers
+                                                , symbolicKostkaNumbers
+                                                , skewKostkaNumbers
+                                                , skewGelfandTsetlinPatterns
+                                                )
 import Math.Algebra.Hspray                      ( FunctionLike (..)
                                                 , Spray, QSpray
                                                 , SimpleParametricSpray
@@ -58,8 +67,6 @@                                                 , jackCombination
                                                 , jackSymbolicCombination
                                                 , jackSymbolicCombination'
-                                                , kostkaNumbers
-                                                , symbolicKostkaNumbers
                                                 , kostkaFoulkesPolynomial
                                                 , skewKostkaFoulkesPolynomial'
                                                 , hallLittlewoodPolynomial
@@ -122,8 +129,23 @@   "Tests"
 
   [ 
-  testCase "Jack polynomial branching rule" $ do
+
+  testCase "Skew Kostka numbers are numbers of skew Gelfand-Tsetlin patterns" $ do
     let
+      lambda = [5, 4, 3, 2, 1]
+      mu = [2, 2, 2, 1]
+      skNumbers = skewKostkaNumbers 1 lambda mu
+      nus = DM.keys skNumbers
+      ellGTpatterns = map (toRational . length . skewGelfandTsetlinPatterns lambda mu) nus
+      parts = map fromPartition (partitions (sum lambda - sum mu))
+      nus' = parts \\ nus
+      ellGTpatterns' = map (length . skewGelfandTsetlinPatterns lambda mu) nus'
+    assertEqual ""
+      (ellGTpatterns, ellGTpatterns')
+      (DM.elems skNumbers, replicate (length nus') 0)
+
+  , testCase "Jack polynomial branching rule" $ do
+    let
       nx = 2
       ny = 2
       lambda = [2, 2]
@@ -156,6 +178,20 @@           | mu <- [[], [1], [2], [1,1], [2,1], [2,2]]
           ]
     assertEqual "" jackPoly expected
+
+  , testCase "Jack combination of skew Jack with Hall inner product" $ do
+    let
+      lambda = [3, 1, 1]
+      mu = [2, 1]
+      alpha = 2 :: Rational
+      n = 5
+      skewJackPoly = skewJackPol' n lambda mu alpha 'Q'
+      jackCombo = jackCombination alpha 'Q' skewJackPoly
+      jackQpoly = jackPol' n lambda alpha 'Q'
+      jackPpoly = jackPol' n mu alpha 'P'
+      jackPpolys = DM.mapWithKey (\nu _ -> jackPol' n nu alpha 'P') jackCombo
+      fs = DM.map (\poly -> hallInnerProduct jackQpoly (jackPpoly ^*^ poly) alpha) jackPpolys
+    assertEqual "" jackCombo fs
     
   , testCase "t-Schur polynomial" $ do
     let