Goto Chapter: Top 1 2 3 4 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 The Knuth-Bendix program on semigroups, monoids and groups
 2.1 Creating a rewriting system
 2.2 Elementary functions on rewriting systems
 2.3 Setting the ordering
 2.4 Control parameters
 2.5 The Knuth-Bendix program
 2.6 The automatic groups program
 2.7 Word reduction
 2.8 Counting and enumerating irreducible words
 2.9 Rewriting System Examples

2 The Knuth-Bendix program on semigroups, monoids and groups

2.1 Creating a rewriting system

First the user should be aware of a technicality. The words in a rewriting system created in GAP for use by KBMag are defined over an alphabet that consists of the generators of a free monoid, called the word-monoid of the system. Suppose, as before, that the rewriting system is defined from the semigroup, monoid or group G which is a quotient of the free structure F. Then the generators of this alphabet will be in one-one correspondence with the generators (or, when G is a group, the generators and their inverses) of F, but will not be identical to them. This feature was necessary for technical reasons. Most of the user-level functions take and return words in F rather than the alphabet, but they do this by converting from one to the other and back.

User-level functions have also been provided to carry out this conversion explicitly if required.

The user should also be aware of a peculiarity in the way that rewriting sytems are displayed, which is really a hangover from the GAP3 interface. They are displayed nicely as a record, which gives a useful description of the system, but it does not correspond at all to the way that they are actually stored internally!

2.1-1 KBMAGRewritingSystem
‣ KBMAGRewritingSystem( G )( operation )

This operation constructs and returns a rewriting system R from a finitely presented semigroup, monoid or group G. When G is a group, the alphabet members of R correspond to the generators of F together with inverses for those generators which are not obviously involutory in G.

2.2 Elementary functions on rewriting systems

2.2-1 IsKBMAGRewritingSystemRep
‣ IsKBMAGRewritingSystemRep( rws )( representation )
‣ IsRewritingSystem( rws )( category )

IsKBMAGRewritingSystemRep returns true if rws is a rewriting system created by KBMAGRewritingSystem (2.1-1). The function IsRewritingSystem (Reference: IsRewritingSystem) will also return true on such a system. (The function IsKnuthBendixRewritingSystem has been considered for inclusion, but is not currently declared.)

2.2-2 IsConfluent
‣ IsConfluent( rws )( method )

This library property returns true if rws is a rewriting system that is known to be confluent.

2.2-3 SemigroupOfRewritingSytem
‣ SemigroupOfRewritingSytem( rws )( method )
‣ FreeStructureOfSystem( rws )( method )
‣ WordMonoidOfRewritingSystem( rws )( operation )

The first two library functions return, respectively, the semigroup, monoid or group G, and the free structure F. The third returns the word-monoid of the rewriting system, as defined in section 2.1.

2.2-4 ExternalWordToInternalWordOfRewritingSystem
‣ ExternalWordToInternalWordOfRewritingSystem( rws, w )( function )
‣ InternalWordToExternalWordOfRewritingSystem( rws, w )( function )

These are the functions for converting between external words, which are those defined over the free structure F of rws, and the internal words, which are defined over the word-monoid of rws.

2.2-5 Alphabet
‣ Alphabet( rws )( attribute )

This is an ordered list of the generators of the word-monoid of rws. It will not necessarily be in the normal order of these generators, and it can be re-ordered by the function ReorderAlphabetOfKBMAGRewritingSystem (2.3-1).

2.2-6 Rules
‣ Rules( rws )( method )

This library function returns a list of the reduction rules of rws. Each rule is a two-element list containing the left and right hand sides of the rule, which are words in the alphabet of rws.

2.2-7 ResetRewritingSystem
‣ ResetRewritingSystem( rws )( function )

This function resets the rewriting system rws back to its form as it was before the application of KnuthBendix (2.5-1) or AutomaticStructure (2.6-1). However, the current ordering and values of control parameters will not be changed. The normal form and reduction algorithms will be unavailable after this call.

2.3 Setting the ordering

