Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346% This file was created automatically from groups.msk.1% DO NOT EDIT!2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3\Chapter{Properties and operations with groups and semigroups}45In this chapter we present the functionality applicable to groups and semigroups.67%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8\Section{Creation of groups and semigroups}910\>AutomatonGroup( <string>[, <bind_vars>] ) O11\>AutomatonGroup( <list>[, <names>, <bind_vars>] ) O12\>AutomatonGroup( <automaton>[, <bind_vars>] ) O1314Creates the self-similar group generated by the finite automaton, described by <string>15or <list>, or by the argument <automaton>.1617The argument <string> is a conventional notation of the form18`name1=(name11,name12,...,name1d)perm1, name2=...'19where each `name\*' is a name of a state or `1', and each `perm\*' is a20permutation written in {\GAP} notation. Trivial permutations may be21omitted. This function ignores whitespace, and states may be separated22by commas or semicolons.2324The argument <list> is a list consisting of $n$ entries corresponding to $n$ states of an automaton.25Each entry is of the form $[a_1,\.\.\.,a_d,p]$,26where $d \geq 2$ is the size of the alphabet the group acts on, $a_i$ are `IsInt' in27$\{1,\ldots,n\}$ and28represent the sections of the corresponding state at all vertices of the first level of the tree;29and $p$ from `SymmetricGroup(<d>)' describes the action of the corresponding state on the30alphabet.3132The optional argument <names> must be a list of names of generators of the group, corresponding to the33states of the automaton.34These names are used to display elements of the resulting group.3536If the optional argument <bind_vars> is `false' the names of generators of the group are not assigned37to the global variables. The default value is `true'. One can use38`AssignGeneratorVariables' function to assign these names later, if they were not assigned39when the group was created.4041\beginexample42gap> AutomatonGroup("a=(a,b), b=(a, b)(1,2)");43< a, b >44gap> AutomatonGroup("a=(b,a,1)(2,3), b=(1,a,b)(1,2,3)");45< a, b >46gap> A := MealyAutomaton("a=(b,1)(1,2), b=(a,1)");47<automaton>48gap> G := AutomatonGroup(A);49< a, b >50\endexample5152In the second form of this operation the definition of the first group53looks like54\beginexample55gap> AutomatonGroup([ [ 1, 2, ()], [ 1, 2, (1,2) ] ], [ "a", "b" ]);56< a, b >57\endexample585960\>AutomatonSemigroup( <string>[, <bind_vars>] ) O61\>AutomatonSemigroup( <list>[, <names>, <bind_vars>] ) O62\>AutomatonSemigroup( <automaton>[, <bind_vars>] ) O6364Creates the semigroup generated by the finite automaton, described by <string>65or <list>, or by the argument <automaton>.6667The argument <string> is a conventional notation of the form68`name1=(name11,name12,...,name1d)trans1, name2=...'69where each `name\*' is a name of a state or `1', and each `trans\*' is either a70permutation written in {\GAP} notation, or a list defining a transformation71of the alphabet via `Transformation(trans\*)'. Trivial permutations may be72omitted. This function ignores whitespace, and states may be separated73by commas or semicolons.7475The argument <list> is a list consisting of $n$ entries corresponding to $n$ states of the automaton.76Each entry is of the form $[a_1,...,a_d,p]$,77where $d \geq 2$ is the size of the alphabet the group acts on, $a_i$ are `IsInt' in78$\{1,\ldots,n\}$ and79represent the sections of the corresponding state at all vertices of the first level of the tree;80and $p$ is a transformation of the alphabet describing the action of the corresponding81state on the alphabet.8283The optional arguments <names> and <bind_vars> have the same meaning as in `AutomatonGroup' (see "AutomatonGroup").8485\beginexample86gap> AutomatonSemigroup("a=(a, b)[2,2], b=(a,b)(1,2)");87< a, b >88gap> AutomatonSemigroup("a=(b,a,1)[1,1,3], b=(1,a,b)(1,2,3)");89< 1, a, b >90gap> A := MealyAutomaton("f0=(f0,f0)(1,2), f1=(f1,f0)[2,2]");91<automaton>92gap> G := AutomatonSemigroup(A);93< f0, f1 >94\endexample95In the second form of this operation the definition of the second semigroup96looks like97\beginexample98gap> AutomatonSemigroup([ [1,2,Transformation([2,2])], [ 1,2,(1,2)] ], ["a","b"]);99< a, b >100\endexample101102103104\>SelfSimilarGroup( <string>[, <bind_vars>] ) O105\>SelfSimilarGroup( <list>[, <names>, <bind_vars>] ) O106\>SelfSimilarGroup( <automaton>[, <bind_vars>] ) O107108Creates the self-similar group generated by the wreath recursion, described by <string>109or <list>, or given by the argument <automaton>.110111The argument <string> is a conventional notation of the form112`name1=(word11,word12,...,word1d)perm1, name2=...'113where each `name\*' is a name of a state, `word\*' is an associative word114over the alphabet consisting of all `name\*', and each `perm\*' is a115permutation written in {\GAP} notation. Trivial permutations may be116omitted. This function ignores whitespace, and states may be separated117by commas or semicolons.118119The argument <list> is a list consisting of $n$ entries corresponding to $n$ generators of the group.120Each entry is of the form $[a_1,\.\.\.,a_d,p]$,121where $d \geq 2$ is the size of the alphabet the group acts on, $a_i$ are lists122acceptable by `AssocWordByLetterRep' (e.g. if the names of generators are `x', `y' and `z',123then `[1, 1, -2, -2, 1, 3]' will produce `x^2*y^-2*x*z')124representing the sections of the corresponding generator at all vertices of the first level of the tree;125and $p$ from `SymmetricGroup(<d>)' describes the action of the corresponding generator on the126alphabet.127128The optional argument <names> must be a list of names of generators of the group.129These names are used to display the elements of the resulting group.130131If the optional argument <bind_vars> is `false' the names of generators of the group are not assigned132to the global variables. The default value is `true'. One can use133`AssignGeneratorVariables' function to assign these names later, if they were not assigned134when the group was created.135136\beginexample137gap> SelfSimilarGroup("a=(a*b, b^-1), b=(1, b^2*a)(1,2)");138< a, b >139gap> SelfSimilarGroup("a=(b,a,a^-1)(2,3), b=(1,a*b,b)(1,2,3)");140< a, b >141gap> A := MealyAutomaton("f0=(f0,f0)(1,2),f1=(f1,f0)");142<automaton>143gap> SelfSimilarGroup(A);144< f0, f1 >145\endexample146In the second form of this operation the definition of the first group147looks like148\beginexample149gap> SelfSimilarGroup([[ [1,2], [-2], ()], [ [], [2,2,1], (1,2) ]], ["a","b"]);150< a, b >151\endexample152153154\>SelfSimilarSemigroup( <string>[, <bind_vars>] ) O155\>SelfSimilarSemigroup( <list>[, <names>, <bind_vars>] ) O156\>SelfSimilarSemigroup( <automaton>[, <bind_vars>] ) O157158Creates the semigroup generated by the wreath recursion, described by <string>159or <list>, or given by the argument <automaton>. Note, that on the contrary to160`AutomatonSemigroup' ("AutomatonSemigroup") in some cases the defined semigroup161may not be self-similar, since the sections of generators may include inverses of162generators or trivial homomorphisms, not included in the semigroup generated by the163generators. If one needs to have self-similarity it is always possible to include the164necessary sections in the generating set.165166The argument <string> is a conventional notation of the form167`name1=(word11,word12,...,word1d)trans1, name2=...'168where each `name\*' is a name of a state, `word\*' is an associative word169over the alphabet consisting of all `name\*', and each `trans\*' is either a170permutation written in {\GAP} notation, or a list defining a transformation171of the alphabet via `Transformation(trans\*)'. Trivial permutations may be172omitted. This function ignores whitespace, and states may be separated173by commas or semicolons.174175The argument <list> is a list consisting of $n$ entries corresponding to $n$ generators of the semigroup.176Each entry is of the form $[a_1,\.\.\.,a_d,p]$,177where $d \geq 2$ is the size of the alphabet the semigroup acts on, $a_i$ are lists178acceptable by `AssocWordByLetterRep' (e.g. if the names of generators are `x', `y' and `z',179then `[1, 1, 2, 3]' will produce `x^2*y*z')180representing the sections of the corresponding generator at all vertices of the first level of the tree;181and $p$ is a transformation of the alphabet describing the action of the corresponding182generator.183184The optional arguments <names> and <bind_vars> have the same meaning as in `SelfSimilarGroup' (see "SelfSimilarGroup").185186\beginexample187gap> SelfSimilarSemigroup("a=(a*b,b)[1,1], b=(a,b^2*a)(1,2)");188< a, b >189gap> SelfSimilarSemigroup("a=(b,a,a^3)(2,3), b=(1,a*b,b^-1)(1,2,3)");190< a, b >191gap> A := MealyAutomaton("f0=(f0,f0)(1,2), f1=(f1,f0)[2,2]");192<automaton>193gap> SelfSimilarSemigroup(A);194< f0, f1 >195\endexample196In the second form of this operation the definition of the first semigroup197looks like198\beginexample199gap> SelfSimilarSemigroup([[[1,2], [2], ()], [[1], [2,2,1], (1,2)]],["a","b"]);200< a, b >201\endexample202203204205\>IsTreeAutomorphismGroup( <G> ) C206207The category of groups of tree automorphisms.208209210\>IsAutomGroup( <G> ) C211212The category of groups generated by finite invertible initial automata213(elements from category `IsAutom').214215216\>IsAutomatonGroup( <G> ) P217218is `true' if <G> is created using the command `AutomatonGroup' ("AutomatonGroup")219or if the generators of <G> coincide with the generators of the corresponding family, and `false' otherwise.220To test whether <G> is self-similar use `IsSelfSimilar' ("IsSelfSimilar") command.221222223\>IsSelfSimGroup( <G> ) C224225The category of groups whose generators are defined using wreath recursion226(elements from category `IsSelfSim'). These groups need not be self-similar.227228229\>IsSelfSimilarGroup( <G> ) P230231is `true' if <G> is created using the command `SelfSimilarGroup' ("SelfSimilarGroup")232or if the generators of <G> coincide with the generators of the corresponding family, and `false' otherwise.233To test whether <G> is self-similar use `IsSelfSimilar' ("IsSelfSimilar") command.234235236237238%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%239\Section{Basic properties of groups and semigroups}240241\>TopDegreeOfTree( <obj> ) A242243Returns the degree of the tree on the first level, i.e. the number of vertices244adjacent to the root vertex.245246247\>DegreeOfTree( <obj> ) A248249This is a synonym for TopDegreeOfTree~("TopDegreeOfTree") for the case of250a regular tree. It is an error to call this method for an object which acts251on a non-regular tree.252253254\>IsFractal( <G> ) P255256Returns whether the group <G> is fractal (also called as <self-replicating>). In other257words, if <G> acts transitively on the first level and for any vertex $v$ of the tree258the projection of the stabilizer of $v$ in <G>259on this vertex coincides with the whole group <G>.260\beginexample261gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");262< a, b, c, d >263gap> IsFractal(Grigorchuk_Group);264true265\endexample266267268\>IsFractalByWords( <G> ) P269270Computes the generators of stabilizers of vertices of the first level271and their projections on these vertices. Returns `true' if the preimages of these272projections in the free group under the canonical epimorphism generate the whole free273group for each stabilizer, and the <G> acts transitively on the first level.274This is sufficient but not necessary condition for <G> to be fractal. See also275`IsFractal' ("IsFractal").276277278\>`IsSphericallyTransitive( <G> )'{IsSphericallyTransitive}!{[treehomsg]} P279280Returns whether the group <G> is spherically transitive (see~"Short math background").281\beginexample282gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");283< a, b, c, d >284gap> IsSphericallyTransitive(Grigorchuk_Group);285true286\endexample287288289\>ContainsSphericallyTransitiveElement( <G> ) A290291For a self-similar group <G> acting on a binary tree returns `true' if <G> contains292an element acting spherically transitively on the levels of the tree and `false'293otherwise. See also `SphericallyTransitiveElement' ("SphericallyTransitiveElement").294\beginexample295gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );296< u, v >297gap> ContainsSphericallyTransitiveElement(Basilica);298true299gap> G := SelfSimilarGroup("a=(a^-1*b^-1,1)(1,2), b=(b^-1,a*b)");300< a, b >301gap> ContainsSphericallyTransitiveElement(G);302false303\endexample304305306\>`IsTransitiveOnLevel( <G>, <lev> )'{IsTransitiveOnLevel}!{[treehomsg]} O307308Returns whether the group (semigroup) <G> acts transitively on level <lev>.309310\beginexample311gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");312< a, b, c, d >313gap> IsTransitiveOnLevel(Group([a,b]),3);314true315gap> IsTransitiveOnLevel(Group([a,b]),4);316false317\endexample318319320\>IsSelfSimilar( <G> ) P321322Returns whether the group or semigroup <G> is self-similar (see "Short math background").323324325\>IsContracting( <G> ) A326327Given a self-similar group <G> tries to compute whether it is contracting or not.328Only a partial method is implemented (since there is no general algorithm so far).329First it tries to find the nucleus up to size 50 using `FindNucleus'(<G>,50) (see~"FindNucleus"), then330it tries to find evidence that the group is noncontracting using331`IsNoncontracting'(<G>,10,10) (see~"IsNoncontracting"). If the answer was not found one can try to use332`FindNucleus' and `IsNoncontracting' with bigger parameters. Also one can use333`SetInfoLevel(InfoAutomGrp, 3)' for more information to be displayed.334335\beginexample336gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );337< u, v >338gap> IsContracting(Basilica);339true340gap> IsContracting(AutomatonGroup("a=(c,a)(1,2), b=(c,b), c=(b,a)"));341false342\endexample343344345\>IsNoncontracting( <G>[, <max_len>, <depth>] ) F346347Tries to show that the group <G> is not contracting.348Enumerates the elements of the group <G> up to length <max_len>349until it finds an element which has a section <g> of infinite order, such that350`OrderUsingSections'(<g>, <depth>) (see "OrderUsingSections")351returns `infinity' and such that <g> stabilizes some vertex and has itself as a352section at this vertex. See also `IsContracting'~("IsContracting").353354If <max_len> and <depth> are omitted they are assumed to be `infinity' and 10, respectively.355356If `InfoLevel' of `InfoAutomGrp' is greater than357or equal to 3 (one can set it by `SetInfoLevel( InfoAutomGrp, 3)'), then the proof358is printed.359360\beginexample361gap> G := AutomatonGroup("a=(b,a)(1,2), b=(c,b), c=(c,a)");362< a, b, c >363gap> IsNoncontracting(G);364true365gap> H := AutomatonGroup("a=(c,b)(1,2), b=(b,a), c=(a,a)");366< a, b, c >367gap> SetInfoLevel(InfoAutomGrp, 3);368gap> IsNoncontracting(H);369#I There are 37 elements of length up to 2370#I There are 187 elements of length up to 3371#I a^2*c^-1*b^-1 is obtained from (a^2*c^-1*b^-1)^2372by taking sections and cyclic reductions at vertex [ 1, 1 ]373#I a^2*c^-1*b^-1 has b*c*a^-2 as a section at vertex [ 2 ]374true375\endexample376377378\>IsGeneratedByAutomatonOfPolynomialGrowth( <G> ) P379380For a group <G> generated by all states of a finite automaton (see "IsAutomatonGroup")381determines whether this automaton has polynomial growth in terms of Sidki~\cite{Sid00}.382383See also operations `IsGeneratedByBoundedAutomaton' ("IsGeneratedByBoundedAutomaton") and384`PolynomialDegreeOfGrowthOfUnderlyingAutomaton' ("PolynomialDegreeOfGrowthOfUnderlyingAutomaton").385\beginexample386gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );387< u, v >388gap> IsGeneratedByAutomatonOfPolynomialGrowth(Basilica);389true390gap> D := AutomatonGroup( "a=(a,b)(1,2), b=(b,a)" );391< a, b >392gap> IsGeneratedByAutomatonOfPolynomialGrowth(D);393false394\endexample395396397\>IsGeneratedByBoundedAutomaton( <G> ) P398399For a group <G> generated by all states of a finite automaton (see "IsAutomatonGroup")400determines whether this automaton is bounded in terms of Sidki~\cite{Sid00}.401402See also `IsGeneratedByAutomatonOfPolynomialGrowth' ("IsGeneratedByAutomatonOfPolynomialGrowth")403and `PolynomialDegreeOfGrowthOfUnderlyingAutomaton' ("PolynomialDegreeOfGrowthOfUnderlyingAutomaton").404\beginexample405gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );406< u, v >407gap> IsGeneratedByBoundedAutomaton(Basilica);408true409gap> C := AutomatonGroup("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");410< a, b, c >411gap> IsGeneratedByBoundedAutomaton(C);412false413\endexample414415416\>PolynomialDegreeOfGrowthOfUnderlyingAutomaton( <G> ) A417418For a group <G> generated by all states of a finite automaton (see "IsAutomatonGroup")419of polynomial growth in terms of Sidki~\cite{Sid00} determines the degree of420polynomial growth of this automaton. This degree is 0 if and only if the automaton is bounded.421If the growth of automaton is exponential returns `fail'.422423See also `IsGeneratedByAutomatonOfPolynomialGrowth' ("IsGeneratedByAutomatonOfPolynomialGrowth")424and `IsGeneratedByBoundedAutomaton' ("IsGeneratedByBoundedAutomaton").425\beginexample426gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );427< u, v >428gap> PolynomialDegreeOfGrowthOfUnderlyingAutomaton(Basilica);4290430gap> C := AutomatonGroup("a=(a,b)(1,2), b=(b,c), c=(c,1)(1,2)");431< a, b, c >432gap> PolynomialDegreeOfGrowthOfUnderlyingAutomaton(C);4332434\endexample435436437\>IsOfSubexponentialGrowth( <G>[, <len>, <depth>] ) O438439Tries to check whether the growth function of a self-similar group <G> is subexponential.440The main part of the algorithm works as follows. It looks at all words of length up to <len>441and if for some length $l$ for each word of this length $l$ the sum of the lengths of442all its sections at level <depth> is less then $l$, returns `true'. The default values of443<len> and <depth> are 10 and 6 respectively. Setting `SetInfoLevel(InfoAtomGrp, 3)' will make it444print for each length the words that are not contracted. It also sometimes helps to use445`AG_UseRewritingSystem' (see "AG_UseRewritingSystem").446447\beginexample448gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");449< a, b, c, d >450gap> AG_UseRewritingSystem(Grigorchuk_Group);451gap> IsOfSubexponentialGrowth(Grigorchuk_Group,10,6);452true453\endexample454455456\>IsAmenable( <G> ) P457458In certain cases (for groups generated by bounded automata~\cite{BKNV05},459some virtually abelian groups or finite groups) returns `true' if <G> is460amenable.461462\beginexample463gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");464< a, b, c, d >465gap> IsAmenable(Grigorchuk_Group);466true467\endexample468469470\>UnderlyingAutomaton( <G> ) A471472For a group (or semigroup) <G> returns an automaton generating a473self-similar group (or semigroup) containing <G>.474\beginexample475gap> GS := AutomatonSemigroup("x=(x,y)[1,1], y=(y,y)(1,2)");476< x, y >477gap> A := UnderlyingAutomaton(GS);478<automaton>479gap> Display(A);480a1 = (a1, a2)[ 1, 1 ], a2 = (a2, a2)[ 2, 1 ]481\endexample482For a subgroup of Basilica group we get the automaton generating Basilica group.483\beginexample484gap> H := Group([u*v^-1,v^2]);485< u*v^-1, v^2 >486gap> Display(UnderlyingAutomaton(H));487a1 = (a1, a1), a2 = (a3, a1)(1,2), a3 = (a2, a1)488\endexample489490491\>`AutomatonList( <G> )'{AutomatonList}!{[automsg]} AM492493Returns an `AutomatonList' of `UnderlyingAutomaton'(<G>) (see "UnderlyingAutomaton").494\beginexample495gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );496< u, v >497gap> AutomatonList(Basilica);498[ [ 2, 5, (1,2) ], [ 1, 5, () ], [ 5, 4, (1,2) ], [ 3, 5, () ], [ 5, 5, () ] ]499\endexample500501502\>`RecurList( <G> )'{RecurList}!{[selfsimsg]} AM503504Returns an internal representation of the wreath recursion of the505self-similar group (semigroup) containing <G>.506\beginexample507gap> R := SelfSimilarGroup("a=(a^-1*b,b^-1*a)(1,2), b=(a^-1,b^-1)");508< a, b >509gap> RecurList(R);510[ [ [ -1, 2 ], [ -2, 1 ], (1,2) ], [ [ -1 ], [ -2 ], () ],511[ [ -1, 2 ], [ -2, 1 ], (1,2) ], [ [ 1 ], [ 2 ], () ] ]512\endexample513514515516517%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%518\Section{Operations with groups and semigroups}519520\>PermGroupOnLevel( <G>, <k> ) O521522Returns the group of permutations induced by the action of the group <G> at the <k>-th523level.524\beginexample525gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );526< u, v >527gap> PermGroupOnLevel(Basilica, 4);528Group([ (1,11,3,9)(2,12,4,10)(5,13)(6,14)(7,15)(8,16), (1,6,2,5)(3,7)(4,8) ])529gap> H := PermGroupOnLevel(Group([u,v^2]),4);530Group([ (1,11,3,9)(2,12,4,10)(5,13)(6,14)(7,15)(8,16), (1,2)(5,6) ])531gap> Size(H);53264533\endexample534535536\>TransformationSemigroupOnLevel( <G>, <k> ) O537538Returns the semigroup of transformations induced by the action of the semigroup <G> at the <k>-th539level.540\beginexample541gap> S := AutomatonSemigroup("y=(1,u)[1,1],u=(y,u)(1,2)");542< 1, y, u >543gap> T := TransformationSemigroupOnLevel(S,3);544<transformation monoid on 8 pts with 2 generators>545gap> Size(T);54611547\endexample548549550\>StabilizerOfLevel( <G>, <k> ) O551552Returns the stabilizer of the <k>-th level.553\beginexample554gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );555< u, v >556gap> StabilizerOfLevel(Basilica, 2);557< u^2, v^2, u*v^2*u^-1, v*u^2*v^-1, u*v*u^2*v^-1*u^-1, (v*u)^2*(v^-1*u^-1)^2, v*u*\558v^2*u^-1*v^-1, (u*v)^2*u*v^-1*u^-1*v^-1, (u*v)^2*v*u^-1*v^-1*u^-1 >559\endexample560561562\>StabilizerOfFirstLevel( <G> ) A563564Returns the stabilizer of the first level, see also~"StabilizerOfLevel".565\beginexample566gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );567< u, v >568gap> StabilizerOfFirstLevel(Basilica);569< v, u^2, u*v*u^-1 >570\endexample571572573\>StabilizerOfVertex( <G>, <v> ) O574575Returns the stabilizer of the vertex <v>. Here <v> can be a list representing a576vertex, or a positive integer representing a vertex at the first level.577\beginexample578gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );579< u, v >580gap> StabilizerOfVertex(Basilica, [1,2,1]);581< u^2, u*v*u^-1, v^2, v*u*v*u^-1*v^-1, v*u^-1*v*u*v^-1, v*u^4*v^-1, v*u^2*v^2*u^-2\582*v^-1, (v*u^2)^2*v^-1*u^-2*v^-1, v*u*(u*v)^2*u^-1*v^-1*u^-2*v^-1 >583\endexample584585586\>FixesLevel( <obj>, <lev> ) O587588Returns whether <obj> fixes level <lev>, i.e. fixes every vertex at the level589<lev>.590591592\>FixesVertex( <obj>, <v> ) O593594Returns whether <obj> fixes the vertex <v>. The vertex <v> may be given as a list, or as595a positive integer, in which case it denotes the <v>-th vertex at the first596level.597598599\>Projection( <G>, <v> ) O600\>ProjectionNC( <G>, <v> ) O601602Returns the projection of the group <G> at the vertex <v>. The group <G> must fix the603vertex <v>, otherwise `Error'() will be called. The operation `ProjectionNC' does the604same thing, except it does not check whether <G> fixes the vertex <v>.605\beginexample606gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );607< u, v >608gap> Projection(StabilizerOfVertex(Basilica, [1,2,1]), [1,2,1]);609< u, v >610\endexample611612613\>ProjStab( <G>, <v> ) O614615Returns the projection of the stabilizer of <v> at itself. It is a shortcut for616`Projection'(`StabilizerOfVertex'(G, v), v) (see "Projection",617"StabilizerOfVertex").618\beginexample619gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );620< u, v >621gap> ProjStab(Basilica, [1,2,1]);622< u, v >623\endexample624625626\>FindGroupRelations( <G>[, <max_len>, <max_num_rels>] ) O627\>FindGroupRelations( <subs_words>[, <names>, <max_len>, <max_num_rels>] ) O628629Finds group relations between the generators of the group <G>630or in the group generated by <subs_words>. Stops after investigating all words631of length up to <max_len> elements or when it finds <max_num_rels>632relations. The optional argument <names> is a list of names of generators of the same length633as <subs_words>. If this argument is given the relations are given in terms of these names.634Otherwise they are given in terms of the elements of the group generated by <subs_words>.635If <max_len> or <max_num_rels> are not specified, they are assumed to be `infinity'.636Note that if the rewring system (see "AG_UseRewritingSystem") for group <G> is used, then this operation637returns relations not contained in the rewriting system rules (see "AG_RewritingSystemRules").638This operation can be applied to any group, not only to a group generated by automata.639\beginexample640gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );641< u, v >642gap> FindGroupRelations(Basilica, 6);643v*u*v*u^-1*v^-1*u*v^-1*u^-1644v*u^2*v^-1*u^2*v*u^-2*v^-1*u^-2645v^2*u*v^2*u^-1*v^-2*u*v^-2*u^-1646[ v*u*v*u^-1*v^-1*u*v^-1*u^-1, v*u^2*v^-1*u^2*v*u^-2*v^-1*u^-2,647v^2*u*v^2*u^-1*v^-2*u*v^-2*u^-1 ]648gap> FindGroupRelations([u*v^-1, v*u], ["x", "y"], 5);649y*x^2*y*x^-1*y^-2*x^-1650[ y*x^2*y*x^-1*y^-2*x^-1 ]651gap> FindGroupRelations([u*v^-1, v*u], 5);652u^-2*v*u^-2*v^-1*u^2*v*u^2*v^-1653[ u^-2*v*u^-2*v^-1*u^2*v*u^2*v^-1 ]654gap> FindGroupRelations([(1,2)(3,4), (1,2,3)], ["x", "y"]);655x^2656y^-3657(y^-1*x)^3658[ x^2, y^-3, (y^-1*x)^3 ]659\endexample660661662\>FindSemigroupRelations( <G>[, <max_len>, <max_num_rels>] ) O663\>FindSemigroupRelations( <subs_words>[, <names>, <max_len>, <max_num_rels>] ) O664665Finds semigroup relations between the generators of the group or semigroup <G>,666or in the semigroup generated by <subs_words>. The arguments have the same meaning667as in `FindGroupRelations'~("FindGroupRelations"). It returns a list of pairs of equal words.668In order to make the list of relations shorter669it also tries to remove relations that can670be derived from the known ones. Note, that by default the trivial automorphism is671not included in every semigroup. So if one needs to find relations of the form672$w=1$ one has to define <G> as a monoid or to include the trivial automorphism673into <subs_words> (for instance, as `One(g)' for any element `g' acting on the same674tree).675This operation can be applied for any semigroup, not only for a semigroup generated by automata.676\beginexample677gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );678< u, v >679gap> FindSemigroupRelations([u*v^-1, v*u], ["x", "y"], 6);680y*x^2*y=x*y^2*x681y*x^3*y^2=x^2*y^3*x682y^2*x^3*y=x*y^3*x^2683[ [ y*x^2*y, x*y^2*x ], [ y*x^3*y^2, x^2*y^3*x ], [ y^2*x^3*y, x*y^3*x^2 ] ]684gap> FindSemigroupRelations([u*v^-1, v*u],6);685v*u^2*v^-1*u^2 = u^2*v*u^2*v^-1686v*u*(u*v^-1)^2*u^2*v*u = u*v^-1*u*(u*v)^2*u^2*v^-1687(v*u)^2*(u*v^-1)^2*u^2 = u*(u*v)^2*u*(u*v^-1)^2688[ [ v*u^2*v^-1*u^2, u^2*v*u^2*v^-1 ],689[ v*u*(u*v^-1)^2*u^2*v*u, u*v^-1*u*(u*v)^2*u^2*v^-1 ],690[ (v*u)^2*(u*v^-1)^2*u^2, u*(u*v)^2*u*(u*v^-1)^2 ] ]691gap> x := Transformation([1,1,2]);;692gap> y := Transformation([2,2,3]);;693gap> FindSemigroupRelations([x,y],["x","y"]);694y*x=x695y^2=y696x^3=x^2697x^2*y=x*y698[ [ y*x, x ], [ y^2, y ], [ x^3, x^2 ], [ x^2*y, x*y ] ]699\endexample700701702703704\>Iterator( <G>[, <max_len>] ) M705706Provides a possibility to loop over elements of a group (semigroup, monoid)707generated by automata. If <max_len> is given, it stops after enumerating all elements708of length up to <max_len>.709\beginexample710gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");711< a, b, c, d >712gap> iter := Iterator(Grigorchuk_Group, 5);713<iterator>714gap> l:=[];;715gap> for g in iter do716> if Order(g)=16 then Add(l,g); fi;717> od;718gap> l;719[ b*a, a*b, d*a*c, c*a*d, d*a*c*a, d*a*b*a, c*a*d*a, b*a*d*a, a*d*a*c,720a*d*a*b, a*c*a*d, a*b*a*d, c*a*c*a*b, c*a*b*a*b, b*a*c*a*c, b*a*b*a*c,721a*d*a*c*a, a*c*a*d*a ]722\endexample723724\>FindElement( <G>, <func>, <val>, <max_len> ) O725\>FindElements( <G>, <func>, <val>, <max_len> ) O726727The first function enumerates elements of the group (semigroup, monoid) <G> until it finds728an element $g$ of length at most <max_len>, for which <func>($g$)=<val>. Returns $g$ if729such an element was found and `fail' otherwise.730731The second function enumerates elements of the group (semigroup, monoid) of length at most <max_len>732and returns the list of elements $g$, for which <func>($g$)=<val>.733734These functions are based on `Iterator' operation (see "Iterator"), so can be applied in735more general settings whenever \GAP\ knows how to solve word problem in the group.736The following example illustrates how to find an element of order 16 in737Grigorchuk group and the list of all such elements of length at most 5.738\beginexample739gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");740< a, b, c, d >741gap> FindElement(Grigorchuk_Group, Order, 16, 5);742a*b743gap> FindElements(Grigorchuk_Group,Order,16,5);744[ a*b, b*a, c*a*d, d*a*c, a*b*a*d, a*c*a*d, a*d*a*b, a*d*a*c, b*a*d*a, c*a*d*a,745d*a*b*a, d*a*c*a, a*c*a*d*a, a*d*a*c*a, (b*a)^2*c, b*(a*c)^2, c*(a*b)^2,746(c*a)^2*b ]747\endexample748749750\>FindElementOfInfiniteOrder( <G>, <max_len>, <depth> ) O751\>FindElementsOfInfiniteOrder( <G>, <max_len>, <depth> ) O752753The first function enumerates elements of the group <G> up to length <max_len>754until it finds an element $g$ of infinite order, such that755`OrderUsingSections'($g$,<depth>) (see "OrderUsingSections") is `infinity'.756In other words all sections of every element up to depth <depth> are757investigated. In case if the element belongs to the group generated by bounded758automaton (see "IsGeneratedByBoundedAutomaton") one can set <depth> to be `infinity'.759760The second function returns the list of all such elements up to length <max_len>.761762\beginexample763gap> G := AutomatonGroup("a=(1,1)(1,2), b=(a,c), c=(b,1)");764< a, b, c >765gap> FindElementOfInfiniteOrder(G, 5, 10);766a*b*c767\endexample768769770\>SphericallyTransitiveElement( <G> ) A771772For a self-similar group <G> acting on a binary tree returns773an element of <G> acting spherically transitively on the levels of the tree if774such an element exists and `fail'775otherwise. See also `ContainsSphericallyTransitiveElement'776("ContainsSphericallyTransitiveElement").777\beginexample778gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );779< u, v >780gap> SphericallyTransitiveElement(Basilica);781u*v782gap> G := SelfSimilarGroup("a=(a^-1*b^-1,1)(1,2), b=(b^-1,a*b)");783< a, b >784gap> SphericallyTransitiveElement(G);785fail786\endexample787788789\>Growth( <G>, <max_len> ) O790791Returns a list of the first values of the growth function of a group792(semigroup, monoid) <G>.793If <G> is a monoid it computes the growth function at $\{0,1,\ldots,<max_len>\}$,794and for a semigroup without identity at $\{1,\ldots,<max_len>\}$.795\beginexample796gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");797< a, b, c, d >798gap> Growth(Grigorchuk_Group, 7);799There are 11 elements of length up to 2800There are 23 elements of length up to 3801There are 40 elements of length up to 4802There are 68 elements of length up to 5803There are 108 elements of length up to 6804There are 176 elements of length up to 7805[ 1, 5, 11, 23, 40, 68, 108, 176 ]806gap> H := AutomatonSemigroup("a=(a,b)[1,1], b=(b,a)(1,2)");807< a, b >808gap> Growth(H,6);809[ 2, 6, 14, 30, 62, 126 ]810\endexample811812813\>ListOfElements( <G>, <max_len> ) O814815Returns the list of all different elements of a group (semigroup, monoid)816<G> up to length <max_len>.817\beginexample818gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");819< a, b, c, d >820gap> ListOfElements(Grigorchuk_Group, 3);821[ 1, a, b, c, d, a*b, a*c, a*d, b*a, c*a, d*a, a*b*a, a*c*a, a*d*a, b*a*b,822b*a*c, b*a*d, c*a*b, c*a*c, c*a*d, d*a*b, d*a*c, d*a*d ]823\endexample824825826\>FindNucleus( <G>[, <max_nucl>, <print_info>] ) O827828Given a self-similar group <G> it tries to find its nucleus. If <G>829is not contracting it will loop forever. When it finds the nucleus it returns830the triple [`GroupNucleus'(<G>), `GeneratingSetWithNucleus'(<G>),831`GeneratingSetWithNucleusAutom'(<G>)] (see "GroupNucleus", "GeneratingSetWithNucleus",832"GeneratingSetWithNucleusAutom").833834If <max_nucl> is given it stops after finding <max_nucl> elements that need to be in835the nucleus and returns `fail' if the nucleus was not found.836837An optional argument <print_info> is a boolean telling whether to print results of838intermediate computations. The default value is `true'.839840Use `IsNoncontracting'~(see "IsNoncontracting") to try to show that <G> is841noncontracting.842843\beginexample844gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );845< u, v >846gap> FindNucleus(Basilica);847Trying generating set with 5 elements848Elements added:[ u^-1*v, v^-1*u ]849Trying generating set with 7 elements850[ [ 1, u, v, u^-1, v^-1, u^-1*v, v^-1*u ],851[ 1, u, v, u^-1, v^-1, u^-1*v, v^-1*u ], <automaton> ]852\endexample853854855\>LevelOfFaithfulAction( <G> ) A856\>LevelOfFaithfulAction( <G>, <max_lev> ) A857858For a given finite self-similar group <G> determines the smallest level of859the tree, where <G> acts faithfully, i.e. the stabilizer of this level in <G>860is trivial. The idea here is that for a self-similar group all nontrivial level861stabilizers are different. If <max_lev> is given it finds only first <max_lev>862quotients by stabilizers and if all of them have different size it returns `fail'.863If <G> is infinite and <max_lev> is not specified it will loop forever.864865See also `IsomorphismPermGroup' ("IsomorphismPermGroup").866\beginexample867gap> H := SelfSimilarGroup("a=(a,a)(1,2), b=(a,a), c=(b,a)(1,2)");868< a, b, c >869gap> LevelOfFaithfulAction(H);8703871gap> Size(H);87216873gap> Adding_Machine := AutomatonGroup("a=(1,a)(1,2)");874< a >875gap> LevelOfFaithfulAction(Adding_Machine, 10);876fail877\endexample878879880\>IsomorphismPermGroup( <G> ) O881\>IsomorphismPermGroup( <G>, <max_lev> ) O882883For a given finite group <G> generated by initial automata or by elements defined by884wreath recursion885computes an isomorphism from <G> into a finite permutational group.886If <G> is not known to be self-similar (see "IsSelfSimilar") the isomorphism is based on the887regular representation, which works generally much slower. If <G> is self-similar888there is a level of the tree (see "LevelOfFaithfulAction"), where <G> acts faithfully.889The corresponding representation is returned in this case. If <max_lev> is given890it finds only the first <max_lev> quotients by stabilizers and if all of them have891different size it returns `fail'.892If <G> is infinite and <max_lev> is not specified it will loop forever.893894For example, consider a subgroup $\langle a, b\rangle$ of Grigorchuk group.895\beginexample896gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");897< a, b, c, d >898gap> f := IsomorphismPermGroup(Group(a, b));899MappingByFunction( < a, b >, Group(900[ (1,2)(3,5)(4,6)(7,9)(8,10)(11,13)(12,14)(15,17)(16,18)(19,21)(20,22)(23,90125)(24,26)(27,29)(28,30)(31,32), (1,3)(2,4)(5,7)(6,8)(9,11)(10,12)(13,90215)(14,16)(17,19)(18,20)(21,23)(22,24)(25,27)(26,28)(29,31)(30,32)903]), function( g ) ... end, function( b ) ... end )904gap> Size(Image(f));90532906gap> H := SelfSimilarGroup("a=(a*b,1)(1,2), b=(1,b*a^-1)(1,2), c=(b, a*b)");907< a, b, c >908gap> f1 := IsomorphismPermGroup(H);909MappingByFunction( < a, b, c >, Group([ (1,3)(2,4), (1,3)(2,4), (1,2)910]), function( g ) ... end, function( b ) ... end )911gap> Size(Image(f1));9128913gap> PreImagesRepresentative(f1, (1,3,2,4));914a*c915gap> (a*c)^f1;916(1,3,2,4)917\endexample918919920\>Random( <G> ) O921922Returns a random element of a group (semigroup) <G>. The operation is based923on the generator of random elements in free groups and semigroups.924925\beginexample926gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );927< u, v >928gap> Random( Basilica );929v*u^-3930\endexample931932933\>MarkovOperator( <G>, <lev>, <weights> ) O934935Computes the matrix of the Markov operator related to the (semi)group <G> on the <lev>-th level936of the tree. If <G> is a group generated by $g_1,g_2,\ldots,g_n$, then the Markov operator937is defined as $(`PermOnLevelAsMatrix'(g_1)+\cdots+`PermOnLevelAsMatrix'(g_n)+938`PermOnLevelAsMatrix'(g_1^{-1})+\cdots+`PermOnLevelAsMatrix'(g_n^{-1}))/(2*n)$.939If <S> is a semigroup generated by $s_1,s_2,\ldots,s_n$, then the Markov operator940is defined similarly with `PermOnLevelAsMatrix' being replaced with `TransformationOnLevelAsMatrix'.941If the list of <weights> is given, uses its entries as coefficients of operators correspondings to942the generators of a group or semigroup. In the case of a group, the length of <weights> must be twice943as big as the number of generators of <G>. The list <weights> may consist either of numbers or of strings944representing the names of indeterminates.945See also946`PermOnLevelAsMatrix' ("PermOnLevelAsMatrix") and `TransformationOnLevelAsMatrix' ("TransformationOnLevelAsMatrix").947\beginexample948gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");949< p, q >950gap> MarkovOperator(L, 3);951[ [ 0, 0, 1/4, 1/4, 0, 1/4, 0, 1/4 ], [ 0, 0, 1/4, 1/4, 1/4, 0, 1/4, 0 ],952[ 1/4, 1/4, 0, 0, 1/4, 0, 1/4, 0 ], [ 1/4, 1/4, 0, 0, 0, 1/4, 0, 1/4 ],953[ 0, 1/4, 1/4, 0, 0, 1/2, 0, 0 ], [ 1/4, 0, 0, 1/4, 1/2, 0, 0, 0 ],954[ 0, 1/4, 1/4, 0, 0, 0, 1/2, 0 ], [ 1/4, 0, 0, 1/4, 0, 0, 0, 1/2 ] ]955gap> MarkovOperator(L,3,["a","b","c","d"]);956[ [ 0, 0, d, b, 0, c, 0, a ], [ 0, 0, b, d, c, 0, a, 0 ],957[ b, d, 0, 0, a, 0, c, 0 ], [ d, b, 0, 0, 0, a, 0, c ],958[ 0, a, c, 0, 0, b+d, 0, 0 ], [ a, 0, 0, c, b+d, 0, 0, 0 ],959[ 0, c, a, 0, 0, 0, b+d, 0 ], [ c, 0, 0, a, 0, 0, 0, b+d ] ]960\endexample961In the case of semigroups we have:962\beginexample963gap> S := AutomatonSemigroup("c=(c,d)[1,1],d=(c,c)(1,2)");964< c, d >965gap> MarkovOperator(S,3,["w1","w2"]);966[ [ w1, 0, 0, 0, w2, 0, 0, 0 ], [ w1, 0, 0, 0, w2, 0, 0, 0 ],967[ 0, w1, 0, 0, 0, w2, 0, 0 ], [ w1, 0, 0, 0, w2, 0, 0, 0 ],968[ w2, 0, w1, 0, 0, 0, 0, 0 ], [ w2, 0, w1, 0, 0, 0, 0, 0 ],969[ w1, w2, 0, 0, 0, 0, 0, 0 ], [ w1+w2, 0, 0, 0, 0, 0, 0, 0 ] ]970gap> MarkovOperator(S,3,[1/3,2/3]);971[ [ 1/3, 0, 0, 0, 2/3, 0, 0, 0 ], [ 1/3, 0, 0, 0, 2/3, 0, 0, 0 ],972[ 0, 1/3, 0, 0, 0, 2/3, 0, 0 ], [ 1/3, 0, 0, 0, 2/3, 0, 0, 0 ],973[ 2/3, 0, 1/3, 0, 0, 0, 0, 0 ], [ 2/3, 0, 1/3, 0, 0, 0, 0, 0 ],974[ 1/3, 2/3, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 0, 0, 0, 0, 0 ] ]975\endexample976977978\>`MihailovaSystem( <G> )'{MihailovaSystem}!{[automgroup]} AM979980In the case when <G> is an automaton fractal group acting on a binary981tree, computes the generating set for the first level stabilizer in G982such that the sections of these generators at the first level,983viewed as elements of $F_r\times F_r$, are in Mihailova normal form.984See~\cite{GSESS} for details.985986\beginexample987gap> G := AutomatonGroup("a=(b,c)(1,2),b=(a,c),c=(a,a)");988< a, b, c >989gap> M := MihailovaSystem(G);990[ c^-1*b, c^-1*b^-1*c*a^-1*b*c*b^-1*a, a^-1*b*c*b^-1*a, a*c^-1*b^-1*a*c,991c^-1*a^-1*b*c*a ]992gap> for g in M do993> Print(g,"=",Decompose(g),"\n");994> od;995c^-1*b=(1, a^-1*c)996c^-1*b^-1*c*a^-1*b*c*b^-1*a=(1, a^-1*c^-1*a*b^-1*a*b)997a^-1*b*c*b^-1*a=(a, b^-1*a*b)998a*c^-1*b^-1*a*c=(b, c*a^-2*b*a)999c^-1*a^-1*b*c*a=(c, a^-1*b^-1*a^2*b)1000\endexample100110021003100410051006\>AbelImage( <obj> ) A10071008Returns image of <obj> in the canonical projection onto the abelianization of1009the full group of tree automorphisms, represented as a subgroup of the additive1010group of rational functions.101110121013\>DiagonalPower( <fam>[, <k>] ) O10141015For a given automaton group <G> acting on alphabet $X$ and corresponding family1016<fam> of automata one can consider the action of $<G>^<k>$ on $X^<k>$ defined by1017$(x_1,x_2,\ldots, x_k)^{(g_1,g_2,\ldots,g_k)}=(x_1^{g_1},x_2^{g_2},\ldots,x_k^{g_k})$.1018This function constructs a self-similar group, which encodes this action. If1019<k> is not given it is assumed to be $2$.1020\beginexample1021gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );1022< u, v >1023gap> S := DiagonalPower(UnderlyingAutomFamily(Basilica));1024< uu, uv, u1, vu, vv, v1, 1u, 1v >1025gap> Decompose(uu);1026(vv, v1, 1v, 1)(1,4)(2,3)1027\endexample102810291030\>MultAutomAlphabet( <fam> ) O1031103210331034\>UnderlyingAutomFamily( <G> ) A10351036Returns the family to which the elements of <G> belong.1037103810391040%Declaration{UnderlyingFreeGroup}1041%Declaration{UnderlyingFreeSubgroup}1042%Declaration{UnderlyingFreeGenerators}1043%Declaration{TrivialSubgroup}104410451046%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1047\Section{Self-similar groups and semigroups defined by the wreath recursion}10481049\>`IsFiniteState( <G> )'{IsFiniteState![selfsimsg]}@{`IsFiniteState'!`[selfsimsg]'} P10501051For a group or semigroup of homomorphisms of the tree defined using a1052wreath recursion, returns `true' if all1053generators can be represented as finite automata (have finitely many different1054sections).1055It will never stop if the free reduction of words is not sufficient to establish1056the finite-state property or if the group is not finite-state.1057In case <G> is a finite-state group it automatically computes the attributes1058`UnderlyingAutomatonGroup'(<G>) ("UnderlyingAutomatonGroup"),1059`IsomorphicAutomGroup'(<G>) ("IsomorphicAutomGroup") and1060`MonomorphismToAutomatonGroup'(<G>) ("MonomorphismToAutomatonGroup").1061For a finite-state semigroup it computes the corresponding attributes1062`UnderlyingAutomatonSemigroup'(<G>) ("UnderlyingAutomatonSemigroup"),1063`IsomorphicAutomSemigroup'(<G>) ("IsomorphicAutomSemigroup") and1064`MonomorphismToAutomatonSemigroup'(<G>) ("MonomorphismToAutomatonSemigroup").1065\beginexample1066gap> W := SelfSimilarGroup("x=(x^-1,y)(1,2), y=(z^-1,1)(1,2), z=(1,x*y)");1067< x, y, z >1068gap> IsFiniteState(W);1069true1070gap> Size(GeneratorsOfGroup(UnderlyingAutomatonGroup(W)));1071501072\endexample10731074\>IsomorphicAutomGroup( <G> ) AM10751076In case <G> is finite-state tries to compute a group generated by automata, isomorphic to <G>,1077which is a subgroup of `UnderlyingAutomatonGroup'(<G>) (see "UnderlyingAutomatonGroup").1078The natural isomorphism between <G> and `IsomorphicAutomGroup'(<G>) is stored in the1079attribute `MonomorphismToAutomatonGroup'(<G>) ("MonomorphismToAutomatonGroup").1080In some cases it may be useful to check if <G> is finite.1081\beginexample1082gap> R := SelfSimilarGroup("a=(a^-1*b,b^-1*a)(1,2), b=(a^-1,b^-1)");1083< a, b >1084gap> UR := UnderlyingAutomatonGroup(R);1085< a1, a2, a4, a5 >1086gap> IR := IsomorphicAutomGroup(R);1087< a1, a5 >1088gap> hom := MonomorphismToAutomatonGroup(R);1089MappingByFunction( < a, b >, < a1, a5 >, function( a ) ... end, function( b ) \1090... end )1091gap> (a*b)^hom;1092a1*a51093gap> PreImagesRepresentative(hom, last);1094a*b1095gap> List(GeneratorsOfGroup(UR), x -> PreImagesRepresentative(hom, x));1096[ a, a^-1*b, b^-1*a, b ]1097\endexample10981099All these operations work also for the subgroups of groups generated by `SelfSimilarGroup'.1100("SelfSimilarGroup").1101\beginexample1102gap> T := Group([b*a, a*b]);1103< b*a, a*b >1104gap> IT := IsomorphicAutomGroup(T);1105< a1, a4 >1106\endexample1107Note, that different groups have different `UnderlyingAutomGroup' attributes. For example,1108the generator `a1' of group `IT' above is different from the generator `a1' of group `IR'.110911101111\>IsomorphicAutomSemigroup( <G> ) AM11121113In case <G> is finite-state returns a semigroup generated by automata, isomorphic to <G>,1114which is a subsemigroup of `UnderlyingAutomatonSemigroup'(<G>) (see "UnderlyingAutomatonSemigroup").1115The natural isomorphism between <G> and `IsomorphicAutomSemigroup'(<G>) is stored in the1116attribute `MonomorphismToAutomatonSemigroup'(<G>) ("MonomorphismToAutomatonSemigroup").1117\beginexample1118gap> R := SelfSimilarSemigroup("a=(1,1)[1,1], b=(a*c,1)(1,2), c=(1,a*b)");1119< a, b, c >1120gap> UR := UnderlyingAutomatonSemigroup(R);1121< 1, a1, a3, a5, a6 >1122gap> IR := IsomorphicAutomSemigroup(R);1123< a1, a3, a5 >1124gap> hom := MonomorphismToAutomatonSemigroup(R);1125MappingByFunction( < a, b, c >, < a1, a3, a5 >, function( a ) ... end, functio\1126n( b ) ... end )1127gap> (a*b)^hom;1128a1*a31129gap> PreImagesRepresentative(hom, last);1130a*b1131gap> List(GeneratorsOfSemigroup(UR), x -> PreImagesRepresentative(hom, x));1132[ 1, a, b, c, a*b ]1133\endexample11341135All these operations work also for the subsemigroups of semigroups generated by1136`SelfSimilarSemigroup' ("SelfSimilarSemigroup").1137\beginexample1138gap> T := Semigroup([a*b, b^2]);1139< a*b, b^2 >1140gap> IT := IsomorphicAutomSemigroup(T);1141< a1, a4 >1142\endexample1143Note, that different semigroups have different `UnderlyingAutomSemigroup' attributes. For example,1144the generator `a1' of semigroup `IT' above is different from the generator `a1' of semigroup `IR'.1145114611471148\>UnderlyingAutomatonGroup( <G> ) AM11491150In case <G> is finite-state returns a self-similar closure of <G> as a group1151generated by automaton.1152The natural monomorphism from <G> and `UnderlyingAutomatonGroup'(<G>) is stored in the1153attribute `MonomorphismToAutomatonGroup'(<G>) ("MonomorphismToAutomatonGroup"). If1154<G> is created by `SelfSimilarGroup' (see "SelfSimilarGroup"), then the self-similar closure1155of <G> coincides with <G>, so one can use `MonomorphismToAutomatonGroup'(<G>) to1156get preimages of elements of `UnderlyingAutomatonGroup'(<G>) in <G>. See the example for1157`IsomorphicAutomGroup' ("IsomorphicAutomGroup").115811591160\>UnderlyingAutomatonSemigroup( <G> ) AM11611162In case <G> is finite-state returns a self-similar closure of <G> as a semigroup1163generated by automaton.1164The natural monomorphism from <G> and `UnderlyingAutomatonSemigroup'(<G>) is stored in the1165attribute `MonomorphismToAutomatonSemigroup'(<G>) ("MonomorphismToAutomatonSemigroup"). If1166<G> is created by `SelfSimilarSemigroup' (see "SelfSimilarSemigroup"), then the self-similar closure1167of <G> coincides with <G>, so one can use `MonomorphismToAutomatonSemigroup'(<G>) to1168get preimages of elements of `UnderlyingAutomatonSemigroup'(<G>) in <G>. See the example for1169`IsomorphicAutomSemigroup' ("IsomorphicAutomSemigroup").1170117111721173\>MonomorphismToAutomatonGroup( <G> ) AM11741175In case <G> is finite-state returns a monomorphism from <G> into `UnderlyingAutomatonGroup'(<G>)1176(see "UnderlyingAutomatonGroup"). If <G> is created by `SelfSimilarGroup' (see "SelfSimilarGroup"),1177then one can use `MonomorphismToAutomatonGroup'(<G>) to1178get preimages of elements of `UnderlyingAutomatonGroup'(<G>) in <G>. See the example for1179`IsomorphicAutomGroup' ("IsomorphicAutomGroup").118011811182\>MonomorphismToAutomatonSemigroup( <G> ) AM11831184In case <G> is finite-state returns a monomorphism from <G> into `UnderlyingAutomatonSemigroup'(<G>)1185(see "UnderlyingAutomatonSemigroup"). If <G> is created by `SelfSimilarSemigroup'1186(see "SelfSimilarSemigroup"),1187then one can use `MonomorphismToAutomatonSemigroup'(<G>) to1188get preimages of elements of `UnderlyingAutomatonSemigroup'(<G>) in <G>. See the example for1189`IsomorphicAutomSemigroup' ("IsomorphicAutomSemigroup").119011911192119311941195%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1196\Section{Contracting groups}11971198\>GroupNucleus( <G> ) AM11991200Tries to compute the <nucleus> (see the definition in "Short math background") of1201a self-similar group <G>. Note that this set need not contain the original1202generators of <G>. It uses `FindNucleus' (see "FindNucleus")1203operation and behaves accordingly: if the group is not contracting it will loop1204forever. See also `GeneratingSetWithNucleus' ("GeneratingSetWithNucleus").12051206\beginexample1207gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );1208< u, v >1209gap> GroupNucleus(Basilica);1210[ 1, u, v, u^-1, v^-1, u^-1*v, v^-1*u ]1211\endexample121212131214\>GeneratingSetWithNucleus( <G> ) AM12151216Tries to compute the generating set of a self-similar group <G> that includes1217the original generators and the <nucleus> (see "Short math background") of <G>.1218It uses `FindNucleus' operation1219and behaves accordingly: if the group is not contracting1220it will loop forever (modulo memory constraints, of course).1221See also `GroupNucleus' ("GroupNucleus").12221223\beginexample1224gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );1225< u, v >1226gap> GeneratingSetWithNucleus(Basilica);1227[ 1, u, v, u^-1, v^-1, u^-1*v, v^-1*u ]1228\endexample122912301231\>GeneratingSetWithNucleusAutom( <G> ) AM12321233Computes the automaton of the generating set that includes the nucleus of a contracting group <G>.1234See also `GeneratingSetWithNucleus' ("GeneratingSetWithNucleus").1235\beginexample1236gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );1237< u, v >1238gap> B_autom := GeneratingSetWithNucleusAutom(Basilica);1239<automaton>1240gap> Display(B_autom);1241a1 = (a1, a1), a2 = (a3, a1)(1,2), a3 = (a2, a1), a4 = (a1, a5)1242(1,2), a5 = (a4, a1), a6 = (a1, a7)(1,2), a7 = (a6, a1)(1,2)1243\endexample124412451246\>ContractingLevel( <G> ) AM12471248Given a contracting group <G> with generating set $N$ that includes the nucleus, stored in1249`GeneratingSetWithNucleus'(<G>) (see "GeneratingSetWithNucleus") computes the1250minimal level $n$, such that for every vertex $v$ of the $n$-th1251level and all $g, h \in N$ the section $gh|_v \in N$.12521253In the case if it is not known whether <G> is contracting, it first tries to compute1254the nucleus. If <G> happens to be noncontracting, it will loop forever. One can1255also use `IsNoncontracting' (see "IsNoncontracting") or `FindNucleus' (see1256"FindNucleus") directly.1257\beginexample1258gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1259< a, b, c, d >1260gap> ContractingLevel(Grigorchuk_Group);126111262gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );1263< u, v >1264gap> ContractingLevel(Basilica);126521266\endexample126712681269\>ContractingTable( <G> ) AM12701271Given a contracting group <G> with a generating set $N$ of size $k$ that includes the nucleus, stored in1272`GeneratingSetWithNucleus'(<G>)~(see "GeneratingSetWithNucleus")1273computes the $k\times k$ table, whose1274[i][j]-th entry contains decomposition of $N$[i]$N$[j] on1275the `ContractingLevel'(<G>) level~(see "ContractingLevel"). By construction the sections of1276$N$[i]$N$[j] on this level belong to $N$. This table is used in the1277algorithm solving the word problem in polynomial time.12781279In the case if it is not known whether <G> is contracting it first tries to compute1280the nucleus. If <G> happens to be noncontracting, it will loop forever. One can1281also use `IsNoncontracting' (see "IsNoncontracting") or `FindNucleus' (see1282"FindNucleus") directly.1283\beginexample1284gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1285< a, b, c, d >1286gap> ContractingTable(Grigorchuk_Group);1287[ [ (1, 1), (1, 1)(1,2), (a, c), (a, d), (1, b) ],1288[ (1, 1)(1,2), (1, 1), (c, a)(1,2), (d, a)(1,2), (b, 1)(1,2) ],1289[ (a, c), (a, c)(1,2), (1, 1), (1, b), (a, d) ],1290[ (a, d), (a, d)(1,2), (1, b), (1, 1), (a, c) ],1291[ (1, b), (1, b)(1,2), (a, d), (a, c), (1, 1) ] ]1292\endexample129312941295\>UseContraction( <G> ) O1296\>DoNotUseContraction( <G> ) O12971298For a contracting automaton group <G> these two operations determine whether to1299use the algorithm1300of polynomial complexity solving the word problem in the group. By default1301it is set to <true> as soon as the nucleus of the group was computed. Sometimes1302when the nucleus is very big, the standard algorithm of exponential complexity1303is faster for short words, but this heavily depends on the group. Therefore1304the decision on which algorithm to use is left to the user. To use the1305exponential algorithm one can use the second operation `DoNotUseContraction'(<G>).13061307Note also then in order to use the polynomial time algorithm the `ContractingTable(G)'1308(see "ContractingTable") has to be computed first, which takes some time when the1309nucleus is big. This attribute is computed automatically when the word problem is solved1310for the first time. This sometimes causes some delay.13111312Below we provide an example which shows that both methods can be of use.1313%notest1314\beginexample|unstableoutput1315gap> G := AutomatonGroup("a=(b,b)(1,2), b=(c,a), c=(a,a)");1316< a, b, c >1317gap> IsContracting(G);1318true1319gap> Size(GroupNucleus(G));1320411321gap> ContractingLevel(G);132261323gap> ContractingTable(G);; time;132447191325gap> v := a*b*a*b^2*c*b*c*b^-1*a^-1*b^-1*a^-1;;1326gap> w := b*c*a*b*a*b*c^-1*b^-2*a^-1*b^-1*a^-1;;1327gap> UseContraction(G);;1328gap> IsOne(Comm(v,w)); time;1329true13301101331gap> FindGroupRelations(G, 9);; time;1332a^21333b^21334c^21335(b*a*b*c*a)^21336(b*(c*a)^2)^21337(b*c*b*a*(b*c)^2*a)^21338(b*(c*b*c*a)^2)^21339115781340gap> DoNotUseContraction(G);;1341gap> IsOne(Comm(v,w)); time;1342true13439221344gap> FindGroupRelations(G, 9);; time;1345a^21346b^21347c^21348(b*a*b*c*a)^21349(b*(c*a)^2)^21350(b*c*b*a*(b*c)^2*a)^21351(b*(c*b*c*a)^2)^21352237191353\endexample13541355135613571358%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1359\Section{Rewriting Systems}13601361It is possible to use basic relators in all computations performed1362in a self-similar group.13631364\>AG_UseRewritingSystem( <G>[, <setting>] ) O13651366Tells whether computations in the group <G> should use a rewriting system.1367<setting> defaults to `true' if omitted. This function initially only1368tries to find involutions in <G>. See `AG_AddRelators' ("AG_AddRelators")1369and `AG_UpdateRewritingSystem' ("AG_UpdateRewritingSystem") for the ways1370to add more relators.13711372\beginexample1373gap> G := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1374< a, b, c, d >1375gap> Comm(a*b, b*a);1376b^-1*a^-2*b^-1*a*b^2*a1377gap> AG_UseRewritingSystem(G);1378gap> Comm(a*b, b*a);137911380gap> AG_UseRewritingSystem(G, false);1381gap> Comm(a*b, b*a);1382b^-1*a^-2*b^-1*a*b^2*a1383\endexample138413851386\>AG_AddRelators( <G>, <relators> ) O13871388Adds relators from the list <relators> to the rewriting system used in1389<G>.13901391\beginexample1392gap> G := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1393< a, b, c, d >1394gap> AG_UseRewritingSystem(G);1395gap> b*c;1396b*c1397gap> AG_AddRelators(G, [b*c*d]);1398gap> b*c;1399d1400\endexample14011402In some cases it's hard to find relations directly from the wreath1403recursion of a self-similar group (at least, there is no general agorithm).1404This function provides possibility to add relators manually. After that1405one can use `AG_UpdateRewritingSystem' (see "AG_UpdateRewritingSystem")1406and `AG_UseRewritingSystem' (see "AG_UseRewritingSystem") to use these1407relators in computations. In the example below we consider a finite group1408$H$, in which $a=b$, but the standard algorithm is unable to solve the1409word problem. There are two solutions for that. One can manually add a1410relator, or one can ask if the group is finite (which does not stop1411generally if the group is infinite).1412\beginexample1413gap> H := SelfSimilarGroup("a=(a*b,1)(1,2), b=(1,b*a^-1)(1,2), c=(b, a*b)");1414< a, b, c >1415gap> AG_AddRelators(H, [a*b^-1]);1416gap> AG_UseRewritingSystem(H);1417gap> Order(a*c);141841419\endexample142014211422\>AG_UpdateRewritingSystem( <G>, <maxlen> ) O14231424Tries to find new relators of length up to <maxlen> and adds them into1425the rewriting system. It can also be used after introducing new relators1426via `AG_AddRelators' (see "AG_AddRelators").14271428\beginexample1429gap> G := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1430< a, b, c, d >1431gap> AG_UseRewritingSystem(G);1432gap> b*c;1433b*c1434gap> AG_UpdateRewritingSystem(G, 3);1435gap> b*c;1436d1437\endexample143814391440\>AG_RewritingSystemRules( <G> ) O14411442Returns the list of rules used in the rewriting system of group <G>.1443\beginexample1444gap> G := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");1445< a, b, c, d >1446gap> AG_UseRewritingSystem(G);1447gap> AG_RewritingSystemRules(G);1448[ [ a^2, <identity ...> ], [ b^2, <identity ...> ], [ c^2, <identity ...> ],1449[ d^2, <identity ...> ], [ A, a ], [ B, b ], [ C, c ], [ D, d ] ]1450\endexample145114521453145414551456%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%145714581459