Safe Haskell | Safe-Infered |
---|

A module defining the following Combinatorial Hopf Algebras, together with coalgebra or Hopf algebra morphisms between them:

- SSym, the Malvenuto-Reutnenauer Hopf algebra of permutations
- YSym, the (dual of the) Loday-Ronco Hopf algebra of binary trees
- QSym, the Hopf algebra of quasi-symmetric functions (having a basis indexed by compositions)
- Sh, the Shuffle Hopf algebra

- newtype Shuffle a = Sh [a]
- sh :: [a] -> Vect Q (Shuffle a)
- shuffles :: [a] -> [a] -> [[a]]
- deconcatenations :: [a] -> [([a], [a])]
- newtype SSymF = SSymF [Int]
- ssymF :: [Int] -> Vect Q SSymF
- shiftedConcat :: SSymF -> SSymF -> SSymF
- prop_Associative :: Eq t => (t -> t -> t) -> (t, t, t) -> Bool
- flatten :: (Enum t, Num t, Ord a) => [a] -> [t]
- newtype SSymM = SSymM [Int]
- ssymM :: [Int] -> Vect Q SSymM
- inversions :: (Enum t, Num t, Ord a) => [a] -> [(t, t)]
- weakOrder :: (Ord a1, Ord a) => [a] -> [a1] -> Bool
- mu :: (Eq a, Num a1) => ([a], a -> a -> Bool) -> a -> a -> a1
- toSSymF :: (Eq k, Num k) => Vect k SSymM -> Vect k SSymF
- toSSymM :: (Eq k, Num k) => Vect k SSymF -> Vect k SSymM
- data PBT a
- newtype YSymF a = YSymF (PBT a)
- ysymF :: PBT a -> Vect Q (YSymF a)
- nodecount :: Num a => PBT t -> a
- leafcount :: Num a => PBT t -> a
- prefix :: PBT a -> [a]
- shapeSignature :: Num t => PBT t1 -> [t]
- nodeCountTree :: Num a => PBT t -> PBT a
- leafCountTree :: Num a => PBT t -> PBT a
- lrCountTree :: Num a => PBT t -> PBT (a, a)
- shape :: PBT a -> PBT ()
- numbered :: Num a => PBT t -> PBT a
- splits :: PBT a -> [(PBT a, PBT a)]
- multisplits :: (Eq a, Num a) => a -> PBT a1 -> [[PBT a1]]
- graft :: [PBT a] -> PBT a -> PBT a
- newtype YSymM = YSymM (PBT ())
- ysymM :: PBT () -> Vect Q YSymM
- trees :: (Enum t, Eq t, Num t) => t -> [PBT ()]
- covers :: PBT a -> [PBT a]
- tamariUpSet :: Ord a => PBT a -> [PBT a]
- tamariOrder :: PBT t -> PBT t1 -> Bool
- toYSymF :: (Eq k, Num k) => Vect k YSymM -> Vect k (YSymF ())
- toYSymM :: (Eq k, Num k) => Vect k (YSymF ()) -> Vect k YSymM
- compositions :: Int -> [[Int]]
- quasiShuffles :: [Int] -> [Int] -> [[Int]]
- newtype QSymM = QSymM [Int]
- qsymM :: [Int] -> Vect Q QSymM
- coarsenings :: Num a => [a] -> [[a]]
- refinements :: [Int] -> [[Int]]
- newtype QSymF = QSymF [Int]
- qsymF :: [Int] -> Vect Q QSymF
- toQSymF :: (Eq k, Num k) => Vect k QSymM -> Vect k QSymF
- toQSymM :: (Eq k, Num k) => Vect k QSymF -> Vect k QSymM
- xvars :: (Enum a, Num a, Show a) => a -> [GlexPoly Q [Char]]
- quasiSymM :: (Integral b, Num a) => [a] -> [b] -> a
- descendingTree :: Ord t => [t] -> PBT t
- descendingTreeMap :: (Eq k, Num k) => Vect k SSymF -> Vect k (YSymF ())
- minPerm :: Num a => PBT t -> [a]
- maxPerm :: Num a => PBT t -> [a]
- leftLeafComposition :: PBT t -> [Int]
- leftLeafComposition' :: YSymF t -> QSymF
- leftLeafCompositionMap :: (Eq k, Num k) => Vect k (YSymF a) -> Vect k QSymF
- descents :: Ord b => [b] -> [Int]
- descentComposition :: Ord b => [b] -> [Int]
- descentMap :: (Eq k, Num k) => Vect k SSymF -> Vect k QSymF
- underComposition :: QSymF -> SSymF
- under :: PBT a -> PBT a -> PBT a
- isUnderIrreducible :: PBT t -> Bool
- underDecomposition :: PBT a -> [PBT a]
- ysymmToSh :: Functor f => f YSymM -> f (Shuffle (PBT ()))

# Documentation

A basis for the shuffle algebra. As a vector space, the shuffle algebra is identical to the tensor algebra. However, we consider a different algebra structure, based on the shuffle product. Together with the deconcatenation coproduct, this leads to a Hopf algebra structure.

