# 25.84 SumFactorizationFunctionAgGroup

`SumFactorizationFunctionAgGroup( U, N )`

Let U and N be ag group with a common parent group such that U normalizes N. Then the function returns a record R with the following components.

`intersection`:

is bound to the intersection <U> cap <N>.

`sum`:

is bound to the sum <U> * <N>.

`factorization`:

is bound to function, which takes an element g of <U> * <N> and returns the factorization of g in an element u of U and n of N, such that g = u {*} n. This factorization is returned as record r with components `r.u` and `r.n`, where `r.u` is bound to the ag word u, `r.n` to the ag word n.

Note that N must be a normal subgroup of <U> * <N>, it is not sufficient that <U> * <N> = <N> * <U>.

```    gap> v4 := AgSubgroup( s4, [ a*b, c ], true );
Subgroup( s4, [ a*b, c ] )
gap> a4 := AgSubgroup( s4, [ b, c, d ], true );
Subgroup( s4, [ b, c, d ] )
gap> sd := SumFactorizationFunctionAgGroup;
function ( U, N ) ... end
gap> sd := SumFactorizationFunctionAgGroup( v4, a4 );
rec(
sum := Group( a*b, b, c, d ),
intersection := Subgroup( s4, [ c ] ),
factorization := function ( un ) ... end )
gap> sd.factorization( a*b*c*d );
rec(
u := a*b*c,
n := d )
gap> sd.factorization( a*b^2*c*d );
rec(
u := a*b*c,
n := b*c ) ```

GAP 3.4.4
April 1997