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

12 Miscellanea
 12.1 Helpers

  12.1-1 TensorSum

  12.1-2 TensorProduct

  12.1-3 DirectSum

  12.1-4 PeriodicListsFamily

  12.1-5 PeriodicList

  12.1-6 CompressPeriodicList

  12.1-7 IsConfinal

  12.1-8 ConfinalityClass

  12.1-9 LargestCommonPrefix

  12.1-10 WordGrowth

  12.1-11 ShortGroupRelations

  12.1-12 ShortGroupWordInSet

  12.1-13 SurfaceBraidFpGroup

  12.1-14 CharneyBraidFpGroup

  12.1-15 ArtinRepresentation

  12.1-16 StringByInt

  12.1-17 PositionInTower

  12.1-18 RenameSubobjects

  12.1-19 CoefficientsInAbelianExtension

  12.1-20 MagmaEndomorphismByImagesNC

  12.1-21 MagmaHomomorphismByImagesNC

  12.1-22 Draw

  12.1-23 IsFIFO

  12.1-24 ProductIdeal

  12.1-25 DimensionSeries

  12.1-26 TRANS_FAMILY

  12.1-27 Trans

  12.1-28 AsTrans

  12.1-29 Cycle

  12.1-30 Cycles

  12.1-31 FullTransMonoid

  12.1-32 ImageSetOfTrans

  12.1-33 KernelOfTrans

  12.1-34 ListTrans

  12.1-35 OneTrans

  12.1-36 PreImagesOfTrans

  12.1-37 RandomTrans

  12.1-38 RankOfTrans

  12.1-39 RestrictedTrans

  12.1-40 AlgebraHomomorphismByFunction

  12.1-41 IsFpLieAlgebra

  12.1-42 JenningsLieAlgebra

  12.1-43 IS_COMPLEX

  12.1-44 ComplexRootsOfUnivariatePolynomial

  12.1-45 MACFLOAT_PI

  12.1-46 DegreeOfRationalFunction

  12.1-47 IsP1Point

  12.1-48 CleanedP1Point

  12.1-49 P1infinity

  12.1-50 P1Antipode

  12.1-51 P1Barycentre

  12.1-52 P1Circumcentre

  12.1-53 P1Distance

  12.1-54 P1Midpoint

  12.1-55 P1Sphere

  12.1-56 SphereP1

  12.1-57 SphereP1Y

  12.1-58 P1XRatio

  12.1-59 IsP1Map

  12.1-60 P1Identity

  12.1-61 CleanedP1Map

  12.1-62 CoefficientsOfP1Map

  12.1-63 P1MapByCoefficients

  12.1-64 P1Path

  12.1-65 DegreeOfP1Map

  12.1-66 P1Image

  12.1-67 P1PreImages

  12.1-68 P1MapCriticalPoints

  12.1-69 P1MapRational

  12.1-70 RationalP1Map

  12.1-71 P1MapSL2

  12.1-72 SL2P1Map
 12.2 User settings

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 TensorProduct
‣ TensorProduct( 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 PeriodicListsFamily
‣ PeriodicListsFamily( family )
‣ IsPeriodicList( filter )

The family, respectively filter, of PeriodicList (12.1-5)s.

12.1-5 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-6).

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

Most of the methods applied for lists have an obvious equivalent for periodic lists: List (Reference: Lists), Filtered (Reference: Filtered), First (Reference: First), ForAll (Reference: ForAll), ForAny (Reference: ForAny), Number (Reference: Number).

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-6 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-7 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-8 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-7)) 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-9 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-10 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 or rsvg-view. This works on UNIX systems.

It is assumed, but not checked, that graphviz and display/rsvg-view are properly installed on the system. The option usesvg requests the use of rsvg-view; by default, display is used.

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;

For example, the command Draw(BasilicaGroup,rec(point:=PeriodicList([],[2,1]),limit:=3)); produces (in a new window) the following picture: Nucleus

12.1-11 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-12 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-13 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-14 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-15 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-16 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-17 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-18 RenameSubobjects
‣ RenameSubobjects( obj, refobj )( function )

This function traverses obj if it is a list or a record, and, when it finds an element which has no name, but is equal (in the sense of =) to an element of refobj, assigns it the name of that element.

gap> trivial := Group(());; SetName(trivial,"trivial");
gap> a := List([1..10],i->Group(Random(SymmetricGroup(3))));
[ Group([ (2,3) ]), Group([ (2,3) ]), Group([ (1,3) ]), Group([ (1,3) ]),
  Group([ (1,3,2) ]), Group([ (1,3,2) ]), Group([ (1,2) ]), Group(()),
  Group([ (2,3) ]), Group([ (1,3,2) ]) ]
