kalmarek / SymbolicWedderburn.jl

Amazing package to compute decompositions into irreducibles of explicit group representations and the Wedderburn decomposition for endomorphisms thereof!
MIT License
9 stars 4 forks source link

refine doesn't preserve the dimension #7

Closed kalmarek closed 4 years ago

kalmarek commented 4 years ago
using PermutationGroups
using SymbolicWedderburn

import SymbolicWedderburn.AbstractAlgebra.@perm_str
import SymbolicWedderburn.FiniteFields.GF

        G = PermutationGroups.PermGroup([perm"(1,2,3)(4)", perm"(2,3,4)"])
        PermutationGroups.order(G)
        S = PermutationGroups.gens(G)

        ccG = [
            Orbit(S, one(G)),
            Orbit(S, perm"(1,2)(3,4)"),
            Orbit(S, perm"(1,2,3)(4)"),
            Orbit(S, perm"(1,3,2)(4)"),
        ]

        @assert sum(length, ccG) == PermutationGroups.order(G)
        p = 29
        F = SymbolicWedderburn.FiniteFields.GF{p}
        Ns = [SymbolicWedderburn.CCMatrix(ccG, i) for i = 1:length(ccG)]
        esd = SymbolicWedderburn.EigenSpaceDecomposition(F.(Ns[1]))
        esd = SymbolicWedderburn.refine(esd, F.(Ns[2]))
        esd = SymbolicWedderburn.refine(esd, F.(Ns[3]))

throws

AssertionError: eigspace_ptrs[end] == size(M, 1) + 1
in top-level scope at tmp_characters.jl:89
in refine at dev/SymbolicWedderburn/src/eigenspacedecomposition.jl:152
in eigen_decomposition! at dev/SymbolicWedderburn/src/eigenspacedecomposition.jl:103
tweisser commented 4 years ago

The function eigen_decomposition! assumes that all eigenvalues of M are in T, or in other words, that the sum of dimensions of the left eigen spaces is equal to the dimension of M. In the example above p = 29 does not seem to meet this requirement. Using p = dixon_prime(ccG), which is p == 7, the decomposition works.

kalmarek commented 4 years ago

but the algorithm should work over any prime, shouldn't it? what goes wrong in the case p=29?

kalmarek commented 4 years ago

my bad, of course not: we need to have the appropriate root of unity in the field, hence exponent(G) must divide p-1, which in this case it does not: exponent(G) = 6, hence 31 should work (it does).