2.3-1 SetOrderingOfKBMAGRewritingSystem
‣ SetOrderingOfKBMAGRewritingSystem( rws, ordering[, list] )( function )
‣ ReorderAlphabetOfKBMAGRewritingSystem( rws, p )( function )
‣ OrderingOfKBMAGRewritingSystem( rws )( function )
‣ OrderingOfRewritingSystem( rws )( method )

SetOrderingOfKBMAGRewritingSystem changes the ordering on the words of the rewriting system rws to ordering. rws is reset when the ordering is changed, so any previously calculated results will be destroyed. ordering must be one of the strings shortlex, recursive, wtlex and wreathprod. The default is shortlex, and this is the ordering of rewriting systems returned by KBMAGRewritingSystem (2.1-1). The orderings wtlex and wreathprod require the third parameter, list, which must be a list of positive integers in one-one correspondence with the alphabet of rws in its current order. They have the effect of attaching weights or levels to the alphabet members, in the cases wtlex and wreathprod, respectively.

Each of these orderings depends on the order of the alphabet. The current ordering of generators is displayed under the generatorOrder field when rws is viewed. This ordering can be changed by the function ReorderAlphabetOfKBMAGRewritingSystem . The second parameter p to this function should be a permutation that moves at most ng points, where ng is the number of generators. This permutation is applied to the current list of generators.

OrderingOfKBMAGRewritingSystem merely prints out a description of the current ordering.

In the shortlex ordering, shorter words come before longer ones, and, for words of equal length, the lexicographically smaller word comes first, using the ordering of the alphabet. The wtlex ordering is similar, but instead of using the length of the word as the first criterion, the total weight of the word is used; this is defined as the sum of the weights of the generators in the word. So shortlex is the special case of wtlex in which all generators have the same nonzero weight.

The recursive ordering is the special case of wreathprod in which the levels of the ng generators are 1,2,...,ng, in the order of the alphabet. We shall not attempt to give a complete definition of these orderings here, but refer the reader instead to pages 46--50 of [Sim94]. The recursive ordering is the one appropriate for a power-conjugate presentation of a polycyclic group, but where the generators are ordered in the reverse order from the usual convention for polycyclic groups. The confluent presentation will then be the same as the power-conjugate presentation. For example, for the Heisenberg group ⟨ x,y,z ~|~ [x,z]=[y,z]=1, [y,x]=z ⟩, a good ordering is recursive with the order of generators [z^-1,z,y^-1,y,x^-1,x]. This example is included as Example 3 in 2.9-3 below.

Finally, a method is included for the attribute OrderingOfRewritingSystem which returns the appropriate GAP ordering on the elements of the word-monoid of rws. The standard GAP ordering functions, such as IsLessThanUnder (Reference: IsLessThanUnder) can then be used.

2.4 Control parameters

2.4-1 InfoRWS
‣ InfoRWS( info class )

This `Info' variable can be set to 0,1,2 or 3 to control the level of diagnostic output.

The Knuth-Bendix procedure is unusually sensitive to the settings of a number of parameters that control its operation. In some examples, a small change in one of these parameters can mean the difference between obtaining a confluent rewriting system fairly quickly on the one hand, and the procedure running on until it uses all available memory on the other hand.

Unfortunately, it is almost impossible to give even very general guidelines on these settings, although the wreathprod orderings appear to be more sensitive than the shortlex and wtlex orderings. The user can only acquire a feeling for the influence of these parameters by experimentation on a large number of examples.

The control parameters are defined by the user by setting values of certain fields of the options record of a rewriting system.

2.4-2 OptionsRecordOfKBMAGRewritingSystem
‣ OptionsRecordOfKBMAGRewritingSystem( rws )( function )

Returns the options record OR of the rewriting system rws. The fields of OR listed below can be set by the user. Be careful to spell them correctly, because otherwise they will have no effect!

2.5 The Knuth-Bendix program

2.5-1 KnuthBendix
‣ KnuthBendix( rws )( operation )
‣ MakeConfluent( rws )( method )

These two functions do the same thing, namely to run the external Knuth-Bendix program on the rewriting system rws. KnuthBendix returns true if it finds a confluent rewriting system and otherwise false. In either case, if it halts normally, then it will update the list of the rewriting rules of rws, and also store a finite state automaton ReductionAutomaton(rws) that can be used for word reduction, and the counting and enumeration of irreducible words.

All control parameters (as defined in the preceding section) should be set before calling KnuthBendix. KnuthBendix will halt either when it finds a finite confluent system of rewriting rules, or when one of the control parameters (such as OR.maxeqns) requires it to stop. The program can also be made to halt and output manually at any time by hitting the interrupt key (normally `ctrl-C') once. (Hitting it twice has unpredictable consequences, since GAP may intercept the signal.)

