diff --git a/lib/cohcfg/classsum.gi b/lib/cohcfg/classsum.gi index 929487f..e02339b 100644 --- a/lib/cohcfg/classsum.gi +++ b/lib/cohcfg/classsum.gi @@ -147,7 +147,8 @@ ProjIrr@ := function(arg) if not IsBound(arg[2]) then G := CCGroup@(T); ct := CharacterTable(G); - irrs := Irr(ct); + # ct may order the classes differently from the class sums + irrs := List(Irr(ct), chi -> List(ClassSums@(T).reps, g -> g^chi)); else irrs := arg[2]; # TODO instead of accepting irreducibles as a list, accept a character table and connect it to the group fi; diff --git a/lib/mymethod.gi b/lib/mymethod.gi index 2068746..21a7e49 100644 --- a/lib/mymethod.gi +++ b/lib/mymethod.gi @@ -35,14 +35,14 @@ InstallMethod( REPN_ComputeUsingMyMethod, "for linear reps", [ IsGroupHomomorphi # its character in char_rho isomorphic_collected := List([1..Size(char_rho_basis)], i -> Replicate@(rec(rep := irreps[i], - dim := chars[i][1]), + dim := DegreeOfRepresentation(irreps[i])), char_rho_basis[i])); summands := List(Flat(isomorphic_collected), r -> r.rep); # We can also compute the basis for the centralizer ring, since we # know the block sizes and relevant dimensions - all_sizes := List([1..Size(chars)], i -> rec(dimension := chars[i][1], + all_sizes := List([1..Size(chars)], i -> rec(dimension := DegreeOfRepresentation(irreps[i]), nblocks := char_rho_basis[i])); # Don't use the blocks that don't appear diff --git a/lib/serre.gi b/lib/serre.gi index c6533de..4a43701 100644 --- a/lib/serre.gi +++ b/lib/serre.gi @@ -424,9 +424,8 @@ InstallMethod( REPN_ComputeUsingSerre, "for linear reps", [ IsGroupHomomorphism char_rho_basis := IrrVectorOfRepresentation@(rho, irr_chars); - # Calculate sizes based on the fact irr_char[1] is the degree all_sizes := List([1..Size(irr_chars)], - i -> rec(dimension := irr_chars[i][1], + i -> rec(dimension := DegreeOfRepresentation(irreps[i]), nblocks := char_rho_basis[i])); # Now we remove all of the ones with nblocks = 0 (doesn't affect diff --git a/lib/utils.gi b/lib/utils.gi index bd3dd7d..3e06314 100644 --- a/lib/utils.gi +++ b/lib/utils.gi @@ -137,6 +137,15 @@ IrrVectorOfRepresentation@ := function(rho, irr_chars) char_rho := List(classes, class -> Trace(Image(rho, Representative(class)))); + # A class function lists its values along the classes of its + # character table, which may be ordered differently from classes + irr_chars := List(irr_chars, function(irr_char) + if not IsClassFunction(irr_char) then + return irr_char; + fi; + return List(classes, class -> Representative(class)^irr_char); + end); + # Write char_rho in the irr_chars basis for class functions char_rho_basis := List(irr_chars, irr_char -> InnerProductOfCharacters@(char_rho, irr_char, G)); diff --git a/tst/classorder.tst b/tst/classorder.tst new file mode 100644 index 0000000..76a8d39 --- /dev/null +++ b/tst/classorder.tst @@ -0,0 +1,76 @@ +gap> START_TEST("classorder.tst"); + +# The classes of CharacterTable(G) need not be ordered like +# ConjugacyClasses(G). Here the group lists classes 2 and 3 of the +# table in the other order. +gap> S4tbl := CharacterTable(SymmetricGroup(4));; +gap> S4reps := List(ConjugacyClasses(S4tbl), Representative){[1,3,2,4,5]};; +gap> S4 := SymmetricGroup(4);; +gap> SetConjugacyClasses(S4, List(S4reps, x -> ConjugacyClass(S4, x))); +gap> # CharacterTableWithStoredGroup wants a table that stores no group +> S4tbl := ConvertToCharacterTable(rec( +> UnderlyingCharacteristic := 0, +> OrdersClassRepresentatives := OrdersClassRepresentatives(S4tbl), +> SizesCentralizers := SizesCentralizers(S4tbl), +> Irr := List(Irr(S4tbl), ValuesOfClassFunction)));; +gap> S4tbl := CharacterTableWithStoredGroup(S4, S4tbl);; +gap> IsIdenticalObj(S4tbl, CharacterTable(S4)); +true +gap> IdentificationOfConjugacyClasses(S4tbl); +[ 1, 3, 2, 4, 5 ] + +# The natural permutation character is the sum of the trivial character +# and one of degree 3. +gap> S4proj := ProjIrr@RepnDecomp(CohCfgFromPermGroup@RepnDecomp(S4));; +gap> SortedList(TransposedMat([S4proj.dims, S4proj.blocksizes])); +[ [ 1, 1 ], [ 3, 1 ] ] + +# Decompositions do not look at the table when the irreps are given. +gap> S4irreps := IrreducibleRepresentations(S4);; +gap> S4rho := DirectSumOfRepresentations([S4irreps[4], S4irreps[5]]);; +gap> S4dec := REPN_ComputeUsingMyMethod(S4rho : irreps := S4irreps);; +gap> Length(S4dec.centralizer_basis); +2 +gap> List(S4dec.decomposition, Vs -> List(Vs, Dimension)); +[ [ 3 ], [ 3 ] ] +gap> AreRepsIsomorphic(S4rho, S4dec.diagonal_rep : irreps := S4irreps); +true +gap> List(CanonicalDecomposition(S4rho : irreps := S4irreps), Dimension); +[ 3, 3 ] + +# Characters of the table can be passed along with the irreps. Results +# are stored in the representation, so this needs a new one. +gap> S4chars := List(S4irreps, r -> First(Irr(S4), +> chi -> ForAll(S4reps, g -> g^chi = Trace(Image(r, g)))));; +gap> S4rho := DirectSumOfRepresentations([S4irreps[4], S4irreps[5]]);; +gap> S4withchars := REPN_ComputeUsingMyMethod(S4rho : irreps := S4irreps, +> irr_chars := S4chars);; +gap> List(S4withchars.decomposition, Vs -> List(Vs, Dimension)); +[ [ 3 ], [ 3 ] ] +gap> S4serrechars := REPN_ComputeUsingSerre(S4rho : irreps := S4irreps, +> irr_chars := S4chars);; +gap> Length(S4serrechars.centralizer_basis); +2 + +# The degree of an irrep is not read off the first class of +# ConjugacyClasses(G): here that list ends with the identity class. +gap> S4reps := List(ConjugacyClasses(SymmetricGroup(4)), Representative);; +gap> S4reps := Concatenation(S4reps{[2..5]}, S4reps{[1]});; +gap> S4 := SymmetricGroup(4);; +gap> SetConjugacyClasses(S4, List(S4reps, x -> ConjugacyClass(S4, x))); +gap> S4irreps := IrreducibleRepresentations(S4);; +gap> S4rho := DirectSumOfRepresentations([S4irreps[4], S4irreps[5]]);; +gap> S4my := REPN_ComputeUsingMyMethod(S4rho : irreps := S4irreps);; +gap> Length(S4my.centralizer_basis); +2 +gap> List(S4my.decomposition, Vs -> List(Vs, Dimension)); +[ [ 3 ], [ 3 ] ] +gap> S4serre := REPN_ComputeUsingSerre(S4rho : irreps := S4irreps);; +gap> Length(S4serre.centralizer_basis); +2 +gap> List(Filtered(S4serre.decomposition, l -> Length(l) > 0), +> l -> List(l, r -> Length(r.basis))); +[ [ 3 ], [ 3 ] ] + +# +gap> STOP_TEST("classorder.tst", 1);