GroupsWithPropertyT/groups/autfreegroup.jl

68 lines
2.0 KiB
Julia
Raw Normal View History

struct SpecialAutomorphismGroup <: SymmetrizedGroup
args::Dict{String,Any}
group::AutGroup
2018-09-05 17:48:59 +02:00
N::Int
function SpecialAutomorphismGroup(args::Dict)
2018-09-05 17:48:59 +02:00
N = args["SAut"]
return new(args, AutGroup(FreeGroup(N), special=true), N)
end
end
function name(G::SpecialAutomorphismGroup)
if G.args["nosymmetry"]
2018-09-05 17:48:59 +02:00
return "SAutF$(G.N)"
else
2018-09-05 17:48:59 +02:00
return "oSAutF$(G.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)
2018-09-05 17:48:59 +02:00
return WreathProduct(PermutationGroup(2), PermutationGroup(G.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