hڼ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE F G H I J K L M N O P Q R S T U VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~SafeAnders Claesson 2014+Anders Claesson <anders.claesson@gmail.com>Safe3The list of minimal sets with respect to inclusion.3The list of maximal sets with respect to inclusion.1A list of all k element subsets of the given set.'A list of all subsets of the given set.Sort and remove duplicates.Anders Claesson 2013-2016+Anders Claesson <anders.claesson@gmail.com>None  An array of s+Construct an array from a list of elements. The list of elements. Slice a ~ into contiguous segments of the given sizes. Each segment size must be positive and they must sum to the size of the array. w `at` i is the value of w at i, where i is in  [0..size w-1]. Like   but without range checking. LThe indices of all elements equal to the query element, in ascending order.<Apply a function to every element of an array and its index.MApply a function to corresponding pairs of elements and their (shared) index.OCreate a new array of the given size that is initialized through an IO action.`Pass a pointer to the array to an IO action; the array may not be modified through the pointer.        Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None ALexicographically, the next bitmask with the same Hamming weight.ones k m< is the set / subsequence of indices whose bits are set in m. Default implementation: :ones m = fromListN (popCount m) $ filter (testBit m) [0..]IA SubSeq is represented by an increasing array of non-negative integers. n `choose` k is the list of subsequences of [0..n-1] with k elements.Lexicographically, the next  with the same Hamming weight. onesCLong m) gives the indices whose bits are set in m.ILexicographically, the next integral number with the same Hamming weight.   Anders Claesson 2013-2016+Anders Claesson <anders.claesson@gmail.com>None 3 A permutation is just a '. By convention a permutation of size n& is understood to be a permutation of [0..n-1].#The unique permutation length zero."The unique permutation length one.The identity permutation.(The reverse of the identity permutation.@Construct a permutation from a list of elements. As opposed to : this is a safe function in the sense that the output of  mkPerm xs& is guaranteed to be a permutation of [0..length xs-1] . E.g., #mkPerm "baxa" == fromList [2,0,3,1].The rank of the given permutation, where the rank is defined as in [W. Myrvold and F. Ruskey, Ranking and Unranking Permutations in Linear Time, Information Processing Letters, 79 (2001) 281-284].The permutation of size n whose rank is r, where the rank is defined as in [W. Myrvold and F. Ruskey, Ranking and Unranking Permutations in Linear Time, Information Processing Letters, 79 (2001) 281-284].!All permutations of a given size.    Anders Claesson 2013-2016+Anders Claesson <anders.claesson@gmail.com>None35 &A pair of Semistandard Young Tableaux.#A !Semistandard Young Tableau (SSYT)U: the entries weakly increase along each row and strictly increase down each column.$A Generalized PermutationG is a lexicographically sorted list of pairs of non-negative integers.%"An entry is a non-negative integer&A pair of empty Young tableaux.'2Check if a given pair of Young tableaux are empty.(0Produce a string for pretty printing SSYT pairs.)-The Robinson-Schensted-Knuth (RSK) algorithm.*!The Robinson-Schensted algorithm.+6The inverse of the Robinson-Schensted-Knuth algorithm.,0The inverse of the Robinson-Schensted algorithm. !"#$%&'()*+, !"#$%&'()*+,$%# !"&'(*),+ !"#$%&'()*+,Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None -+Ration by 0 degrees, i.e. the identity map..Ration by 90 degrees clockwise./'Ration by 2*90 = 180 degrees clockwise.0'Ration by 3*90 = 270 degrees clockwise.12Reflection through a horizontal axis (also called =).20Reflection through a vertical axis (also called <).32Reflection through the main diagonal (also called ;).4%Reflection through the anti-diagonal.5DThe dihedral group of order 8 (the symmetries of a square); that is, %d8 = [r0, r1, r2, r3, s0, s1, s2, s3]6OThe Klein four-group (the symmetries of a non-equilateral rectangle); that is, klein4 = [r0, r2, s0, s1]7 orbit fs x is the orbit of x under the group of function fs. E.g., 4orbit klein4 "2314" == ["1423","2314","3241","4132"]8symmetryClasses fs xs= is the list of equivalence classes under the action of the group of functions fs.9$Symmetry classes with respect to D8.:'Symmetry classes with respect to Klein4;"The group theoretical inverse: if  v = inverse u then v `at` (u `at` i) = i.<)The reverse of the given permutation: if  v = reverse u then v `at` i = u `at` (n-1-i).=,The complement of the given permutation: if v = complement u then v `at` i = n - 1 - u `at` i.> rotate = r1 = inverse . reverse-./0123456789:;<=>-./0123456789:;<=>-./0123456789:>=<;-./0123456789:;<=>Anders Claesson 2013-2016+Anders Claesson <anders.claesson@gmail.com>None?The list of (plus) components.@:The list of skew components, also called minus components.AKFor each position, left-to-right, records the largest value seen thus far.BLFor each position, left-to-right, records the smallest value seen thus far.CFor each position,  right-to-left+, records the largest value seen thus far.DFor each position,  right-to-left,, records the smallest value seen thus far.?@ABCD?@ABCD?@ABCD?@ABCD Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None E7The Simion-Schmidt bijection from Av(123) onto Av(132).FWThe inverse of the Simion-Schmidt bijection. It is a function from Av(132) to Av(123).EFEFEFEF Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None GThe product/composition of u and v: if w = u G v then w `at ` i = v `at` (u `at` i).H.The (left) group action of Perm on itself: if w = u H v then w `at ` (u `at` i) = v `at` i.GHGHGHGH Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None I)Pattern is just an alias for permutation.J ordiso u v m# determines whether the subword in v specified by m is order isomorphic to u.K copiesOf p w. is the list of sets that represent copies of p in w.Lw L p is a predicate determining if w contains the pattern p.Mw M p is a predicate determining if w avoids the pattern p.Nw N ps is a predicate determining if w avoids the patterns ps.Oavoiders ps ws is the list of permutations in ws avoiding the patterns in ps.PSThe set of minimal elements with respect to containment. FIX: Poor implementationQRThe set of maximal elements with respect to containment. FIX: Poor implementationR coeff f v is the coefficient of v+ when expanding the permutation statistic f as a sum of permutations/patterns. See Petter Brndn and Anders Claesson: Mesh patterns and the expansion of permutation statistics as sums of permutation patterns, The Electronic Journal of Combinatorics 18(2) (2011),  Dhttp://www.combinatorics.org/ojs/index.php/eljc/article/view/v18i2p5. IJKLMNOPQR IJKLMNOPQR IJKLMNOPQR IJKLMNOPQR Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None SIs the permutation simple?SSSS Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None TOne pass of stack-sort.UOne pass of bubble-sort.TUTUTUTUAnders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>NoneV^A permgram consists of a permutation together with a label for each index of the permutation.WThe underlying permutation.X$The assignment of labels to indices.YYThe purpose of this data type is to assign labels to the indices of a given permutation.ZJConstruct a permgram from an underlying permutation and a list of labels.[FThe inverse permgram. It's obtained by mirroring the permgram in the x=y diagonal.\AThe size of a permgram is the size of the underlying permutation.VWXYZ[\VWXYZ[\ YVWXWX\Z[ VWXYZ[\Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None]The  direct sum of two permutations.^)The direct sum of a list of permutations._The skew sum of two permutations.`'The skew sum of a list of permutations.a inflate w vs is the  inflation of w by vs#. It is the permutation of length sum (map size vs)# obtained by replacing each entry w!i, by an interval that is order isomorphic to vs!i; in such a way that the intervals are order isomorphic to w. In particular, Mu /+/ v == inflate (mkPerm "12") [u,v] u \-\ v == inflate (mkPerm "21") [u,v]]^_`a]^_`a]_^`a]^_`a]_Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>Noneb%The class of increasing permutations.c%The class of decreasing permutations.dAv(1)eAv(12)fAv(21)gAv(123)hAv(132)iAv(213)j6Av(231); also know as the stack sortable permutations.kAv(312)lAv(321)mAv(1243)nAv(1324)oAv(2134)pOAv(s) where s is a string of one or more patterns, using space as a seperator.q{The V-class is Av(132, 231). It is so named because the diagram of a typical permutation in this class is shaped like a V.r{The "'-class is Av(213, 312). It is so named because the diagram of a typical permutation in this class is shaped like a "'.s{The >-class is Av(132, 312). It is so named because the diagram of a typical permutation in this class is shaped like a >.t{The <-class is Av(213, 231). It is so named because the diagram of a typical permutation in this class is shaped like a <.u The union of q, r, s and t.vFThe class of separable permutations; it is identical to Av(2413,3142).w'The class of layered permutations with k layers.x"The class of layered permutations.y)The class of Fibonacci permutations with k layers. A Fibonacci permutation? is a layered permutation whose layers are all of size 1 or 2.z'The class of Fibonacci permutations. A Fibonacci permutation? is a layered permutation whose layers are all of size 1 or 2.bcdefghijklmnopqrstuvwxyzbcdefghijklmnopqrstuvwxyzbcdefghijklmnopqrstuvwxyzbcdefghijklmnopqrstuvwxyzAnders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>NoneL ?@ABCDEFGHIJKLMNOPQRSTU]^_`abcdefghijklmnopqrstuvwxyzAnders Claesson 2013-2016+Anders Claesson <anders.claesson@gmail.com>None {The number of ascents. An ascent in w is an index i such that  w[i] < w[i+1].|The number of descents. A descent in w is an index i such that  w[i] > w[i+1].}The number of  excedances : positions i such that w[i] > i.~The number of  fixed points : positions i such that  w[i] == i.The number of strong fixed points% (also called splitters): positions i such that w[j] < i for j < i and w[j] > i for j > i.The number of cycles7: orbits of the permutation when viewed as a function.The number of  inversions : pairs (i,j) such that i < j and  w[i] > w[j].The major index is the sum of descents.The co-major index is the sum of descents.The number of peaks : positions i such that  w[i-1] < w[i] and  w[i] > w[i+1].The number of valleys : positions i such that  w[i-1] > w[i] and  w[i] < w[i+1].The number of double ascents : positions i such that w[i-1] < w[i] < w[i+1].The number of double descents : positions i such that w[i-1] > w[i] > w[i+1].The number of left-to-right minima : positions i such that  w[i] < w[j] for all j < i.The number of left-to-right maxima : positions i such that  w[i] > w[j] for all j < i.The number of right-to-left minima : positions i such that  w[i] < w[j] for all j > i.The number of right-to-left maxima : positions i such that  w[i] > w[j] for all j > i.=The first (left-most) element in the standardization. E.g., (head "231" = head (fromList [1,2,0]) = 1.=The last (right-most) element in the standardization. E.g., (last "231" = last (fromList [1,2,0]) = 0.0Length of the left-most increasing run: largest i such that w[0] < w[1] < ... < w[i-1].0Length of the left-most decreasing run: largest i such that w[0] > w[1] > ... > w[i-1].1Length of the right-most increasing run: largest i such that w[n-i] < ... < w[n-2] < w[n-1].1Length of the right-most decreasing run: largest i such that w[n-i] > ... > w[n-2] > w[n-1]. The number of components. E.g., [2,0,3,1,4,6,7,5] has three components:  [2,0,3,1], [4] and [6,7,5].%The number of skew components. E.g., [5,7,4,6,3,1,0,2] has three skew components:  [5,7,4,6], [3] and [1,0,2].ZThe rank as defined by Elizalde and Pak [Bijections for refined restricted permutations, J. Comb. Theory, Ser. A, 2004]: 6maximum [ k | k <- [0..n-1], w[i] >= k for all i < k ]kThe dimension of a permutation is defined as the largest non-fixed-point, or zero if all points are fixed.The number of small ascents. A  small ascent in w is an index i such that w[i] + 1 == w[i+1]. The number of small descents. A  small descent in w is an index i such that w[i] == w[i+1] + 1.#The longest increasing subsequence.#The longest decreasing subsequence.6     {|}~{|}~{|}~6     {|}~Anders Claesson 2014-2016+Anders Claesson <anders.claesson@gmail.com>None0@A box is represented by the coordinates of its southwest corner.1A mesh is a, possibly empty, set of shaded boxes. match p w m# determines whether the subword in w specified by m is an occurrence of p. copiesOf p w. is the list of sets that represent copies of p in w.w  p is a predicate determining if w contains the pattern p.w  p is a predicate determining if w avoids the pattern p.w  ps is a predicate determining if w avoids the patterns ps.avoiders ps ws is the list of permutations in ws avoiding the patterns in ps.Anders Claesson 2013+Anders Claesson <anders.claesson@gmail.com>None35 8The class of permutations. Minimal complete definition: ,  and  . The default implementation of @ can be somewhat slow, so you may want to implement it as well.DThe standardization map. If there is an underlying linear order on a then st8 is determined by the unique order preserving map from [0..] to that order. In any case, the standardization map should be equivariant with respect to the group action defined below; i.e., it should hold that st (u `act` v) == u `act` st v A (left)  group action of  on a.. As for any group action it should hold that G(u `act` v) `act` w == u `act` (v `act` w) && idperm n `act` v == vwhere v,w::a and u::Perm are of size n.BThe size of a permutation. The default implementation derived from size == size . st%This is not a circular definition as  on 9 is implemented independently. If the implementation of  is slow, then it can be worth while to override the standard definiton; any implementation should, however, satisfy the identity above.+The identity permutation of the given size.2The group theoretical inverse. It should hold that inverse == unst . inverse . st'and this is the default implementation.`Predicate determining if two permutations are order-isomorphic. The default implementation uses u `ordiso` v == u == st vEquivalently, one could use 6u `ordiso` v == inverse u `act` v == idperm (size u)The inverse of . It should hold that #unst w == w `act` idperm (P.size w)'and this is the default implementation./The list of all permutations of the given size.Lifts a function on s to one on any permutations.Like $ but for functions of two variables.OA String viewed as a permutation of its characters. The alphabet is ordered as #['1'..'9'] ++ ['A'..'Z'] ++ ['a'..]  !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX Y Z [ \ ] ^ _ ` a b c   d e f ghijklOmnopqrstuvwxyz{|}~_`abc\,O^1       sym_4Y0mkziivEtE2WW6OBUbYVSym.Internal.SizeSym.Internal.UtilSym.Internal.CLongArraySym.Internal.SubSeqSym.Perm Sym.Perm.SSYT Sym.Perm.D8Sym.Perm.ComponentSym.Perm.BijectionSym.Perm.GroupSym.Perm.PatternSym.Perm.Simple Sym.Perm.Sort Sym.PermgramSym.Perm.ConstructionsSym.Perm.Class Sym.Perm.StatSym.Perm.MeshPatternSym Sym.Perm.MetaSizesizeminimamaximakSubsetspowersetnubSort CLongArrayfromListtoListslicesatunsafeAt elemIndicesimapizipWith unsafeNew unsafeWithSubSeqchoosePerm emptypermoneidpermebbmkPermrankunrankpermsShapeshapeSSYTPairinsertionTableaurecordingTableauSSYTGeneralizedPermEntryemptynulldisplayfromGeneralizedPermfromPermtoGeneralizedPermtoPermr0r1r2r3s0s1s2s3d8klein4orbitsymmetryClasses d8Classes klein4Classesinversereverse complementrotate componentsskewComponents leftMaxima leftMinima rightMaxima rightMinima simionSchmidtsimionSchmidt'composeactPatternordisocopiesOfcontainsavoids avoidsAllavoiderscoeffsimple stackSort bubbleSortPermgrampermlabelLabelpermgram/+/ directSum\-\skewSuminflateincdecav1av12av21av123av132av213av231av312av321av1243av1324av2134avveecaretgtltwedges separableskLayeredlayered kFibonacci fibonacciascdesexcfpsfpcycinvmajcomajpeakvalldascddeslminlmaxrminrmaxheadlastlirldrrirrdrcompscompepdimasc0des0lislds MeshPatternMPgetPermgetMeshBoxMesh mkPatternpatternmeshcolsrowscolrowbox kVincularvincular bivincular meshPatterns Permutationstunstliftlift2 $fSizeMaybe $fSizeSet$fSize[]baseForeign.C.TypesCLongCArr$fShowCLongArray$fSizeCLongArray$fOrdCLongArraynextones nextCLong onesCLong nextIntegralBitmaskc_onesc_nextbitmasks$fBitmaskInteger$fBitmaskCLongc_unrankc_rankRowinsertPinsertQinsertPQtrimremovePremoveQremovePQ$fShowSSYTPair$fShapeSSYTPair $fShape[] c_complement c_reverse c_inversemarshalcompsrecordsc_simion_schmidt'c_simion_schmidtc_act c_composec_ordiso avoiders1c_simple c_bubblesort c_stacksortPGram constituents joinPermgram$fApplicativePermgram$fMonadPermgram$fFunctorPermgram $fOrdPermgram $fEqPermgram$fShowPermgram streamAv231 streamVeeunion compositionsboundedCompositionsc_des0c_asc0c_dimc_epc_compc_ldrc_lirc_lmaxc_lminc_ddesc_dascc_vallc_peakc_comajc_majc_invc_cycc_sfpc_fpc_excc_desc_ascmatch PermTwoLinePointfullMeshmatch'twoLine$fSizeMeshPattern$fPermutation[]$fPermutationSSYTPair$fPermutationCLongArray