Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Bib Ind
Top of Book Previous Chapter Next Chapter

12 Miscellanea
12.1 Helpers
12.1-1 TensorSum
12.1-2 TensorProductX
12.1-3 DirectSum
12.1-4 PeriodicList
12.1-5 CompressPeriodicList
12.1-6 IsConfinal
12.1-7 ConfinalityClass
12.1-8 LargestCommonPrefix
12.1-9 WordGrowth
12.1-10 ShortGroupRelations
12.1-11 ShortGroupWordInSet
12.1-12 SurfaceBraidFpGroup
12.1-13 CharneyBraidFpGroup
12.1-14 ArtinRepresentation
12.1-15 StringByInt
12.1-16 PositionInTower
12.1-17 CoefficientsInAbelianExtension
12.1-18 MagmaEndomorphismByImagesNC
12.1-19 MagmaHomomorphismByImagesNC
12.1-20 NewFIFO
12.1-21 ProductIdeal
12.1-22 DimensionSeries
12.1-23 Trans
12.2 User settings
12.2-1 InfoFR
12.2-2 SEARCH@

### 12 Miscellanea

#### 12.1 Helpers

##### 12.1-1 TensorSum

`> TensorSum`( objects, ... ) | ( function )

This function is similar in syntax to `DirectProduct` (Reference: DirectProduct), and delegates to `TensorSumOp`; its meaning depends on context, see e.g. `TensorSumOp` (3.5-4).

##### 12.1-2 TensorProductX

`> TensorProductX`( objects, ... ) | ( function )

This function is similar in syntax to `DirectProduct` (Reference: DirectProduct), and delegates to `TensorProductOp`; its meaning depends on context, see e.g. `TensorProductOp` (3.5-5).

##### 12.1-3 DirectSum

`> DirectSum`( objects, ... ) | ( function )

This function is similar in syntax to `DirectProduct` (Reference: DirectProduct), and delegates to `DirectSumOp`; its meaning depends on context, see e.g. `DirectSumOp` (3.5-6).

##### 12.1-4 PeriodicList

`> PeriodicList`( preperiod[, period] ) | ( operation )

`> PeriodicList`( list, i ) | ( operation )

`> PeriodicList`( list, f ) | ( operation )

`> CompressedPeriodicList`( preperiod[, period] ) | ( operation )

`> CompressedPeriodicList`( list, i ) | ( operation )

`> PrePeriod`( list ) | ( operation )

`> Period`( list ) | ( operation )

These functions manipulate periodic lists, i.e. lists of infinite length such that elements follow a periodic order after some point.

The first command creates a periodic list, specified by its preperiod and period, which must both be lists. If the period is absent, this is actually a finite list.

The second command creates a periodic list by decreeing that the entries after the end of the list start again at position i.

The third command creates a list by applying function f to all elements of l.

The fourth and fifth command compress the newly created periodic list, see `CompressPeriodicList` (12.1-5).

The sixth and seventh commands return respectively the preperiod and period of a periodic list.

    gap> l := PeriodicList([1],[2,3,4]);
    [ 1, / 2, 3, 4 ]
    gap> l[5];
    2
    gap> Add(l,100,3); l;
    [ 1, 2, 100, / 3, 4, 2 ]
    gap> Remove(l,5);
    4
    gap> l;
    [ 1, 2, 100, 3, / 2, 3, 4 ]
    gap> PrePeriod(l);
    [ 1, 2, 100, 3 ]
    gap> Period(l);
    [ 2, 3, 4 ]

##### 12.1-5 CompressPeriodicList

`> CompressPeriodicList`( l ) | ( operation )

This function compresses a periodic list, in replacing the period by a minimal period, and shortening the preperiod. No value is returned, but the list l is modified. It remains equal (under `=`) to the original list.

    gap> l := PeriodicList([1],[2,3,4,2,3,4]);
    [ 1, / 2, 3, 4, 2, 3, 4 ]
    gap> Add(l,4,5); l;
    [ 1, 2, 3, 4, 4, / 2, 3, 4, 2, 3, 4 ]
    gap> CompressPeriodicList(l);
    gap> l;
    [ 1, 2, 3, 4, / 4, 2, 3 ]

##### 12.1-6 IsConfinal

`> IsConfinal`( l, m ) | ( operation )

Returns: `true` if l and m are eventually equal.

This function tests whether two lists are confinal, i.e. whether, after removal of the same suitable number of elements from both lists, they become equal.

    gap> l := PeriodicList([1],[2,3,2,3]);
    [ 1, / 2, 3, 2, 3 ]
    gap> m := PeriodicList([0,1],[3,2]);
    [ 0, 1, / 3, 2 ]
    gap> IsConfinal(l,m);
    true

