inform("Testing Subgroup Functions.", 2);

/*
f := inclusion(g16,p16);
w( not morphism(f), "incl,mphsm: g16.");
*/

// Invariant.
inform("Invariant.", 3);

w( cInvar(t12, g12), "invnt: g12.");
w( cInvar(a437, sub<a437 | a437.1, a437.3>), "invnt: a437.");
w( cInvar(s16, sub<s16 | s16b, s16c>), "invnt: s16.");

// Zentral.
inform("IsCentral.", 3);

w( bZent(p16, g16), "zntl: p16.");
w( dZent(a437, sub<a437 | a437.1>), "zntl: a437.");
w( bZent(ir12, sub<ir12 | ir12c>), "zntl: ir12.");
w( dZent(s12, sub<s12 | s12a*s12b>), "zntl: s12.");

// Centre.
inform("Centre.", 3);

w( bCent(l302), "cntre: l302." );
w( eCent(p11n5), "cntre: p11n5.");
w( bCent(int12), "cntre: int12.");
w( eCent(r12), "cntre: r12."  );

// Normal Closure.
inform("Normal Closure.", 3);

w( bNmlCl(p16,g16), "nml cl: g16." );
w( bNmlCl(t12,ir12),"nml cl: ir12.");
w( eNmlCl(t12, g12), "nml cl: g12.");
w(eNmlCl(p12n4, sub<p12n4 | p12n4e,p12n4f>),"nml cl: p12n4.");

// Core.
inform("Core.", 3);

w( eCore(p16, g16), "core: g16.");
w( eCore(t12, int12), "core: t12.");
w( eCore(a437, sub<a437 | a437.1,a437.3>), "core: a437.");

// (Elementary) Abelian, Cyclic.
inform("(Elementary) Abelian, Cyclic.", 3);

w( cAbel(a437), "abel: a437.");
w( cAbel(l303), "abel: l303.");
w( cElAbel(s12), "el abel: s12.");
w( cElAbel(a437), "el abel: im14.");
w( cElAbel(sub<t7 | (1,2,3),(4,5,6)>), "el abel: t7.");
w( dCyclic(sub<l302 | l302a*l302d>), "cycl: l302.");
w( dCyclic(as12), "cycl: as12.");

// Minimal Normals, Normal Lattice.
inform("Minimal Normals, Normal Lattice.", 3);

w( bMinNmls(d16), "min nml: d16.");
w( bMinNmls(ra4), "min nml: ra4.");
w( bMinNmls(s12), "min nml: s12.");
w( bNmlLatt(r12), "nml latt: r12.");
w( bNmlLatt(d16), "nml latt: d16.");

// Conjugation.
inform("Conjugation.", 3);

w(cSgpConj(g12, t12!(1,2,5)(7,6)(8,9,10,11)), "cnjgn: sgp: g12.");
w(cSgpConj(sub<a10 | a10y>, a10x), "cnjgn: sgp: a10.");
w(cSgpConj(sub<s16 | s16a,s16b>,s16d),"cnjgn: sgp: s16.");
w(cSgpConj(sub<t7 | (1,2,3),(1,2)>, t7!(1,6,2,4)), "cnjgn: sgp: t7.");

// Commutator Group.
inform("Commutator Group.", 3);

w( eCommut(a437, sub<a437 | a437.1>, sub<a437 | a437.2>),"cmmtr: sgp: a437.");
w( eCommut(t12, t12, g12), "cmmtr: sgp: t12.");
w( eCommut(p16, sub<g16 | Id(g16)>, g16), "cmmtr: sgp: p16.");

// Derived Subgroup,Series.
inform("Derived Subgroup, Series.", 3);

w( dDerSgp(c41), "der sgp: c41.");
w( dDerSgp(l303), "der sgp: l303.");
w( dDerSgp(s16), "der sgp: s16.");
w( eDerSer(im14), "der ser: im14.");
w( eDerSer(l303), "der ser: l303.");
w( eDerSer(s16), "der ser: s16.");

// Soluble.
inform("Soluble.", 3);

w( cSoluble(s12), "solub: s12.");
w( cSoluble(s16), "solub: s16.");
w( cSoluble(p16), "solub: p16.");
w( cSoluble(p10n7),"solub: p10n7.");

// Frattini.
inform("Frattini.", 3);

w( eFrattini(r12), "fratt: r12.");
w( eFrattini(sub<l302 | l302a>), "fratt: l302.");
w( eFrattini(c41), "fratt: c41.");

// Sylow.
inform("Sylow.", 3);

w( bSylow(s12), "sylow: s12.");
w( bSylow(sub<t7 | (1,2,3,4,5), (1,2)>), "sylow: t7.");
w( bSylow(r12), "sylow: r12.");
w( bSylow(d16), "sylow: d16.");

// Central Series.
inform("Central Series.", 3);

w( eLCS(p11n5), "LCS: p11n5.");
w( eLCS(sub<im21 | (1,2)(3,
	4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16),(7,9)(8,10)(11,13)(12,14),
 (5,6)(11,13)(12,14)(20,21),(1,3)(2,4)(7,11)(8,12)(9,13)(10,14)(15,16)(20,21),
 (5,6)(8,10)(12,14)(15,16),(1,2)(5,21,6,20)(11,14,13,12)(17,19)>),"LCS: im21.");
w( eUCS(a4), "UCS: a4.");
w( eUCS(c41), "UCS: c41.");

// Nilpotency.
inform("Nilpotency.", 3);

w( cNilpotent(sub<s16 | (2,7,6)(4,9,5),(10,12,11),(14,16,15),(4,5,9),
  (3,13,8)(4,14,10)(5,15,11)(9,16,12)>), "nilpotent: s16.");
