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 elements.msk.1% DO NOT EDIT!2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3\Chapter{Properties and operations with group and semigroup elements}45In this chapter we present the functionality applicable to elements of groups and semigroups.678%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%9\Section{Creation of tree automorphisms and homomorphisms}1011\>TreeAutomorphism( <states>, <perm> ) O1213Constructs the tree automorphism with states on the first level given by the14argument <states> and acting15on the first level as the permutation <perm>. The <states> must16belong to the same family.17\beginexample18gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");19< p, q >20gap> r := TreeAutomorphism([p, q, p, q^2],(1,2)(3,4));21(p, q, p, q^2)(1,2)(3,4)22gap> t := TreeAutomorphism([q, 1, p*q, q],(1,2));23(q, 1, p*q, q)(1,2)24gap> r*t;25(p, q^2, p*q, q^2*p*q)(3,4)26\endexample272829\>TreeHomomorphism( <states>, <tr> ) O3031Constructs an homomorphism with states <states> and acting32on the first level with transformation <tr>. The <states> must33belong to the same family.34\beginexample35gap> S := AutomatonSemigroup("a=(a,b)[1,1],b=(b,a)(1,2)");36< a, b >37gap> x := TreeHomomorphism([a,b^2,a,a*b],Transformation([3,1,2,2]));38(a, b^2, a, a*b)[3,1,2,2]39gap> y := TreeHomomorphism([a*b,b,b,b^2],Transformation([1,4,2,3]));40(a*b, b, b, b^2)[1,4,2,3]41gap> x*y;42(a*b, b^2*a*b, a*b, a*b^2)[2,1,4,4]43\endexample444546\>Representative( <word>, <fam> ) O47\>Representative( <word>, <a> ) O4849Given an associative word <word> constructs the tree homomorphism from the family50<fam>, or to which homomorphism <a> belongs. This function is useful when51one needs to make some operations with associative words. See also `Word' ("Word").52\beginexample53gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");54< p, q >55gap> F := UnderlyingFreeGroup(L);56<free group on the generators [ p, q ]>57gap> r := Representative(F.1*F.2^2, p);58p*q^259gap> Decompose(r);60(p*q^2, q*p^2)(1,2)61gap> H := SelfSimilarGroup("x=(x*y,x)(1,2), y=(x^-1,y)");62< x, y >63gap> F := UnderlyingFreeGroup(H);64<free group on the generators [ x, y ]>65gap> r := Representative(F.1^-1*F.2, x);66x^-1*y67gap> Decompose(r);68(x^-1*y, y^-1*x^-2)(1,2)69\endexample707172%Declaration{AutomFamily}737475%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%76\Section{Properties and attributes of tree automorphisms and homomorphisms}7778\>`IsSphericallyTransitive( <a> )'{IsSphericallyTransitive}!{[treehom]} P7980Returns whether the action of <a> is spherically transitive (see "Short math background").818283\>`IsTransitiveOnLevel( <a>, <lev> )'{IsTransitiveOnLevel}!{[treehom]} O8485Returns whether <a> acts transitively on level <lev> of the tree.86878889\>IsOne( <a> ) O9091Returns whether an automorphism <a> acts trivially on the tree. For contracting groups see also92`UseContraction' ("UseContraction") and `IsOneContr' ("IsOneContr").93\beginexample94gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");95< p, q >96gap> IsOne(q*p^-1*q*p^-1);97true98\endexample99100\>IsOneContr( <a> ) F101102Returns `true' if <a> is trivial automorphism and `false' otherwise. Works for103contracting groups only. Uses polynomial time algorithm.104105106107108\>Order( <a> ) O109110Computes the order of an automorphism <a>. In some cases it does not stop. Works always (modulo memory111restrictions) for groups generated by bounded automata.112113If `InfoLevel' of `InfoAutomGrp' is greater than or equal to 3 (one can set it by114`SetInfoLevel( InfoAutomGrp, 3)') and the element has infinite order, then the proof of this fact115is printed.116117\beginexample118gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");119< p, q >120gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );121< u, v >122gap> Order(p*q^-1);1232124gap> SetInfoLevel( InfoAutomGrp, 3);125gap> Order( u^35*v^-12*u^2*v^-3 );126#I (u^35*v^-12*u^2*v^-3)^68719476736 has conjugate of u^2*v^-3*u^35*v^127-12 as a section at vertex [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1281, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]129infinity130\endexample131132\>OrderUsingSections( <a>[, <max_depth>] ) O133134Tries to compute the order of the element <a> by looking at its sections135of depth up to <max_depth>-th level.136If <max_depth> is omitted it is assumed to be `infinity', but then it may not stop. Also note,137that if <max_depth> is not given, it searches the tree in depth first and may be trapped138in some infinite ray, while specifying finite <max_depth> may produce a result by looking at139a section not in that ray.140For bounded automata it will always produce a result.141142If `InfoLevel' of `InfoAutomGrp' is greater than143or equal to 3 (one can set it by `SetInfoLevel( InfoAutomGrp, 3)')144and the element has infinite order, then the proof of this fact is printed.145146\beginexample147gap> Grigorchuk_Group := AutomatonGroup("a=(1,1)(1,2),b=(a,c),c=(a,d),d=(1,b)");148< a, b, c, d >149gap> OrderUsingSections( a*b*a*c*b );15016151gap> Basilica := AutomatonGroup( "u=(v,1)(1,2), v=(u,1)" );152< u, v >153gap> SetInfoLevel( InfoAutomGrp, 3);154gap> OrderUsingSections( u^23*v^-2*u^3*v^15, 10 );155#I v^13*u^15 acts transitively on levels and is obtained from (u^23*v^-2*u^3*v^15)^1156by taking sections and cyclic reductions at vertex [ 1 ]157infinity158gap> G := AutomatonGroup("a=(c,a)(1,2), b=(b,c), c=(b,a)");159< a, b, c >160gap> OrderUsingSections(b,10);161#I b*c*a^2*b^2*c*a acts transitively on levels and is obtained from (b)^8162by taking sections and cyclic reductions at vertex163[ 2, 2, 1, 1, 1, 1, 2, 2, 1, 1 ]164infinity165\endexample166167168\>Perm( <a>[, <lev>] ) O169170Returns the permutation induced by the tree automorphism <a> on the level <lev>171(or first level if <lev> is not given). See also172`TransformationOnLevel'~("TransformationOnLevel").173174175\>PermOnLevel( <a>, <k> ) O176177Does the same thing as `Perm'~("Perm").178179180\>PermOnLevelAsMatrix( <g>, <lev> ) F181182Computes the action of the element <g> of a group on the <lev>-th level as a permutational matrix, in183which the i-th row contains 1 at the position i^<g>.184\beginexample185gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");186< p, q >187gap> PermOnLevel(p*q,2);188(1,4)(2,3)189gap> PermOnLevelAsMatrix(p*q, 2);190[ [ 0, 0, 0, 1 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 0 ], [ 1, 0, 0, 0 ] ]191\endexample192193194\>TransformationOnLevel( <a>, <lev> ) O195\>TransformationOnFirstLevel( <a> ) O196197The first function returns the transformation induced by the tree homomorphism198<a> on the level <lev>. See also `PermOnLevel'~("PermOnLevel").199200If the transformation is invertible then it returns a permutation, and201`Transformation' otherwise.202203`TransformationOnFirstLevel'(<a>) is equivalent to204`TransformationOnLevel'(<a>, `1').205206207\>TransformationOnLevelAsMatrix( <g>, <lev> ) F208209Computes the action of the element <g> on the <lev>-th level as a permutational matrix, in210which the i-th row contains 1 at the position i^<g>.211\beginexample212gap> L := AutomatonSemigroup("p=(p,q)(1,2), q=(p,q)[1,1]");213< p, q >214gap> TransformationOnLevel(p*q,2);215Transformation( [ 1, 1, 2, 2 ] )216gap> TransformationOnLevelAsMatrix(p*q,2);217[ [ 1, 0, 0, 0 ], [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 1, 0, 0 ] ]218\endexample219220221\>Word( <a> ) O222223Returns <a> as an associative word (an element of the underlying free group) in224the generators of the self-similar group (semigroup) to which <a> belongs.225\beginexample226gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");227< p, q >228gap> w := Word(p*q^2*p^-1);229p*q^2*p^-1230gap> Length(w);2314232\endexample233234235236237%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%238\Section{Operations with tree automorphisms and homomorphisms}239240The multiplication of tree homomorphisms is defined in the standard way241242\>`<a> \* <b>'{product}!{for tree homomorphisms}243244The following operations allow computation of the actions of tree245homomorphisms on letters and vertices246247\>`<letter> ^ <a>'{action}!{of tree homomorphism on letter}248\>`<vertex> ^ <a>'{action}!{of tree homomorphism on vertex}249250\beginexample251gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");252< p, q >253gap> 1^p;2542255gap> [1, 2, 2, 1, 2, 1]^(p*q^2);256[ 2, 1, 2, 2, 1, 2 ]257\endexample258259260The operations below describe how to work with sections of tree homomorphisms.261262\>`Section( <a>, <v> )'{Section}!{[treehom]} O263264Returns the section of the automorphism (homomorphism) <a> at the vertex <v>.265The vertex <v> can be a list representing the vertex, or a positive integer266representing a vertex of the first level of the tree.267\beginexample268gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");269< p, q >270gap> Section(p*q*p^2, [1,2,2,1,2,1]);271p^2*q^2272\endexample273274275\>Sections( <a> [, <lev>] ) O276277Returns the list of sections of <a> at the <lev>-th level. If <lev> is omitted278it is assumed to be 1.279\beginexample280gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");281< p, q >282gap> Sections(p*q*p^2);283[ p*q^2*p, q*p^2*q ]284\endexample285286287\>Decompose( <a>[, <k>] ) O288289Returns the decomposition of the tree homomorphism <a> on the <k>-th level of the tree, i.e. the290representation of the form $$a = (a_1, a_2, \ldots, a_{d_1\times...\times d_k})\sigma$$291where $a_i$ are the sections of <a> at the <k>-th level, and $\sigma$ is the292transformation of the <k>-th level. If <k> is omitted it is assumed to be 1.293\beginexample294gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");295< p, q >296gap> Decompose(p*q^2);297(p*q^2, q*p^2)(1,2)298gap> Decompose(p*q^2,3);299(p*q^2, q*p^2, p^2*q, q^2*p, p*q*p, q*p*q, p^3, q^3)(1,8,3,5)(2,7,4,6)300\endexample301302303304305306307308\>`<a> in <G>'{in}309310Returns whether the automorphism <a> belongs to the group <G>. In some cases it does not stop.311\beginexample312gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");313< p, q >314gap> H := Group([p^2, q^2]);315< p^2, q^2 >316gap> p in H;317false318\endexample319320321322\>OrbitOfVertex( <ver>, <g>[, <n>] ) O323324Returns the list of vertices in the orbit of the vertex <ver> under the325action of the semigroup generated by the automorphism <g>.326If <n> is specified, it returns only the first <n> elements of the orbit.327Vertices are defined either as lists with entries from $\{1,\ldots,d\}$, or as328strings containing characters $1,\ldots,d$, where $d$329is the degree of the tree.330\beginexample331gap> T := AutomatonGroup("t=(1,t)(1,2)");332< t >333gap> OrbitOfVertex([1,1,1], t);334[ [ 1, 1, 1 ], [ 2, 1, 1 ], [ 1, 2, 1 ], [ 2, 2, 1 ], [ 1, 1, 2 ],335[ 2, 1, 2 ], [ 1, 2, 2 ], [ 2, 2, 2 ] ]336gap> OrbitOfVertex("11111111111", t, 6);337[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],338[ 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],339[ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 ] ]340\endexample341342343\>PrintOrbitOfVertex( <ver>, <g>[, <n>] ) O344345Prints the orbit of the vertex <ver> under the action of the semigroup generated by346<g>. Each vertex is printed as a string containing characters $1,\ldots,d$, where $d$347is the degree of the tree. In case of binary tree the symbols `` '' and ```x'''348are used to represent `1' and `2'.349If <n> is specified only the first <n> elements of the orbit are printed.350Vertices are defined either as lists with entries from $\{1,\ldots,d\}$, or as351strings. See also `OrbitOfVertex' ("OrbitOfVertex").352\beginexample353gap> L := AutomatonGroup("p=(p,q)(1,2), q=(p,q)");354< p, q >355gap> PrintOrbitOfVertex("2222222222222222222222222222222", p*q^-2, 6);356xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx357x x x x x x x x x x x x x x x358x xx xx xx xx xx xx xx359x x x x x x x360xxx xxxx xxxx xxxx361x x x x x x x362gap> H := AutomatonGroup("t=(s,1,1)(1,2,3), s=(t,s,t)(1,2)");363< t, s >364gap> PrintOrbitOfVertex([1,2,1], s^2);365121366132367123368131369122370133371\endexample372373374\>PermActionOnLevel( <perm>, <big_lev>, <sm_lev>, <deg> ) F375376Given a permutation <perm> on the <big_lev>-th level of the tree of degree377<deg> returns the permutation induced by <perm> on a smaller level378<sm_lev>.379\beginexample380gap> PermActionOnLevel((1,4,2,3), 2, 1, 2);381(1,2)382gap> PermActionOnLevel((1,13,5,9,3,15,7,11)(2,14,6,10,4,16,8,12), 4, 2, 2);383(1,4,2,3)384\endexample385386387388389%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%390\Section{Elements of groups and semigroups defined by wreath recursion}391392\>`IsFiniteState( <a> )'{IsFiniteState}!{[selfsim]} P393394Returns `true' if <a> has finitely many different sections.395It will never stop if the free reduction of words is not sufficient396to establish the finite-state property or if <a> is not finite-state (has397infinitely many different sections).398399See also `AllSections' ("AllSections") for the list of all sections and400`MealyAutomaton' ("MealyAutomaton"), which allows to construct401a Mealy automaton whose states are the sections of <a> and which402encodes its action on the tree.403\beginexample404gap> D := SelfSimilarGroup("x=(1,y)(1,2), y=(z^-1,1)(1,2), z=(1,x*y)");405< x, y, z >406gap> IsFiniteState(x*y^-1);407true408\endexample409410411\>AllSections( <a> ) A412413Returns the list of all sections of <a> if there are finitely many of them and414this fact can be established using free reduction of words in sections. Otherwise415will never stop. Note, that in the case when <a> is an element of a self-similar416(semi)group defined by wreath recurion it does not check whether all elements of the list417are actually different automorphisms (homomorphisms) of the tree. If <a> is a element of418of a (semi)group generated by finite automaton, it will always return the list of419all distinct sections of <a>.420\beginexample421gap> D := SelfSimilarGroup("x=(1,y)(1,2), y=(z^-1,1)(1,2), z=(1,x*y)");422< x, y, z >423gap> AllSections(x*y^-1);424[ x*y^-1, z, 1, x*y, y*z^-1, z^-1*y^-1*x^-1, y^-1*x^-1*z*y^-1, z*y^-1*x*y*z,425y*z^-1*x*y, z^-1*y^-1*x^-1*y*z^-1, x*y*z, y, z^-1, y^-1*x^-1, z*y^-1 ]426\endexample427428429430See also operation `MealyAutomaton' ("MealyAutomaton"), which allows to construct431a Mealy automaton whose states are the sections of given tree homomorphism and which432encodes its action on the tree.433434435%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%436\Section{Elements of contracting groups}437438\>AutomPortrait( <a> ) F439\>AutomPortraitBoundary( <a> ) F440\>AutomPortraitDepth( <a> ) F441442Constructs the portrait of an element <a> of a443contracting group $G$. The portrait of <a> is defined recursively as follows.444For $g$ in the nucleus of $G$ the portrait is just $[g]$. For any other445element $g=(g_1,g_2,\ldots,g_d)\sigma$ the portrait of $g$ is446$[\sigma, `AutomPortrait'(g_1),\ldots, `AutomPortrait'(g_d)]$, where $d$ is447the degree of the tree. This structure describes a finite tree whose inner vertices448are labelled by permutations from $S_d$ and the leaves are labelled by449elements from the nucleus. The contraction in $G$ guarantees that the450portrait of any element is finite.451452The portraits may be considered as ``normal forms''453of the elements of $G$, since different elements have different portraits.454455One also can be interested only in the boundary of a portrait, which consists456of all leaves of the portrait. This boundary can be described by an ordered set of457pairs $[level_i, g_i]$, $i=1,\ldots,r$ representing the leaves of the tree ordered from left458to right (where $level_i$ and $g_i$ are the level and the label of the $i$-th leaf459correspondingly, $r$ is the number of leaves). The operation `AutomPortraitBoundary'(<a>)460computes this boundary.461462`AutomPortraitDepth'( <a> ) returns the depth of the portrait, i.e. the minimal463level such that all sections of <a> at this level belong to the nucleus of $G$.464465\beginexample466gap> Basilica := AutomatonGroup("u=(v,1)(1,2), v=(u,1)");467< u, v >468gap> AutomPortrait(u^3*v^-2*u);469[ (), [ (), [ (), [ v ], [ v ] ], [ 1 ] ],470[ (), [ (), [ v ], [ u^-1*v ] ], [ v^-1 ] ] ]471gap> AutomPortrait(u^3*v^-2*u^3);472[ (), [ (), [ (1,2), [ (), [ (), [ v ], [ v ] ], [ 1 ] ], [ v ] ], [ 1 ] ],473[ (), [ (1,2), [ (), [ (), [ v ], [ v ] ], [ 1 ] ], [ u^-1*v ] ], [ v^-1 ]474] ]475gap> AutomPortraitBoundary(u^3*v^-2*u^3);476[ [ 5, v ], [ 5, v ], [ 4, 1 ], [ 3, v ], [ 2, 1 ], [ 5, v ], [ 5, v ],477[ 4, 1 ], [ 3, u^-1*v ], [ 2, v^-1 ] ]478gap> AutomPortraitDepth(u^3*v^-2*u^3);4795480\endexample481482483484485%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%486487488