##### 12.1-7 ConfinalityClass

`> ConfinalityClass`( l ) | ( operation )

Returns: The strictly periodic list with same tail as l.

There exists a unique periodic list, with no preperiod, which is confinal (see `IsConfinal` (12.1-6)) to l. This strictly periodic list is returned by this command.

    gap> l := PeriodicList([1],[2,3,2,3]);
    [ 1, / 2, 3, 2, 3 ]
    gap> ConfinalityClass(l);
    [/ 3, 2 ]

##### 12.1-8 LargestCommonPrefix

`> LargestCommonPrefix`( c ) | ( operation )

Returns: The longest list that is a prefix of all elements of c.

This command computes the longest (finite or periodic) list which is a prefix of all elements of c. The argument c is a collection of finite and periodic lists.

    gap> LargestCommonPrefix([PeriodicList([1],[2,3,2,3]),[1,2,3,4]]);
    [ 1, 2, 3 ]

##### 12.1-9 WordGrowth

`> WordGrowth`( g, rec(options...) ) | ( function )

`> WordGrowth`( g:options... ) | ( function )

`> OrbitGrowth`( g, point[, limit] ) | ( function )

`> Ball`( g, radius ) | ( function )

`> Sphere`( g, radius ) | ( function )

Returns: The word growth of the semigroup g.

This function computes the first terms of growth series associated with the semigroup g. The argument g can actually be a group/monoid/semigroup, or a list representing that semigroup's generating set.

The behaviour of `WordGrowth` is controlled via options passed in the second argument, which is a record. They can be combined when reasonable, and are:

`limit:=n`

  to specify a limit radius;

`sphere:=radius`

  to return the sphere of the specified radius, unless a radius was specified in `limit`, in which case the value is ignored;

`spheres:=maxradius`

  to return the list of spheres of radius between 0 and the specified limit;

`spheresizes:=maxradius`

  to return the list sizes of spheres of radius between 0 and the specified limit;

`ball:=radius`

  to return the ball of the specified radius;

`balls:=maxradius`

  to return the list of balls of radius between 0 and the specified limit;

`ballsizes:=maxradius`

  to return the list sizes of balls of radius between 0 and the specified limit;

