1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +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
function symmetric_AutSymbol(perm::Vector{Int}; pow::Int=1)
# if perm == collect(1:length(perm))
# return one(AutSymbol)
# end
perm = Permutation(perm)
ord = order(perm)
pow = pow % ord
perm = perm^pow
gen = string('σ', [Char(8320 + i) for i in array(perm)]...)
return AutSymbol(gen, 1, :(σ($(array(perm)))))
if array(perm) == collect(1:length(perm))
return one(AutSymbol)
else
gen = string('σ', [Char(8320 + i) for i in array(perm)]...)
return AutSymbol(gen, 1, :(σ($(array(perm)))))
end
end
function getperm(s::AutSymbol)