A method is installed to make the library operation MakeConfluent run the KnuthBendix operation.

If KnuthBendix halts without finding a confluent system, but still manages to output the current system and update rws, then it is possible to use the resulting rewriting system to reduce words, and count and enumerate the irreducible words; it cannot be guaranteed that the irreducible words are all in normal form, however. It is also possible to re-run KnuthBendix on the current system, usually after altering some of the control parameters. In fact, in some more difficult examples, this seems to be the only means of finding a finite confluent system.

2.5-2 ReductionAutomaton
‣ ReductionAutomaton( rws )( function )

Returns the reduction automaton of rws. Only expert users will wish to see this explicitly. See the section on finite state automata below for general information on functions for manipulating automata.

2.6 The automatic groups program

2.6-1 AutomaticStructure
‣ AutomaticStructure( rws[, large, filestore, diff1] )( function )

This function runs the external automatic groups program on the rewriting system rws. It returns true if successful and false otherwise. If successful, it stores three finite state automata FirstWordDifferenceAutomaton(rws), SecondWordDifferenceAutomaton(rws) and WordAcceptor(rws): see WordAcceptor (2.6-2) below. The first two of these are used for word-reduction, and the third for counting and enumeration of irreducible words (i.e. words in normal form).

The three optional parameters to AutomaticStructure are all boolean, and false by default. Setting large to be true results in some of the control parameters (such as maxeqns and tidyint) being set larger than they would be otherwise. This is necessary for examples that require a large amount of space. Setting filestore to be true results in more use being made of temporary files than would be otherwise. This makes the program run slower, but it may be necessary if you are short of core memory. Setting diff1 to be true is a more technical option, which is explained more fully in the documentation for the stand-alone KBMag package. It is not usually necessary or helpful, but it enables one or two examples to complete that would otherwise run out of space.

The ordering field of rws will usually be set to shortlex for AutomaticStructure to be applicable. However, it is now possible to use some procedures written by Sarah Rees that work when the ordering is wtlex or wreathprod. In the latter case, each generator must have the same level as its inverse.

The only control parameters for rws that are likely to be relevant are maxeqns and maxwdiffs.

2.6-2 WordAcceptor
‣ WordAcceptor( rws )( function )
‣ FirstWordDifferenceAutomaton( rws )( function )
‣ SecondWordDifferenceAutomaton( rws )( function )
‣ GeneralMultiplier( rws )( function )

These functions return, respectively, the word acceptor, the first and second word-difference automata, and the general multiplier automaton of rws. They can only be called after a successful call of AutomaticStructure(rws). All except the word acceptor are 2-variable automata that read pairs of words in the alphabet of rws. Note that the general multiplier has its states labeled, where the different labels represent the accepting states for the different letters in the alphabet of rws.

2.7 Word reduction

2.7-1 IsReducedWord
‣ IsReducedWord( rws, w )( operation )
‣ IsReducedForm( rws, w )( method )

These two functions do the same thing, namely to test whether the word w in the generators of the freestructure FreeStructure(rws) of the rewriting system system rws is reduced or not, and return true or false.

IsReducedWord can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. In the former case, if KnuthBendix halted without a confluent set of rules, then irreducible words are not necessarily in normal form (but reducible words are definitely not in normal form). If KnuthBendix completes with a confluent rewriting system or AutomaticStructure completes successfully, then it is guaranteed that all irreducible words are in normal form.

