# LieRing, chapter 1
#
# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
#
# This file has been autogenerated with GAP. It contains examples
# extracted from the documentation. Each example is preceded by the
# comment which points to the location of its source.
#
gap> START_TEST( "liering01.tst");

# doc/manual.xml:50-66
gap> L:= FreeLieRing( Integers, ["a","b"] );
<Free algebra over Integers generators: a, b >
gap> a:= L.1; b:= L.2;
a
b
gap> S:= [ 5*a-(b*a)*a-((b*a)*b)*b,5*b];
[ (5)*a+(-1)*(a,(a,b))+(b,(b,(a,b))), (5)*b ]
gap> K:= FpLieRing( L, S : maxdeg:= 4 );
<Lie ring with 5 generators>
gap> v:=BasisVectors( Basis(K) );
[ v_1, v_2, v_3, v_4, v_5 ]
gap> v[1]*v[4];
4*v_2+5*v_5
gap> Torsion( Basis(K) );
[ 5, 5, 5, 5, 25 ]
gap> STOP_TEST("liering01.tst", 1 );
