  
  [1X2 [33X[0;0YLists, Sets and Strings[133X[101X
  
  
  [1X2.1 [33X[0;0YFunctions for lists[133X[101X
  
  [1X2.1-1 DifferencesList[101X
  
  [29X[2XDifferencesList[102X( [3XL[103X ) [32X function
  [29X[2XQuotientsList[102X( [3XL[103X ) [32X function
  [29X[2XFloatQuotientsList[102X( [3XL[103X ) [32X function
  
  [33X[0;0YThese  functions  are  in  the  process  of  being  transferred from package
  [5XResClasses[105X:  for  now  you  should [10XLoadPackage("resclasses")[110X in order to use
  them.[133X
  
  [33X[0;0YThey take a list [22XL[122X of length [22Xn[122X and output the lists of length [22Xn-1[122X containing
  all  the  differences  [22XL[i]-L[i-1][122X  and  all  the  quotients  [22XL[i]/L[i-1][122X of
  consecutive entries in [22XL[122X.[133X
  
  [33X[0;0YIn the quotient functions an error is returned if an entry is zero.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL := [ 1, 3, 5, -1, -3, -5 ];;[127X[104X
    [4X[25Xgap>[125X [27XDifferencesList( L );        [127X[104X
    [4X[28X[ 2, 2, -6, -2, -2 ][128X[104X
    [4X[25Xgap>[125X [27XQuotientsList( L );[127X[104X
    [4X[28X[ 3, 5/3, -1/5, 3, 5/3 ][128X[104X
    [4X[25Xgap>[125X [27XFloatQuotientsList( L );[127X[104X
    [4X[28X[ 3., 1.66667, -0.2, 3., 1.66667 ][128X[104X
    [4X[25Xgap>[125X [27XQuotientsList( [ 2, 1, 0, -1, -2 ] );[127X[104X
    [4X[28X[ 1/2, 0, fail, 2 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X2.1-2 SearchCycle[101X
  
  [29X[2XSearchCycle[102X( [3XL[103X ) [32X operation
  
  [33X[0;0YThis  function is in the process of being transferred from package [5XRCWA[105X: for
  now you should [10XLoadPackage("rcwa")[110X in order to use it.[133X
  
  [33X[0;0Y[10XSearchCycle[110X  is  a  tool  to find likely cycles in lists. What, precisely, a
  [13Xcycle[113X is, is deliberately fuzzy here, and may possibly even change. The idea
  is  that  the beginning of the list may be anything, following that the same
  pattern  needs  to  be repeated several times in order to be recognized as a
  cycle.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL := [1..20];;  L[1]:=13;;                                              [127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..19] do                                                     [127X[104X
    [4X[25X>[125X [27X       if IsOddInt(L[i]) then L[i+1]:=3*L[i]+1; else L[i+1]:=L[i]/2; fi;[127X[104X
    [4X[25X>[125X [27X   od;                                                                  [127X[104X
    [4X[25Xgap>[125X [27XL;                                                                      [127X[104X
    [4X[28X[ 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4 ][128X[104X
    [4X[25Xgap>[125X [27XSearchCycle( L );                                                       [127X[104X
    [4X[28X[ 1, 4, 2 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X2.1-3 RandomCombination[101X
  
  [29X[2XRandomCombination[102X( [3XS[103X, [3Xk[103X ) [32X operation
  
  [33X[0;0YThis   function  is  in  the  process  of  being  transferred  from  package
  [5XResClasses[105X: for now you should [10XLoadPackage("resclasses")[110X in order to use it.[133X
  
  [33X[0;0YIt returns a random unordered [22Xk[122X-tuple of distinct elements of a set [22XS[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRandomCombination([31..79],8); [127X[104X
    [4X[28X[ 33, 45, 60, 63, 65, 69, 71, 77 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X2.1-4 PrintListOneItemPerLine[101X
  
  [29X[2XPrintListOneItemPerLine[102X( [3XL[103X ) [32X operation
  
  [33X[0;0YThis  function  has  been  transferred  from  package  [5XXMod[105X.  Printing lists
  vertically, rather than in the usual horizontal form, may be useful when the
  entries are lengthy.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XPrintListOneItemPerLine( KnownPropertiesOfObject(L) );  [127X[104X
    [4X[28X[ IsFinite,[128X[104X
    [4X[28X  IsSmallList[128X[104X
    [4X[28X  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X2.2 [33X[0;0YDistinct and Common Representatives[133X[101X
  
  [1X2.2-1 DistinctRepresentatives[101X
  
  [29X[2XDistinctRepresentatives[102X( [3Xlist[103X ) [32X operation
  [29X[2XCommonRepresentatives[102X( [3Xlist[103X ) [32X operation
  [29X[2XCommonTransversal[102X( [3Xgrp[103X, [3Xsubgrp[103X ) [32X operation
  [29X[2XIsCommonTransversal[102X( [3Xgrp[103X, [3Xsubgrp[103X, [3Xlist[103X ) [32X operation
  
  [33X[0;0YThese  functions  have  been  transferred  from package [5XXMod[105X. They deal with
  lists  of  subsets of [22X[1 ... n][122X and construct systems of distinct and common
  representatives using simple, non-recursive, combinatorial algorithms.[133X
  
  [33X[0;0YWhen  [22XL[122X  is  a  set  of  [22Xn[122X  subsets  of  [22X[1 ... n][122X and the Hall condition is
  satisfied  (the  union  of  any [22Xk[122X subsets has at least [22Xk[122X elements), a set of
  [10XDistinctRepresentatives[110X exists.[133X
  
  [33X[0;0YWhen  [22XJ,K[122X  are  both  lists  of  [22Xn[122X  sets, the function [10XCommonRepresentatives[110X
  returns  two  lists:  the  set  of representatives, and a permutation of the
  subsets  of  the  second  list.  It  may  also  be  used to provide a common
  transversal  for sets of left and right cosets of a subgroup [22XH[122X of a group [22XG[122X,
  although a greedy algorithm is usually quicker.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XJ := [ [1,2,3], [3,4], [3,4], [1,2,4] ];;[127X[104X
    [4X[25Xgap>[125X [27XDistinctRepresentatives( J );[127X[104X
    [4X[28X[ 1, 3, 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XK := [ [3,4], [1,2], [2,3], [2,3,4] ];;[127X[104X
    [4X[25Xgap>[125X [27XCommonRepresentatives( J, K );[127X[104X
    [4X[28X[ [ 3, 3, 3, 1 ], [ 1, 3, 4, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27Xd16 := DihedralGroup( IsPermGroup, 16 );  SetName( d16, "d16" );[127X[104X
    [4X[28XGroup([ (1,2,3,4,5,6,7,8), (2,8)(3,7)(4,6) ])[128X[104X
    [4X[25Xgap>[125X [27Xc4 := Subgroup( d16, [ d16.1^2 ] );  SetName( c4, "c4" );[127X[104X
    [4X[28XGroup([ (1,3,5,7)(2,4,6,8) ])[128X[104X
    [4X[25Xgap>[125X [27XRightCosets( d16, c4 );[127X[104X
    [4X[28X[ RightCoset(c4,()), RightCoset(c4,(2,8)(3,7)(4,6)), RightCoset(c4,(1,8,7,6,5,[128X[104X
    [4X[28X   4,3,2)), RightCoset(c4,(1,8)(2,7)(3,6)(4,5)) ][128X[104X
    [4X[25Xgap>[125X [27Xtrans := CommonTransversal( d16, c4 );[127X[104X
    [4X[28X[ (), (2,8)(3,7)(4,6), (1,2,3,4,5,6,7,8), (1,2)(3,8)(4,7)(5,6) ][128X[104X
    [4X[25Xgap>[125X [27XIsCommonTransversal( d16, c4, trans );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X2.3 [33X[0;0YFunctions for strings[133X[101X
  
  [1X2.3-1 BlankFreeString[101X
  
  [29X[2XBlankFreeString[102X( [3Xobj[103X ) [32X function
  
  [33X[0;0YThis   function  is  in  the  process  of  being  transferred  from  package
  [5XResClasses[105X: for now you should [10XLoadPackage("resclasses")[110X in order to use it.[133X
  
  [33X[0;0YThe  result  of  [10XBlankFreeString(  obj  );[110X  is  a composite of the functions
  [10XString( obj )[110X and [10XRemoveCharacters( obj, " " );[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD12 := DihedralGroup( 12 );; [127X[104X
    [4X[25Xgap>[125X [27XBlankFreeString( D12 );[127X[104X
    [4X[28X"Group([f1,f2,f3])"[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X2.3-2 StringDotSuffix[101X
  
  [29X[2XStringDotSuffix[102X( [3Xstr[103X, [3Xsuf[103X ) [32X operation
  
  [33X[0;0YThis  function has been transferred from package [5XAutoDoc[105X, and was originally
  named [10XAUTODOC_GetSuffix[110X.[133X
  
  [33X[0;0YWhen  [10XStringDotSuffix[110X  is  given  a  string  containing  a "." it return its
  extension, i.e. the bit after the last ".".[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XStringDotSuffix( "file.ext" );[127X[104X
    [4X[28X"ext"[128X[104X
    [4X[25Xgap>[125X [27XStringDotSuffix( "file.ext.bak" );[127X[104X
    [4X[28X"bak"[128X[104X
    [4X[25Xgap>[125X [27XStringDotSuffix( "file." );[127X[104X
    [4X[28X""[128X[104X
    [4X[25Xgap>[125X [27XStringDotSuffix( "Hello" );   [127X[104X
    [4X[28Xfail[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