gap> RenameSubobjects(a,[trivial]); a;
[ Group([ (2,3) ]), Group([ (2,3) ]), Group([ (1,3) ]), Group([ (1,3) ]),
  Group([ (1,3,2) ]), Group([ (1,3,2) ]), Group([ (1,2) ]), trivial,
  Group([ (2,3) ]), Group([ (1,3,2) ]) ]

12.1-19 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 x∈ H, then this function computes exponents e_1,...,e_k such that ∏ b_i^e_iG=xG.

12.1-20 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-21 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-22 Draw
‣ Draw( p )( function )
‣ HeightOfPoset( p )( function )

Returns: The length of a maximal chain in the poset.

12.1-23 IsFIFO
‣ IsFIFO( filter )
‣ 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-24 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-25 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-26 TRANS_FAMILY
‣ TRANS_FAMILY( family )
‣ IsTrans( filter )

The family and filter of transformations of the FR's implementation of transformations on the positive integers, see Trans (12.1-27).

12.1-27 Trans
‣ Trans( list, ... )( function )
‣ TransList( list, ... )( function )
‣ TransNC( 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.1-28 AsTrans
‣ AsTrans( perm )( operation )

Returns: An FR transformation equivalent to perm.

12.1-29 Cycle
‣ Cycle( trans, point )( operation )

Returns: The cycle of integers that point eventually reaches under trans.

12.1-30 Cycles
‣ Cycles( trans, domain[, act] )( operation )

Returns: The cycles that domain eventually reaches under trans.

12.1-31 FullTransMonoid
‣ FullTransMonoid( n )( operation )

Returns: The monoid of transformations of [1..n] (if n is an integer) or of n (if n is a collection).

12.1-32 ImageSetOfTrans
‣ ImageSetOfTrans( trans, coll )( operation )

Returns: The images of coll under trans.

12.1-33 KernelOfTrans
‣ KernelOfTrans( trans )( operation )

Returns: The non-trivial equivalence classes of integers identified under trans.

12.1-34 ListTrans
‣ ListTrans( trans )( operation )

Returns: A list of images describing trans.

12.1-35 OneTrans
‣ OneTrans( global variable )

The identity FR transformation.

12.1-36 PreImagesOfTrans
‣ PreImagesOfTrans( trans, i )( operation )

Returns: The preimages of i under trans.

12.1-37 RandomTrans
‣ RandomTrans( n )( operation )

Returns: A random FR transformation on the fist n positive integers.

12.1-38 RankOfTrans
‣ RankOfTrans( trans[, list] )( function )

Returns: The (normalized) rank of the FR transformation trans.

If list is present, this computes the size of the image of list under trans. Otherwise, this computes the limit, as n->∞, of RankOfTrans(trans,[1..n])-n.

gap> RankOfTrans(Trans([1,1]));
gap> RankOfTrans(Trans([1,1]),[1..10]);
9
-1
gap> RankOfTrans(Trans());
0

12.1-39 RestrictedTrans
‣ RestrictedTrans( trans, coll )( operation )

Returns: The FR transformation that agrees with trans on coll, and is the identity elsewhere.

12.1-40 AlgebraHomomorphismByFunction
‣ AlgebraHomomorphismByFunction( A, B, f )( operation )
‣ AlgebraWithOneHomomorphismByFunction( A, B, f )( operation )

Returns: A homomorphism from the algebra A to the algebra B.

These functions construct an algebra homomorphism from a one-argument function. They do not check that the function actually defines a homomorphism.

gap> A := MatrixAlgebra(Rationals,2);
( Rationals^[ 2, 2 ] )
gap> e1 := AlgebraHomomorphismByFunction(Rationals,A,f->[[f,0],[0,0]]);
MappingByFunction( Rationals, ( Rationals^[ 2, 2 ] ), function( f ) ... end )
gap> 11^e1;
[ [ 11, 0 ], [ 0, 0 ] ]

12.1-41 IsFpLieAlgebra
‣ IsFpLieAlgebra( filter )

The category of Lie algebras coming from a finitely presented group. They appear as the JenningsLieAlgebra (Reference: JenningsLieAlgebra) of a finitely presented group.

If G is an infinite, finitely presented group, then the original implementation of JenningsLieAlgebra (Reference: JenningsLieAlgebra) does not return. On the other hand, the implementation in FR constructs a graded object, for which the graded components are computed on-demand; see JenningsLieAlgebra (12.1-42).

12.1-42 JenningsLieAlgebra
‣ JenningsLieAlgebra( ring, fpgroup )( operation )

Returns: The Jennings Lie algebra of fpgroup.

This method does not compute the Jennings Lie algebra per se; it merely constructs a placeholder to contain the result.

gap> f := FreeGroup(4);
<free group on the generators [ f1, f2, f3, f4 ]>
gap> surfacegp := f/[Comm(f.1,f.2)*Comm(f.3,f.4)];
<fp group of size infinity on the generators [ f1, f2, f3, f4 ]>
gap> j := JenningsLieAlgebra(Rationals,surfgp);
<FP Lie algebra over Rationals>
gap> List([1..4],Grading(j).hom_components);
[ <vector space over Rationals, with 4 generators>,
  <vector space over Rationals, with 5 generators>,
  <vector space over Rationals, with 16 generators>,
  <vector space over Rationals, with 45 generators> ]
gap> B := Basis(Grading(j).hom_components(1));
gap> B[1]*B[2]+B[3]*B[4];
<zero Lie element>

12.1-43 IS_COMPLEX
‣ IS_COMPLEX( filter )
‣ COMPLEX_FAMILY( family )
‣ Complex( ... )( function )
‣ COMPLEX_FIELD( global variable )
‣ COMPLEX_0( global variable )
‣ COMPLEX_1( global variable )
‣ COMPLEX_I( global variable )
‣ COMPLEX_2IPI( global variable )
‣ COMPLEX_INF( global variable )
‣ COMPLEX_NAN( global variable )
‣ EXP_COMPLEX( z )( function )
‣ Argument( z )( operation )
‣ AbsoluteValue( z )( operation )
‣ Norm( z )( operation )
‣ RealPart( z )( operation )
‣ ImaginaryPart( z )( operation )

A rough implementation of complex numbers, based on the underlying floating-point numbers in GAP.

Strictly speaking, complex numbers do not form a field in GAP, because associativity etc. do not hold. Still, a field is defined, COMPLEX_FIELD, making it possible to construct an indeterminate and rational functions, to be passed to FR's routines.

gap> z := Indeterminate(COMPLEX_FIELD);
gap> z := Indeterminate(COMPLEX_FIELD);
z
gap> (z+1/2)^5/(z-1/2);
(z^5+2.5*z^4+2.5*z^3+1.25*z^2+0.3125*z+0.03125)/(z+(-0.5))
gap> Complex(1,2);
1+I*2
gap> last^2;
-3+I*4
gap> RealPart(last);
-3
gap> Norm(last2);
25
gap> Complex("1+2*I");
1+I*2

12.1-44 ComplexRootsOfUnivariatePolynomial
‣ ComplexRootsOfUnivariatePolynomial( poly )( operation )
‣ ComplexRootsOfUnivariatePolynomial( list )( operation )

Returns: The complex roots of poly.

These methods compute the complex roots of a univariate complex polynomial, using the Jenkins-Traub algorithm (TOMS 493).

Note that this is a globally-convergent, very fast algorithm, but that it suffers from loss of precision due to deflation, in case many roots have the same norm.

gap> ComplexRootsOfUnivariatePolynomial(z^2-5);
[ -2.23607, 2.23607 ]
gap> ComplexRootsOfUnivariatePolynomial([COMPLEX_1,COMPLEX_2]);
Error, Variable: 'COMPLEX_2' must have a value
not in any function
gap> ComplexRootsOfUnivariatePolynomial([COMPLEX_1,2*COMPLEX_1]);
[ -0.5 ]
gap> ComplexRootsOfUnivariatePolynomial(ListWithIdenticalEntries(70,COMPLEX_1));
[ 0.995974-I*0.0896393, 0.995974+I*0.0896393, 0.963963+I*0.266037, 0.98393-I*0.178557,
  ...
  -0.550314+I*0.826223 ]
gap> List(last,AbsoluteValue);
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.989218, 0.977391, 0.9982, 1,
  1.01007, 1, 1.0075, 1.00466, 1.00055, 1.00228, 0.999955, 1.00023, 0.999212, 0.999573, 1,
  0.999914, 1, 1, 1.00104, 1, 0.999998, 1.00224, 1, 1.01073, 1, 1, 1.00003, 1, 0.990849, 1,
  0.999983, 0.999955, 0.999985, 0.999749, 0.999999, 1.00043, 1.00002, 1, 0.999926, 1.00004,
  1.00001, 0.99722, 1.00597, 0.999355, 1, 0.997287, 1.00555, 1.00117, 1.00759, 0.992719 ]