`indet:=z`

  to return the `spheresizes`, as a polynomial in `z` (or the first indeterminate if `z` is not a polynomial;

`draw:=filename`

  to create a rendering of the Cayley graph of g. Edges are given colours according to the cyclic ordering "red", "blue", "green", "gray", "yellow", "cyan", "orange", "purple". If `filename` is a string, the graph is appended, in `dot` format, to that file. Otherwise, the output is converted to Postscript using the program `neato` from the graphviz package, and displayed in a separate X window using the program display. This works on UNIX systems.

  It is assumed, but not checked, that graphviz and display are properly installed on the system.

`point:=p`

  to compute the growth of the orbit of `p` under g, rather than the growth of g.

`track:=true`

  to keep track of a word in the generators that gives the element. This affects the "ball", "balls", "sphere" and "spheres" commands, where the result returned is a 3-element list: the first entry is the original results; the second entry is a homomorphism from a free group/monoid/semigroup; and the third entry contains the words corresponding to the first entry via the homomorphism.

If the first argument is an integer `n` and not a record, the command is interpreted as `WordGrowth(...,rec(spheresizes:=n))`.

`WordGrowth(...,rec(draw:=true))` may be abbreviated as `Draw(...)`; `WordGrowth(...,rec(ball:=n))` may be abbreviated as `Ball(...,n)`; `WordGrowth(...,rec(sphere:=n))` may be abbreviated as `Sphere(...,n)`;

    gap> WordGrowth(GrigorchukGroup,4);
    [ 1, 4, 6, 12, 17 ]
    gap> WordGrowth(GrigorchukGroup,rec(limit:=4,indet:=true));
    17*x_1^4+12*x_1^3+6*x_1^2+4*x_1+1
    gap> WordGrowth(GrigorchukGroup,rec(limit:=1,spheres:=true));
    [ [ <Mealy element on alphabet [ 1, 2 ] with 1 state, initial state 1> ],
      [ d, b, c, a ] ]
    gap> WordGrowth(GrigorchukGroup,rec(point:=[2,2,2]));
    [ 1, 1, 1, 1, 1, 1, 1, 1 ]
    gap> OrbitGrowth(GrigorchukGroup,[1,1,1]);
    [ 1, 2, 2, 1, 1, 1 ]
    gap> WordGrowth(GrigorchukGroup,rec(spheres:=4,point:=PeriodicList([],[2])));
    [ [ [/ 2 ] ], [ [ 1, / 2 ] ], [ [ 1, 1, / 2 ] ], [ [ 2, 1, / 2 ] ],
      [ [ 2, 1, 1, / 2 ] ] ]
    gap> WordGrowth([(1,2),(2,3)],rec(spheres:=infinity,track:=true));
    [ [ [  ], [ (2,3), (1,2) ], [ (), (1,2,3), (1,3,2) ], [ (1,3) ] ],
      MappingByFunction( <free semigroup on the generators [ s1, s2 ]>, <group>, function( w ) ... end ),
      [ [  ], [ s2, s1 ], [ s2^2, s2*s1, s1*s2 ], [ s2*s1*s2 ] ] ]

Note that the orbit growth of `[/2]` is constant 1, while that of `[/1]` is constant 2. The following code would find the point with maximal orbit growth of a semigroup acting on the integers (for example, constructed with `PermGroup` (7.2-1)):

    MaximalOrbitGrowth := function(g)
        local maxpt, growth, max;
        maxpt := LargestMovedPoint(g);
        growth := List([1..maxpt],n->WordGrowth(g:point:=n));
        max := Maximum(growth);
        return [max,Filtered([1..maxpt],n->growth[n]=max)];
    end;

##### 12.1-10 ShortGroupRelations

`> ShortGroupRelations`( g, n ) | ( operation )

`> ShortMonoidRelations`( g, n ) | ( operation )

Returns: A list of relations between words over g, of length at most n.

This function assumes that g is a list of monoid elements. it searches for products of at most n elements over g that are equal.

In its first form, it returns a list of words in a free group `f` of rank the length of g, that are trivial in g. The first argument may be a group, in which case its symmetric generating set is considered.

In its second form, it returns a list of pairs `[l,r]`, where `l` and `r` are words in a free monoid `f` of rank the length of g, that are equal in g. The first argument may be a monoid, in which case its monoid generating set is considered.

This command does not construct all such pairs; rather, it returns a small set, in the hope that it may serve as a presentation for the monoid generated by g.

The first element of the list returned is actually not a relation: it is a homomorphism from `f` to [the group/monoid generated by] g.

    gap> ShortGroupRelations(GrigorchukGroup,10);
    [ [ x1, x2, x3, x4 ] -> [ a, b, c, d ],
      x1^2, x2^2, x3^2, x4^2, x2*x3*x4, x4*x1*x4*x1*x4*x1*x4*x1,
      x3*x1*x3*x1*x3*x1*x3*x1*x3*x1*x3*x1*x3*x1*x3*x1 ]
    gap> ShortGroupRelations(GuptaSidkiGroup,9);
    [ [ x1, x2 ] -> [ x, gamma ],
      x1^3, x2^3, x2*x1^-1*x2*x1^-1*x2*x1^-1*x2*x1^-1*x2*x1^-1*x2*x1^-1*
         x2*x1^-1*x2*x1^-1*x2*x1^-1,    x1^-1*x2^-1*x1^-1*x2^-1*x1^-1*x2^-1*
    x1^-1*x2^-1*x1^-1*x2^-1*x1^-1*x2^-1*x1^-1*x2^-1*x1^-1*x2^-1*x1^-1*x2^-1 ]

##### 12.1-11 ShortGroupWordInSet

`> ShortGroupWordInSet`( g, s, n ) | ( operation )

`> ShortMonoidWordInSet`( g, s, n ) | ( operation )

`> ShortSemigroupWordInSet`( g, s, n ) | ( operation )

Returns: Words over g that express elements of s.

This command produces words in the free group/monoid/semigroup generated by g's generators that express elements of the set s. Elements of length at most AbsoluteValue(n) are searched; if n is non-negative then at most one element is returned. The value `n=infinity` is allowed.

The second argument may be either a list, a predicate (i.e. a function returning `true` or `false`) or an element.

The function returns a list of words in the free group/monoid/semigroup; the first entry of the list is a homomorphism from the free group/monoid/semigroup to g.

    gap> l := ShortMonoidWordInSet(Group((1,2),(2,3),(3,4)),
                [(1,2,3,4),(4,3,2,1)],-3);
    [ MappingByFunction( <free monoid on the generators [ m1, m2, m3 ]>, Group(
        [ (1,2), (2,3), (3,4) ]), function( w ) ... end ), m3*m2*m1, m1*m2*m3 ]
    gap> f := Remove(l,1);;
    gap> List(l,x->x^f);
    [ (1,2,3,4), (1,4,3,2) ]
    gap> ShortMonoidWordInSet(GrigorchukGroup,
           [Comm(GrigorchukGroup.1,GrigorchukGroup.2)],4);
    [ MappingByFunction( <free monoid on the generators [ m1, m2, m3, m4
         ]>, <self-similar monoid over [ 1 .. 2 ] with
        4 generators>, function( w ) ... end ), m1*m2*m1*m2 ]

##### 12.1-12 SurfaceBraidFpGroup

`> SurfaceBraidFpGroup`( n, g, p ) | ( function )

`> PureSurfaceBraidFpGroup`( n, g, p ) | ( function )

Returns: The [pure] surface braid group on n strands.

This function creates a finitely presented group, isomorphic to the [pure] braid group on n strands of the surface of genus g, with p punctures. In particular, `SurfaceBraidFpGroup(n,0,1)` is the usual braid group (on the disc).

The presentation comes from [Bel04]. The first 2g generators are the standard a_i,b_i surface generators; the next n-1 are the standard s_i braid generators; and the last are the extra z generators.

The pure surface braid group is the kernel of the natural map from the surface braid group to the symmetric group on n points, defined by sending a_i,b_i,z to the identity and s_i to the transposition `(i,i+1)`.

##### 12.1-13 CharneyBraidFpGroup

`> CharneyBraidFpGroup`( n ) | ( function )

Returns: The braid group on n strands.

This function creates a finitely presented group, isomorphic to the braid group on n strands (on the disc). It is isomorphic to `SurfaceBraidFpGroup(n,0,1)`, but has a different presentation, due to Charney ([Cha95]), with one generator per non-trivial permutation of n points.

##### 12.1-14 ArtinRepresentation

`> ArtinRepresentation`( n ) | ( function )

Returns: The braid group's representation on `FreeGroup(n)`.

This function creates a Artin's representatin, a homomorphism from the braid group on n strands (on the disc) into the automorphism group of a free group of rank n.

##### 12.1-15 StringByInt

`> StringByInt`( n[, b] ) | ( function )

Returns: A string representing n in base b.

This function converts a positive integer to string. It accepts an optional second argument, which is a base in which to print n. By default, b is 2.

##### 12.1-16 PositionInTower

`> PositionInTower`( t, x ) | ( function )

Returns: The largest index such that `t[i]` contains x.

This function assumes t is a descending tower of domains, such as that constructed by `LowerCentralSeries`. It returns the largest integer `i` such that `t[i]` contains x; in case the tower ends precisely with x, the value `infinity` is returned.

x can be an element or a subdomain of `t[1]`.

##### 12.1-17 CoefficientsInAbelianExtension

`> CoefficientsInAbelianExtension`( x, b, G ) | ( function )

Returns: The coefficients in b of the element x, modulo G.

If b is a list of group elements b_1,...,b_k, and H=< G,b_1,...,b_k> contains G as a normal subgroup, and H/G is abelian and xin H, then this function computes exponents e_1,...,e_k such that prod b_i^e_iG=xG.

##### 12.1-18 MagmaEndomorphismByImagesNC

`> MagmaEndomorphismByImagesNC`( f, im ) | ( function )

Returns: An endomorphism of f.

This function constructs an endomorphism of the group,monoid or semigroup f specified by sending generator number i to the ith entry in im. It is a shortcut for a call to `GroupHomomorphismByImagesNC` or `MagmaHomomorphismByFunctionNC(...,MappedWord(...))`.

##### 12.1-19 MagmaHomomorphismByImagesNC

`> MagmaHomomorphismByImagesNC`( f, g, im ) | ( function )

Returns: An homomorphism from f to g.

This function constructs a homomorphism of the group,monoid or semigroup f specified by sending generator number i to the ith entry in im. It is a shortcut for a call to `GroupHomomorphismByImagesNC` or `MagmaHomomorphismByFunctionNC(...,MappedWord(...))`.

##### 12.1-20 NewFIFO

`> NewFIFO`( [l] ) | ( operation )

`> Add`( f, i ) | ( operation )

`> Append`( f, l ) | ( operation )

These functions create and extend FIFOs, i.e. first-in first-out data structures.

The first command creates a FIFO, with an optional list initializing it.

The second and third commands add an element, or append a list, to the FIFO.

Elements are removed via `NextIterator(f)`, and the FIFO is tested for emptyness via `IsDoneIterator(f)`. Thus, a typical use is the following code, which tests in breadth-first manner that all numbers in `[1..1000]` have a successor which is prime:

    gap> f := NewFIFO([1..10000]);
    <iterator>
    gap> for i in f do if not IsPrime(i) then Add(f,i+1); fi; od;

##### 12.1-21 ProductIdeal

`> ProductIdeal`( a, b ) | ( function )

`> ProductBOIIdeal`( a, b ) | ( function )

Returns: the product of the ideals a and b.

The first command computes the product of the left ideal a and the right ideal b. If they are not appropriately-sided ideals, the command first attempts to convert them.

The second command assumes that the ring of these ideals has a basis made of invertible elements. It is then much easier to compute the product.

##### 12.1-22 DimensionSeries

`> DimensionSeries`( a[, n] ) | ( function )

Returns: A nested list of ideals in the algebra-with-one a.

This command computes the powers of the augmentation ideal of a, and returns their list. The list stops when the list becomes stationary.

The optional second argument gives a limit to the number of terms to put in the series.

    gap> a := ThinnedAlgebraWithOne(GF(2),GrigorchukGroup);
    <self-similar algebra-with-one on alphabet GF(2)^2 with 4 generators>
    gap> q := MatrixQuotient(a,3);
    <algebra-with-one of dimension 22 over GF(2)>
    gap> l := DimensionSeries(q);
    [ <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (5 generators)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 21)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 18)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 14)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 10)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 6)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 3)>,
      <two-sided ideal in <algebra-with-one of dimension 22 over GF(2)>, (dimension 1)>,
      <algebra of dimension 0 over GF(2)> ]