2.7-2 ReducedWord
‣ ReducedWord( rws, w )( operation )
‣ ReducedForm( rws, w )( method )

Reduce the word w in the generators of the freestructure FreeStructure(rws) of the rewriting system rws (or, equivalently, in the generators of the underlying group of rws), and return the result.

ReducedForm can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. In the former case, if KnuthBendix halted without a confluent set of rules, then the irreducible word returned is not necessarily in normal form. If KnuthBendix completes with a confluent rewriting system or AutomaticStructure completes successfully, then it is guaranteed that all irreducible words are in normal form.

2.8 Counting and enumerating irreducible words

2.8-1 Size
‣ Size( rws )( method )

Returns the number of irreducible words in the rewriting system rws.

Size can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. In the former case, if KnuthBendix halted without a confluent set of rules, then the number of irreducible words may be greater than the number of words in normal form (which is equal to the order of the underlying group, monoid or semigroup G of rws). If KnuthBendix completes with a confluent rewriting system or AutomaticStructure completes successfully, then it is guaranteed that Size will return the correct order of G.

2.8-2 Order
‣ Order( rws, w )( method )

The order of the element w of the free structure FreeStructure(rws) of rws as an element of the group or monoid from which rws was defined.

Order can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. It is not guaranteed to terminate in the case of infinite order, but it usually seems to do so in practice!

2.8-3 EnumerateReducedWords
‣ EnumerateReducedWords( rws, min, max )( operation )

Enumerate all irreducible words in the rewriting system rws that have lengths between min and max (inclusive), which should be non-negative integers. The result is returned as a list of words. The enumeration is by depth-first search of a finite state automaton, and so the words in the list returned are ordered lexicographically (not by shortlex).

EnumerateReducedWords can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. In the former case, if KnuthBendix halted without a confluent set of rules, then not all irreducible words in the list returned will necessarily be in normal form. If KnuthBendix completes with a confluent rewriting system or AutomaticStructure completes successfully, then it is guaranteed that all words in the list will be in normal form.

2.8-4 GrowthFunction
‣ GrowthFunction( rws )( function )

Returns the growth function of the set of irreducible words in the rewriting system rws. This is a rational function, of which the coefficient of x^n in its Taylor expansion is equal to the number of irreducible words of length n.

If the coefficients in this rational function are larger than about 16000 then strange error messages will appear and fail will be returned.

GrowthFunction can only be used after KnuthBendix (2.5-1) or AutomaticStructure (2.6-1) has been run successfully on rws. In the former case, if KnuthBendix halted without a confluent set of rules, then not all irreducible words in the list returned will necessarily be in normal form. If KnuthBendix completes with a confluent rewriting system or AutomaticStructure completes successfully, then it is guaranteed that all words in the list will be in normal form.

2.9 Rewriting System Examples

Here are five examples to illustrate the operations described above.

2.9-1 Example 1

We start with a easy example - the alternating group A_4.


gap> F := FreeGroup( "a", "b" );;
gap> a := F.1;;  b := F.2;;
gap> G := F/[a^2, b^3, (a*b)^3];;
gap> R := KBMAGRewritingSystem( G );
rec(
       isRWS := true,
  generatorOrder := [_g1,_g2,_g3],
    inverses := [_g1,_g3,_g2],
    ordering := "shortlex",
   equations := [
     [_g2^2,_g3],
     [_g1*_g2*_g1,_g3*_g1*_g3]
   ]
)

Notice that monoid generators, printed as _g1, _g2, _g3, are used internally. These correspond to the group generators a, b, b^-1.


