Skip to content

Commit

Permalink
minimal rank projs: add support for χ + conj(χ)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalmarek committed Sep 12, 2021
1 parent e959af2 commit e3290a5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
18 changes: 13 additions & 5 deletions src/minimal_projections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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

Expand Down
13 changes: 9 additions & 4 deletions src/sa_basis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions test/action_permutation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions test/sa_basis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e3290a5

Please sign in to comment.