úÎ9ç4}L      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK LMNOPQRSTUVW LMNOPQRSTUVW LMNOPQRSTUVW"XYZ[\]  Synonym for . <Generates all sequences of nested parentheses of length 2n. > Order is lexigraphic (when right parentheses are considered  smaller then left ones).  Based on " Algorithm P") in Knuth, but less efficient because of  the " idiomatic" code. *Generates all binary trees with n nodes. # = Catalan(n) = \frac { 1 } { n+1 } \binom { 2n } { n }. GThis is also the counting function for forests and nested parentheses. >Generates all binary trees with n nodes. The naive algorithm. ^_`abcdefgh   Permutations of [1..n]* in lexicographic order, naive algorithm. # = n! +Generates all permutations of a multiset. ! The order is lexicographic. # = \frac { (sum_i n_i) ! } { \prod_i (n_i !) } *Generates all permutations of a multiset  (based on " algorithm L"& in Knuth; somewhat less efficient). ! The order is lexicographic. ;The additional invariant enforced here is that partitions ; are monotone decreasing sequences of positive integers. iSorts the input. &Assumes that the input is decreasing. )Checks whether the input is a partition.  !#The first element of the sequence. "The length of the sequence. #$The weight of the partition 5 (that is, the sum of the corresponding sequence). %#The dual (or conjugate) partition. &';Partitions of d, fitting into a given rectangle, as lists. (height,width) d (SPartitions of d, fitting into a given rectangle. The order is again lexicographic. (height,width) d )*Partitions of d, as lists +Partitions of d. ,-/All partitions fitting into a given rectangle. (height,width) .%All partitions up to a given degree. /# = \binom { h+w } { h } 0 !"#$%&'()*+,-./0 !"#$&%'()*+,-./0 !"#$%&'()*+,-./0 123456789:*Standard Young tableaux of a given shape. " Adapted from John Stembridge,   ?http://www.math.lsa.umich.edu/~jrs/software/SFexamples/tableaux. ;hook-length formula 123456789:; 123456789:; 123456789:;<CCombinations fitting into a given shape and having a given degree. ) The order is lexicographic, that is, 0 sort cs == cs where cs = combinations' shape k shape sum =>-All combinations fitting into a given shape. ? Combinations of a given length. length sum @# = \binom { len+d-1 } { len-1 } A)Positive combinations of a given length. length sum B<=>?@AB<=>?@AB<=>?@AB C"Tuples"A fitting into a give shape. The order is lexicographic, that is,  ( sort ts == ts where ts = tuples' shape  Example:  tuples' [2,3] = M [[0,0],[0,1],[0,2],[0,3],[1,0],[1,1],[1,2],[1,3],[2,0],[2,1],[2,2],[2,3]] D positive "tuples" fitting into a give shape. E# = \prod_i (m_i + 1) F# = \ prod_i m_i Glength (width) maximum (height) Hlength (width) maximum (height) I# = (m+1) ^ len J# = m ^ len K CDEFGHIJK CDEFGHIJK CDEFGHIJKQdefgh  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnomnpmnqmnrmns$t combinat-0.1Math.Combinat.TreesMath.Combinat.PermutationsMath.Combinat.PartitionsMath.Combinat.TableauxMath.Combinat.CombinationsMath.Combinat.TuplesMath.Combinat.Helper Math.CombinatParen RightParen LeftParenBinTreeLeafBranchleafparenthesesToStringstringToParenthesesforestToNestedParenthesesforestToBinaryTreenestedParenthesesToForestnestedParenthesesToForestUnsafenestedParenthesesToBinaryTree#nestedParenthesesToBinaryTreeUnsafebinaryTreeToNestedParenthesesbinaryTreeToForestnestedParenthesesfasc4A_algorithm_P binaryTreescountBinaryTreesbinaryTreesNaive _permutationscountPermutationspermute countPermutefasc2B_algorithm_L Partition mkPartitiontoPartitionUnsafe toPartition isPartition fromPartitionheightwidth heightWidthweight dualPartition_dualPartition _partitions' partitions'countPartitions' _partitions partitionscountPartitionsallPartitions' allPartitionscountAllPartitions'countAllPartitionsTableau_shapeshape dualTableauhooksrowWordrowWordToTableau columnWordcolumnWordToTableaustandardYoungTableauxcountStandardYoungTableaux combinations'countCombinations'allCombinations' combinationscountCombinations combinations1countCombinations1tuples'tuples1' countTuples' countTuples1'tuplestuples1 countTuples countTuples1 binaryTuplesdebugfromJustnestreverseOrderingreverseCompare factorialbinomial intToBool boolToIntunfold1unfold unfoldEitherLocCtxRLTop parenToCharleftrighttopupupmostmodifycontainers-0.3.0.0 Data.Tree subForest rootLabelNodeTreeForest