90 Appendix -- utility functions of CHEVIE

The functions described below, used in various parts of the CHEVIE\ package, are of a general nature and should really be included in other parts of the GAP library. We include them here for the moment for the commodity of the reader.

Subsections

  1. CharParams
  2. CharName
  3. PositionId
  4. InductionTable
  5. CharRepresentationWords
  6. PositionClass
  7. PointsAndRepresentativesOrbits
  8. SublistUnbnd
  9. Coefficient
  10. GetRoot
  11. IntListToString
  12. Join
  13. Split
  14. Replace
  15. SymmetricDifference

90.1 CharParams

CharParams(G)

G should be a group or another object which has a method CharTable, or a character table. The function CharParams tries to determine a list of labels for the characters of G. If G has a method CharParams this is called. Otherwise, if G is not a character table, its CharTable is called. If the table has a field .charparam in .irredinfo this is returned. Otherwise, the list [1..Length(G.irreducibles)] is returned.

    gap> CharParams(CoxeterGroup("A",2));
    [ [ [ 1, 1, 1 ] ], [ [ 2, 1 ] ], [ [ 3 ] ] ]
    gap> CharParams(Group((1,2),(2,3))); 
    #W  Warning: Group has no name
    [ 1 .. 3 ]

This function requires the package "chevie" (see RequirePackage).

90.2 CharName

CharName(G, param)

G should be a group and param a parameter of a character of that group (as returned by CharParams). If G has a method CharName, the function returns the result of that method, which is a string which displays nicely param (this is used by CHEVIE to nicely fill the .charNames in a CharTable -- all finite reflection groups have such methods CharName).

    gap> G:=CoxeterGroup("G", 2);
    CoxeterGroup("G",2)
    gap> CharParams(G);
    [ [ [ 1, 0 ] ], [ [ 1, 6 ] ], [ [ 1, 3, "'" ] ], [ [ 1, 3, "''" ] ], 
      [ [ 2, 1 ] ], [ [ 2, 2 ] ] ]
    gap>  List(last,x->CharName(G,x));
    [ "phi{1,0}", "phi{1,6}", "phi{1,3}'", "phi{1,3}''", "phi{2,1}",
      "phi{2,2}" ]

This function requires the package "chevie" (see RequirePackage).

90.3 PositionId

PositionId( G )

G should be a group, a character table, an Hecke algebra or another object which has characters. PositionId returns the position of the identity character in the character table of G.

    gap> W := CoxeterGroup( "D", 4 );;
    gap> PositionId( W );
    13

This function requires the package "chevie" (see RequirePackage).

90.4 InductionTable

InductionTable( S, G )

InductionTable computes the decomposition of the induced characters from the subgroup S into irreducible characters of G. The rows correspond to the characters of the parent group, the columns to those of the subgroup. What is returned is actually a record with several fields: .scalar contains the induction table proper, and there is a Display method. The other fields contain labeling information taken from the character tables of S and G when it exists.

    gap> G := Group( [ (1,2), (2,3), (3,4) ], () );
    Group( (1,2), (2,3), (3,4) )
    gap> S:=Subgroup( G, [ (1,2), (3,4) ] );
    Subgroup( Group( (1,2), (2,3), (3,4) ), [ (1,2), (3,4) ] )
    gap> G.name := "G";; S.name := "S";; # to avoid warnings
    gap> Display( InductionTable( S, G ) );
    Induction from S to G
        | X1a X1b X1c X1d
    _____________________
    X1a |   1   .   .   .
    X1b |   .   .   .   1
    X2a |   1   .   .   1
    X3a |   .   1   1   1
    X3b |   1   1   1   . 

    gap> G := CoxeterGroup( "G", 2 );;
    gap> S := ReflectionSubgroup( G, [ 1, 4 ] );
    ReflectionSubgroup(CoxeterGroup("G",2), [ 1, 4 ])
    gap> t := InductionTable( S, G );       
    InductionTable( ReflectionSubgroup(CoxeterGroup("G",2), 
    [ 1, 4 ]), CoxeterGroup("G",2))
    gap> Display( t );
    Induction from A1x~A1 to G2
               | 11,11 11,2 2,11 2,2
    ________________________________
    phi{1,0}   |     .    .    .   1
    phi{1,6}   |     1    .    .   .
    phi{1,3}'  |     .    1    .   .
    phi{1,3}'' |     .    .    1   .
    phi{2,1}   |     .    1    1   .
    phi{2,2}   |     1    .    .   1 