##### 12.1-23 Trans

`> Trans`( list, ... ) | ( function )

This function creates a new transformation, in the family `TRANS_FAMILY`. These objects behave quite as usual transformations (see `Transformation` (Reference: Transformation)); the differences are that these transformations do not have a bounded set on which they operate; they are all part of one family, and act on `PosInt`. The other difference is that, when they are invertible, these transformations are simply permutations.

If one argument is passed, it is a list of images, as in `PermList` (Reference: PermList). If two arguments are passed and both are lists, they are the source and range, as in `PermListList` (Reference: PermListList). Finally, if two arguments are passed and the second is a function, the first argument is treated as the source and the range is computed with this function.

Transformations are printed, and converted to strings, as `"<x,y,...>"`, where the `x,y,...` denote the images of `1,2,...` under the transformation; the shortest possible list is printed.

    gap> Trans();
    <>
    gap> Trans([1,,2]);
    <1,2,2>
    gap> 3^last;
    2
    gap> Trans([1,3,3]);
    <1,3>
    gap> Trans([10,11],[11,12]);
    <1,2,3,4,5,6,7,8,9,11,12>
    gap> Trans([10,11],x->x^2);
    <1,2,3,4,5,6,7,8,9,100,121>

#### 12.2 User settings

##### 12.2-1 InfoFR

