Skip to content

Commit

Permalink
Update projections.jl
Browse files Browse the repository at this point in the history
adding a test for doubling the quaternionic characters
  • Loading branch information
kneshat authored Jul 25, 2024
1 parent d0bd37e commit 0f2e18c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/projections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,25 @@ end
end
end
end

@testset "affordable real all cases" begin
G = SmallPermGroups[24][3] # SL(2,3)
tbl = SymbolicWedderburn.CharacterTable(Rational{Int}, G)
chars = SymbolicWedderburn.irreducible_characters(tbl)

@test SymbolicWedderburn.degree.(chars)==[1, 1, 1, 2, 2, 2, 3]
@test all-> isone(dot(χ, χ)), chars)
chars_fl = SymbolicWedderburn.Character{ComplexF64}.(chars)
@test SymbolicWedderburn.degree.(chars_fl)==[1, 1, 1, 2, 2, 2, 3]
@test all-> isapprox(dot(χ, χ), 1), chars_fl)



charsR, _ = SymbolicWedderburn.affordable_real(chars,fill(2,length(chars)))
@test SymbolicWedderburn.degree.(charsR) == [1, 2, 4, 4, 3]
@test [dot(χ, χ) for χ in charsR] == [1, 2, 2, 4, 1]

charsR_fl = SymbolicWedderburn.Character{Float64}.(charsR)
@test all( [1, 2, 4, 4, 3] .== SymbolicWedderburn.degree.(charsR_fl),)
@test all( [1, 2, 2, 4, 1].[dot(χ, χ) for χ in charsR_fl],)
end

0 comments on commit 0f2e18c

Please sign in to comment.