struct SpecialAutomorphismGroup <: SymmetricGroup args::Dict{String,Any} group::AutGroup function SpecialAutomorphismGroup(args::Dict) N = args["N"] return new(args, AutGroup(FreeGroup(N), special=true)) end end function name(G::SpecialAutomorphismGroup) N = G.args["N"] if G.args["nosymmetry"] return "SAutF$(N)" else return "oSAutF$(N)" end end group(G::SpecialAutomorphismGroup) = G.group function generatingset(G::SpecialAutomorphismGroup) S = gens(group(G)); return unique([S; inv.(S)]) end function autS(G::SpecialAutomorphismGroup) N = G.args["N"] return WreathProduct(PermutationGroup(2), PermutationGroup(N)) end ############################################################################### # # Action of WreathProductElems on AutGroupElem # ############################################################################### function AutFG_emb(A::AutGroup, g::WreathProductElem) isa(A.objectGroup, FreeGroup) || throw("Not an Aut(Fₙ)") parent(g).P.n == length(A.objectGroup.gens) || throw("No natural embedding of $(parent(g)) into $A") elt = A() Id = parent(g.n.elts[1])() flips = Groups.AutSymbol[Groups.flip_autsymbol(i) for i in 1:length(g.p.d) if g.n.elts[i] != Id] Groups.r_multiply!(elt, flips, reduced=false) Groups.r_multiply!(elt, [Groups.perm_autsymbol(g.p)]) return elt end function AutFG_emb(A::AutGroup, p::perm) isa(A.objectGroup, FreeGroup) || throw("Not an Aut(Fₙ)") parent(p).n == length(A.objectGroup.gens) || throw("No natural embedding of $(parent(g)) into $A") return A(Groups.perm_autsymbol(p)) end function (g::WreathProductElem)(a::Groups.Automorphism) A = parent(a) g = AutFG_emb(A,g) res = A() Groups.r_multiply!(res, g.symbols, reduced=false) Groups.r_multiply!(res, a.symbols, reduced=false) Groups.r_multiply!(res, [inv(s) for s in reverse!(g.symbols)]) return res end function (p::perm)(a::Groups.Automorphism) g = AutFG_emb(parent(a),p) return g*a*inv(g) end