`> InfoFR` | ( info class )

This is an `Info` class for the package FR. The command `SetInfoLevel(InfoFR,1);` switches on the printing of some information during the computations of certain FR functions; in particular all automatic conversions between FR machines and Mealy machines.

The command `SetInfoLevel(InfoFR,2);` requests a little more information, and in particular prints intermediate results in potentially long calculations such as `NucleusOfFRSemigroup` (7.2-17).

The command `SetInfoLevel(InfoFR,3);` ensures that FR will print information every few seconds or so. This is useful to gain confidence that the program is not stuck due to a programming bug by the author of FR.

##### 12.2-2 SEARCH@

`> SEARCH@` | ( global variable )

This variable controls the search mechanism in FR groups. It is a record with in particular entries `radius` and `depth`.

`radius` limits the search in FR groups to balls of that radius in the generating set. For example, the command `x in G` will initiate a search in `G` to attempt to express `x` as a reasonably short word in the generators of `G`.

`depth` limits the level of the tree on which quotients of FR groups should be considered. Again for the command `x in G`, deeper and deeper quotients will be considered, in the hope of finding a quotient of `G` to which `x` does not belong.

A primitive mechanism is implemented to search alternatively for a quotient disproving `x in G` and a word proving `x in G`.

When the limits are reached and the search was unsuccessful, an interactive `Error()` is raised, to let the user increase their values.

Specific limits can be passed to any command via the options `FRdepth` and `FRradius`, as for example in `Size(G:FRdepth:=3,FRradius:=5)`.

Top of Book Previous Chapter Next Chapter
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Bib Ind

generated by GAPDoc2HTML