ReducedAgWord( b, x )
Let b and x be ag words of the same depth, then ReducedAgWord
returns an ag word a such that a is an element of the coset U <b>,
where U is the cyclic group generated by x, and a has a higher
depth than b and x.
Note that the relative order of b and x must be a prime.
Let p be the relative order of b and x. Let beta and xi be the leading exponent of b and x respectively. Then there exits an integer i such that xi * i = beta modulo p. We can set <a> = <x>^{-i} <b>.
Typically this function is used when b and x occur in a generating set of a subgroup W. Then b can be replaced by a in the generating set of W, but a and x have different depth.
gap> ReducedAgWord( a*b^2*c, a ); b^2*c gap> ReducedAgWord( last, b ); c
GAP 3.4.4