From 703e69fc6274059511bc6e8b2a828e5fbcc3f266 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Mon, 14 Nov 2022 19:50:27 +0100 Subject: [PATCH] fix actions on SpNs --- src/actions/actions.jl | 1 + src/actions/spn_conjugation.jl | 37 +++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/actions/actions.jl b/src/actions/actions.jl index aa02b15..9cc6872 100644 --- a/src/actions/actions.jl +++ b/src/actions/actions.jl @@ -4,6 +4,7 @@ StarAlgebras.star(g::Groups.GroupElement) = inv(g) include("alphabet_permutation.jl") include("sln_conjugation.jl") +include("spn_conjugation.jl") include("autfn_conjugation.jl") function SymbolicWedderburn.action( diff --git a/src/actions/spn_conjugation.jl b/src/actions/spn_conjugation.jl index 25b8bbc..ec760e9 100644 --- a/src/actions/spn_conjugation.jl +++ b/src/actions/spn_conjugation.jl @@ -1,26 +1,43 @@ ## Particular definitions for actions on Sp(n,ℤ) function _conj( - t::MatrixGroups.ElementarySymplectic{N,T}, + s::MatrixGroups.ElementarySymplectic{N,T}, σ::PermutationGroups.AbstractPerm, ) where {N,T} @assert iseven(N) - @assert degree(σ) == N ÷ 2 "Got degree = $(degree(σ)); N = $N" - i = mod1(t.i, N ÷ 2) - ib = i == t.i ? 0 : N ÷ 2 - j = mod1(t.j, N ÷ 2) - jb = j == t.j ? 0 : N ÷ 2 - return MatrixGroups.ElementarySymplectic{N}(t.symbol, i^inv(σ) + ib, j^inv(σ) + jb, t.val) + @assert PermutationGroups.degree(σ) == N ÷ 2 "Got degree = $(PermutationGroups.degree(σ)); N = $N" + n = N ÷ 2 + @assert 1 ≤ s.i ≤ N + @assert 1 ≤ s.j ≤ N + if s.symbol == :A + @assert 1 ≤ s.i ≤ n + @assert 1 ≤ s.j ≤ n + i = s.i^inv(σ) + j = s.j^inv(σ) + else + @assert s.symbol == :B + @assert xor(s.i > n, s.j > n) + if s.i > n + i = (s.i - n)^inv(σ) + n + j = s.j^inv(σ) + elseif s.j > n + i = s.i^inv(σ) + j = (s.j - n)^inv(σ) + n + end + end + return MatrixGroups.ElementarySymplectic{N}(s.symbol, i, j, s.val) end function _conj( - t::MatrixGroups.ElementarySymplectic{N,T}, + s::MatrixGroups.ElementarySymplectic{N,T}, x::Groups.Constructions.DirectPowerElement, ) where {N,T} @assert Groups.order(Int, parent(x).group) == 2 @assert iseven(N) - just_one_flips = xor(isone(x.elts[mod1(t.i, N ÷ 2)]), isone(x.elts[mod1(t.j, N ÷ 2)])) - return ifelse(just_one_flips, inv(t), t) + n = N ÷ 2 + i, j = ifelse(s.i <= n, s.i, s.i - n), ifelse(s.j <= n, s.j, s.j - n) + just_one_flips = xor(isone(x.elts[i]), isone(x.elts[j])) + return ifelse(just_one_flips, inv(s), s) end action_by_conjugation(sln::Groups.MatrixGroups.SymplecticGroup, Σ::Groups.Group) =