If one does not want to see the whole induction table, one can specify the characters of the subgroup and of the parent group by giving a second argument to Display. This second argument is a record with optional components charsGroup and charsSubgroup, to which one has to assign the lists of rows and columns which should be printed.

    gap> Display( t,rec( charsGroup := [5], charsSubgroup := [2,3] ) );
    Induction from A1x~A1 to G2
             | 11,2 2,11
    ____________________
    phi{2,1} |    1    1 

This function requires the package "chevie" (see RequirePackage).

90.5 CharRepresentationWords

CharRepresentationWords( rep , elts )

given a list rep of matrices corresponding to generators and a list elts of words in the generators it returns the list of traces of the corresponding representation on the elements in elts.

    gap> H := Hecke(CoxeterGroup( "F", 4 ));;
    gap> r := ChevieClassInfo( Group( H ) ).classtext;;
    gap> t := HeckeReflectionRepresentation( H );;
    gap> CharRepresentationWords( t, r );
    [ 4, -4, 0, 1, -1, 0, 1, -1, -2, 2, 0, 2, -2, -1, 1, 0, 2, -2, -1,
      1, 0, 0, 2, -2, 0 ] 

This function requires the package "chevie" (see RequirePackage).

90.6 PositionClass

PositionClass( G, c )

G must be a domain for which ConjugacyClasses is defined and c must be an element of G. This functions returns a positive integer i such that c in ConjugacyClasses( G )[i].

    gap> G := Group( (1,2)(3,4), (1,2,3,4,5) );;
    gap> ConjugacyClasses( G );
    [ ConjugacyClass( Group( (1,2)(3,4), (1,2,3,4,5) ), () ), 
      ConjugacyClass( Group( (1,2)(3,4), (1,2,3,4,5) ), (3,4,5) ), 
      ConjugacyClass( Group( (1,2)(3,4), (1,2,3,4,5) ), (2,3)(4,5) ), 
      ConjugacyClass( Group( (1,2)(3,4), (1,2,3,4,5) ), (1,2,3,4,5) ), 
      ConjugacyClass( Group( (1,2)(3,4), (1,2,3,4,5) ), (1,2,3,5,4) ) ]
    gap>  g := Random( G );
    (1,2,5,4,3)
    gap> PositionClass( G, g );
    5 

This function requires the package "chevie" (see RequirePackage).

90.7 PointsAndRepresentativesOrbits

PointsAndRepresentativesOrbits( G[, m] )

returns a pair [orb, rep] where orb is a list of the orbits of the permutation group G on [ 1..LargestMovedPoint( G ) ] and rep is a list of list of elements of G such that rep[i][j] applied to orb[i][1] yields orb[i][j] for all i,j. If the optional argument m is given, then LargestMovedPoint( G ) is replaced by the integer m.

    gap> G := Group( (1,7)(2,3)(5,6)(8,9)(11,12), 
    >                (1,5)(2,8)(3,4)(7,11)(9,10) );;
    gap> PointsAndRepresentativesOrbits( G );
    [ [ [ 1, 7, 5, 11, 6, 12 ], [ 2, 3, 8, 4, 9, 10 ] ], 
      [ [ (), ( 1, 7)( 2, 3)( 5, 6)( 8, 9)(11,12), 
              ( 1, 5)( 2, 8)( 3, 4)( 7,11)( 9,10), 
              ( 1,11,12, 7, 5, 6)( 2, 4, 3, 8,10, 9), 
              ( 1, 6, 5, 7,12,11)( 2, 9,10, 8, 3, 4), 
              ( 1,12)( 2, 4)( 3, 9)( 6, 7)( 8,10) ], 
          [ (), ( 1, 7)( 2, 3)( 5, 6)( 8, 9)(11,12), 
              ( 1, 5)( 2, 8)( 3, 4)( 7,11)( 9,10), 
              ( 1,11,12, 7, 5, 6)( 2, 4, 3, 8,10, 9), 
              ( 1, 6, 5, 7,12,11)( 2, 9,10, 8, 3, 4), 
              ( 1, 6)( 2,10)( 4, 8)( 5,11)( 7,12) ] ] ] 

This function requires the package "chevie" (see RequirePackage).

90.8 SublistUnbnd

SublistUnbnd( l, ind )

Sublist of a list with possibly unbound entries.

The writing of this function was prompted by the fact that if l has some unbound entries, l{ind} returns an error message instead of doing what is expected (which is what this routine does).

    gap> l := [ 1, , 2, , , 3 ];;
    gap> SublistUnbnd( l, [ 1..4 ] );
    [ 1,, 2 ] 

