  
  [1X4 [33X[0;0YMiscellaneous useful functions[133X[101X
  
  
  [1X4.1 [33X[0;0YPredicates for representations[133X[101X
  
  [1X4.1-1 IsFiniteGroupLinearRepresentation[101X
  
  [33X[1;0Y[29X[2XIsFiniteGroupLinearRepresentation[102X( [3Xrho[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ytrue or false[133X
  
  [33X[0;0YTells  you  if  [3Xrho[103X  is  a  linear  representation  of  a  finite group. The
  algorithms implemented in this package work on these homomorphisms only.[133X
  
  [1X4.1-2 IsFiniteGroupPermutationRepresentation[101X
  
  [33X[1;0Y[29X[2XIsFiniteGroupPermutationRepresentation[102X( [3Xrho[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ytrue or false[133X
  
  [33X[0;0YTells  you  if  [3Xrho[103X  is  a homomorphism from a finite group to a permutation
  group.[133X
  
  
  [1X4.2 [33X[0;0YEfficient summing over groups[133X[101X
  
  [1X4.2-1 GroupSumBSGS[101X
  
  [33X[1;0Y[29X[2XGroupSumBSGS[102X( [3XG[103X, [3Xsummand[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[23X\sum_{g \in G} \mbox{summand}(g)[123X[133X
  
  [33X[0;0YUses a basic stabiliser chain for [23XG[123X to compute the sum described above. This
  trick  requires  [3Xsummand[103X  to be a function (in the GAP sense) that defines a
  monoid  homomorphism  (in  the  mathematical  sense). The computation of the
  stabiliser  chain assumes [3XG[103X is a group. More precisely, if we have the basic
  stabiliser chain:[133X
  
  
  [24X[33X[0;6Y\{1\} = G_1 \leq \ldots \leq G_n = G[133X
  
  [124X
  
  [33X[0;0YWe  traverse  the  chain  from [23XG_1[123X to [23XG_n[123X, using the previous sum [23XG_{i-1}[123X to
  build the sum [23XG_i[123X. We do this by using the fact that (writing [23Xf[123X for [3Xsummand[103X)[133X
  
  
  [24X[33X[0;6Y\sum_{g  \in  G_i}  f(g) = \sum_{r_j} \left(\sum_{h \in G_{i-1}} f(h)\right)
  f(r_j)[133X
  
  [124X
  
  [33X[0;0Ywhere  the  [23Xr_j[123X  are  right  coset  representatives  of  [23XG_{i-1}[123X in [23XG_i[123X. The
  condition  on  [3Xsummand[103X  is  satisfied  if,  for  example,  it  is  a  linear
  representation of a group [3XG[103X.[133X
  
  
  [1X4.3 [33X[0;0YSpace-efficient representation of tensors of matrices[133X[101X
  
  [33X[0;0YSuppose we have representations of [23XG[123X, [23X\rho[123X and [23X\tau[123X, with degree [23Xn[123X and [23Xm[123X. If
  we  would  like  to  construct  the tensor product representation of [23XG[123X, [23X\rho
  \otimes  \tau[123X, the usual way to do it would be to take the Kronecker product
  of  the  matrices.  This  means we now have to store very large [23Xnm \times nm[123X
  matrices  for each generator of [23XG[123X. This can be avoided by storing the tensor
  of  matrices  as  pairs, essentially storing [23XA \otimes B[123X as a pair [23X(A,B)[123X and
  implementing   group   operations   on   top   of  these,  along  with  some
  representation-theoretic  functions.  It  is  only  possible to guarantee an
  economical  representation  for  pure  tensors,  i.e. matrices of the form [23XA
  \otimes  B[123X.  These  are  closed  under group operations, so it is natural to
  define a group structure.[133X
  
  [1X4.3-1 IsTensorProductOfMatricesObj[101X
  
  [33X[1;0Y[29X[2XIsTensorProductOfMatricesObj[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X
  
  [33X[0;0YPosition  [23Xi[123X  in  this  representation  stores  the  matrix [23XA_i[123X in the tensor
  product [23XA_1 \otimes A_2[123X.[133X
  
  [1X4.3-2 IsTensorProductPairRep[101X
  
  [33X[1;0Y[29X[2XIsTensorProductPairRep[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X
  
  [33X[0;0YPosition  1  stores the full Kronecker product of the matrices, this is very
  space inefficient and supposed to be used as a last resort.[133X
  
  [1X4.3-3 IsTensorProductKroneckerRep[101X
  
  [33X[1;0Y[29X[2XIsTensorProductKroneckerRep[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X
  
  [33X[0;0YMore  convenient  constructor  for  a  tensor product (automatically handles
  family)[133X
  
  [1X4.3-4 TensorProductOfMatrices[101X
  
  [33X[1;0Y[29X[2XTensorProductOfMatrices[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YThis  uses the multiplicativity of characters when taking tensor products to
  avoid having to compute the trace of a big matrix.[133X
  
  [1X4.3-5 CharacterOfTensorProductOfRepresentations[101X
  
  [33X[1;0Y[29X[2XCharacterOfTensorProductOfRepresentations[102X( [3Xarg[103X ) [32X function[133X
  
  
  [1X4.4 [33X[0;0YMatrices and homomorphisms[133X[101X
  
  [1X4.4-1 ComposeHomFunction[101X
  
  [33X[1;0Y[29X[2XComposeHomFunction[102X( [3Xhom[103X, [3Xfunc[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YHomomorphism g given by g(x) = func(hom(x)).[133X
  
  [33X[0;0YThis  is  mainly for convenience, since it handles all GAP accounting issues
  regarding the range, ByImages vs ByFunction, etc.[133X
  
  
  [1X4.5 [33X[0;0YRepresentation theoretic functions[133X[101X
  
  [1X4.5-1 TensorProductRepLists[101X
  
  [33X[1;0Y[29X[2XTensorProductRepLists[102X( [3Xlist1[103X, [3Xlist2[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YAll possible tensor products given by [23X\rho \otimes \tau[123X where [23X\rho
            :  G  \to  \mbox{GL}(V)[123X  is  taken  from  [3Xlist1[103X  and  [23X\tau : H \to
            \mbox{GL}(W)[123X  is  taken  from  [3Xlist2[103X. The result is then a list of
            representations of [23XG \times H[123X.[133X
  
  [1X4.5-2 DirectSumOfRepresentations[101X
  
  [33X[1;0Y[29X[2XDirectSumOfRepresentations[102X( [3Xlist[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YDirect sum of the list of representations [3Xlist[103X[133X
  
  [1X4.5-3 DegreeOfRepresentation[101X
  
  [33X[1;0Y[29X[2XDegreeOfRepresentation[102X( [3Xrho[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YDegree  of  the representation [3Xrho[103X. That is, [23X\mbox{Tr}(\rho(e_G))[123X,
            where [23Xe_G[123X is the identity of the group [23XG[123X that [3Xrho[103X has as domain.[133X
  
  [1X4.5-4 PermToLinearRep[101X
  
  [33X[1;0Y[29X[2XPermToLinearRep[102X( [3Xrho[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YLinear   representation   [23X\rho[123X   isomorphic   to  the  permutation
            representation [3Xrho[103X.[133X
  
  [1X4.5-5 IsOrthonormalSet[101X
  
  [33X[1;0Y[29X[2XIsOrthonormalSet[102X( [3XS[103X, [3Xprod[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YWhether  [3XS[103X is an orthonormal set with respect to the inner product
            [3Xprod[103X.[133X
  
