diff --git a/examples/centralizer.g b/examples/centralizer.g new file mode 100644 index 0000000..64aec8e --- /dev/null +++ b/examples/centralizer.g @@ -0,0 +1,56 @@ +#! @BeginChunk Example_CentralizerBlocksOfRepresentation +#! @BeginExample +G := DihedralGroup(8);; +irreps := IrreducibleRepresentations(G);; +# rho is the sum of two isomorphic degree 1 irreps, and a degree +# 2 irrep. +rho := DirectSumOfRepresentations([irreps[4], irreps[4], irreps[5]]);; +# Compute a basis for the centralizer (in blocks) +cent_basis_blocks := CentralizerBlocksOfRepresentation(rho);; +# Verify that the dimension is the sum of the multiplicities squared, +# in this case 2^2 + 1 = 5. +Length(cent_basis_blocks) = 5; +#! true +#! @EndExample +#! @EndChunk + +#! @BeginChunk Example_CentralizerOfRepresentation +#! @BeginExample +# This is the actual basis for the centralizer. +cent_basis := CentralizerOfRepresentation(rho);; +# All matrices in the span should commute with the image of rho. +ForAll(G, g -> ForAll(cent_basis, M -> Image(rho, g)*M = M*Image(rho,g))); +#! true +#! @EndExample +#! @EndChunk + +#! @BeginChunk Example_ClassSumCentralizer +#! @BeginExample +# Now we have a basis for the centralizer, we can sum a conjugacy class +# of G. +class := List(ConjugacyClasses(G)[3]);; +# We can do the computation naively, with no centralizer basis given: +sum1 := ClassSumCentralizer(rho, class, fail);; +# Before summing with th centralizer basis given, we need to +# orthonormalize it. It's already orthogonal, but not normal: +orth_basis := OrthonormalBasis@RepnDecomp(cent_basis);; +IsOrthonormalSet(orth_basis, InnerProduct@RepnDecomp); +#! true +# And with the centralizer given, should be more efficient in certain +# cases (small degree, low multiplicities, but very large group) +sum2 := ClassSumCentralizer(rho, class, orth_basis);; +# Should be the same: +sum1 = sum2; +#! true +#! @EndExample +#! @EndChunk + + +#! @BeginChunk Example_ClassSumCentralizerNC +#! @BeginExample +# The very same as the above, but with no checks on orthonormality. +sum3 := ClassSumCentralizerNC(rho, class, orth_basis);; +sum1 = sum3; +#! true +#! @EndExample +#! @EndChunk diff --git a/examples/mymethod.g b/examples/mymethod.g index 3cba012..8b36540 100644 --- a/examples/mymethod.g +++ b/examples/mymethod.g @@ -5,8 +5,8 @@ irreps := IrreducibleRepresentations(G);; rho := DirectSumOfRepresentations([irreps[4], irreps[5]]);; # Jumble rho up a bit so it's not so easy for the library. A := [ [ 3, -3, 2, -4, 0, 0 ], [ 4, 0, 1, -5, 1, 0 ], [ -3, -1, -2, 4, -1, -2 ], - [ 4, -4, -1, 5, -3, -1 ], [ 3, -2, 1, 0, 0, 0 ], [ 4, 2, 4, -1, -2, 1 ] ]; -rho := ComposeHomFunction(rho, B -> A^-1 * B * A); + [ 4, -4, -1, 5, -3, -1 ], [ 3, -2, 1, 0, 0, 0 ], [ 4, 2, 4, -1, -2, 1 ] ];; +rho := ComposeHomFunction(rho, B -> A^-1 * B * A);; # We've constructed rho from two degree 3 irreps, so there are a few # things we can check for correctness: decomposition := REPN_ComputeUsingMyMethod(rho);; diff --git a/lib/centralizer.gd b/lib/centralizer.gd index 51ed67f..c7655d8 100644 --- a/lib/centralizer.gd +++ b/lib/centralizer.gd @@ -2,53 +2,63 @@ #! @Section Finding a basis for the centralizer +#! @Description Let $G$ have irreducible representations $\rho_i$ with +#! multiplicities $m_i$. The centralizer has dimension $\sum_i m_i^2$ +#! as a $\mathbb{C}$-vector space. This function gives the minimal +#! number of generators required. +#! +#!

+#! @InsertChunk Example_CentralizerBlocksOfRepresentation +#!

#! @Arguments rho - #! @Returns List of vector space generators for the centralizer ring #! of $\rho(G)$, written in the basis given by . The matrices are #! given as a list of blocks. - -#! @Description Let $G$ have irreducible representations $\rho_i$ with -#! multiplicities $m_i$. The centralizer has dimension $\sum_i m_i^2$ -#! as a $\mathbb{C}$-vector space. This function gives the minimal -#! number of generators required. DeclareGlobalFunction( "CentralizerBlocksOfRepresentation" ); -#! @Returns List of vector space generators for the centralizer ring -#! of $\rho(G)$. - #! @Description This gives the same result as , but with the matrices #! given in their entirety: not as lists of blocks, but as full #! matrices. +#! +#!

+#! @InsertChunk Example_CentralizerOfRepresentation +#!

+#! @Returns List of vector space generators for the centralizer ring +#! of $\rho(G)$. DeclareGlobalFunction( "CentralizerOfRepresentation" ); #! @Section Using the centralizer for computations -#! @Arguments rho, class, cent_basis - -#! @Returns $\sum_{s \in t^G} \rho(s)$, where $t$ is a representative -#! of the conjugacy class class of $G$. - #! @Description We require that rho is unitary. Uses the given #! orthonormal basis (with respect to the inner product $\langle A, B #! \rangle = \mbox{Trace}(AB^*)$) for the centralizer ring of #! rho to calculate the sum of the conjugacy class class #! quickly, i.e. without summing over the class. - +#! #! NOTE: Orthonormality of cent_basis and unitarity of #! rho are checked. See #! for a version of this function without checks. The checks are not #! very expensive, so it is recommended you use the function with #! checks. -DeclareGlobalFunction( "ClassSumCentralizer" ); - +#! +#!

+#! @InsertChunk Example_ClassSumCentralizer +#!

#! @Arguments rho, class, cent_basis +#! @Returns $\sum_{s \in t^G} \rho(s)$, where $t$ is a representative +#! of the conjugacy class class of $G$. +DeclareGlobalFunction( "ClassSumCentralizer" ); #! @Description The same as , but #! does not check the basis for orthonormality or the representation #! for unitarity. +#! +#!

+#! @InsertChunk Example_ClassSumCentralizerNC +#!

+#! @Arguments rho, class, cent_basis DeclareGlobalFunction( "ClassSumCentralizerNC" ); DeclareGlobalFunction( "SizesToBlocks" ); diff --git a/lib/centralizer.gi b/lib/centralizer.gi index 5cd5c02..1b47973 100644 --- a/lib/centralizer.gi +++ b/lib/centralizer.gi @@ -130,7 +130,7 @@ InstallGlobalFunction( ClassSumCentralizer, function(rho, class, cent_basis) Error(" is not unitary!"); fi; - if not IsOrthonormalSet(cent_basis, InnerProduct@) then + if cent_basis <> fail and not IsOrthonormalSet(cent_basis, InnerProduct@) then Error(" is not an orthonormal set!"); fi;