Sh [a] |

deconcatenations :: [a] -> [([a], [a])]Source

The fundamental basis for the Malvenuto-Reutenauer Hopf algebra of permutations, SSym.

ssymF :: [Int] -> Vect Q SSymFSource

Construct a fundamental basis element in SSym. The list of ints must be a permutation of [1..n], eg [1,2], [3,4,2,1].

shiftedConcat :: SSymF -> SSymF -> SSymFSource

prop_Associative :: Eq t => (t -> t -> t) -> (t, t, t) -> BoolSource

An alternative "monomial" basis for the Malvenuto-Reutenauer Hopf algebra of permutations, SSym. This basis is related to the fundamental basis by Mobius inversion in the poset of permutations with the weak order.

ssymM :: [Int] -> Vect Q SSymMSource

Construct a monomial basis element in SSym. The list of ints must be a permutation of [1..n], eg [1,2], [3,4,2,1].

inversions :: (Enum t, Num t, Ord a) => [a] -> [(t, t)]Source

toSSymF :: (Eq k, Num k) => Vect k SSymM -> Vect k SSymFSource

Convert an element of SSym represented in the monomial basis to the fundamental basis

toSSymM :: (Eq k, Num k) => Vect k SSymF -> Vect k SSymMSource

Convert an element of SSym represented in the fundamental basis to the monomial basis

A type for (rooted) planar binary trees. The basis elements of the Loday-Ronco Hopf algebra are indexed by these.

Although the trees are labelled, we're really only interested in the shapes of the trees, and hence in the type PBT (). The Algebra, Coalgebra and HopfAlgebra instances all ignore the labels. However, it is convenient to allow labels, as they can be useful for seeing what is going on, and they also make it possible to define various ways to create trees from lists of labels.

The fundamental basis for (the dual of) the Loday-Ronco Hopf algebra of binary trees, YSym.

ysymF :: PBT a -> Vect Q (YSymF a)Source

Construct the element of YSym in the fundamental basis indexed by the given tree

shapeSignature :: Num t => PBT t1 -> [t]Source

nodeCountTree :: Num a => PBT t -> PBT aSource

leafCountTree :: Num a => PBT t -> PBT aSource

lrCountTree :: Num a => PBT t -> PBT (a, a)Source

An alternative monomial basis for (the dual of) the Loday-Ronco Hopf algebra of binary trees, YSym.

ysymM :: PBT () -> Vect Q YSymMSource

Construct the element of YSym in the monomial basis indexed by the given tree

tamariUpSet :: Ord a => PBT a -> [PBT a]Source

The up-set of a binary tree in the Tamari partial order

tamariOrder :: PBT t -> PBT t1 -> BoolSource

toYSymF :: (Eq k, Num k) => Vect k YSymM -> Vect k (YSymF ())Source

Convert an element of YSym represented in the monomial basis to the fundamental basis

toYSymM :: (Eq k, Num k) => Vect k (YSymF ()) -> Vect k YSymMSource

Convert an element of YSym represented in the fundamental basis to the monomial basis

compositions :: Int -> [[Int]]Source

List the compositions of an integer n. For example, the compositions of 4 are [[1,1,1,1],[1,1,2],[1,2,1],[1,3],[2,1,1],[2,2],[3,1],[4]]

quasiShuffles :: [Int] -> [Int] -> [[Int]]Source

A type for the monomial basis for the quasi-symmetric functions, indexed by compositions.

qsymM :: [Int] -> Vect Q QSymMSource

Construct the element of QSym in the monomial basis indexed by the given composition

coarsenings :: Num a => [a] -> [[a]]Source

refinements :: [Int] -> [[Int]]Source

qsymF :: [Int] -> Vect Q QSymFSource

Construct the element of QSym in the fundamental basis indexed by the given composition

toQSymF :: (Eq k, Num k) => Vect k QSymM -> Vect k QSymFSource

Convert an element of QSym represented in the monomial basis to the fundamental basis

toQSymM :: (Eq k, Num k) => Vect k QSymF -> Vect k QSymMSource

Convert an element of QSym represented in the fundamental basis to the monomial basis

descendingTree :: Ord t => [t] -> PBT tSource

descendingTreeMap :: (Eq k, Num k) => Vect k SSymF -> Vect k (YSymF ())Source

A Hopf algebra morphism from SSymF to YSymF

leftLeafComposition :: PBT t -> [Int]Source

leftLeafComposition' :: YSymF t -> QSymFSource

leftLeafCompositionMap :: (Eq k, Num k) => Vect k (YSymF a) -> Vect k QSymFSource

A Hopf algebra morphism from YSymF to QSymF

descentComposition :: Ord b => [b] -> [Int]Source

descentMap :: (Eq k, Num k) => Vect k SSymF -> Vect k QSymFSource

A Hopf algebra morphism from SSymF to QSymF

underComposition :: QSymF -> SSymFSource

isUnderIrreducible :: PBT t -> BoolSource

underDecomposition :: PBT a -> [PBT a]Source