Computing decompositions of representations
Block diagonalizing Given a representation \rho : G \to GL(V), it is often desirable to find a basis for V that block diagonalizes each \rho(g) with the block sizes being as small as possible. This speeds up matrix algebra operations, since they can now be done block-wise. Basis for V that block diagonalizes \rho. Let G have irreducible representations \rho_i, with dimension d_i and multiplicity m_i. The basis returned by this operation gives each \rho(g) as a block diagonal matrix which has m_i blocks of size d_i \times d_i for each i. Representation of G isomorphic to \rho where the images \rho(g) are block diagonalized. This is just a convenience operation that uses to calculate the basis change matrix and applies it to put \rho into the block diagonalised form.
Algorithms due to the authors A record in the same format as Computes the same values as , taking the same options. The heavy lifting of this method is done by , where there are some further options that can be passed to influence algorithms used.

<#Include Label="Example_REPN_ComputeUsingMyMethod">

A record in the same format as . Performs the same computation as , but first splits the representation into canonical summands using . This might reduce the size of the matrices we need to work with significantly, so could be much faster.

If the option `parallel` is given, the decomposition of canonical summands into irreps is done in parallel, which could be much faster.

<#Include Label="Example_REPN_ComputeUsingMyMethodCanonical">

Algorithms due to Serre Note: all computation in this section is actually done in the function , the other functions are wrappers around it. List of vector spaces V_i, each G-invariant and a direct sum of isomorphic irreducibles. That is, for each i, V_i \cong \oplus_j W_i (as representations) where W_i is an irreducible G-invariant vector space. Computes the canonical decomposition of V into \oplus_i\;V_i using the formulas for projections V \to V_i due to Serre. You can pass in the option `irreps` with a list of irreps of G, and this will be used instead of computing a complete list ourselves. If you already know which irreps will appear in \rho, for instance, this will save time.

<#Include Label="Example_CanonicalDecomposition">

List of vector spaces W_j such that V = \oplus_j W_j and each W_j is an irreducible G-invariant vector space. Computes the decomposition of V into irreducible subprepresentations.

<#Include Label="Example_IrreducibleDecomposition">

List of lists V_i of vector spaces V_{ij} such that V = \oplus_i \oplus_j V_{ij} and V_{ik} \cong V_{il} for all i, k and l (as representations). Computes the decomposition of V into irreducible subrepresentations, grouping together the isomorphic subrepresentations. A record, in the format described below This function does all of the computation and (since it is an attribute) saves the results. Doing all of the calculations at the same time ensures consistency when it comes to irrep ordering, block ordering and basis ordering. There is no canonical ordering of irreps, so this is crucial.

irreps is the complete list of irreps involved in the direct sum decomposition of rho, this can be given in case the default (running Dixon's algorithm) is too expensive, or e.g. you don't want representations over Cyclotomics.

The return value of this function is a record with fields:

`basis`: The basis that block diagonalises \rho, see .

`diagonal_rep`: \rho, block diagonalised with the basis above. See

`decomposition`: The irreducible G-invariant subspaces, collected according to isomorphism, see

`centralizer_basis`: An orthonormal basis for the centralizer ring of \rho, written in block form. See

Pass the option `parallel` for the computations per-irrep to be done in parallel.

Pass the option `irreps` with the complete list of irreps of \rho to avoid recomputing this list (could be very expensive)

<#Include Label="Example_REPN_ComputeUsingSerre">