If you use l{[ 1..4 ]}, you get an error message.

This function requires the package "chevie" (see RequirePackage).

90.9 Coefficient

Coefficient( a, b )

generic routine which looks if a has a Coefficient method in its operations record and then returns a.operations.Coefficient(a,b).

90.10 GetRoot

GetRoot( x, n [, msg])

n must be a positive integer. GetRoot returns an n-th root of x when possible, else signals an error. If msg is present and InfoChevie=Print a warning message is printed about which choice of root has been made, after printing msg.

In the current implementation, it is possible to find an n-th root when x is one of the following GAP objects:

1- a monomial of the form a*q^(b*n) when we know how to find a root of a. The root chosen is GetRoot(a,n)*q^b.

2- a root of unity of the form E(a)^i. The root chosen is E(a*n)^i.

3- an integer, when n=2 (the root chosen is ER(x)) or when x is a perfect n-th power of a (the root chosen is a).

4- a product of an x of form 2- by an x of form 3-.

5- when x is a record and has a method x.operations.GetRoot the work is delegated to that method.

     gap> q:=X(Cyclotomics);;q.name:="q";;
     gap> GetRoot(E(3)*q^2,2,"test");
     
#
warning: test: E3^2q chosen as 2nd root of (E(3))*q^2
     (E(3)^2)*q
     gap> GetRoot(1,2,"test");       
     
#
warning: test: 1 chosen as 2nd root of 1
     1

The example above shows that GetRoot is not compatible with specialization: E(3)*q^2 evaluated at E(3) is 1 whose root chosen by GetRoot is 1, while (-E(3)^2)*q evaluated at E(3) is -1. Actually it can be shown that it is not possible mathematically to define a function GetRoot compatible with specializations. This is why there is a provision in functions for character tables of Hecke algebras to provide explicit roots.

     gap> GetRoot(8,3);       
     2
     gap> GetRoot(7,3);
     Error, unable to compute 3-th root of 7:
      in
     GetRoot( 7, 3 ) called from
     main loop
     brk>

This function requires the package "chevie" (see RequirePackage).

90.11 IntListToString

IntListToString( part [, brackets] )

part must be a list of positive integers. If all of them are smaller than 10 then a string of digits corresponding to the entries of part is returned. If an entry is ≥ 10 then the elements of part are converted to strings, concatenated with separating commas and the result surrounded by brackets. By default () brackets are used. This may be changed by giving as second argument a length two string specifying another kind of brackets.

    gap> IntListToString( [ 4, 2, 2, 1, 1 ] );
    "42211"
    gap> IntListToString( [ 14, 2, 2, 1, 1 ] );
    "(14,2,2,1,1)"
    gap> IntListToString( [ 14, 2, 2, 1, 1 ], "{}" );
    "{14,2,2,1,1}" 

This function requires the package "chevie" (see RequirePackage).

90.12 Join

Join( list [, delimiter] )

This function is similar to the Perl function of the same name. It first applies the function String to all elements of the list, then joins the resulting strings, separated by the given delimiter (if omitted, "," is used as a delimiter)

   gap> Join([1..4]);
   "1,2,3,4"
   gap> Join([1..4],"foo");
   "1foo2foo3foo4"

This function requires the package "chevie" (see RequirePackage).

90.13 Split

Split( s [, delimiter] )

This function is similar to the Perl function of the same name. It splits the string s at each occurrence of the delimiter (a character). If delimiter is omitted, ',' is used as a delimiter.

   gap> Split("14,2,2,1,");
    [ "14" , "2" , "2" , "1" , "" ]

This function requires the package "chevie" (see RequirePackage).

90.14 Replace

Replace( s [, s1, r1 [, s2, r2 [...]]])

Replaces in list s all (non-overlapping) occurrences of sublist s1 by list r1, then all occurrences of s2 by r2, etc...

     gap> Replace("aabaabaabbb","aabaa","c","cba","def","bbb","ult");
     "default"

This function requires the package "chevie" (see RequirePackage).

90.15 SymmetricDifference

SymmetricDifference( S, T)

This function returns the symmetric difference of the sets S and T, that is, Difference(Union(x,y),IntersectionSet(x,y).

     gap>SymmetricDifference([1,2],[2,3]);
     [1,3]

This function requires the package "chevie" (see RequirePackage).

Previous Up Next
Index

GAP 3.4.4
April 1997