  
  [1X8 Algebras[0X
  
  Self-similar  algebras  and algebras with one (below [13XFR algebras[0m) are simply
  algebras  [with  one]  whose elements are linear FR machines. They naturally
  act on the alphabet of their elements, which is a vector space.
  
  Elements  may  be  added,  subtracted  and multiplied. They can be vector or
  algebra  linear elements; the vector elements are in general preferable, for
  efficiency reasons.
  
  Finite-dimensional  approximations of self-similar algebras can be computed;
  they are given as matrix algebras.
  
  
  [1X8.1 Creators for FR algebras[0X
  
  The  most  straightforward  creation  method  for  FR algebras is [10XAlgebra()[0m,
  applied  with  linear  FR elements as arguments. There are shortcuts to this
  somewhat tedious method:
  
  [1X8.1-1 FRAlgebra[0m
  
  [2X> FRAlgebra( [0X[3Xring, {definition, }[0X[2X ) _______________________________[0Xoperation
  [2X> FRAlgebraWithOne( [0X[3Xring, {definition, }[0X[2X ) ________________________[0Xoperation
  [6XReturns:[0X  A new self-similar algebra [with one].
  
  This function constructs a new FR algebra [with one], generated by linear FR
  elements.  It  receives  as  argument  any  number of strings, each of which
  represents a generator of the object to be constructed.
  
  [3Xring[0m is the acting domain of the vector space on which the algebra will act.
  
  Each  [3Xdefinition[0m  is  of  the  form  [10X"name=[[...],...,[...]]"[0m or of the form
  [10X"name=[[...],...,[...]]:out"[0m,  namely  a  matrix whose entries are algebraic
  expressions  in  the  [10Xnames[0m,  possibly  using  [10X0,1[0m, optionally followed by a
  scalar.  The  matrix  entries specify the decomposition of the element being
  defined,  and  the  optional scalar specifies the output of that element, by
  default assumed to be one.
  
  The       option      [10XIsVectorElement[0m,      passed      e.g.      as      in
  [10XFRAlgebra(Rationals,"a=[[a,1],[a,0]]":IsVectorElement)[0m,    asks    for   the
  resulting algebra to be generated by vector elements. The generators must of
  course  be  finite-state.  Their  names  ("a",...) are not remembered in the
  constructing algebra (but can be set using [2XSetName[0m ([14XReference: SetName[0m)).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> m := FRAlgebra(Rationals,"a=[[1,a],[a,0]]");[0X
    [4X<self-similar algebra on alphabet Rationals^2 with 1 generator>[0X
    [4Xgap> Display(Activity(m.1,2));[0X
    [4X[ [  1,  0,  1,  1 ],[0X
    [4X  [  0,  1,  1,  0 ],[0X
    [4X  [  1,  1,  0,  0 ],[0X
    [4X  [  1,  0,  0,  0 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.1-2 SCAlgebra[0m
  
  [2X> SCAlgebra( [0X[3Xm[0X[2X ) __________________________________________________[0Xoperation
  [2X> SCAlgebraWithOne( [0X[3Xm[0X[2X ) ___________________________________________[0Xoperation
  [2X> SCAlgebraNC( [0X[3Xm[0X[2X ) ________________________________________________[0Xoperation
  [2X> SCAlgebraWithOneNC( [0X[3Xm[0X[2X ) _________________________________________[0Xoperation
  [6XReturns:[0X  The state-closed algebra [with one] generated by the machine [3Xm[0m.
  
  This function constructs a new FR algebra [vith one] [10Xa[0m, generated by all the
  states  of  the  FR  machine  [3Xm[0m. There is a bijective correspondence between
  [10XGeneratorsOfFRMachine(m)[0m  and  the  generators of [10Xa[0m, which is accessible via
  [10XCorrespondence(a)[0m  (See  [2XCorrespondence[0m  ([14X7.1-3[0m)); it is a homomorphism from
  the  stateset  of  [3Xm[0m  to  [10Xa[0m,  or  a  list  indicating  for each state of [3Xm[0m a
  corresponding generator index in the generators of [10Xa[0m (with 0 for identity).
  
  In  the non-[10XNC[0m forms, redundant (equal, zero or one) states are removed from
  the generating set of [10Xa[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a := SCAlgebra(AsLinearMachine(Rationals,I4Machine));[0X
    [4X<self-similar algebra on alphabet Rationals^2 with 3 generators>[0X
    [4Xgap> a.1 = AsLinearElement(Rationals,I4Monoid.1);[0X
    [4Xtrue[0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.1-3 BranchingIdeal[0m
  
  [2X> BranchingIdeal( [0X[3XA[0X[2X ) _____________________________________________[0Xoperation
  [6XReturns:[0X  An ideal I that contains matrices over itself.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> !!![0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X8.2 Operations for FR algebras[0X
  
  [1X8.2-1 MatrixQuotient[0m
  
  [2X> MatrixQuotient( [0X[3Xa, l[0X[2X ) __________________________________________[0Xoperation
  [2X> EpimorphismMatrixQuotient( [0X[3Xa, l[0X[2X ) _______________________________[0Xoperation
  [6XReturns:[0X  The matrix algebra of [3Xa[0m's action on level [3Xl[0m.
  
  The first function returns the matrix algebra generated by the activities of
  [3Xa[0m  on  level  [3Xl[0m  (see  the examples in [14X6.1-6[0m). The second functon returns an
  algebra homomorphism from [3Xa[0m to the matrix algebra.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a := ThinnedAlgebraWithOne(GF(2),GrigorchukGroup);[0X
    [4X<self-similar algebra-with-one on alphabet GF(2)^2 with 4 generators>[0X
    [4Xgap> List([0..4],i->Dimension(MatrixQuotient(a,i)));[0X
    [4X[ 1, 2, 6, 22, 78 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.2-2 ThinnedAlgebra[0m
  
  [2X> ThinnedAlgebra( [0X[3Xr, g[0X[2X ) __________________________________________[0Xoperation
  [2X> ThinnedAlgebraWithOne( [0X[3Xr, g[0X[2X ) ___________________________________[0Xoperation
  [6XReturns:[0X  The thinned algebra [with one] associated with [3Xg[0m.
  
  The    first    function    returns    the   thinned   algebra   of   a   FR
  group/monoid/semigroup  [3Xg[0m, over the domain [3Xr[0m. This is the linear envelope of
  [3Xg[0m in its natural action on sequences.
  
  The embedding of [3Xg[0m in its thinned algebra is returned by [10XEmbedding(g,a)[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a := ThinnedAlgebraWithOne(GF(2),GrigorchukGroup);[0X
    [4X<self-similar algebra on alphabet GF(2)^2 with 5 generators>[0X
    [4Xgap> a.1 = GrigorchukGroup.1^Embedding(GrigorchukGroup,a);[0X
    [4Xtrue[0X
    [4Xgap> Dimension(VectorSpace(GF(2),[One(a),a.2,a.3,a.4]));[0X
    [4X3[0X
  [4X------------------------------------------------------------------[0X
  
  [1X8.2-3 Nillity[0m
  
  [2X> Nillity( [0X[3Xx[0X[2X ) ____________________________________________________[0Xoperation
  [6XReturns:[0X  The smallest [10Xn[0m such that x^n=0.
  
  This command computes the nillity of [3Xx[0m, i.e. the smallest [10Xn[0m such that x^n=0.
  The command is of course not guaranteed to terminate.
  
