  
  [1X4 New Objects and Utility Functions Provided by the [5XAtlasRep[1X Package[0X
  
  This  chapter  describes  [5XGAP[0m objects and functions that are provided in the
  [5XAtlasRep[0m package but that might be of general interest.
  
  The  new objects are straight line decisions (see Section [14X4.1[0m) and black box
  programs (see Section [14X4.2[0m).
  
  The  new functions are concerned with representations of minimal degree, see
  Section [14X4.3[0m.
  
  
  [1X4.1 Straight Line Decisions[0X
  
  [13XStraight   line  decisions[0m  are  similar  to  straight  line  programs  (see
  Section [14X'Reference:  Straight  Line  Programs'[0m)  but return [9Xtrue[0m or [9Xfalse[0m. A
  straight  line  decisions  checks  a  property  for its inputs. An important
  example  is  to  check whether a given list of group generators is in fact a
  list of standard generators (cf. Section[14X2.3[0m) for this group.
  
  A  straight line decision in [5XGAP[0m is represented by an object in the category
  [2XIsStraightLineDecision[0m  ([14X4.1-1[0m)  that stores a list of "lines" each of which
  has one of the following three forms.
  
  (1)   a nonempty dense list l of integers,
  
  (2)   a  pair  [  l,  i  ]  where l is a list of form 1. and i is a positive
        integer,
  
  (3)   a list [[10X"Order"[0m, i, n ] where i and n are positive integers.
  
  The first two forms have the same meaning as for straight line programs (see
  Section [14X'Reference:  Straight  Line  Programs'[0m), the last form means a check
  whether the element stored at the label i-th has the order n.
  
  For  the  meaning  of  the  list  of lines, see [2XResultOfStraightLineDecision[0m
  ([14X4.1-6[0m).
  
  Straight  line  decisions  can  be  constructed  using  [2XStraightLineDecision[0m
  ([14X4.1-5[0m),    defining    attributes   for   straight   line   decisions   are
  [2XNrInputsOfStraightLineDecision[0m   ([14X4.1-3[0m)   and   [2XLinesOfStraightLineDecision[0m
  ([14X4.1-2[0m),     an     operation     for    straight    line    decisions    is
  [2XResultOfStraightLineDecision[0m ([14X4.1-6[0m).
  
  Special  methods applicable to straight line decisions are installed for the
  operations  [2XDisplay[0m ([14XReference: Display[0m), [2XIsInternallyConsistent[0m ([14XReference:
  IsInternallyConsistent[0m),   [2XPrintObj[0m   ([14XReference:   PrintObj[0m),  and  [2XViewObj[0m
  ([14XReference: ViewObj[0m).
  
  For  a straight line decision [3Xprog[0m, the default [2XDisplay[0m ([14XReference: Display[0m)
  method  prints  the  interpretation  of [3Xprog[0m as a sequence of assignments of
  associative  words  and  of order checks; a record with components [10Xgensnames[0m
  (with  value  a  list  of strings) and [10Xlistname[0m (a string) may be entered as
  second  argument  of  [2XDisplay[0m ([14XReference: Display[0m), in this case these names
  are  used,  the  default  for  [10Xgensnames[0m is [10X[ g1, g2, [0m...[10X ][0m, the default for
  [3Xlistname[0m is r.
  
  [1X4.1-1 IsStraightLineDecision[0m
  
  [2X> IsStraightLineDecision( [0X[3Xobj[0X[2X ) ____________________________________[0XCategory
  
  Each    straight    line    decision   in   [5XGAP[0m   lies   in   the   category
  [2XIsStraightLineDecision[0m.
  
  [1X4.1-2 LinesOfStraightLineDecision[0m
  
  [2X> LinesOfStraightLineDecision( [0X[3Xprog[0X[2X ) _____________________________[0Xoperation
  [6XReturns:[0X  the list of lines that define the straight line decision.
  
  This   defining   attribute   for  the  straight  line  decision  [3Xprog[0m  (see
  [2XIsStraightLineDecision[0m  ([14X4.1-1[0m))  corresponds  to [2XLinesOfStraightLineProgram[0m
  ([14XReference: LinesOfStraightLineProgram[0m) for straight line programs.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> dec:= StraightLineDecision( [ [ [ 1, 1, 2, 1 ], 3 ],[0X
    [4X> [ "Order", 1, 2 ], [ "Order", 2, 3 ], [ "Order", 3, 5 ] ] );[0X
    [4X<straight line decision>[0X
    [4Xgap> LinesOfStraightLineDecision( dec );[0X
    [4X[ [ [ 1, 1, 2, 1 ], 3 ], [ "Order", 1, 2 ], [ "Order", 2, 3 ], [0X
    [4X  [ "Order", 3, 5 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.1-3 NrInputsOfStraightLineDecision[0m
  
  [2X> NrInputsOfStraightLineDecision( [0X[3Xprog[0X[2X ) __________________________[0Xoperation
  [6XReturns:[0X  the number of inputs required for the straight line decision.
  
  This   defining   attribute   corresponds  to  [2XNrInputsOfStraightLineProgram[0m
  ([14XReference: NrInputsOfStraightLineProgram[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> NrInputsOfStraightLineDecision( dec );[0X
    [4X2[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.1-4 ScanStraightLineDecision[0m
  
  [2X> ScanStraightLineDecision( [0X[3Xstring[0X[2X ) _______________________________[0Xfunction
  [6XReturns:[0X  a record containing the straight line decision, or [9Xfail[0m.
  
  Let  [3Xstring[0m  be  a string that encodes a straight line decision in the sense
  that  it  consists  of the lines listed for [2XScanStraightLineProgram[0m ([14X5.4-1[0m),
  except  that  [10Xoup[0m  lines are not allowed, and instead lines of the following
  form may occur.
  
  [8X[10Xchor [3Xa[0m[8X[10X [3Xb[0m[8X[10X[0m[8X[0m
        means  that  it is checked whether the order of the element at label [3Xa[0m
        is [3Xb[0m.
  
  [2XScanStraightLineDecision[0m  returns  a  record  containing as the value of its
  component   [10Xprogram[0m   the   corresponding   [5XGAP[0m   straight   line   decision
  (see [2XIsStraightLineDecision[0m  ([14X4.1-1[0m))  if  the  input  string  satisfies the
  syntax  rules  stated above, and returns [9Xfail[0m otherwise. In the latter case,
  information  about the first corrupted line of the program is printed if the
  info level of [2XInfoCMeatAxe[0m ([14X5.1-2[0m) is at least 1.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> str:= "inp 2\nchor 1 2\nchor 2 3\nmu 1 2 3\nchor 3 5";;[0X
    [4Xgap> prg:= ScanStraightLineDecision( str );[0X
    [4Xrec( program := <straight line decision> )[0X
    [4Xgap> prg:= prg.program;;[0X
    [4Xgap> Display( prg );[0X
    [4X# input:[0X
    [4Xr:= [ g1, g2 ];[0X
    [4X# program:[0X
    [4Xif Order( r[1] ) <> 2 then  return false;  fi;[0X
    [4Xif Order( r[2] ) <> 3 then  return false;  fi;[0X
    [4Xr[3]:= r[1]*r[2];[0X
    [4Xif Order( r[3] ) <> 5 then  return false;  fi;[0X
    [4X# return value:[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.1-5 StraightLineDecision[0m
  
  [2X> StraightLineDecision( [0X[3Xlines[, nrgens][0X[2X ) __________________________[0Xfunction
  [2X> StraightLineDecisionNC( [0X[3Xlines[, nrgens][0X[2X ) ________________________[0Xfunction
  [6XReturns:[0X  the straight line decision given by the list of lines.
  
  Let  [3Xlines[0m  be  a list of lists that defines a unique straight line decision
  (see [2XIsStraightLineDecision[0m  ([14X4.1-1[0m));  in  this  case  [2XStraightLineDecision[0m
  returns this program, otherwise an error is signalled. The optional argument
  [3Xnrgens[0m specifies the number of input generators of the program; if a list of
  integers  (a  line  of form 1. in the definition above) occurs in [3Xlines[0m then
  this  number  is  not determined by [3Xlines[0m and therefore [13Xmust[0m be specified by
  the argument [3Xnrgens[0m; if not then [2XStraightLineDecision[0m returns [9Xfail[0m.
  
  [2XStraightLineDecisionNC[0m  does  the  same as [2XStraightLineDecision[0m, except that
  the internal consistency of the program is not checked.
  
  [1X4.1-6 ResultOfStraightLineDecision[0m
  
  [2X> ResultOfStraightLineDecision( [0X[3Xprog, gens[, orderfunc][0X[2X ) _________[0Xoperation
  [6XReturns:[0X  [9Xtrue[0m if all checks succeed, otherwise [9Xfalse[0m.
  
  [2XResultOfStraightLineDecision[0m    evaluates   the   straight   line   decision
  (see [2XIsStraightLineDecision[0m  ([14X4.1-1[0m)) [3Xprog[0m at the group elements in the list
  [3Xgens[0m.
  
  The  function for computing the order of a group element can be given as the
  optional  argument [3Xorderfunc[0m. For example, this may be a function that gives
  up  at  a  certain  limit if one has to be aware of extremely huge orders in
  failure cases.
  
  The  [13Xresult[0m  of  a straight line decision with lines p_1, p_2, ..., p_k when
  applied to [3Xgens[0m is defined as follows.
  
  [8X(a)[0m
        First  a  list  r of intermediate values is initialized with a shallow
        copy of [3Xgens[0m.
  
  [8X(b)[0m
        For  i <= k, before the i-th step, let r be of length n. If p_i is the
        external  representation  of  an  associative  word  in  the  first  n
        generators  then the image of this word under the homomorphism that is
        given  by  mapping r to these first n generators is added to r. If p_i
        is  a  pair [ l, j ], for a list l, then the same element is computed,
        but  instead  of being added to r, it replaces the j-th entry of r. If
        p_i  is a triple [[10X"Order"[0m, i, n ] then it is checked whether the order
        of r[i] is n; if not then [9Xfalse[0m is returned immediately.
  
  [8X(c)[0m
        If  all k lines have been processed and no order check has failed then
        [9Xtrue[0m is returned.
  
  Here are some examples.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> dec:= StraightLineDecision( [ ], 1 );[0X
    [4X<straight line decision>[0X
    [4Xgap> ResultOfStraightLineDecision( dec, [ () ] );[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  The  above  straight  line  decision  [10Xdec[0m returns [9Xtrue[0m –for [13Xany[0m input of the
  right length.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> dec:= StraightLineDecision( [ [ [ 1, 1, 2, 1 ], 3 ],[0X
    [4X>       [ "Order", 1, 2 ], [ "Order", 2, 3 ], [ "Order", 3, 5 ] ] );[0X
    [4X<straight line decision>[0X
    [4Xgap> LinesOfStraightLineDecision( dec );[0X
    [4X[ [ [ 1, 1, 2, 1 ], 3 ], [ "Order", 1, 2 ], [ "Order", 2, 3 ], [0X
    [4X  [ "Order", 3, 5 ] ][0X
    [4Xgap> ResultOfStraightLineDecision( dec, [ (), () ] );[0X
    [4Xfalse[0X
    [4Xgap> ResultOfStraightLineDecision( dec, [ (1,2)(3,4), (1,4,5) ] );[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  The  above  straight  line  decision admits two inputs; it tests whether the
  orders of the inputs are 2 and 3, and the order of their product is 5.
  
  
  [1X4.1-7 Semi-Presentations and Presentations[0X
  
  We  can  associate  a  [13Xfinitely  presented group[0m F / R to each straight line
  decision  [3Xdec[0m,  say, as follows. The free generators of the free group F are
  in  bijection  with  the inputs, and the defining relators generating R as a
  normal  subgroup  of F are given by those words w^k for which [3Xdec[0m contains a
  check whether the order of w equals k.
  
  So  if  [3Xdec[0m  returns  [9Xtrue[0m  for  the  input list [ g_1, g_2, ..., g_n ] then
  mapping  the  free  generators of F to the inputs defines an epimorphism Phi
  from  F  to the group G, say, that is generated by these inputs, such that R
  is contained in the kernel of Phi.
  
  (Note  that  "satisfying  [3Xdec[0m"  is  a  stronger  property than "satisfying a
  presentation".  For example, < x | x^2 = x^3 = 1 > is a presentation for the
  trivial  group, but the straight line decision that checks whether the order
  of x is both 2 and 3 clearly always returns [9Xfalse[0m.)
  
  The  [5XATLAS[0m  of  Group  Representations  contains  the following two kinds of
  straight line decisions.
  
  --    A  [13Xpresentation[0m  is a straight line decision [3Xdec[0m that is defined for a
        set  of  standard generators of a group G and that returns [9Xtrue[0m if and
        only  if  the  list  of  inputs is in fact a sequence of such standard
        generators  for G. In other words, the relators derived from the order
        checks  in  the  way  described above are defining relators for G, and
        moreover these relators are words in terms of standard generators. (In
        particular  the  kernel  of  the map Phi equals R whenever [3Xdec[0m returns
        [9Xtrue[0m.)
  
  --    A  [13Xsemi-presentation[0m  is  a straight line decision [3Xdec[0m that is defined
        for  a  set  of standard generators of a group G and that returns [9Xtrue[0m
        for a list of inputs [13Xthat is known to generate a group isomorphic with
        G[0m  if  and  only  if  these inputs form in fact a sequence of standard
        generators  for G. In other words, the relators derived from the order
        checks  in  the  way  described  above  are  [13Xnot  necessarily defining
        relators[0m for G, but if we assume that the g_i generate G then they are
        standard  generators. (In particular, F / R may be a larger group than
        G  but  in  this  case  Phi  maps the free generators of F to standard
        generators of G.)
  
        More about semi-presentations can be found in [NW05].
  
  Available    presentations    and    semi-presentations    are   listed   by
  [2XDisplayAtlasInfo[0m  ([14X2.5-1[0m),  they  can  be accessed via [2XAtlasProgram[0m ([14X2.5-3[0m).
  (Clearly   each   presentation   is   also   a   semi-presentation.   So   a
  semi-presentation  for  some  standard  generators of a group is regarded as
  available  whenever  a  presentation  for these standard generators and this
  group is available.)
  
  Note   that  different  groups  can  have  the  same  semi-presentation.  We
  illustrate  this  with  an  example  that is mentioned in [NW05]. The groups
  L_2(7)  cong L_3(2) and L_2(8) are generated by elements of the orders 2 and
  3  such  that  their  product  has  order  7,  and no further conditions are
  necessary to define standard generators.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> check:= AtlasProgram( "L2(8)", "check" );[0X
    [4Xrec( program := <straight line decision>, standardization := 1, [0X
    [4X  identifier := [ "L2(8)", "L28G1-check1", 1, 1 ], groupname := "L2(8)" )[0X
    [4Xgap> gens:= AtlasGenerators( "L2(8)", 1 );[0X
    [4Xrec( generators := [ (1,2)(3,4)(6,7)(8,9), (1,3,2)(4,5,6)(7,8,9) ], [0X
    [4X  groupname := "L2(8)", standardization := 1, repnr := 1, [0X
    [4X  identifier := [ "L2(8)", [ "L28G1-p9B0.m1", "L28G1-p9B0.m2" ], 1, 9 ], [0X
    [4X  p := 9, id := "", size := 504 )[0X
    [4Xgap> ResultOfStraightLineDecision( check.program, gens.generators );[0X
    [4Xtrue[0X
    [4Xgap> gens:= AtlasGenerators( "L3(2)", 1 );[0X
    [4Xrec( generators := [ (2,4)(3,5), (1,2,3)(5,6,7) ], groupname := "L3(2)", [0X
    [4X  standardization := 1, repnr := 1, [0X
    [4X  identifier := [ "L3(2)", [ "L27G1-p7aB0.m1", "L27G1-p7aB0.m2" ], 1, 7 ], [0X
    [4X  p := 7, id := "a", size := 168 )[0X
    [4Xgap> ResultOfStraightLineDecision( check.program, gens.generators );[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.1-8 AsStraightLineDecision[0m
  
  [2X> AsStraightLineDecision( [0X[3Xbbox[0X[2X ) __________________________________[0Xattribute
  [6XReturns:[0X  an  equivalent  straight  line  decision  for  the given black box
            program, or [9Xfail[0m.
  
  For    a    black    box   program   (see   [2XIsBBoxProgram[0m   ([14X4.2-1[0m))   [3Xbbox[0m,
  [2XAsStraightLineDecision[0m    returns    a    straight    line   decision   (see
  [2XIsStraightLineDecision[0m  ([14X4.1-1[0m))  with the same output as [3Xbbox[0m, in the sense
  of  [2XAsBBoxProgram[0m ([14X4.2-5[0m), if such a straight line decision exists, and [9Xfail[0m
  otherwise.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> lines:= [ [ "Order", 1, 2 ], [ "Order", 2, 3 ],[0X
    [4X>              [ [ 1, 1, 2, 1 ], 3 ], [ "Order", 3, 5 ] ];;[0X
    [4Xgap> dec:= StraightLineDecision( lines, 2 );[0X
    [4X<straight line decision>[0X
    [4Xgap> bboxdec:= AsBBoxProgram( dec );[0X
    [4X<black box program>[0X
    [4Xgap> asdec:= AsStraightLineDecision( bboxdec );[0X
    [4X<straight line decision>[0X
    [4Xgap> LinesOfStraightLineDecision( asdec );[0X
    [4X[ [ "Order", 1, 2 ], [ "Order", 2, 3 ], [ [ 1, 1, 2, 1 ], 3 ], [0X
    [4X  [ "Order", 3, 5 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.1-9 StraightLineProgramFromStraightLineDecision[0m
  
  [2X> StraightLineProgramFromStraightLineDecision( [0X[3Xdec[0X[2X ) ______________[0Xoperation
  [6XReturns:[0X  the  straight  line  program associated to the given straight line
            decision.
  
  For  a  straight  line  decision  [3Xdec[0m  (see  [2XIsStraightLineDecision[0m ([14X4.1-1[0m),
  [2XStraightLineProgramFromStraightLineDecision[0m   returns   the   straight  line
  program   (see   [2XIsStraightLineProgram[0m   ([14XReference:  IsStraightLineProgram[0m)
  obtained  by  replacing  each  line of type 3. (i.e, each order check) by an
  assignment of the power in question to a new slot, and by declaring the list
  of these elements as the return value.
  
  This  means that the return value describes exactly the defining relators of
  the  presentation  that  is  associated  to  the straight line decision, see
  [14X4.1-7[0m.
  
  For  example,  one  can  use the return value for printing the relators with
  [2XStringOfResultOfStraightLineProgram[0m                              ([14XReference:
  StringOfResultOfStraightLineProgram[0m),  or  for  explicitly  constructing the
  relators   as   words   in   terms   of   free   generators,   by   applying
  [2XResultOfStraightLineProgram[0m  ([14XReference: ResultOfStraightLineProgram[0m) to the
  program and to these generators.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> dec:= StraightLineDecision( [ [ [ 1, 1, 2, 1 ], 3 ],[0X
    [4X> [ "Order", 1, 2 ], [ "Order", 2, 3 ], [ "Order", 3, 5 ] ] );[0X
    [4X<straight line decision>[0X
    [4Xgap> prog:= StraightLineProgramFromStraightLineDecision( dec );[0X
    [4X<straight line program>[0X
    [4Xgap> Display( prog );[0X
    [4X# input:[0X
    [4Xr:= [ g1, g2 ];[0X
    [4X# program:[0X
    [4Xr[3]:= r[1]*r[2];[0X
    [4Xr[4]:= r[1]^2;[0X
    [4Xr[5]:= r[2]^3;[0X
    [4Xr[6]:= r[3]^5;[0X
    [4X# return values:[0X
    [4X[ r[4], r[5], r[6] ][0X
    [4Xgap> StringOfResultOfStraightLineProgram( prog, [ "a", "b" ] );[0X
    [4X"[ a^2, b^3, (ab)^5 ]"[0X
    [4Xgap> gens:= GeneratorsOfGroup( FreeGroup( "a", "b" ) );[0X
    [4X[ a, b ][0X
    [4Xgap> ResultOfStraightLineProgram( prog, gens );[0X
    [4X[ a^2, b^3, a*b*a*b*a*b*a*b*a*b ][0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X4.2 Black Box Programs[0X
  
  [13XBlack  box  programs[0m  formalize the idea that one takes some group elements,
  forms  arithmetic  expressions  in  terms of them, tests properties of these
  expressions,  executes  conditional  statements  (including jumps inside the
  program)  depending  on  the  results of these tests, and eventually returns
  some result.
  
  A specification of the language can be found in [Nic06], see also
  
  [7Xhttp://brauer.maths.qmul.ac.uk/Atlas/info/blackbox.html[0m.
  
  The  [13Xinputs[0m  of  a black box program may be explicit group elements, and the
  program  may  also  ask  for random elements from a given group. The [13Xprogram
  steps[0m  form  products,  inverses,  conjugates,  commutators,  etc.  of known
  elements,  [13Xtests[0m  concern essentially the orders of elements, and the [13Xresult[0m
  is a list of group elements or [9Xtrue[0m or [9Xfalse[0m or [9Xfail[0m.
  
  Examples that can be modeled by black box programs are
  
  [8X[13Xstraight line programs[0m[8X,[0m
        which  require  a  fixed  number of input elements and form arithmetic
        expressions  of  elements  but  do  not  use  random  elements, tests,
        conditional statements and jumps; the return value is always a list of
        elements; these programs are described in Section [14X'Reference: Straight
        Line Programs'[0m.
  
  [8X[13Xstraight line decisions[0m[8X,[0m
        which  differ  from straight line programs only in the sense that also
        order  tests  are admissible, and that the return value is [9Xtrue[0m if all
        these  tests  are  satisfied, and [9Xfalse[0m as soon as the first such test
        fails; they are described in Section [14X4.1[0m.
  
  [8X[13Xscripts for finding standard generators[0m[8X,[0m
        which take a group and a function to generate a random element in this
        group  but  no  explicit input elements, admit all control structures,
        and  return  either  a  list  of  standard  generators  or  [9Xfail[0m;  see
        [2XResultOfBBoxProgram[0m ([14X4.2-4[0m) for examples.
  
  In  the  case of general black box programs, currently [5XGAP[0m provides only the
  possibility  to read an existing program via [2XScanBBoxProgram[0m ([14X4.2-2[0m), and to
  run  the  program using [2XRunBBoxProgram[0m ([14X4.2-3[0m). The aim is not to write such
  programs in [5XGAP[0m.
  
  The special case of the "find" scripts mentioned above is also admissible as
  an  argument of [2XResultOfBBoxProgram[0m ([14X4.2-4[0m), which returns either the set of
  generators or [9Xfail[0m.
  
  Contrary  to  the  general  situation, more support is provided for straight
  line  programs  and  straight line decisions in [5XGAP[0m, see Section [14X'Reference:
  Straight  Line  Programs'[0m  for  functions  that  manipulate  them  (compose,
  restrict etc.).
  
  The   functions  [2XAsStraightLineProgram[0m  ([14X4.2-6[0m)  and  [2XAsStraightLineDecision[0m
  ([14X4.1-8[0m)  can  be used to transform a general black box program object into a
  straight line program or a straight line decision if this is possible.
  
  Conversely,  one  can  create an equivalent general black box program from a
  straight  line  program  or from a straight line decision with [2XAsBBoxProgram[0m
  ([14X4.2-5[0m).
  
  (Computing a straight line program related to a given straight line decision
  is  supported  in  the  sense of [2XStraightLineProgramFromStraightLineDecision[0m
  ([14X4.1-9[0m).)
  
  Note that none of these three kinds of objects is a special case of another:
  Running  a  black  box  program with [2XRunBBoxProgram[0m ([14X4.2-3[0m) yields a record,
  running a straight line program with [2XResultOfStraightLineProgram[0m ([14XReference:
  ResultOfStraightLineProgram[0m)  yields  a  list  of  elements,  and  running a
  straight line decision with [2XResultOfStraightLineDecision[0m ([14X4.1-6[0m) yields [9Xtrue[0m
  or [9Xfalse[0m.
  
  [1X4.2-1 IsBBoxProgram[0m
  
  [2X> IsBBoxProgram( [0X[3Xobj[0X[2X ) _____________________________________________[0XCategory
  
  Each black box program in [5XGAP[0m lies in the category [2XIsBBoxProgram[0m.
  
  [1X4.2-2 ScanBBoxProgram[0m
  
  [2X> ScanBBoxProgram( [0X[3Xstring[0X[2X ) ________________________________________[0Xfunction
  [6XReturns:[0X  a  record  containing  the  black box program encoded by the input
            string, or [9Xfail[0m.
  
  For  a  string  [3Xstring[0m  that describes a black box program, e.g., the return
  value  of  [2XStringFile[0m  ([14XGAPDoc:  StringFile[0m),  [2XScanBBoxProgram[0m computes this
  black  box  program. If this is successful then the return value is a record
  containing  as  the  value  of  its  component [10Xprogram[0m the corresponding [5XGAP[0m
  object that represents the program, otherwise [9Xfail[0m is returned.
  
  As  the  first  example, we construct a black box program that tries to find
  standard generators for the alternating group A_5; these standard generators
  are  any  pair  of  elements  of the orders 2 and 3, respectively, such that
  their product has order 5.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> findstr:= "\[0X
    [4X>   set V 0\n\[0X
    [4X> lbl START1\n\[0X
    [4X>   rand 1\n\[0X
    [4X>   ord 1 A\n\[0X
    [4X>   incr V\n\[0X
    [4X>   if V gt 100 then timeout\n\[0X
    [4X>   if A notin 1 2 3 5 then fail\n\[0X
    [4X>   if A noteq 2 then jmp START1\n\[0X
    [4X> lbl START2\n\[0X
    [4X>   rand 2\n\[0X
    [4X>   ord 2 B\n\[0X
    [4X>   incr V\n\[0X
    [4X>   if V gt 100 then timeout\n\[0X
    [4X>   if B notin 1 2 3 5 then fail\n\[0X
    [4X>   if B noteq 3 then jmp START2\n\[0X
    [4X>   # The elements 1 and 2 have the orders 2 and 3, respectively.\n\[0X
    [4X>   set X 0\n\[0X
    [4X> lbl CONJ\n\[0X
    [4X>   incr X\n\[0X
    [4X>   if X gt 100 then timeout\n\[0X
    [4X>   rand 3\n\[0X
    [4X>   cjr 2 3\n\[0X
    [4X>   mu 1 2 4   # ab\n\[0X
    [4X>   ord 4 C\n\[0X
    [4X>   if C notin 2 3 5 then fail\n\[0X
    [4X>   if C noteq 5 then jmp CONJ\n\[0X
    [4X>   oup 2 1 2";;[0X
    [4Xgap> find:= ScanBBoxProgram( findstr );[0X
    [4Xrec( program := <black box program> )[0X
  [4X------------------------------------------------------------------[0X
  
  The second example is a black box program that checks whether its two inputs
  are standard generators for A_5.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> checkstr:= "\[0X
    [4X> chor 1 2\n\[0X
    [4X> chor 2 3\n\[0X
    [4X> mu 1 2 3\n\[0X
    [4X> chor 3 5";;[0X
    [4Xgap> check:= ScanBBoxProgram( checkstr );[0X
    [4Xrec( program := <black box program> )[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-3 RunBBoxProgram[0m
  
  [2X> RunBBoxProgram( [0X[3Xprog, G, input, options[0X[2X ) ________________________[0Xfunction
  [6XReturns:[0X  a  record  describing the result and the statistics of running the
            black box program [3Xprog[0m, or [9Xfail[0m, or the string [10X"timeout"[0m.
  
  For a black box program [3Xprog[0m, a group [3XG[0m, a list [3Xinput[0m of group elements, and
  a record [3Xoptions[0m, [2XRunBBoxProgram[0m applies [3Xprog[0m to [3Xinput[0m, where [3XG[0m is used only
  to compute random elements.
  
  The  return value is [9Xfail[0m if a syntax error or an explicit [10Xfail[0m statement is
  reached  at  runtime,  and  the  string  [10X"timeout"[0m if a [10Xtimeout[0m statement is
  reached.  (The  latter  might  mean  that  the random choices were unlucky.)
  Otherwise a record with the following components is returned.
  
  [8X[10Xgens[0m[8X[0m
        a list of group elements, bound if an [10Xoup[0m statement was reached,
  
  [8X[10Xresult[0m[8X[0m
        [9Xtrue[0m  if  a  [10Xtrue[0m  statement  was  reached,  [9Xfalse[0m  if  either a [10Xfalse[0m
        statement or a failed order check was reached,
  
  The  other  components serve as statistical information about the numbers of
  the  various  operations ([10Xmultiply[0m, [10Xinvert[0m, [10Xpower[0m, [10Xorder[0m, [10Xrandom[0m, [10Xconjugate[0m,
  [10Xconjugateinplace[0m, [10Xcommutator[0m), and the runtime in milliseconds ([10Xtimetaken[0m).
  
  The following components of [3Xoptions[0m are supported.
  
  [8X[10Xrandomfunction[0m[8X[0m
        the  function  called  with  argument  [3XG[0m  in order to compute a random
        element of [3XG[0m (default [2XPseudoRandom[0m ([14XReference: PseudoRandom[0m))
  
  [8X[10Xorderfunction[0m[8X[0m
        the  function  for  computing  element  orders  (the  default is [2XOrder[0m
        ([14XReference: Order[0m)),
  
  [8X[10Xquiet[0m[8X[0m
        ignore [10Xecho[0m statements (default [9Xfalse[0m),
  
  [8X[10Xverbose[0m[8X[0m
        print  information  about  the  line  that is currently processed, and
        about order checks (default [9Xfalse[0m),
  
  [8X[10Xallowbreaks[0m[8X[0m
        call  [2XError[0m  ([14XReference:  Error[0m)  when  a  [10Xbreak[0m  statement is reached
        (default [9Xtrue[0m).
  
  As  an example, we run the black box programs constructed in the example for
  [2XScanBBoxProgram[0m ([14X4.2-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> g:= AlternatingGroup( 5 );;[0X
    [4Xgap> res:= RunBBoxProgram( find.program, g, [], rec() );;[0X
    [4Xgap> IsBound( res.gens );  IsBound( res.result );[0X
    [4Xtrue[0X
    [4Xfalse[0X
    [4Xgap> List( res.gens, Order );[0X
    [4X[ 2, 3 ][0X
    [4Xgap> Order( Product( res.gens ) );[0X
    [4X5[0X
    [4Xgap> res:= RunBBoxProgram( check.program, "dummy", res.gens, rec() );;[0X
    [4Xgap> IsBound( res.gens );  IsBound( res.result );[0X
    [4Xfalse[0X
    [4Xtrue[0X
    [4Xgap> res.result;[0X
    [4Xtrue[0X
    [4Xgap> othergens:= GeneratorsOfGroup( g );;[0X
    [4Xgap> res:= RunBBoxProgram( check.program, "dummy", othergens, rec() );;[0X
    [4Xgap> res.result;[0X
    [4Xfalse[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-4 ResultOfBBoxProgram[0m
  
  [2X> ResultOfBBoxProgram( [0X[3Xprog, G[0X[2X ) ___________________________________[0Xfunction
  [6XReturns:[0X  a  list  of  group  elements  or  [9Xtrue[0m, [9Xfalse[0m, [9Xfail[0m, or the string
            [10X"timeout"[0m.
  
  This  function  calls [2XRunBBoxProgram[0m ([14X4.2-3[0m) with the black box program [3Xprog[0m
  and  second argument either a group or a list of group elements; the default
  options  are  assumed.  The  return  value is [9Xfail[0m if this call yields [9Xfail[0m,
  otherwise  the  [10Xgens[0m  component  of  the  result,  if  bound,  or the [10Xresult[0m
  component if not.
  
  As  an example, we run the black box programs constructed in the example for
  [2XScanBBoxProgram[0m ([14X4.2-2[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> g:= AlternatingGroup( 5 );;[0X
    [4Xgap> res:= ResultOfBBoxProgram( find.program, g );;[0X
    [4Xgap> List( res, Order );[0X
    [4X[ 2, 3 ][0X
    [4Xgap> Order( Product( res ) );[0X
    [4X5[0X
    [4Xgap> res:= ResultOfBBoxProgram( check.program, res );[0X
    [4Xtrue[0X
    [4Xgap> othergens:= GeneratorsOfGroup( g );;[0X
    [4Xgap> res:= ResultOfBBoxProgram( check.program, othergens );[0X
    [4Xfalse[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-5 AsBBoxProgram[0m
  
  [2X> AsBBoxProgram( [0X[3Xslp[0X[2X ) ____________________________________________[0Xattribute
  [6XReturns:[0X  an  equivalent  black  box  program  for  the  given straight line
            program or straight line decision.
  
  Let  [3Xslp[0m  be  a straight line program (see [2XIsStraightLineProgram[0m ([14XReference:
  IsStraightLineProgram[0m))     or     a    straight    line    decision    (see
  [2XIsStraightLineDecision[0m  ([14X4.1-1[0m)).  Then  [2XAsBBoxProgram[0m  returns  a black box
  program  [3Xbbox[0m  (see [2XIsBBoxProgram[0m ([14X4.2-1[0m)) with the "same" output as [3Xslp[0m, in
  the  sense  that [2XResultOfBBoxProgram[0m ([14X4.2-4[0m) yields the same result for [3Xbbox[0m
  as  [2XResultOfStraightLineProgram[0m  ([14XReference: ResultOfStraightLineProgram[0m) or
  [2XResultOfStraightLineDecision[0m ([14X4.1-6[0m), respectively, for [3Xslp[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> f:= FreeGroup( "x", "y" );;  gens:= GeneratorsOfGroup( f );;[0X
    [4Xgap> slp:= StraightLineProgram( [ [1,2,2,3], [3,-1] ], 2 );[0X
    [4X<straight line program>[0X
    [4Xgap> ResultOfStraightLineProgram( slp, gens );[0X
    [4Xy^-3*x^-2[0X
    [4Xgap> bboxslp:= AsBBoxProgram( slp );[0X
    [4X<black box program>[0X
    [4Xgap> ResultOfBBoxProgram( bboxslp, gens );[0X
    [4X[ y^-3*x^-2 ][0X
    [4Xgap> lines:= [ [ "Order", 1, 2 ], [ "Order", 2, 3 ],[0X
    [4X>              [ [ 1, 1, 2, 1 ], 3 ], [ "Order", 3, 5 ] ];;[0X
    [4Xgap> dec:= StraightLineDecision( lines, 2 );[0X
    [4X<straight line decision>[0X
    [4Xgap> ResultOfStraightLineDecision( dec, [ (1,2)(3,4), (1,3,5) ] );[0X
    [4Xtrue[0X
    [4Xgap> ResultOfStraightLineDecision( dec, [ (1,2)(3,4), (1,3,4) ] );[0X
    [4Xfalse[0X
    [4Xgap> bboxdec:= AsBBoxProgram( dec );[0X
    [4X<black box program>[0X
    [4Xgap> ResultOfBBoxProgram( bboxdec, [ (1,2)(3,4), (1,3,5) ] );[0X
    [4Xtrue[0X
    [4Xgap> ResultOfBBoxProgram( bboxdec, [ (1,2)(3,4), (1,3,4) ] );[0X
    [4Xfalse[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-6 AsStraightLineProgram[0m
  
  [2X> AsStraightLineProgram( [0X[3Xbbox[0X[2X ) ___________________________________[0Xattribute
  [6XReturns:[0X  an  equivalent  straight  line  program  for  the  given black box
            program, or [9Xfail[0m.
  
  For    a    black    box   program   (see   [2XAsBBoxProgram[0m   ([14X4.2-5[0m))   [3Xbbox[0m,
  [2XAsStraightLineProgram[0m    returns    a    straight    line    program    (see
  [2XIsStraightLineProgram[0m  ([14XReference:  IsStraightLineProgram[0m))  with  the  same
  output as [3Xbbox[0m if such a straight line program exists, and [9Xfail[0m otherwise.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> Display( AsStraightLineProgram( bboxslp ) );[0X
    [4X# input:[0X
    [4Xr:= [ g1, g2 ];[0X
    [4X# program:[0X
    [4Xr[3]:= r[1]^2;[0X
    [4Xr[4]:= r[2]^3;[0X
    [4Xr[5]:= r[3]*r[4];[0X
    [4Xr[3]:= r[5]^-1;[0X
    [4X# return values:[0X
    [4X[ r[3] ][0X
    [4Xgap> AsStraightLineProgram( bboxdec );[0X
    [4Xfail[0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X4.3 Representations of Minimal Degree[0X
  
  This   section   deals  with  minimal  degrees  of  permutation  and  matrix
  representations.  We do not provide an algorithm that computes these degrees
  for  an  arbitrary  group,  we  only provide some tools for evaluating known
  databases,  mainly  concerning  nearly simple groups, in order to derive the
  minimal degrees, see Section [14X4.3-4[0m.
  
  In  the  [5XAtlasRep[0m  package,  this  information  is  used in [2XDisplayAtlasInfo[0m
  ([14X2.5-1[0m),  [2XOneAtlasGeneratingSetInfo[0m  ([14X2.5-4[0m), and [2XAllAtlasGeneratingSetInfos[0m
  ([14X2.5-5[0m).
  
  [1X4.3-1 MinimalRepresentationInfo[0m
  
  [2X> MinimalRepresentationInfo( [0X[3Xgrpname, conditions[0X[2X ) _________________[0Xfunction
  [6XReturns:[0X  a record with the components [10Xvalue[0m and [10Xsource[0m, or [9Xfail[0m
  
  Let  [3Xgroupname[0m  be  the  [5XGAP[0m  name  of  a  group  G, say. If the information
  described  by  [3Xconditions[0m about minimal representations of this group can be
  computed  or  is stored then [2XMinimalRepresentationInfo[0m returns a record with
  the components [10Xvalue[0m and [10Xsource[0m, otherwise [9Xfail[0m is returned.
  
  The following values for [3Xconditions[0m are supported.
  
  --    If  [3Xconditions[0m is [2XNrMovedPoints[0m ([14XReference: NrMovedPoints[0m) then [10Xvalue[0m,
        if   known,   is   the   degree  of  a  minimal  faithful  permutation
        representation for G.
  
  --    If  [3Xconditions[0m  consists of [2XCharacteristic[0m ([14XReference: Characteristic[0m)
        and  a  prime  integer  [3Xp[0m  then [10Xvalue[0m, if known, is the dimension of a
        minimal faithful matrix representation in characteristic [3Xp[0m for [3XG[0m.
  
  --    If  [3Xconditions[0m  consists of [2XSize[0m ([14XReference: Size[0m) and a prime power [3Xq[0m
        then  [10Xvalue[0m,  if  known, is the dimension of a minimal faithful matrix
        representation over the field of size [3Xq[0m for [3XG[0m.
  
  In  all  cases,  the value of the component [10Xsource[0m is a list of strings that
  describe  sources  of  the information, which can be the ordinary or modular
  character  table  of [10XG[0m (see [CCNPW85], [JLPW95], [HL89]), the table of marks
  of  [10XG[0m,  or  [Jan05].  For  an overview of minimal degrees of faithful matrix
  representations  for  sporadic  simple groups and their covering groups, see
  also
  
  [7Xhttp://www.math.rwth-aachen.de/~MOC/mindeg/[0m.
  
  Note  that  this  function  does  not  give  any  information  about minimal
  representations over prescribed fields in characteristic zero.
  
  Information  about  groups that occur in the [5XAtlasRep[0m package is precomputed
  in [2XMinimalRepresentationInfoData[0m ([14X4.3-2[0m), so the packages [5XCTblLib[0m and [5XTomLib[0m
  are  not  needed  when [2XMinimalRepresentationInfo[0m is called for these groups.
  (The  only  case  that  is not covered by this list is that one asks for the
  minimal  degree  of  matrix  representations  over  a  prescribed  field  in
  characteristic coprime to the group order.)
  
  One of the following strings can be given as an additional last argument.
  
  [8X[10X"cache"[0m[8X[0m
        means  that the function tries to compute (and then store) values that
        are  not  stored  in [2XMinimalRepresentationInfoData[0m ([14X4.3-2[0m), but stored
        values are preferred; this is also the default.
  
  [8X[10X"lookup"[0m[8X[0m
        means  that  stored  values  are  returned  but  the function does not
        attempt    to    compute    values    that    are    not   stored   in
        [2XMinimalRepresentationInfoData[0m ([14X4.3-2[0m).
  
  [8X[10X"recompute"[0m[8X[0m
        means that the function always tries to compute the desired value, and
        checks the result against stored values.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> MinimalRepresentationInfo( "A5", NrMovedPoints );[0X
    [4Xrec( value := 5,[0X
    [4X  source := [ "computed (alternating group)", "computed (char. table)",[0X
    [4X      "computed (subgroup tables)",[0X
    [4X      "computed (subgroup tables, known repres.)",[0X
    [4X      "computed (table of marks)" ] )[0X
    [4Xgap> MinimalRepresentationInfo( "A5", Characteristic, 2 );[0X
    [4Xrec( value := 2, source := [ "computed (char. table)" ] )[0X
    [4Xgap> MinimalRepresentationInfo( "A5", Size, 2 );[0X
    [4Xrec( value := 4, source := [ "computed (char. table)" ] )[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.3-2 MinimalRepresentationInfoData[0m
  
  [2X> MinimalRepresentationInfoData______________________________[0Xglobal variable
  
  This  is  a  record  whose  components  are  [5XGAP[0m  names  of groups for which
  information  about minimal permutation and matrix representations were known
  in  advance  or have been computed in the current [5XGAP[0m session. The value for
  the group G, say, is a record with the following components.
  
  [8X[10XNrMovedPoints[0m[8X[0m
        a  record with the components [10Xvalue[0m (the degree of a smallest faithful
        permutation  representation  of G) and [10Xsource[0m (a string describing the
        source of this information).
  
  [8X[10XCharacteristic[0m[8X[0m
        a  record  whose components are at most [10X0[0m and strings corresponding to
        prime  integers, each bound to a record with the components [10Xvalue[0m (the
        degree  of  a  smallest  faithful  matrix  representation of G in this
        characteristic)  and  [10Xsource[0m  (a  string describing the source of this
        information).
  
  [8X[10XCharacteristicAndSize[0m[8X[0m
        a  record whose components are strings corresponding to prime integers
        [3Xp[0m,  each bound to a record with the components [10Xsizes[0m (a list of powers
        [3Xq[0m  of  [3Xp[0m), [10Xdimensions[0m (the corresponding list of minimal dimensions of
        faithful  matrix representations of G over a field of size [3Xq[0m), [10Xsources[0m
        (the  corresponding  list  of  strings  describing  the source of this
        information),  and [10Xcomplete[0m (a record with the components [10Xval[0m ([9Xtrue[0m if
        the minimal dimension over [13Xany[0m finite field in characteristic [3Xp[0m can be
        derived from the values in the record, and [9Xfalse[0m otherwise) and [10Xsource[0m
        (a string describing the source of this information)).
  
  The values are set by [2XSetMinimalRepresentationInfo[0m ([14X4.3-3[0m).
  
  [1X4.3-3 SetMinimalRepresentationInfo[0m
  
  [2X> SetMinimalRepresentationInfo( [0X[3Xgrpname, op, value, source[0X[2X ) _______[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m  if  the values were successfully set, [9Xfalse[0m if stored values
            contradict the given ones.
  
  This function sets an entry in [2XMinimalRepresentationInfoData[0m ([14X4.3-2[0m) for the
  group G, say, with [5XGAP[0m name [3Xgrpname[0m.
  
  Supported values for [3Xop[0m are
  
  --    [10X"NrMovedPoints"[0m  (see [2XNrMovedPoints[0m ([14XReference: NrMovedPoints[0m)), which
        means  that  [3Xvalue[0m  is  the  degree  of  minimal  faithful permutation
        representations of G,
  
  --    a   list   of  length  two  with  first  entry  [10X"Characteristic"[0m  (see
        [2XCharacteristic[0m  ([14XReference:  Characteristic[0m))  and  second  entry [3Xchar[0m
        either  zero  or  a  prime  integer,  which  means  that  [3Xvalue[0m is the
        dimension   of   minimal  faithful  matrix  representations  of  G  in
        characteristic [3Xchar[0m,
  
  --    a  list  of  length  two with first entry [10X"Size"[0m (see [2XSize[0m ([14XReference:
        Size[0m)) and second entry a prime power [3Xq[0m, which means that [3Xvalue[0m is the
        dimension  of  minimal  faithful  matrix representations of G over the
        field with [3Xq[0m elements, and
  
  --    a  list  of  length  three  with  first  entry  [10X"Characteristic"[0m  (see
        [2XCharacteristic[0m  ([14XReference:  Characteristic[0m)),  second  entry  a prime
        integer [3Xp[0m, and third entry the string [10X"complete"[0m, which means that the
        information  stored for characteristic [3Xp[0m is complete in the sense that
        for any given power q of [3Xp[0m, the minimal faithful degree over the field
        with q elements equals that for the largest stored field size of which
        q is a power.
  
  In each case, [3Xsource[0m is a string describing the source of the data; [13Xcomputed[0m
  values are detected from the prefix [10X"comp"[0m of [3Xsource[0m.
  
  If the intended value is already stored and differs from [3Xvalue[0m then an error
  message is printed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", "NrMovedPoints", 5,[0X
    [4X>      "computed (alternating group)" );[0X
    [4Xtrue[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", [ "Characteristic", 0 ], 3,[0X
    [4X>      "computed (char. table)" );[0X
    [4Xtrue[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", [ "Characteristic", 2 ], 2,[0X
    [4X>      "computed (char. table)" );[0X
    [4Xtrue[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", [ "Size", 2 ], 4,[0X
    [4X>      "computed (char. table)" );[0X
    [4Xtrue[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", [ "Size", 4 ], 2,[0X
    [4X>      "computed (char. table)" );[0X
    [4Xtrue[0X
    [4Xgap> SetMinimalRepresentationInfo( "A5", [ "Characteristic", 3 ], 3,[0X
    [4X>      "computed (char. table)" );[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X4.3-4 Criteria Used to Compute Minimality Information[0X
  
  Let [3Xgrpname[0m be the [5XGAP[0m name of a group G, say.
  
  The information about the minimal degree of a faithful [13Xmatrix representation[0m
  of  G  in  a  given  characteristic  or  over  a  given  field  in  positive
  characteristic  is derived from the relevant (ordinary or modular) character
  table  of  G, except in a few cases where this table itself is not known but
  enough information about the degrees is available in [HL89] and [Jan05].
  
  The  following  criteria  are  used  for  deriving  the  minimal degree of a
  faithful  [13Xpermutation  representation[0m  of  G from the information in the [5XGAP[0m
  libraries of character tables and of tables of marks.
  
  --    If [3Xgrpname[0m has the form [10XA[3Xn[0m[10X[0m or [10XA[3Xn[0m[10X.2[0m (denoting alternating and symmetric
        groups,  respectively)  then  the  minimal degree is [3Xn[0m, except if [3Xn[0m is
        smaller than 3 or 2, respectively.
  
  --    If  [3Xgrpname[0m  has  the  form  [10XL2([3Xq[0m[10X)[0m (denoting projective special linear
        groups in dimension two) then the minimal degree is [3Xq[0m + 1, except if [3Xq[0m
        in { 2, 3, 5, 7, 9, 11 }, see [Hup67, Satz II.8.28].
  
  --    If  the  largest  maximal subgroup of G is core-free then the index of
        this  subgroup  is  the  minimal  degree.  (This  is used when the two
        character tables in question and the class fusion are available in the
        [5XGAP[0m Character Table Library; this happens for many character tables of
        simple groups.)
  
  --    If  G  has a unique minimal normal subgroup then each minimal faithful
        permutation representation is transitive.
  
        In  this  case,  the  minimal degree can be computed directly from the
        information  in  the table of marks of G if this is available in [5XGAP[0m's
        library of tables of marks.
  
        Suppose  that  the  largest maximal subgroup of G is not core-free but
        simple  and normal in G, and that the other maximal subgroups of G are
        core-free.  In  this  case,  we take the minimum of the indices of the
        core-free  maximal  subgroups  and of the product of index and minimal
        degree  of  the  normal  maximal  subgroup.  (This  suffices  since no
        core-free  subgroup of the whole group can contain a nontrivial normal
        subgroup of a normal maximal subgroup.)
  
        Let  N be the unique minimal normal subgroup of G, and assume that G/N
        is  simple  and has minimal degree n, say. If there is a subgroup U of
        index n * |N| in G that intersects N trivially then the minimal degree
        of G is n * |N|. (This is used for the case that N is central in G and
        N x U occurs as a subgroup of G.)
  
  --    If  we  know a subgroup of G whose minimal degree is [3Xn[0m, say, and if we
        know either (a class fusion from) a core-free subgroup of index [3Xn[0m in G
        or  a  faithful permutation representation of degree [3Xn[0m for G then [3Xn[0m is
        the  minimal  degree  for  G. (This happens often for tables of almost
        simple groups.)
  
  [1X4.3-5 AGR_TestMinimalDegrees[0m
  
  [2X> AGR_TestMinimalDegrees( [0X[3X[0X[2X ) _______________________________________[0Xfunction
  [6XReturns:[0X  [9Xtrue[0m if no contradiction was found, and [9Xfalse[0m otherwise.
  
  This  function  checks  that  the  (permutation  and matrix) representations
  available  in  the [5XATLAS[0m of group representations do not have smaller degree
  than the claimed minimum.
  
  An error message is printed for each contradiction found.
  
  [1X4.3-6 BrowseMinimalDegrees[0m
  
  [2X> BrowseMinimalDegrees( [0X[3X[groupnames][0X[2X ) _____________________________[0Xfunction
  [6XReturns:[0X  the list of info records for the clicked representations.
  
  If  the  [5XGAP[0m  package  [5XBrowse[0m  (see  [BL08])  is  loaded  then  the function
  [2XBrowseMinimalDegrees[0m  is  available.  It  opens  a  browse  table whose rows
  correspond  to  the  groups  for  which  the  [5XATLAS[0m of Group Representations
  contains some information about minimal degrees, whose columns correspond to
  the  characteristics  that  occur,  and  whose entries are the known minimal
  degrees.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> if LoadPackage( "browse", "1.2" ) = true then[0X
    [4X>   down:= NCurses.keys.DOWN;;  DOWN:= NCurses.keys.NPAGE;;[0X
    [4X>   right:= NCurses.keys.RIGHT;;  END:= NCurses.keys.END;;[0X
    [4X>   enter:= NCurses.keys.ENTER;;  nop:= [ 14, 14, 14 ];;[0X
    [4X>   # just scroll in the table[0X
    [4X>   BrowseData.SetReplay( Concatenation( [ DOWN, DOWN, DOWN,[0X
    [4X>          right, right, right ], "sedddrrrddd", nop, nop, "Q" ) );[0X
    [4X>   BrowseMinimalDegrees();;[0X
    [4X>   # restrict the table to the groups with minimal ordinary degree 6[0X
    [4X>   BrowseData.SetReplay( Concatenation( "scf6",[0X
    [4X>        [ down, down, right, enter, enter ] , nop, nop, "Q" ) );[0X
    [4X>   BrowseMinimalDegrees();;[0X
    [4X>   BrowseData.SetReplay( false );[0X
    [4X> fi;[0X
  [4X------------------------------------------------------------------[0X
  
  If  an argument [3Xgroupnames[0m is given then it must be a list of group names of
  the  [5XATLAS[0m  of Group Representations; the browse table is then restricted to
  the  rows  corresponding  to  these  group names and to the columns that are
  relevant  for  these  groups.  A perhaps interesting example is the subtable
  with  the  data concerning sporadic simple groups and their covering groups,
  which has been published in [Jan05]. This table can be shown as follows.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> if LoadPackage( "browse", "1.2" ) = true then[0X
    [4X>   # just scroll in the table[0X
    [4X>   BrowseData.SetReplay( Concatenation( [ DOWN, DOWN, DOWN, END ],[0X
    [4X>          "rrrrrrrrrrrrrr", nop, nop, "Q" ) );[0X
    [4X>   BrowseMinimalDegrees( BibliographySporadicSimple.groupNamesJan05 );;[0X
    [4X> fi;[0X
  [4X------------------------------------------------------------------[0X
  
  (The  browse  table  does  not  contain rows for the groups 6.M_22, 12.M_22,
  6.Fi_22.  Note that in spite of the title of [Jan05], the entries in Table 1
  of  this  paper  are  in  fact  the  minimal degrees of faithful [13Xirreducible[0m
  representations, and in the above three cases, these degrees are larger than
  the  minimal degrees of faithful representations. The underlying data of the
  browse table is about the minimal faithful degrees.)
  
  The    return    value    of    [2XBrowseMinimalDegrees[0m    is   the   list   of
  [2XOneAtlasGeneratingSetInfo[0m ([14X2.5-4[0m) values for those representations that have
  been "clicked" in visual mode.
  
  The variant without arguments of this function is also available in the menu
  shown by [2XBrowseGapData[0m ([14XBrowse: BrowseGapData[0m).
  
  
  [1X4.4 Bibliographies of Sporadic Simple Groups[0X
  
  The  bibliographies contained in the [5XATLAS[0m of Finite Groups [CCNPW85] and in
  the [5XATLAS[0m of Brauer Characters [JLPW95] are available online in HTML format,
  see [7Xhttp://www.gap-system.org/Manuals/pkg/atlasrep/bibl/index.html[0m.
  
  The source data in BibXMLext format is part of the [5XAtlasRep[0m package, in four
  files with suffix [11Xxml[0m in the package's [11Xbibl[0m directory. Note that each of the
  two books contains two bibliographies.
  
  Details  about  the BibXMLext format, including information how to transform
  the  data into other formats such as BibTeX, can be found in the [5XGAP[0m package
  [5XGAPDoc[0m (see [LN08]).
  
  These     source     files     are     used    also    by    the    function
  [2XBrowseBibliographySporadicSimple[0m ([14X4.4-1[0m).
  
  [1X4.4-1 BrowseBibliographySporadicSimple[0m
  
  [2X> BrowseBibliographySporadicSimple( [0X[3X[0X[2X ) _____________________________[0Xfunction
  [6XReturns:[0X  a    record   as   returned   by   [2XParseBibXMLExtString[0m   ([14XGAPDoc:
            ParseBibXMLextString[0m).
  
  If  the  [5XGAP[0m  package  [5XBrowse[0m  (see  [BL08]) is loaded then this function is
  available.  It  opens a browse table whose rows correspond to the entries of
  the  bibliographies of the [5XATLAS[0m of Finite Groups [CCNPW85] and the [5XATLAS[0m of
  Brauer Characters [JLPW95].
  
  The  function  is  based on [2XBrowseBibliography[0m ([14XBrowse: BrowseBibliography[0m),
  see  the  documentation of this function for details, e.g., about the return
  value.
  
  The  returned record encodes the bibliography entries corresponding to those
  rows  of  the table that are "clicked" in visual mode, in the same format as
  the return value of [2XParseBibXMLExtString[0m ([14XGAPDoc: ParseBibXMLextString[0m), see
  the manual of the [5XGAP[0m package [5XGAPDoc[0m [LN08] for details.
  
  [2XBrowseBibliographySporadicSimple[0m  can  be  called also via the menu shown by
  [2XBrowseGapData[0m ([14XBrowse: BrowseGapData[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> if LoadPackage( "browse", "1.2" ) = true then[0X
    [4X>   enter:= NCurses.keys.ENTER;;  nop:= [ 14, 14, 14 ];;[0X
    [4X>   BrowseData.SetReplay( Concatenation([0X
    [4X>     # choose the application[0X
    [4X>     "/Bibliography of Sporadic Simple Groups", [ enter, enter ],[0X
    [4X>     # search in the title column for the Atlas of Finite Groups[0X
    [4X>     "scr/Atlas of finite groups", [ enter,[0X
    [4X>     # and quit[0X
    [4X>     nop, nop, nop, nop ], "Q" ) );[0X
    [4X>   BrowseGapData();;[0X
    [4X>   BrowseData.SetReplay( false );[0X
    [4X> fi;[0X
  [4X------------------------------------------------------------------[0X
  
