Factorization( G, g )
Let G be a group with generators g_1, ..., g_n and let
g be an element of G. Factorization
returns a representation of g as word in the generators of G.
The group record of G must have a component G.abstractGenerators
which contains a list of n abstract words h_1, ..., h_n.
Otherwise a list of n abstract generators is bound to G.abstractGenerators.
The function returns an abstract word h = h_(i_1)^(e_1) * ... * h_(i_m)^(e_m)
such that g_(i_1)^(e_1) * ... * g_(i_m)^(e_m) = g.
gap> s4 := Group( (1,2,3,4), (1,2) );
Group( (1,2,3,4), (1,2) )
gap> Factorization( s4, (1,2,3) );
x1^3*x2*x1*x2
gap> (1,2,3,4)^3 * (1,2) * (1,2,3,4) * (1,2);
(1,2,3)
The default group function GroupOps.Factorization needs a
finite group G. It computes the set of elements of G
using a Dimino algorithm, together with a representation of these elements as
words in the generators of G.