gap> KnuthBendix( R );
true
gap> R;
rec(
       isRWS := true,
 isConfluent := true,
  generatorOrder := [_g1,_g2,_g3],
    inverses := [_g1,_g3,_g2],
    ordering := "shortlex",
   equations := [
     [_g1^2,IdWord],
     [_g2*_g3,IdWord],
     [_g3*_g2,IdWord],
     [_g2^2,_g3],
     [_g3*_g1*_g3,_g1*_g2*_g1],
     [_g3^2,_g2],
     [_g2*_g1*_g2,_g1*_g3*_g1],
     [_g3*_g1*_g2*_g1,_g2*_g1*_g3],
     [_g1*_g2*_g1*_g3,_g3*_g1*_g2],
     [_g2*_g1*_g3*_g1,_g3*_g1*_g2],
     [_g1*_g3*_g1*_g2,_g2*_g1*_g3]
   ]
)

The equations field of R is now a complete system of rewriting rules.


gap> Size( R );
12
gap> EnumerateReducedWords( R, 0, 12 );
[ <identity ...>, a, a*b, a*b*a, a*b^-1, a*b^-1*a, b, b*a, b*a*b^-1, b^-1, 
  b^-1*a, b^-1*a*b ]

We have enumerated all of the elements of the group - note that they are returned as words in the free group F.

2.9-2 Example 2

We construct the Fibonacci group F(2,5), defined by a semigroup rather than a group presentation. Interestingly these define the same structure (although they would not do so for F(2,r) with r even).


gap> S := FreeSemigroup( 5 );; 
gap> a := S.1;;  b := S.2;;  c := S.3;;  d := S.4;;  e := S.5;;
gap> Q := S/[ [a*b,c], [b*c,d], [c*d,e], [d*e,a], [e*a,b] ];
<fp semigroup on the generators [ s1, s2, s3, s4, s5 ]>
gap> R := KBMAGRewritingSystem( Q ); 
rec(
       isRWS := true,
      silent := true,
  generatorOrder := [_s1,_s2,_s3,_s4,_s5],
    inverses := [,,,,],
    ordering := "shortlex",
   equations := [
     [_s1*_s2,_s3],
     [_s2*_s3,_s4],
     [_s3*_s4,_s5],
     [_s4*_s5,_s1],
     [_s5*_s1,_s2]
   ]
)
gap> KnuthBendix( R );
true
gap> Size( R );
11
gap> EnumerateReducedWords( R, 0, 4 );
[ s1, s1^2, s1^2*s4, s1*s3, s1*s4, s2, s2^2, s2*s5, s3, s4, s5 ]

Let's do the same thing using the recursive ordering.


gap> SetOrderingOfKBMAGRewritingSystem( R, "recursive" );
gap> KnuthBendix( R );
true
gap> Size( R ); 
11
gap> EnumerateReducedWords( R, 0, 11 );
[ s1, s1^2, s1^3, s1^4, s1^5, s1^6, s1^7, s1^8, s1^9, s1^10, s1^11 ]

2.9-3 Example 3

The Heisenberg group is the free 2-generator nilpotent group of class 2. For KnuthBendix to complete, we need to use the recursive ordering, and reverse our initial order of generators. (Alternatively, we could avoid this reversal, by using a wreathprod ordering, and setting the levels of the generators to be 6,5,4,3,2,1.)