w( IsNilpotent(im14), "nilpotent: im14.");
w( cNilCl(sub<l303|(1,11)(2,8)(3,13)(4,5)(12,24)(14,22)(16,17)(18,23),
 (6,9)(7,19)(10,21)(12,14)(15,20)(16,23)(17,18)(22,24),
 (6,19)(7,9)(10,20)(12,16)(14,23)(15,21)(17,24)(18,22),
 (6,21)(7,20)(9,10)(12,17)(14,18)(15,19)(16,24)(22,23),
 (3,4)(5,13)(6,15)(7,10)(9,21)(14,16)(17,22)(19,20),
 (3,5)(4,13)(6,7)(9,20)(10,15)(14,17)(16,22)(19,21),
 (1,8)(2,11)(6,10)(7,15)(9,20)(14,16)(17,22)(19,21),
 (1,3)(2,5)(4,8)(6,19)(7,9)(10,20)(11,13)(15,21),
 (1,12)(2,18)(3,14)(4,16)(5,17)(6,15)(7,10)(8,23)(9,21)(11,24)(13,22)(19,20)>),
 "nilp cl: l303.");
w( cNilCl(int12), "nilp cl: int12.");

// (Extra) Special.
inform("(Extra) Special.", 3);

w( cSpec(c41), "spec: c41.");
w( cSpec(sub<im24 | (1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16) (17,18)(19,20)(21,22)(23,24),
(11,14)(12,13),(9,18)(10,17),(7,16)(8,15),(5,20)(6,19),(3,22)(4,21),(1,23)(2,24),
 (1,3)(2,4)(5,10)(6,9)(7,12)(8,11)(13,16)(14,15)(17,20)(18,19)(21,24)(22,23),
 (8,15)(12,13),(6,19)(10,17),(10,17)(12,13),(2,24)(4,21),
 (4,21)(12,13)>), "spec: im24.");
w( cExSp(c41), "ex spec: c41.");    
w( cExSp(sub<s16 | (2,7,6)(4,9,5),(10,12,11),(14,16,15),(4,5,9),
	 (3,13,8)(4,14,10)(5,15,11)(9,16,12)>), "ex spec: s16.");

// Perfect, Self-Normalising.
inform("Perfect,Self-Normalising.", 3);

w( ePerfect(s12), "pfct: s12.");
w( ePerfect(im24),"pfct: im24.");
w( eSelfNorm(t12,int12),"self nml: int12.");
w( eSelfNorm(t7,sub<t7 | (1,2,3,4,5),(1,2)>), "self nml: t7.");

// Simple.
inform("Simple.", 3);

w( eSimple(c41),"simple: c41.");
w( eSimple(p11n6),"simple: p11n6.");
w( eSimple(p12n4),"simple: p12n4.");
w( eSimple(sub<t7 | (1,2,3,4,5,6),(1,2)>),"simple: t7.");
w( eSimple(p10n7),"simple: p10n7.");

// Subnormal.
inform("Subnormal.", 3);

w( cSubNorm(p16,g16), "subnml: g16.");
w( eSubNorm(p16, g16),"subnml ser: g16.");
w( cSubNorm(sub<t7 | (1,2),(1,3),(3,4)>, sub<t7 | (1,2)>), "subnml: t7.");
w( eSubNorm(sub<t7 | (1,2),(1,3),(3,4)>, sub<t7 | (1,2)>), "subnml ser: t7.");
w( cSubNorm(t12, sub<t12 | (1,2,3),(1,2,4)>), "subnml: t12.");
w( eSubNorm(t12, sub<t12 | (1,2,3),(1,3,4)>), "subnml ser: t12.");
w( cSubNorm(c41, sub<c41 | c41.1>), "subnml: c41.");
w( eSubNorm(d16, sub<d16 | d16.2>), "subnml ser: d16.");
w( cSubNorm(ir12, sub<ir12 | ir12.2>), "subnml: ir12.");
w( eSubNorm(r12, sub<r12 | r12.1>), "subnml ser: r12.");

// Normaliser.
inform("Normaliser.", 3);

w( bNorm(im24,sub<im24 | im24a>), "nmlsr: im24.");
w( cNorm(p16,g16), "nmlsr: p16.");
w( dNorm(sub<t12 | (1,2),(2,3)>, sub<t12 | (1,3)>), "nmlsr: t12.");
w( bNorm(t12, g12), "nmlsr: g12.");
w( cNorm(a10,sub<a10 | (1,2)(3,4,5)(6,7),(2,3,4,5,6)>),"nmlsr: a10.");
w( dNorm(ra4,sub<ra4 | ra4.2>), "nmlsr: ra4.");

// Element Centraliser.
inform("Centraliser.", 3);
inform("Element.", 4);

w( bEltCntlr(s16, s16d), "cntlr: elt: s16.");
w( cEltCntlr(im24, im24b), "cntlr: elt: im24.");
w( bEltCntlr(as12, as12!(1,4)(3,6,5)(7,8,11,12)(9,10)),
	"cntlr: elt: as12.");
w( cEltCntlr(a437,a437.2), "cntlr: elt: a437.");

// Subgroup Centraliser.
inform("Subgroup.", 4);

w( bSgpCntlr(p16,g16), "cntlr: sgp: p16.");
w( bSgpCntlr(p12n4,sub<p12n4 | p12n4d,p12n4e,p12n4f>), "cntlr: sgp: p12n4.");
w( dSgpCntlr(ir12, sub<ir12 | ir12b>), "cntlr: sgp: ir12.");
w( dSgpCntlr(a4, sub<a4 | (1,2,3), (2,3,4)>), "cntlr: sgp: a4.");