12.1-45 MACFLOAT_PI
‣ MACFLOAT_PI( global variable )
‣ MACFLOAT_EPS( global variable )
‣ MACFLOAT_INF( global variable )
‣ MACFLOAT_NAN( global variable )

Floating-point constants.

12.1-46 DegreeOfRationalFunction
‣ DegreeOfRationalFunction( rat )( operation )

Returns: The degree of the univariate rational function rat.

12.1-47 IsP1Point
‣ IsP1Point( filter )
‣ P1PointsFamily( family )
‣ P1Point( complex )( function )
‣ P1Point( real, imag )( function )
‣ P1Point( string )( function )

P1 points are complex numbers or infinity; fast methods are implemented to compute with them, and to apply rational maps to them.

The first filter recognizes these objects. Next, the family they belong to. The next methods create a new P1 point.

12.1-48 CleanedP1Point
‣ CleanedP1Point( p, prec )( function )

Returns: p, rounded towards 0/1/infinity/reals at precision prec.

12.1-49 P1infinity
‣ P1infinity( global variable )

The north pole of the Riemann sphere.

12.1-50 P1Antipode
‣ P1Antipode( p )( function )

Returns: The antipode of p on the Riemann sphere.

12.1-51 P1Barycentre
‣ P1Barycentre( points, ... )( function )

