mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-26 10:25:30 +01:00
AutGroup constructor
This commit is contained in:
parent
5aa68207df
commit
6993c284cd
@ -114,6 +114,25 @@ function getperm(s::AutSymbol)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function AutGroup(G::FPGroup; outer=false, special=false)
|
||||||
|
length(G.rels) == 0 || throw("Don't know how to construct AutGroup of $G.")
|
||||||
|
n = length(G.generators)
|
||||||
|
indexing = [[i,j] for i in 1:n for j in 1:n if i≠j]
|
||||||
|
rmuls = [rmul_autsymbol(i,j) for (i,j) in indexing]
|
||||||
|
lmuls = [lmul_autsymbol(i,j) for (i,j) in indexing]
|
||||||
|
S = [rmuls..., lmuls...]
|
||||||
|
if special
|
||||||
|
flips = [flip_autsymbol(i) for i in 1:n]
|
||||||
|
append!(S, flips...)
|
||||||
|
elseif outer
|
||||||
|
perms = collect(elements(PermutationGroup(n)))
|
||||||
|
perms = [perm_autsymbol(p) for p in perms[2:end]] # leave the identity
|
||||||
|
append!(S, perms)
|
||||||
|
end
|
||||||
|
return new(G, S)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function (f::AutSymbol){T}(v::Vector{GWord{T}})
|
function (f::AutSymbol){T}(v::Vector{GWord{T}})
|
||||||
if f.pow == 0
|
if f.pow == 0
|
||||||
return v
|
return v
|
||||||
|
Loading…
Reference in New Issue
Block a user