DifferenceAgWord( u, v )
DifferenceAgWord
returns an ag word s representing the difference of
the exponent vectors of u and v.
Let G be the parent group of u and v. Let (g_1, ..., g_n) be the
AG system of G and o_i be the relative order or g_i. Then u can
be expressed uniquely as g_1^{u_1}* ...* g_n^{u_n} for integers u_i
between 0 and o_i-1 and v can be expressed uniquely as g_1^{v_1}*
...* g_n^{v_n} for integers v_i between 0 and o_i-1. The
function DifferenceAgWord
returns an ag word s = g_1^{s_1}* ...*
g_n^{s_n} with integer s_i such that 0 leq s_i < o_i and s_i
equiv u_i - v_i mod o_i.
gap> DifferenceAgWord( a * b, a ); b gap> DifferenceAgWord( a, b ); a*b^2 gap> z27 := CyclicGroup( AgWords, 27 ); Group( c27_1, c27_2, c27_3 ) gap> x := z27.1 * z27.2; c27_1*c27_2 gap> x * x; c27_1^2*c27_2^2 gap> DifferenceAgWord( x, x ); IdAgWord
GAP 3.4.4