1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 14:35:28 +01:00

identify trivial elt with symmetric_AutSymbol() on trivial perm

This commit is contained in:
kalmar 2017-01-24 12:22:42 +01:00
parent 8c1dfffa99
commit ee3be65fb2

View File

@ -55,15 +55,16 @@ function flip_AutSymbol(j; pow::Int=1)
end end
function symmetric_AutSymbol(perm::Vector{Int}; pow::Int=1) function symmetric_AutSymbol(perm::Vector{Int}; pow::Int=1)
# if perm == collect(1:length(perm))
# return one(AutSymbol)
# end
perm = Permutation(perm) perm = Permutation(perm)
ord = order(perm) ord = order(perm)
pow = pow % ord pow = pow % ord
perm = perm^pow perm = perm^pow
if array(perm) == collect(1:length(perm))
return one(AutSymbol)
else
gen = string('σ', [Char(8320 + i) for i in array(perm)]...) gen = string('σ', [Char(8320 + i) for i in array(perm)]...)
return AutSymbol(gen, 1, :(σ($(array(perm))))) return AutSymbol(gen, 1, :(σ($(array(perm)))))
end
end end
function getperm(s::AutSymbol) function getperm(s::AutSymbol)