GroupsWithPropertyT/groups/autfreegroup.jl

70 lines
2.0 KiB
Julia
Raw Normal View History

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()
2018-08-08 00:24:17 +02:00
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
2018-07-31 12:42:58 +02:00
function (g::WreathProductElem)(a::Groups.Automorphism)
2018-08-08 00:24:17 +02:00
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
2018-07-31 12:42:58 +02:00
function (p::perm)(a::Groups.Automorphism)
g = AutFG_emb(parent(a),p)
2018-08-08 00:24:17 +02:00
return g*a*inv(g)
end