"Source: Text/Group/GrpFP.text";
"Line: 9194";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Group/GrpFP.text, line: 9194
// Example: H80E72 ()
print "Example: H80E72";
ei := GetEchoInput();
SetEchoInput(true);
F<a,b,c,d,e> := FreeGroup(5);
G<a,b,c,d,e> :=
         quo<F | (b,a), (c,a),
         (d,a)=(c,b), (e,a)=(d,b), (e,b)=(d,c),
         (e,c), (e,d)>;
N1<[x]>, pi1 := NilpotentQuotient(G, 0);
NilpotencyClass(N1);
assert $1 eq 6;
M := FPGroup<w,x,y,z|((w,x),(y,z))>; // metabelian identity
D := FreeProduct(G,M); // adjoin to G
N2, pi2 := NilpotentQuotient(D, 0: NumberOfFreeVariables := 4); 
NilpotencyClass(N2);
assert $1 eq 4;
DerivedLength(N2);
assert $1 eq 2;
f := hom< N1->N2 | [ pi1(G.i)->pi2(D.i) : i in [1..Ngens(G)] ] >; 
PCGenerators(Kernel(f), N1);
N3, pi3 := NilpotentQuotient(G, 0 : Engel := 4);
NilpotencyClass(N3);
assert $1 eq 4;
DerivedLength(N3);
assert $1 eq 3;
h := hom< N1->N3 | [ pi1(g)->pi3(g) : g in Generators(G) ] >; 
PCGenerators(Kernel(h), N1);
SetEchoInput(ei);
