From e3290a5c4686b66b415fd5e0ff28b129d5f5b30e Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Sun, 12 Sep 2021 12:51:11 +0200 Subject: [PATCH] =?UTF-8?q?minimal=20rank=20projs:=20add=20support=20for?= =?UTF-8?q?=20=CF=87=20+=20conj(=CF=87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/minimal_projections.jl | 18 +++++++++++++----- src/sa_basis.jl | 13 +++++++++---- test/action_permutation.jl | 6 +++--- test/sa_basis.jl | 5 +++-- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/minimal_projections.jl b/src/minimal_projections.jl index 5f65a87..c2c6c84 100644 --- a/src/minimal_projections.jl +++ b/src/minimal_projections.jl @@ -95,20 +95,28 @@ else end end -function rank_one_projection(χ::Character, RG::StarAlgebra{<:Group}; +function minimal_rank_projection(χ::Character, RG::StarAlgebra{<:Group}; idems = small_idempotents(RG), # idems are AlgebraElements over Rational{Int} iters=3 ) - degree(χ) == 1 && return one(RG, Rational{Int}), true + + k = if isirreducible(χ) + 1 + else + sum(constituents(χ).>0) + # the minimal rank projection for the composite character + end + + degree(χ) == k && return one(RG, Rational{Int}), true for µ in idems - isone(χ(µ)) && µ^2 == µ && return µ, true + χ(µ) == k && µ^2 == µ && return µ, true end for n in 2:iters for elts in Iterators.product(ntuple(i -> idems, n)...) µ = *(elts...) - isone(χ(µ)) && µ^2 == µ && return µ, true + χ(µ) == k && µ^2 == µ && return µ, true end end @debug "Could not find minimal projection for $χ" @@ -119,7 +127,7 @@ function minimal_projection_system( chars::AbstractVector{<:AbstractClassFunction}, RG::StarAlgebra{<:Group} ) - res = fetch.([@spawn_compat rank_one_projection(χ, RG) for χ in chars]) + res = fetch.([@spawn_compat minimal_rank_projection(χ, RG) for χ in chars]) r1p, simple = first.(res), last.(res) # rp1 are sparse storage diff --git a/src/sa_basis.jl b/src/sa_basis.jl index 452565d..0ddb75a 100644 --- a/src/sa_basis.jl +++ b/src/sa_basis.jl @@ -217,11 +217,16 @@ function _symmetry_adapted_basis( @spawn_compat begin µT = eltype(µ) == T ? µ : AlgebraElement{T}(µ) image = hom === nothing ? image_basis(µT) : image_basis(hom, µT) - if simple - @assert size(image, 1) == m "The dimension of the projection doesn't match with simple summand multiplicity" - end DirectSummand(image, m, deg, simple) end end - return fetch.(res) + direct_summands = fetch.(res) + + for (χ, ds) in zip(irr, direct_summands) + if issimple(ds) && (d = size(ds, 1)) != (e = multiplicity(ds)*sum(constituents(χ).>0)) + throw("The dimension of the projection doesn't match with simple summand multiplicity: $d ≠ $e") + end + end + + return direct_summands end diff --git a/test/action_permutation.jl b/test/action_permutation.jl index c0c46c1..cc1495f 100644 --- a/test/action_permutation.jl +++ b/test/action_permutation.jl @@ -96,7 +96,7 @@ end end let χ = irr[1], m = multips[1] - (a, fl) = SymbolicWedderburn.rank_one_projection(χ, RG) + (a, fl) = SymbolicWedderburn.minimal_rank_projection(χ, RG) @test fl == isone(χ(a)) µ = AlgebraElement(χ, RG)*a @@ -116,7 +116,7 @@ end end let χ = irr[2], m = multips[2] - (a, fl) = SymbolicWedderburn.rank_one_projection(χ, RG) + (a, fl) = SymbolicWedderburn.minimal_rank_projection(χ, RG) @test fl == isone(χ(a)) µ = AlgebraElement(χ, RG)*a @@ -126,7 +126,7 @@ end end let χ = irr[3], m = multips[3] - (a, fl) = SymbolicWedderburn.rank_one_projection(χ, RG) + (a, fl) = SymbolicWedderburn.minimal_rank_projection(χ, RG) @test fl == isone(χ(a)) µ = AlgebraElement(χ, RG)*a diff --git a/test/sa_basis.jl b/test/sa_basis.jl index d6a09a0..807450d 100644 --- a/test/sa_basis.jl +++ b/test/sa_basis.jl @@ -34,7 +34,7 @@ end StarAlgebra(G, b, (length(b), length(b))) end - µ, s = SymbolicWedderburn.rank_one_projection(irr[1], RG) + µ, s = SymbolicWedderburn.minimal_rank_projection(irr[1], RG) @test µ isa AlgebraElement @test s @@ -129,7 +129,8 @@ end sa_basisR = symmetry_adapted_basis(Float64, G, S, semisimple=false) for b in sa_basisR if issimple(b) - @test multiplicity(b) == size(b, 1) + @test multiplicity(b) == size(b, 1) || 2*multiplicity(b) == size(b, 1) + # the first condiditon doesn't hold for realified characters; else @test multiplicity(b)*SymbolicWedderburn.degree(b) == size(b, 1) end