  
  [1X8 [33X[0;0YAlgebras[133X[101X
  
  [33X[0;0YSelf-similar  algebras  and algebras with one (below [13XFR algebras[113X) 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.[133X
  
  [33X[0;0YElements  may  be  added,  subtracted  and multiplied. They can be vector or
  algebra  linear elements; the vector elements are in general preferable, for
  efficiency reasons.[133X
  
  [33X[0;0YFinite-dimensional  approximations of self-similar algebras can be computed;
  they are given as matrix algebras.[133X
  
  
  [1X8.1 [33X[0;0YCreators for FR algebras[133X[101X
  
  [33X[0;0YThe  most  straightforward  creation  method  for  FR algebras is [10XAlgebra()[110X,
  applied  with  linear  FR elements as arguments. There are shortcuts to this
  somewhat tedious method:[133X
  
  [1X8.1-1 FRAlgebra[101X
  
  [33X[1;0Y[29X[2XFRAlgebra[102X( [3Xring[103X, [3X{definition[103X, [3X}[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XFRAlgebraWithOne[102X( [3Xring[103X, [3X{definition[103X, [3X}[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA new self-similar algebra [with one].[133X
  
  [33X[0;0YThis 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.[133X
  
  [33X[0;0Y[3Xring[103X is the acting domain of the vector space on which the algebra will act.[133X
  
  [33X[0;0YEach  [3Xdefinition[103X  is  of  the  form  [10X"name=[[...],...,[...]]"[110X or of the form
  [10X"name=[[...],...,[...]]:out"[110X,  namely  a  matrix whose entries are algebraic
  expressions  in  the  [10Xnames[110X,  possibly  using  [10X0,1[110X, 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.[133X
  
  [33X[0;0YThe option [10XIsVectorElement[110X asks for the resulting algebra to be generated by
  vector  elements,  see  example  below.  The  generators  must  of course be
  finite-state.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xm := FRAlgebra(Rationals,"a=[[1,a],[a,0]]");[127X[104X
    [4X[28X<self-similar algebra on alphabet Rationals^2 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XDisplay(Activity(m.1,2));[127X[104X
    [4X[28X[ [  1,  0,  1,  1 ],[128X[104X
    [4X[28X  [  0,  1,  1,  0 ],[128X[104X
    [4X[28X  [  1,  1,  0,  0 ],[128X[104X
    [4X[28X  [  1,  0,  0,  0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xm2 := FRAlgebra(Rationals,"a=[[1,a],[a,0]]":IsVectorElement);;[127X[104X
    [4X[25Xgap>[125X [27Xm.1=m2.1;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X8.1-2 SCAlgebra[101X
  
  [33X[1;0Y[29X[2XSCAlgebra[102X( [3Xm[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSCLieAlgebra[102X( [3Xm[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSCAlgebraWithOne[102X( [3Xm[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSCAlgebraNC[102X( [3Xm[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSCAlgebraWithOneNC[102X( [3Xm[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe state-closed algebra [with one] generated by the machine [3Xm[103X.[133X
  
  [33X[0;0YThis function constructs a new FR algebra [vith one] [10Xa[110X, generated by all the
  states  of  the  FR  machine  [3Xm[103X. There is a bijective correspondence between
  [10XGeneratorsOfFRMachine(m)[110X  and  the  generators of [10Xa[110X, which is accessible via
  [10XCorrespondence(a)[110X  (See  [2XCorrespondence[102X  ([14X7.1-4[114X)); it is a homomorphism from
  the  stateset  of  [3Xm[103X  to  [10Xa[110X,  or  a  list  indicating  for each state of [3Xm[103X a
  corresponding generator index in the generators of [10Xa[110X (with 0 for identity).[133X
  
  [33X[0;0YIn  the non-[10XNC[110X forms, redundant (equal, zero or one) states are removed from
  the generating set of [10Xa[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xa := SCAlgebra(AsLinearMachine(Rationals,I4Machine));[127X[104X
    [4X[28X<self-similar algebra on alphabet Rationals^2 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xa.1 = AsLinearElement(Rationals,I4Monoid.1);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X8.1-3 NucleusOfFRAlgebra[101X
  
  [33X[1;0Y[29X[2XNucleusOfFRAlgebra[102X( [3Xa[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XNucleus[102X( [3Xa[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe nucleus of the contracting algebra [3Xa[103X.[133X
  
  [33X[0;0YThis  function  returns  the  [13Xnucleus[113X of the contracting algebra [3Xa[103X, i.e. the
  smallest subspace [10XN[110X of [3Xa[103X such that the [2XLimitStates[102X ([14X4.2-11[114X) of every element
  of [3Xa[103X belong to [10XN[110X.[133X
  
  [33X[0;0YThis  function  returns  [9Xfail[109X if no such [10XN[110X exists. Usually, it loops forever
  without  being  able  to decide whether [10XN[110X is finite or infinite. It succeeds
  precisely when [10XIsContracting(g)[110X succeeds.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27X> a := GrigorchukThinnedAlgebra(2);[127X[104X
    [4X[28X<self-similar algebra-with-one on alphabet GF(2)^2 with 4 generators, of dimension infinity>[128X[104X
    [4X[25Xgap>[125X [27XNucleusOfFRAlgebra(a);[127X[104X
    [4X[28X<vector space over GF(2), with 4 generators>[128X[104X
  [4X[32X[104X
  
  [1X8.1-4 BranchingIdeal[101X
  
  [33X[1;0Y[29X[2XBranchingIdeal[102X( [3XA[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YAn ideal [22XI[122X that contains matrices over itself.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := GrigorchukThinnedAlgebra(2);;[127X[104X
    [4X[25Xgap>[125X [27XI := BranchingIdeal(R);[127X[104X
    [4X[28X<two-sided ideal in <self-similar algebra-with-one on alphabet GF(2)^2[128X[104X
    [4X[28X with 4 generators, of dimension infinity>, (3 generators)>[128X[104X
    [4X[25Xgap>[125X [27Xe := EpimorphismMatrixQuotient(R,3);;[127X[104X
    [4X[25Xgap>[125X [27XeI := Ideal(Range(e),List(GeneratorsOfIdeal(I),x->x^e));[127X[104X
    [4X[28X<two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (3 generators)>[128X[104X
    [4X[25Xgap>[125X [27XDimension(Range(e)/eI);[127X[104X
    [4X[28X6[128X[104X
  [4X[32X[104X
  
  
  [1X8.2 [33X[0;0YOperations for FR algebras[133X[101X
  
  [1X8.2-1 MatrixQuotient[101X
  
  [33X[1;0Y[29X[2XMatrixQuotient[102X( [3Xa[103X, [3Xl[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XEpimorphismMatrixQuotient[102X( [3Xa[103X, [3Xl[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe matrix algebra of [3Xa[103X's action on level [3Xl[103X.[133X
  
  [33X[0;0YThe first function returns the matrix algebra generated by the activities of
  [3Xa[103X  on  level  [3Xl[103X  (see  the examples in [14X6.1-7[114X). The second functon returns an
  algebra homomorphism from [3Xa[103X to the matrix algebra.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xa := ThinnedAlgebraWithOne(GF(2),GrigorchukGroup);[127X[104X
    [4X[28X<self-similar algebra-with-one on alphabet GF(2)^2 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XList([0..4],i->Dimension(MatrixQuotient(a,i)));[127X[104X
    [4X[28X[ 1, 2, 6, 22, 78 ][128X[104X
  [4X[32X[104X
  
  [1X8.2-2 ThinnedAlgebra[101X
  
  [33X[1;0Y[29X[2XThinnedAlgebra[102X( [3Xr[103X, [3Xg[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XThinnedAlgebraWithOne[102X( [3Xr[103X, [3Xg[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe thinned algebra [with one] associated with [3Xg[103X.[133X
  
  [33X[0;0YThe    first    function    returns    the   thinned   algebra   of   a   FR
  group/monoid/semigroup  [3Xg[103X, over the domain [3Xr[103X. This is the linear envelope of
  [3Xg[103X in its natural action on sequences.[133X
  
  [33X[0;0YThe embedding of [3Xg[103X in its thinned algebra is returned by [10XEmbedding(g,a)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xa := ThinnedAlgebraWithOne(GF(2),GrigorchukGroup);[127X[104X
    [4X[28X<self-similar algebra on alphabet GF(2)^2 with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27Xa.1 = GrigorchukGroup.1^Embedding(GrigorchukGroup,a);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDimension(VectorSpace(GF(2),[One(a),a.2,a.3,a.4]));[127X[104X
    [4X[28X3[128X[104X
  [4X[32X[104X
  
  [1X8.2-3 Nillity[101X
  
  [33X[1;0Y[29X[2XNillity[102X( [3Xx[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XIsNilElement[102X( [3Xx[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10YThe smallest [10Xn[110X such that [22Xx^n=0[122X.[133X
  
  [33X[0;0YThe  first  command computes the nillity of [3Xx[103X, i.e. the smallest [10Xn[110X such that
  [22Xx^n=0[122X. The command is not guaranteed to terminate.[133X
  
  [33X[0;0YThe second command returns whether [3Xx[103X is nil, that is, whether its nillity is
  finite.[133X
  
  [1X8.2-4 DegreeOfHomogeneousElement[101X
  
  [33X[1;0Y[29X[2XDegreeOfHomogeneousElement[102X( [3Xx[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XIsHomogeneousElement[102X( [3Xx[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10YThe degree of [3Xx[103X in its parent.[133X
  
  [33X[0;0YIf  [3Xx[103X belongs to a graded algebra [10XA[110X, then the second command returns whether
  [3Xx[103X  belongs  to  a homogeneous component of [10XGrading(A)[110X, and the first command
  returns the degree of that component (or [9Xfail[109X if no such component exists).[133X
  