Returns: The barycentre of its arguments (which can also be a list of P1 points).

12.1-52 P1Circumcentre
‣ P1Circumcentre( p, q, r )( function )

Returns: The centre of the smallest disk containing p,q,r.

12.1-53 P1Distance
‣ P1Distance( p, q )( function )

Returns: The spherical distance from p to q.

12.1-54 P1Midpoint
‣ P1Midpoint( p, q )( function )

Returns: The point between p to q (undefined if they are antipodes of each other).

12.1-55 P1Sphere
‣ P1Sphere( v )( function )

Returns: The P1 point corresponding to v in R^3.

12.1-56 SphereP1
‣ SphereP1( p )( function )

Returns: The coordinates in R^3 of p.

12.1-57 SphereP1Y
‣ SphereP1Y( p )( function )

Returns: The Y coordinate in R^3 of p.

12.1-58 P1XRatio
‣ P1XRatio( p, q, r, s )( function )

Returns: The cross ratio of p, q, r, s.

12.1-59 IsP1Map
‣ IsP1Map( filter )
‣ P1MapsFamily( family )
‣ MoebiusMap( p, q, r, P, Q, R )( function )
‣ MoebiusMap( p, q, r )( function )
‣ MoebiusMap( p, q )( function )

P1 maps are efficiently-coded rational maps with complex coefficients.

The first filter recognizes these objects. Next, the family they belong to. The next methods create a new P1 map. In the first case, this is the Möbius transformation sending p,q,r to P,Q,R respectively; in the second case, the map sending p,q,r to 0,1,P1infinity respectively; in the third case, the map sending p,q to 0,P1infinity respectively, of the form (z-p)/(z-q).

P1 maps may not be added. They can be multiplied, and this operation corresponds to composition, in the topological order (a*b is first b, then a).

12.1-60 P1Identity
‣ P1Identity( global variable )

The identity Möbius transformation.

12.1-61 CleanedP1Map
‣ CleanedP1Map( map, prec )( operation )

Returns: map, with coefficients rounded using prec.

12.1-62 CoefficientsOfP1Map
‣ CoefficientsOfP1Map( map )( operation )

Returns: Coefficients of numerator and denominator of map, lowest degree first.

12.1-63 P1MapByCoefficients
‣ P1MapByCoefficients( numer, denom )( operation )

Returns: The P1 map with numerator coefficients numer and denominator denom, lowest degree first.

12.1-64 P1Path
‣ P1Path( p, q )( operation )

Returns: The P1 map sending 0 to p and 1 to q.

12.1-65 DegreeOfP1Map
‣ DegreeOfP1Map( map )( operation )

Returns: The degree of map.

12.1-66 P1Image
‣ P1Image( map, p1point )( operation )

Returns: The image of p1point under map.

12.1-67 P1PreImages
‣ P1PreImages( map, p1point )( operation )

Returns: The preimages of p1point under map.

12.1-68 P1MapCriticalPoints
‣ P1MapCriticalPoints( map )( operation )

Returns: The critical points of map.

12.1-69 P1MapRational
‣ P1MapRational( rat )( operation )

Returns: The P1 map given by the rational function rat.

12.1-70 RationalP1Map
‣ RationalP1Map( map )( operation )
‣ RationalP1Map( indeterminate, map )( operation )

Returns: The rational function given by P1 map map.

12.1-71 P1MapSL2
‣ P1MapSL2( mat )( operation )

Returns: The Möbius P1 map given by the 2x2 matrix mat.

12.1-72 SL2P1Map
‣ SL2P1Map( map )( operation )

Returns: The matrix of the Möbius P1 map map.

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-19).

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]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Bib Ind

generated by GAPDoc2HTML