From 7e18eb5ffa0b6d95a3ee9612627c7d4102dfb368 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Tue, 9 Jul 2024 06:50:33 -0700 Subject: [PATCH 01/10] Add files via upload Adding an example to illustrate how real irreps are constructed from complex ones in the three different cases of FS=1, 0, and -1. --- examples/ex_SL(2,3).jl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/ex_SL(2,3).jl diff --git a/examples/ex_SL(2,3).jl b/examples/ex_SL(2,3).jl new file mode 100644 index 0000000..efed238 --- /dev/null +++ b/examples/ex_SL(2,3).jl @@ -0,0 +1,35 @@ +using SymbolicWedderburn +using PermutationGroups +import SymbolicWedderburn as SW + + +# Constructing SL(2,3) or binary tetrahedral group as a permutation group of 8 elements +gen1 = perm"(1,2,3,4)(5,6,7,8)" +gen2 = perm"(1,7,3,5)(2,6,4,8)" +gen3 = perm"(2,6,7)(4,8,5)" +MyGroup = PermGroup([gen1, gen2, gen3]) # SL(2,3) + +# Compute the character table +tbl = SW.CharacterTable(Rational{Int}, MyGroup) + +# Get irreducible characters +irreducible_chars = irreducible_characters(tbl) + +# Define multiplicities (for simplicity, use ones) +multiplicities = fill(1, length(irreducible_chars)) + +# Get real irreducible characters and their multiplicities +real_irreps, real_mults = SW.affordable_real(irreducible_chars, multiplicities) +# Print the Frobinus-Schur indicator of each complex irrep +using SymbolicWedderburn.Characters +for (i, χ) in enumerate(irreducible_characters(tbl)) + fs_indicator = Characters.frobenius_schur(χ) + println("Frobenius-Schur indicator of $χ: $fs_indicator") + println() +end +# Print characters of real irreps +println("Real Irreducible Characters:") +for irrep in real_irreps + println(irrep) +end +# Expected Result: χ does not change if its FS is 1. χ is doubled if its FS is -1. χ is added by another character if its FS is 0. \ No newline at end of file From ca0ccc8f13585a851cab95a6042570c5c60490c3 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:02:30 -0700 Subject: [PATCH 02/10] Update ex_SL(2,3).jl --- examples/ex_SL(2,3).jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ex_SL(2,3).jl b/examples/ex_SL(2,3).jl index efed238..59b905e 100644 --- a/examples/ex_SL(2,3).jl +++ b/examples/ex_SL(2,3).jl @@ -15,8 +15,8 @@ tbl = SW.CharacterTable(Rational{Int}, MyGroup) # Get irreducible characters irreducible_chars = irreducible_characters(tbl) -# Define multiplicities (for simplicity, use ones) -multiplicities = fill(1, length(irreducible_chars)) +# Define multiplicities (for simplicity, use twos, it should be even for the quaternion case) +multiplicities = fill(2, length(irreducible_chars)) # Get real irreducible characters and their multiplicities real_irreps, real_mults = SW.affordable_real(irreducible_chars, multiplicities) @@ -32,4 +32,4 @@ println("Real Irreducible Characters:") for irrep in real_irreps println(irrep) end -# Expected Result: χ does not change if its FS is 1. χ is doubled if its FS is -1. χ is added by another character if its FS is 0. \ No newline at end of file +# Expected Result: χ does not change if its FS is 1. χ is doubled if its FS is -1. χ is added by another character if its FS is 0. From 1750d93865024507a38b1137959e83735a27ad68 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:24:52 -0700 Subject: [PATCH 03/10] Update sa_basis.jl Adding quaternionic real characters --- src/sa_basis.jl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/sa_basis.jl b/src/sa_basis.jl index 0403425..05497b6 100644 --- a/src/sa_basis.jl +++ b/src/sa_basis.jl @@ -1,22 +1,27 @@ function affordable_real( irreducible_characters, - multiplicities = fill(1, length(irreducible_characters)), + multiplicities, ) irr_real = similar(irreducible_characters, 0) mls_real = similar(multiplicities, 0) for (i, χ) in pairs(irreducible_characters) ι = Characters.frobenius_schur(χ) - if abs(ι) == 1 # real or quaternionic - @debug "real/quaternionic:" χ + if ι == 1 # real + @debug "real" χ push!(irr_real, χ) push!(mls_real, multiplicities[i]) - else # complex one... + elseif ι == -1 # quaternionic + @debug "quaternionic" χ + @assert iseven(multiplicities[i]) "Multiplicities of quaternionic character must be even." + push!(irr_real, 2 * χ) + push!(mls_real, div(multiplicities[i], 2)) + else # complex cχ = conj(χ) k = findfirst(==(cχ), irreducible_characters) - @assert k !== nothing - @debug "complex" χ conj(χ) = irreducible_characters[k] - if k > i # ... we haven't already observed a conjugate of - @assert multiplicities[i] == multiplicities[k] + @assert k !== nothing "Conjugate character not found." + @debug "complex" χ "conj(χ) =" irreducible_characters[k] + if k > i # we haven't already observed a conjugate + @assert multiplicities[i] == multiplicities[k] "Multiplicities of complex conjugates must be equal." push!(irr_real, χ + cχ) push!(mls_real, multiplicities[i]) end From 510a144e11d464b73eb4560d5446a3300a0b8677 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:33:02 -0700 Subject: [PATCH 04/10] Update sa_basis.jl --- src/sa_basis.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sa_basis.jl b/src/sa_basis.jl index 05497b6..7c71ca1 100644 --- a/src/sa_basis.jl +++ b/src/sa_basis.jl @@ -19,7 +19,7 @@ function affordable_real( cχ = conj(χ) k = findfirst(==(cχ), irreducible_characters) @assert k !== nothing "Conjugate character not found." - @debug "complex" χ "conj(χ) =" irreducible_characters[k] + @debug "complex" χ conj(χ) = irreducible_characters[k] if k > i # we haven't already observed a conjugate @assert multiplicities[i] == multiplicities[k] "Multiplicities of complex conjugates must be equal." push!(irr_real, χ + cχ) From 5dc99173e5483bed217b1de12776d3549fabed87 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:35:44 -0700 Subject: [PATCH 05/10] Update sa_basis.jl Changing `@testset "affordable real degrees/dot"` base on new `function affordable_real` --- test/sa_basis.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sa_basis.jl b/test/sa_basis.jl index dd43ee1..04663c2 100644 --- a/test/sa_basis.jl +++ b/test/sa_basis.jl @@ -9,7 +9,7 @@ @test all(isone ∘ SymbolicWedderburn.degree, chars_fl) @test all(χ -> isapprox(dot(χ, χ), 1), chars_fl) - charsR, _ = SymbolicWedderburn.affordable_real(chars) + charsR, _ = SymbolicWedderburn.affordable_real(chars,fill(1, length(chars))) @test SymbolicWedderburn.degree.(charsR) == [dot(χ, χ) for χ in charsR] == [1, 1, 2, 2, 2, 2] From e0e7a56364e5c9114eecb5494458c0d0801fbe57 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:00:17 -0700 Subject: [PATCH 06/10] Update projections.jl --- test/projections.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/projections.jl b/test/projections.jl index eeaeefe..22ee062 100644 --- a/test/projections.jl +++ b/test/projections.jl @@ -21,7 +21,7 @@ end G = PermGroup([perm"(1,2,3,4)"]) chars = let irr = SymbolicWedderburn.irreducible_characters(G) if !all(isreal, irr) - irr, _ = SymbolicWedderburn.affordable_real(irr) + irr, _ = SymbolicWedderburn.affordable_real(irr,fill(1, length(irr))) end SymbolicWedderburn.Character{Float64}.(irr) end From d0bd37e56f9fd8371a194098c77fb1c091734772 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:12:35 -0700 Subject: [PATCH 07/10] Delete examples/ex_SL(2,3).jl --- examples/ex_SL(2,3).jl | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 examples/ex_SL(2,3).jl diff --git a/examples/ex_SL(2,3).jl b/examples/ex_SL(2,3).jl deleted file mode 100644 index 59b905e..0000000 --- a/examples/ex_SL(2,3).jl +++ /dev/null @@ -1,35 +0,0 @@ -using SymbolicWedderburn -using PermutationGroups -import SymbolicWedderburn as SW - - -# Constructing SL(2,3) or binary tetrahedral group as a permutation group of 8 elements -gen1 = perm"(1,2,3,4)(5,6,7,8)" -gen2 = perm"(1,7,3,5)(2,6,4,8)" -gen3 = perm"(2,6,7)(4,8,5)" -MyGroup = PermGroup([gen1, gen2, gen3]) # SL(2,3) - -# Compute the character table -tbl = SW.CharacterTable(Rational{Int}, MyGroup) - -# Get irreducible characters -irreducible_chars = irreducible_characters(tbl) - -# Define multiplicities (for simplicity, use twos, it should be even for the quaternion case) -multiplicities = fill(2, length(irreducible_chars)) - -# Get real irreducible characters and their multiplicities -real_irreps, real_mults = SW.affordable_real(irreducible_chars, multiplicities) -# Print the Frobinus-Schur indicator of each complex irrep -using SymbolicWedderburn.Characters -for (i, χ) in enumerate(irreducible_characters(tbl)) - fs_indicator = Characters.frobenius_schur(χ) - println("Frobenius-Schur indicator of $χ: $fs_indicator") - println() -end -# Print characters of real irreps -println("Real Irreducible Characters:") -for irrep in real_irreps - println(irrep) -end -# Expected Result: χ does not change if its FS is 1. χ is doubled if its FS is -1. χ is added by another character if its FS is 0. From 0f2e18ceedea4e2038ac9e24ac89fff0b2186480 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:06:04 -0700 Subject: [PATCH 08/10] Update projections.jl adding a test for doubling the quaternionic characters --- test/projections.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/projections.jl b/test/projections.jl index 22ee062..0890018 100644 --- a/test/projections.jl +++ b/test/projections.jl @@ -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 From b407377d334ca3e0347f1fc3136299ab8cd30bba Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:01:03 -0700 Subject: [PATCH 09/10] Update sa_basis.jl --- test/sa_basis.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/sa_basis.jl b/test/sa_basis.jl index 04663c2..04525df 100644 --- a/test/sa_basis.jl +++ b/test/sa_basis.jl @@ -157,7 +157,8 @@ end for b in sa_basisR if issimple(b) @test multiplicity(b) == size(b, 1) || - 2 * multiplicity(b) == size(b, 1) + 2 * multiplicity(b) == size(b, 1) || + 4 * multiplicity(b) == size(b, 1) # the first condiditon doesn't hold for realified characters; else rk, res = divrem(size(b, 1), multiplicity(b)) From 6848a976172d3552f20f5b1fbe2a1887d142ce01 Mon Sep 17 00:00:00 2001 From: Khashayar Neshat <111620549+kneshat@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:13:28 -0700 Subject: [PATCH 10/10] Update sa_basis.jl --- test/sa_basis.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/sa_basis.jl b/test/sa_basis.jl index 04525df..04663c2 100644 --- a/test/sa_basis.jl +++ b/test/sa_basis.jl @@ -157,8 +157,7 @@ end for b in sa_basisR if issimple(b) @test multiplicity(b) == size(b, 1) || - 2 * multiplicity(b) == size(b, 1) || - 4 * multiplicity(b) == size(b, 1) + 2 * multiplicity(b) == size(b, 1) # the first condiditon doesn't hold for realified characters; else rk, res = divrem(size(b, 1), multiplicity(b))