  
  [1X6 [33X[0;0YCentralizer (commutant) rings[133X[101X
  
  
  [1X6.1 [33X[0;0YFinding a basis for the centralizer[133X[101X
  
  [1X6.1-1 CentralizerBlocksOfRepresentation[101X
  
  [33X[1;0Y[29X[2XCentralizerBlocksOfRepresentation[102X( [3Xrho[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YList  of  vector  space  generators  for  the  centralizer ring of
            [23X\rho(G)[123X,      written      in      the      basis     given     by
            [2XBlockDiagonalBasisOfRepresentation[102X ([14X5.1-1[114X). The matrices are given
            as a list of blocks.[133X
  
  [33X[0;0YLet  [23XG[123X  have irreducible representations [23X\rho_i[123X with multiplicities [23Xm_i[123X. The
  centralizer  has  dimension  [23X\sum_i m_i^2[123X as a [23X\mathbb{C}[123X-vector space. This
  function gives the minimal number of generators required.[133X
  
  [1X6.1-2 CentralizerOfRepresentation[101X
  
  [33X[1;0Y[29X[2XCentralizerOfRepresentation[102X( [3Xarg[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YList  of  vector  space  generators  for  the  centralizer ring of
            [23X\rho(G)[123X.[133X
  
  [33X[0;0YThis gives the same result as [2XCentralizerBlocksOfRepresentation[102X ([14X6.1-1[114X), but
  with  the  matrices  given in their entirety: not as lists of blocks, but as
  full matrices.[133X
  
  
  [1X6.2 [33X[0;0YUsing the centralizer for computations[133X[101X
  
  [1X6.2-1 ClassSumCentralizer[101X
  
  [33X[1;0Y[29X[2XClassSumCentralizer[102X( [3Xrho[103X, [3Xclass[103X, [3Xcent_basis[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[23X\sum_{s  \in  t^G}  \rho(s)[123X,  where  [23Xt[123X  is a representative of the
            conjugacy class [3Xclass[103X of [23XG[123X.[133X
  
  [33X[0;0YWe  require  that  [3Xrho[103X  is  unitary.  Uses the given orthonormal basis (with
  respect  to the inner product [23X\langle A, B \rangle = \mbox{Trace}(AB^*)[123X) for
  the  centralizer  ring  of  [3Xrho[103X  to calculate the sum of the conjugacy class
  [3Xclass[103X  quickly, i.e. without summing over the class. NOTE: Orthonormality of
  [3Xcent_basis[103X  and  unitarity  of  [3Xrho[103X  are  checked. See [2XClassSumCentralizerNC[102X
  ([14X6.2-2[114X)  for  a  version of this function without checks. The checks are not
  very expensive, so it is recommended you use the function with checks.[133X
  
  [1X6.2-2 ClassSumCentralizerNC[101X
  
  [33X[1;0Y[29X[2XClassSumCentralizerNC[102X( [3Xrho[103X, [3Xclass[103X, [3Xcent_basis[103X ) [32X function[133X
  
  [33X[0;0YThe  same  as  [2XClassSumCentralizer[102X ([14X6.2-1[114X), but does not check the basis for
  orthonormality or the representation for unitarity.[133X
  
