  
  [1X9 [33X[0;0YInstallation and Auxiliary Functions[133X[101X
  
  
  [1X9.1 [33X[0;0YRequirements[133X[101X
  
  [33X[0;0YThis   version   of   [5XRCWA[105X   needs  at  least  [5XGAP[105X 4.7.0,  [5XResClasses[105X 3.4.0,
  [5XGRAPE[105X 4.3 [Soi06],   [5XPolycyclic[105X 2.6 [EN09]   and   [5XGAPDoc[105X 1.4 [LN11].   With
  possible  exception  of  the  most  recent version of [5XResClasses[105X, all needed
  packages are already present in an up-to-date standard [5XGAP[105X installation. The
  [5XRCWA[105X  package can be used on all platforms for which [5XGAP[105X is available. It is
  completely  written in the [5XGAP[105X language and does neither contain nor require
  external  binaries.  In  particular,  possible  warnings  concerning missing
  binaries issued by other packages when loading [5XRCWA[105X can safely be ignored.[133X
  
  
  [1X9.2 [33X[0;0YInstallation[133X[101X
  
  [33X[0;0YLike  any  other [5XGAP[105X package, [5XRCWA[105X must be installed in the [11Xpkg[111X subdirectory
  of the [5XGAP[105X distribution. This is accomplished by extracting the distribution
  file  in  this directory. If you have done this, you can load the package as
  usual via [10XLoadPackage( "rcwa" );[110X.[133X
  
  
  [1X9.3 [33X[0;0YBuilding the manual[133X[101X
  
  [33X[0;0YThe  following  routine is a development tool. As all files it generates are
  included in the distribution file anyway, users will not need it.[133X
  
  [1X9.3-1 RCWABuildManual[101X
  
  [29X[2XRCWABuildManual[102X(  ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YThis  function  builds  the  manual  of the [5XRCWA[105X package in the file formats
  LaTeX,  PDF,  HTML  and  ASCII  text.  This is accomplished using the [5XGAPDoc[105X
  package  by Frank Lübeck and Max Neunhöffer. Building the manual is possible
  only on UNIX systems and requires PDFLaTeX.[133X
  
  
  [1X9.4 [33X[0;0YThe testing routines[133X[101X
  
  [1X9.4-1 RCWATestInstall[101X
  
  [29X[2XRCWATestInstall[102X(  ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YPerforms  a  nontrivial computation to check whether an installation of [5XRCWA[105X
  appears to work. Errors, i.e. differences to the correct results of the test
  computation,     are     reported.    The    processed    test    file    is
  [11Xpkg/rcwa/tst/testinstall.tst[111X.[133X
  
  [1X9.4-2 RCWATestAll[101X
  
  [29X[2XRCWATestAll[102X(  ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YRuns  the  full  test  suite  of  the  [5XRCWA[105X  package. Any differences to the
  supposed  results  of the test computations are reported. The processed test
  file is [11Xpkg/rcwa/tst/testall.g[111X.[133X
  
  [33X[0;0YPlease  note  that  the  test  suite is a tool for developing. The tests are
  deliberately  very  volatile  to allow to spot possible problems of any kind
  also  in  other  packages or in the [5XGAP[105X Library. For this reason you may see
  reports  of  differences  which  simply  reflect  improved  methods in other
  packages  or in the [5XGAP[105X Library (for example an object may already know more
  of  its attributes or properties than it is expected to, or an object may be
  represented  in  a  better  way),  or which are caused by changes of the way
  certain  objects  are  printed, and which are therefore harmless. However if
  the  correct  and  the actual output look different mathematically or if you
  see  error  messages  or  if  [5XGAP[105X  crashes, then something went wrong. Also,
  reports  about  significantly  increased run times of individual commands as
  well  as  run  times  of test files which are much longer than the predicted
  times shown may indicate a problem.[133X
  
  [1X9.4-3 RCWATestExamples[101X
  
  [29X[2XRCWATestExamples[102X(  ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YRuns  all  examples  in  the  manual  of  the  [5XRCWA[105X package, and reports any
  differences between the actual output and the output printed in the manual.[133X
  
  
  [1X9.5 [33X[0;0YThe Info class of the package[133X[101X
  
  [1X9.5-1 InfoRCWA[101X
  
  [29X[2XInfoRCWA[102X[32X info class
  
  [33X[0;0YThis  is  the  Info class of the [5XRCWA[105X package. See section [13XInfo Functions[113X in
  the  [5XGAP[105X  Reference  Manual  for  a  description  of the Info mechanism. For
  convenience: [10XRCWAInfo([110X[3Xn[103X[10X)[110X is a shorthand for [10XSetInfoLevel(InfoRCWA[110X,[3Xn[103X[10X)[110X.[133X
  
  
  [1X9.6 [33X[0;0YRunning demonstrations[133X[101X
  
  [33X[0;0Y[5XRCWA[105X  provides  a  routine  to run demonstrations of its functionality or of
  other features of [5XGAP[105X. It is intended for being used in talks.[133X
  
  [1X9.6-1 RunDemonstration[101X
  
  [29X[2XRunDemonstration[102X( [3Xfilename[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YThis  function  executes the commands in the file named [3Xfilename[103X. It shows a
  command  and the corresponding output, waits for a keystroke, shows the next
  command and the corresponding output, waits again for a keystroke, and so on
  until  the  end of the file. The demonstration can be stopped by pressing [10Xq[110X.
  The  function  is  adapted  from  the  function  [10XDemonstration[110X  in  the file
  [11Xlib/demo.g[111X of the main [5XGAP[105X distribution.[133X
  
  
  [1X9.7 [33X[0;0YUtility functions for bitmap pictures[133X[101X
  
  [33X[0;0Y[5XRCWA[105X  provides  functions to create bitmap picture files from suitable pixel
  matrices  and  vice  versa.  The author has successfully tested this feature
  both  under  Linux  and  under  Windows,  and  the  produced pictures can be
  processed further with many common graphics programs:[133X
  
  [1X9.7-1 SaveAsBitmapPicture[101X
  
  [29X[2XSaveAsBitmapPicture[102X( [3Xpicture[103X, [3Xfilename[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YWrites  the  pixel  matrix  [3Xpicture[103X  to  a bitmap- (bmp-) picture file named
  [3Xfilename[103X.  The  filename  should  include  the entire pathname. The argument
  [3Xpicture[103X  can  be  a GF(2) matrix, in which case a monochrome picture file is
  generated.  In  this  case,  zeros stand for black pixels and ones stand for
  white  pixels.  The argument [3Xpicture[103X can also be an integer matrix, in which
  case  a  24-bit  True  Color  picture  file  is generated. In this case, the
  entries  of  the  matrix are supposed to be integers [22Xn = 65536 ⋅ red + 256 ⋅
  green  +  blue[122X in the range [22X0, dots, 2^24-1[122X specifying the RGB values of the
  colors of the pixels.[133X
  
  [33X[0;0YThe    picture    can    be   read   back   into   [5XGAP[105X   by   the   function
  [10XLoadBitmapPicture([3Xfilename[103X[10X)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xcolor   := n->32*(n mod 8)+256*32*(Int(n/8) mod 8)+65536*32*Int(n/64);;[127X[104X
    [4X[25Xgap>[125X [27Xpicture := List([1..512],y->List([1..512],x->color(Gcd(x,y)-1)));;[127X[104X
    [4X[25Xgap>[125X [27XSaveAsBitmapPicture(picture,"~/images/gcd.bmp");[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0Y[5XRCWA[105X also provides functions for steganography in bitmap pictures:[133X
  
  [1X9.7-2 EncryptIntoBitmapPicture[101X
  
  [29X[2XEncryptIntoBitmapPicture[102X( [3Xpicturefile[103X, [3Xcleartextfile[103X, [3Xpassphrase[103X ) [32X function
  [29X[2XDecryptFromBitmapPicture[102X( [3Xpicturefile[103X, [3Xcleartextfile[103X, [3Xpassphrase[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YThe first function encrypts the contents of the textfile named [3Xcleartextfile[103X
  into  the  image  from  the  file  named  [3Xpicturefile[103X,  using the passphrase
  [3Xpassphrase[103X.  The  modified  image is written to a file whose name is derived
  from [3Xpicturefile[103X by appending the string [10X-out[110X.[133X
  
  [33X[0;0YThe second function decrypts an encoded text from the file named [3Xpicturefile[103X
  using the passphrase [3Xpassphrase[103X, and writes the obtained cleartext to a file
  named [3Xcleartextfile[103X.[133X
  
  [33X[0;0YThese steganographic utility functions are designed for security rather than
  speed,  and  are  intended to be used for texts of the order of magnitude of
  what  one  would normally write into the body of an e-mail -- encoding about
  100kb  into  a  picture  of usual size should be still convenient, while the
  functions  are  definitely  not  suitable for encoding entire backups or the
  like.[133X
  
  [33X[0;0Y[10XInfo[110X  messages  on  the progress of the encryption / decryption are given at
  [10XInfoLevel[110X 2 of [10XInfoRCWA[110X.[133X
  
  
  [1X9.8 [33X[0;0YConverting GAP logfiles to HTML[133X[101X
  
  [33X[0;0Y[5XRCWA[105X provides a routine to convert [5XGAP[105X logfiles to HTML.[133X
  
  [1X9.8-1 Log2HTML[101X
  
  [29X[2XLog2HTML[102X( [3Xlogfilename[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ynothing.[133X
  
  [33X[0;0YThis function converts the [5XGAP[105X logfile [3Xlogfilename[103X to HTML. The extension of
  the input file must be [10X*.log[110X. The name of the output file is the same as the
  one of the input file except that the extension [10X*.log[110X is replaced by [10X*.html[110X.
  There  is  a sample CSS file in [11Xrcwa/doc/gaplog.css[111X, which you can adjust to
  your taste.[133X
  
  
  [1X9.9 [33X[0;0YSome general utility functions[133X[101X
  
  [33X[0;0Y[5XRCWA[105X  provides  a  couple  of small utility functions which can be used in a
  more general context. They are described in this section.[133X
  
  [33X[0;0YThe    utility    functions    for    groups    and   group   elements   are
  [10XGeneratorsAndInverses([3XG[103X[10X)[110X  which  returns a list of generators of [3XG[103X and their
  inverses, the function [10XEpimorphismByGenerators([3XG[103X[10X,[3XH[103X[10X)[110X which is a shorthand for
  [10XGroupHomomorphismByImages([3XG[103X[10X,[3XH[103X[10X,    GeneratorsOfGroup([3XG[103X[10X),GeneratorsOfGroup([3XH[103X[10X))[110X
  (there  is  also  an  [10XNC[110X  version of this), the function [10XListOfPowers([3Xg[103X[10X,[3Xexp[103X[10X)[110X
  which  returns  the  list [10X[[3Xg[103X[10X,[3Xg[103X[10X^2,...,[3Xg[103X[10X^[3Xexp[103X[10X][110X of powers of [3Xg[103X, and the function
  [10XAllProducts([3Xl[103X[10X,[3Xk[103X[10X)[110X  which returns the list of all products of [3Xk[103X entries of the
  list [3Xl[103X.[133X
  
  [33X[0;0YThe utility functions for lists are [10XDifferencesList([3Xl[103X[10X)[110X and [10XQuotientsList([3Xl[103X[10X)[110X,
  which  return  the list of differences respectively quotients of consecutive
  entries of the list [3Xl[103X, and the function [10XFloatQuotientsList([3Xl[103X[10X)[110X, which returns
  the list of floating point approximations of the latter.[133X
  
  [33X[0;0YThere  are  methods [10XEquivalenceClasses([3Xl[103X[10X,[3Xinv[103X[10X)[110X and [10XEquivalenceClasses([3Xl[103X[10X,[3Xrel[103X[10X)[110X,
  which  decompose  a  list [3Xl[103X  into  equivalence  classes under an equivalence
  relation.  The  equivalence  relation  is  given  either  as  a function [3Xinv[103X
  computing a class invariant of a given list entry or as a function [3Xrel[103X which
  takes  as  arguments  two  list  entries  and  returns  either [10Xtrue[110X or [10Xfalse[110X
  depending  on  whether the arguments belong to the same equivalence class or
  not.[133X
  
  [33X[0;0YYet another utility function is [10XAssignGlobals([3Xrec[103X[10X)[110X which takes as argument a
  record  [3Xrec[103X and assigns its components to global variables of the same (i.e.
  the component's) names.[133X
  
  [33X[0;0YFinally,  the  function  [10XAllSmoothIntegers([3Xmaxp[103X[10X,[3Xmaxn[103X[10X)[110X  returns a list of all
  integers  less  than  or  equal  to  [3Xmaxn[103X  which  do not have prime divisors
  exceeding  [3Xmaxp[103X,  the  function [10XExponentOfPrime([3Xn[103X[10X,[3Xp[103X[10X)[110X returns the exponent of
  the   prime   [3Xp[103X   in   the  prime  factorization  of  [3Xn[103X,  and  the  function
  [10XLaTeXStringFactorsInt([3Xn[103X[10X)[110X  returns the prime factorization of an integer [3Xn[103X as
  a string in LaTeX format.[133X
  
