PropertyT.jl/src/actions/spn_conjugation.jl

48 lines
1.3 KiB
Julia
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Particular definitions for actions on Sp(n,)
function _conj(
s::MatrixGroups.ElementarySymplectic{N,T},
σ::PG.AbstractPermutation,
) where {N,T}
@assert iseven(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(
s::MatrixGroups.ElementarySymplectic{N,T},
x::Groups.Constructions.DirectPowerElement,
) where {N,T}
@assert Groups.order(Int, parent(x).group) == 2
@assert iseven(N)
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
function action_by_conjugation(
sln::Groups.MatrixGroups.SymplecticGroup,
Σ::Groups.Group,
)
return AlphabetPermutation(alphabet(sln), Σ, _conj)
end