gap> F := FreeGroup("x","y","z");;
gap> x := F.1;;  y := F.2;;  z := F.3;;
gap> G := F/[Comm(y,x)*z^-1, Comm(z,x), Comm(z,y)];;
gap> R := KBMAGRewritingSystem( G );
rec(
       isRWS := true,
  generatorOrder := [_g1,_g2,_g3,_g4,_g5,_g6],
    inverses := [_g2,_g1,_g4,_g3,_g6,_g5],
    ordering := "shortlex",
   equations := [
     [_g4*_g2*_g3,_g5*_g2],
     [_g6*_g2,_g2*_g6],
     [_g6*_g4,_g4*_g6]
   ]
)
gap> SetOrderingOfKBMAGRewritingSystem( R, "recursive" );
gap> ReorderAlphabetOfKBMAGRewritingSystem( R, (1,6)(2,5)(3,4) );
gap> R;
rec(
       isRWS := true,
  generatorOrder := [_g6,_g5,_g4,_g3,_g2,_g1],
    inverses := [_g5,_g6,_g3,_g4,_g1,_g2],
    ordering := "recursive",
   equations := [
     [_g4*_g2*_g3,_g5*_g2],
     [_g6*_g2,_g2*_g6],
     [_g6*_g4,_g4*_g6]
   ]
)
gap> SetInfoLevel( InfoRWS, 1 );
gap> KnuthBendix( R );
#I  Calling external Knuth-Bendix program.
#System is confluent.
#Halting with 18 equations.
#I  External Knuth-Bendix program complete.
#I  System computed is confluent.
true
gap> R;
rec(
       isRWS := true,
 isConfluent := true,
  generatorOrder := [_g6,_g5,_g4,_g3,_g2,_g1],
    inverses := [_g5,_g6,_g3,_g4,_g1,_g2],
    ordering := "recursive",
   equations := [
     [_g6*_g5,IdWord],
     [_g5*_g6,IdWord],
     [_g4*_g3,IdWord],
     [_g3*_g4,IdWord],
     [_g2*_g1,IdWord],
     [_g1*_g2,IdWord],
     [_g6*_g2,_g2*_g6],
     [_g6*_g4,_g4*_g6],
     [_g4*_g2,_g2*_g4*_g5],
     [_g5*_g2,_g2*_g5],
     [_g6*_g1,_g1*_g6],
     [_g5*_g4,_g4*_g5],
     [_g6*_g3,_g3*_g6],
     [_g3*_g1,_g1*_g3*_g5],
     [_g4*_g1,_g1*_g4*_g6],
     [_g3*_g2,_g2*_g3*_g6],
     [_g5*_g1,_g1*_g5],
     [_g5*_g3,_g3*_g5]
   ]
)
gap> Size( R );
infinity
gap> IsReducedWord( R, z*y*x );
false
gap> ReducedForm( R, z*y*x );
x*y*z^2
gap> IsReducedForm( R, x*y*z^2 );
true

2.9-4 Example 4

This is an example of the use of the Knuth-Bendix algorithm to prove the nilpotence of a finitely presented group. (The method is due to Sims, and is described in Chapter 11.8 of [Sim94].) This example is of intermediate difficulty, and demonstrates the necessity of using the maxstoredlen control parameter.

The group is

\langle a,b ~|~ [b,a,b], [b,a,a,a,a], [b,a,a,a,b,a,a] \rangle

with left-normed commutators. The first step in the method is to check that there is a maximal nilpotent quotient of the group, for which we could use, for example, the GAP NilpotentQuotient (nq: NilpotentQuotient) command, from the package nq. We find that there is a maximal such quotient, and it has class 7, and the layers going down the lower central series have the abelian structures [0,0], [0], [0], [0], [0], [2], [2].

