more efficient actions of autS
This commit is contained in:
parent
1d82aeed8d
commit
fd29784a00
@ -39,10 +39,10 @@ end
|
||||
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")
|
||||
Id = parent(g.n[1])()
|
||||
powers = ((el == Id ? 0: 1) for el in g.n.elts)
|
||||
elt = A()
|
||||
Groups.r_multiply!(elt, [Groups.flip_autsymbol(i, pow=p) for (i,p) in enumerate(powers)], reduced=false)
|
||||
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
|
||||
@ -54,13 +54,16 @@ function AutFG_emb(A::AutGroup, p::perm)
|
||||
end
|
||||
|
||||
function (g::WreathProductElem)(a::Groups.Automorphism)
|
||||
g = AutFG_emb(parent(a),g)
|
||||
return g*a*g^-1
|
||||
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*g^-1
|
||||
end
|
||||
|
||||
return g*a*inv(g)
|
||||
end
|
||||
|
@ -71,21 +71,23 @@ end
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
function matrix_emb(MM::MatSpace, g::WreathProductElem)
|
||||
parent(g).P.n == MM.cols == MM.rows || throw("No natural embedding of $(parent(g)) in ")
|
||||
powers = [(elt == parent(elt)() ? 0: 1) for elt in g.n.elts]
|
||||
elt = diagm([(-1)^(elt == parent(elt)() ? 0: 1) for elt in g.n.elts])
|
||||
return MM(elt)*MM(Nemo.matrix_repr(g.p)')
|
||||
function matrix_emb(n::DirectProductGroupElem, p::perm)
|
||||
Id = parent(n.elts[1])()
|
||||
elt = diagm([(-1)^(el == Id ? 0 : 1) for el in n.elts])
|
||||
return elt[:, p.d]
|
||||
end
|
||||
|
||||
function (g::WreathProductElem)(A::MatElem)
|
||||
G = matrix_emb(parent(A), g)
|
||||
inv_G = matrix_emb(parent(A), inv(g))
|
||||
return G*A*inv_G
|
||||
g_inv = inv(g)
|
||||
G = matrix_emb(g.n, g_inv.p)
|
||||
G_inv = matrix_emb(g_inv.n, g.p)
|
||||
M = parent(A)
|
||||
res = M(G_inv)
|
||||
Nemo.mul!(res, A, res)
|
||||
return Nemo.mul!(res, M(G), res)
|
||||
end
|
||||
|
||||
function (p::perm)(A::MatElem)
|
||||
length(p.d) == A.r == A.c || throw("Can't act via $p on matrix of size ($(A.r), $(A.c))")
|
||||
R = parent(A)
|
||||
return p*A*inv(p)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user