-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Combinatorial species lite -- -- A simple library for combinatorial species with no dependencies but -- base. If you want something more substantial, then you will most -- likely be happier with the excellent species package by Brent Yorgey: -- http://hackage.haskell.org/package/species @package spe @version 0.5 -- | License : BSD-3 -- -- Species lite module Math.Spe -- | A combinatorial species is an endofunctor on the category of -- finite sets and bijections. We approximate this by a function as -- defined. type Spe a c = [a] -> [c] -- | Species addition. (.+.) :: Spe a b -> Spe a c -> Spe a (Either b c) -- | The sum of a list of species of the same type. assemble :: [Spe a c] -> Spe a c -- | Species multiplication. (.*.) :: Spe a b -> Spe a c -> Spe a (b, c) -- | Ordinal L-species multiplication. Give that the underlying set is -- sorted , elements in the left factor will be smaller than those in the -- right factor. (<*.) :: Spe a b -> Spe a c -> Spe a (b, c) -- | The product of a list of species. prod :: [Spe a b] -> Spe a [b] -- | The ordinal product of a list of L-species. ordinalProd :: [Spe a b] -> Spe a [b] -- | The power F^k for species F. (.^) :: Spe a b -> Int -> Spe a [b] -- | The ordinal power F^k for L-species F. (<^) :: Spe a b -> Int -> Spe a [b] -- | The composition F(G) of two species F and G. compose :: Spe [a] b -> Spe a c -> Spe a (b, [c]) -- | This is just a synonym for compose. It is usually used infix. o :: Spe [a] b -> Spe a c -> Spe a (b, [c]) -- | The derivative d^k/dX^k F of a species F. kDiff :: Int -> Spe (Maybe a) b -> Spe a b -- | The first derivative. diff :: Spe (Maybe a) b -> Spe a b -- | f ofSize n is like f on n element sets, but empty otherwise. ofSize :: Spe a c -> Int -> Spe a c -- | No structure on the empty set, but otherwise the same. nonEmpty :: Spe a c -> Spe a c -- | The species of sets. set :: Spe a [a] -- | The species characteristic of the empty set; the identity with respect -- to species multiplication. one :: Spe a () -- | The singleton species. x :: Spe a a -- | The species of ballots with k blocks kBal :: Int -> Spe a [[a]] -- | The species of ballots. bal :: Spe a [[a]] -- | The species of set partitions. par :: Spe a [[a]] -- | The species of lists (linear orders) with k elements. kList :: Int -> Spe a [a] -- | The species of lists (linear orders) list :: Spe a [a] -- | The species of cycles. cyc :: Spe a [a] -- | The species of permutations, where a permutation is a set of cycles. perm :: Spe a [[a]] -- | The species of k element subsets. kSubset :: Int -> Spe a ([a], [a]) -- | The species of subsets. subset :: Spe a [a]