By using the stand-alone `C' nilpotent quotient program, it is possible to find a power-commutator presentation of this maximal quotient. We now construct a new presentation of the same group, by introducing the generators in this power-commutator presentation, together with their definitions as powers or commutators of earlier generators. It is this new presentation that we use as input for the Knuth-Bendix program. Again we use the recursive ordering, but this time we will be careful to introduce the generators in the correct order in the first place!


gap> F := FreeGroup( "h", "g", "f", "e", "d", "c", "b", "a" );;
gap> h := F.1;;  g := F.2;;  f := F.3;;  e := F.4;; 
gap> d := F.5;;  c := F.6;;  b := F.7;;  a := F.8;;
gap> G := F/[Comm(b,a)*c^-1, Comm(c,a)*d^-1, Comm(d,a)*e^-1, Comm(e,b)*f^-1, 
>            Comm(f,a)*g^-1, Comm(g,b)*h^-1, Comm(g,a), Comm(c,b), Comm(e,a)];;
gap> R:=KBMAGRewritingSystem(G);
rec(
       isRWS := true,
  generatorOrder := [_g1,_g2,_g3,_g4,_g5,_g6,_g7,_g8,_g9,_g10,
               _g11,_g12,_g13,_g14,_g15,_g16],
    inverses := [_g2,_g1,_g4,_g3,_g6,_g5,_g8,_g7,_g10,_g9,
               _g12,_g11,_g14,_g13,_g16,_g15],
    ordering := "shortlex",
   equations := [
     [_g14*_g16*_g13,_g11*_g16],
     [_g12*_g16*_g11,_g9*_g16],
     [_g10*_g16*_g9,_g7*_g16],
     [_g8*_g14*_g7,_g5*_g14],
     [_g6*_g16*_g5,_g3*_g16],
     [_g4*_g14*_g3,_g1*_g14],
     [_g4*_g16,_g16*_g4],
     [_g12*_g14,_g14*_g12],
     [_g8*_g16,_g16*_g8]
   ]
)

A little experimentation reveals that this example works best when only those equations with left and right hand sides of lengths at most 10 are kept.


gap> SetOrderingOfKBMAGRewritingSystem( R, "recursive" );
gap> O := OptionsRecordOfKBMAGRewritingSystem( R );
gap> O.maxstoredlen := [10,10];;
gap> SetInfoLevel( InfoRWS, 2 );
gap> KnuthBendix( R );
  # 60 eqns; total len: lhs, rhs = 129, 143; 25 states; 0 secs.
  # 68 eqns; total len: lhs, rhs = 364, 326; 28 states; 0 secs.
  # 77 eqns; total len: lhs, rhs = 918, 486; 45 states; 0 secs.
  # 91 eqns; total len: lhs, rhs = 728, 683; 58 states; 0 secs.
  # 102 eqns; total len: lhs, rhs = 1385, 1479; 89 states; 0 secs.
  . . . .
  # 310 eqns; total len: lhs, rhs = 4095, 4313; 489 states; 1 secs.
  # 200 eqns; total len: lhs, rhs = 2214, 2433; 292 states; 1 secs.
  # 194 eqns; total len: lhs, rhs = 835, 922; 204 states; 1 secs.
  # 157 eqns; total len: lhs, rhs = 702, 723; 126 states; 1 secs.
  # 151 eqns; total len: lhs, rhs = 553, 444; 107 states; 1 secs.
  # 101 eqns; total len: lhs, rhs = 204, 236; 19 states; 1 secs.
  #No new eqns for some time - testing for confluence
  #System is not confluent.
  # 172 eqns; total len: lhs, rhs = 616, 473; 156 states; 1 secs.
  # 171 eqns; total len: lhs, rhs = 606, 472; 156 states; 1 secs.
  #No new eqns for some time - testing for confluence
  #System is not confluent.
  # 151 eqns; total len: lhs, rhs = 452, 453; 92 states; 1 secs.
  # 151 eqns; total len: lhs, rhs = 452, 453; 92 states; 1 secs.
  #No new eqns for some time - testing for confluence
  #System is not confluent.
  # 101 eqns; total len: lhs, rhs = 200, 239; 15 states; 1 secs.
  # 101 eqns; total len: lhs, rhs = 200, 239; 15 states; 1 secs.
  #No new eqns for some time - testing for confluence
#System is confluent.
#Halting with 101 equations.
WARNING: The monoid defined by the presentation may have changed,
     since equations have been discarded.
     If you re-run, include the original equations.
  #Exit status is 0
#I  External Knuth-Bendix program complete.
#WARNING: Because of the control parameters you set, the system may
# not be confluent. Unbind the parameters and re-run KnuthBendix
# to check!
#I  System computed is NOT confluent.
false

Now it is essential to re-run with the maxstoredlen limit removed to check that the system really is confluent.


gap> Unbind( O.maxstoredlen );
gap> KnuthBendix( R );
  # 101 eqns; total len: lhs, rhs = 200, 239; 15 states; 0 secs.
  #No new eqns for some time - testing for confluence
#System is confluent.
#Halting with 101 equations.
#Exit status is 0
#I  External Knuth-Bendix program complete.
#I  System computed is confluent.
true

In fact, in this case, we did have a confluent set already.

Inspection of the confluent set now reveals it to be precisely a power-commutator presentation of a nilpotent group, and so we have proved that the group we started with really is nilpotent. Of course, this means also that it is equal to its largest nilpotent quotient, of which we already know the structure.

2.9-5 Example 5

Our final example illustrates the use of the AutomaticStructure command, which runs the automatic groups programs. The group has a balanced symmetrical presentation with 3 generators and 3 relators, and was originally proposed by Heineken as a possible example of a finite group with such a presentation. In fact, the AutomaticStructure (2.6-1) command proves it to be infinite.

This example is of intermediate difficulty, but there is no need to use any special options. It takes a few minutes to run on a WorkStation. It works better with the optional large parameter of AutomaticStructure set to true.

We will not attempt to explain all of the output in detail here; the interested user should consult the documentation for the stand-alone KBMag package. Roughly speaking, it first runs the Knuth-Bendix program, which does not halt with a confluent rewriting system, but is used instead to construct a word-difference finite state automaton. This in turn is used to construct the word-acceptor and multiplier automata for the group. Sometimes the initial constructions are incorrect, and part of the procedure consists in checking for this, and making corrections. In fact, in this example, the correct automata are considerably smaller than the ones first constructed. The final stage is to run an axiom-checking program, which essentially checks that the automata satisfy the group relations. If this completes successfully, then the correctness of the automata has been proved, and they can be used for correct word-reduction and enumeration in the group.


gap> F := FreeGroup( "a", "b", "c" );;
gap> a := F.1;;  b := F.2;;  c := F.3;;
gap> G := F/[Comm(a,Comm(a,b))*c^-1, Comm(b,Comm(b,c))*a^-1,
>            Comm(c,Comm(c,a))*b^-1];;
gap> R := KBMAGRewritingSystem( G );
rec(
       isRWS := true,
     verbose := true,
  generatorOrder := [_g1,_g2,_g3,_g4,_g5,_g6],
    inverses := [_g2,_g1,_g4,_g3,_g6,_g5],
    ordering := "shortlex",
   equations := [
     [_g2*_g4*_g2*_g3*_g1,_g5*_g4*_g2*_g3],
     [_g4*_g6*_g4*_g5*_g3,_g1*_g6*_g4*_g5],
     [_g6*_g2*_g6*_g1*_g5,_g3*_g2*_g6*_g1]
   ]
)
gap> SetInfoLevel( InfoRWS, 1 );
gap> AutomaticStructure( R, true );
#I  Calling external automatic groups program.
#Running Knuth-Bendix Program
 (pathname)/kbprog -mt 20 -hf 100 -cn 0 -wd -me 262144 -t 500 (filename)
#Halting with 42317 equations.
#First word-difference machine with 271 states computed.
#Second word-difference machine with 271 states computed.
#System is confluent, or halting factor condition holds.

#Running program to construct word-acceptor and multiplier automata
 (pathname)/gpmakefsa -l (filename)
#Word-acceptor with 1106 states computed.
#General multiplier with 2428 states computed.
#Validity test on general multiplier succeeded.
#Running program to verify axioms on the automatic structure
 (pathname)/gpaxioms -l (filename)
#General length-2 multiplier with 2820 states computed.
#Checking inverse and short relations.
#Checking relation:  _g2*_g4*_g2*_g3*_g1 = _g5*_g4*_g2*_g3
#Checking relation:  _g4*_g6*_g4*_g5*_g3 = _g1*_g6*_g4*_g5
#Checking relation:  _g6*_g2*_g6*_g1*_g5 = _g3*_g2*_g6*_g1
#Axiom checking succeeded.
#I  Computation was successful - automatic structure computed.
#Minimal reducible word acceptor with 1058 states computed.
#Minimal Knuth-Bendix equation fsa with 1891 states computed.
#Correct diff1 fsa with 271 states computed.
#Correct diff2 fsa with 271 states computed.
true

gap> Size( R );
infinity
gap> Order( R, a );
infinity
gap> Order( R, Comm(a,b) );
infinity

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 Bib Ind

generated by GAPDoc2HTML