Add simple permutation action on Nemo.MatElem

This commit is contained in:
kalmar 2017-06-08 19:59:18 +02:00
parent 762f069cbd
commit 1575aabfa9

View File

@ -52,20 +52,19 @@ end
import Nemo.elements import Nemo.elements
elements(F::Nemo.FinField) = FFEltsIter(F) elements(F::Nemo.FinField) = FFEltsIter(F)
###############################################################################
#
# Action of Premutations on Nemo.MatElem
#
###############################################################################
function AutFG_emb(A::AutGroup, g::WreathProductElem) function (p::Nemo.perm)(A::Nemo.MatElem)
isa(A.objectGroup, FreeGroup) || throw("Not an Aut(Fₙ)") length(p.d) == A.r == A.c || throw("Can't act via $p on matrix of size ($(A.r), $(A.c))")
parent(g).P.n == length(A.objectGroup.gens) || throw("No natural embedding of $(parent(g)) into $A") R = parent(A)
powers = [(elt == parent(elt)() ? 0: 1) for elt in g.n.elts] inv_p = inv(p)
elt = reduce(*, [A(Groups.flip_autsymbol(i))^pow for (i,pow) in enumerate(powers)]) return R(Nemo.matrix_repr(p))*A*R(Nemo.matrix_repr(inv_p))
Groups.r_multiply!(elt, [Groups.perm_autsymbol(g.p)])
return elt
end end
function (g::WreathProductElem)(a::AutGroupElem)
g = AutFG_emb(parent(a),g)
return g*a*g^-1
end
function orbit_decomposition(G::Nemo.Group, E::Vector, rdict=GroupRings.reverse_dict(E)) function orbit_decomposition(G::Nemo.Group, E::Vector, rdict=GroupRings.reverse_dict(E))