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)
|
function AutFG_emb(A::AutGroup, g::WreathProductElem)
|
||||||
isa(A.objectGroup, FreeGroup) || throw("Not an Aut(Fₙ)")
|
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")
|
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()
|
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)])
|
Groups.r_multiply!(elt, [Groups.perm_autsymbol(g.p)])
|
||||||
return elt
|
return elt
|
||||||
end
|
end
|
||||||
@ -54,13 +54,16 @@ function AutFG_emb(A::AutGroup, p::perm)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function (g::WreathProductElem)(a::Groups.Automorphism)
|
function (g::WreathProductElem)(a::Groups.Automorphism)
|
||||||
g = AutFG_emb(parent(a),g)
|
A = parent(a)
|
||||||
return g*a*g^-1
|
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
|
end
|
||||||
|
|
||||||
function (p::perm)(a::Groups.Automorphism)
|
function (p::perm)(a::Groups.Automorphism)
|
||||||
g = AutFG_emb(parent(a),p)
|
g = AutFG_emb(parent(a),p)
|
||||||
return g*a*g^-1
|
return g*a*inv(g)
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -71,21 +71,23 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function matrix_emb(MM::MatSpace, g::WreathProductElem)
|
function matrix_emb(n::DirectProductGroupElem, p::perm)
|
||||||
parent(g).P.n == MM.cols == MM.rows || throw("No natural embedding of $(parent(g)) in ")
|
Id = parent(n.elts[1])()
|
||||||
powers = [(elt == parent(elt)() ? 0: 1) for elt in g.n.elts]
|
elt = diagm([(-1)^(el == Id ? 0 : 1) for el in n.elts])
|
||||||
elt = diagm([(-1)^(elt == parent(elt)() ? 0: 1) for elt in g.n.elts])
|
return elt[:, p.d]
|
||||||
return MM(elt)*MM(Nemo.matrix_repr(g.p)')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function (g::WreathProductElem)(A::MatElem)
|
function (g::WreathProductElem)(A::MatElem)
|
||||||
G = matrix_emb(parent(A), g)
|
g_inv = inv(g)
|
||||||
inv_G = matrix_emb(parent(A), inv(g))
|
G = matrix_emb(g.n, g_inv.p)
|
||||||
return G*A*inv_G
|
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
|
end
|
||||||
|
|
||||||
function (p::perm)(A::MatElem)
|
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))")
|
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)
|
return p*A*inv(p)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user