[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Low Level Operations on Presentations and Words

In this section, we describe some rather low level operations on presentations and on elements of fp-groups. The main purpose of the functions described here, is to provide some efficient machinery for manipulating presentations and elements of fp-groups for user written functions.

Subsections

Modifying Presentations

The functions described in this section construct a new fp-group from an existing one by adding or deleting a generator or by adding, deleting or changing a relation. The new group is created without any relationship to the existing group.

AddGenerator(G) : GrpFP -> GrpFP
Given an fp-group G with presentation < X | R >, create a new fp-group with presentation < X ∪{ z } | R >, where z is a symbol not in X.
AddGenerator(G, w) : GrpFP, GrpFPElt -> GrpFP
Given an fp-group G with presentation < X | R >, and given also a word w in the generators X, create a new fp-group having the presentation < X ∪{ z } | R ∪{ z = w } >, where z is a symbol not in X.
AddRelation(G, r) : GrpFP, RelElt -> GrpFP
Given an fp-group G, and a relation r on the generators of G, create a new fp-group whose presentation consists of the relations of G together with the relation r.
AddRelation(G, g) : GrpFP, GrpFPElt -> GrpFP
Given an fp-group G, and an element g of G, create a new fp-group whose presentation consists of the relations of G together with the relation g=( Id)(G).
AddRelation(G, r, i) : GrpFP, RelElt, RngIntElt -> GrpFP
Given an fp-group G, and a relation r on the generators of G, create a new fp-group which has as its presentation the relations of G together with the relation r inserted after the i-th existing relation of G.
AddRelation(G, g, i) : GrpFP, GrpFPElt, RngIntElt -> GrpFP
Given an fp-group G, and an element g of G, create a new fp-group which has as its presentation the relations of G together with the relation g=( Id)(G) inserted after the i-th existing relation of G.
DeleteGenerator(G, x) : GrpFP, GrpFPElt -> GrpFP
Given an fp-group G with presentation < X | R >, and given also an element z in X, create a new fp-group with presentation < X - {z} | R' >, where the relations R' are obtained from R by deleting all relations containing an occurrence of z.
DeleteRelation(G, r) : GrpFP, RelElt -> GrpFP
Given an fp-group G, which includes the relation r amongst its relations, create a new fp-group which has as its presentation the relations of G with relation r omitted.
DeleteRelation(G, g) : GrpFP, GrpFPElt -> GrpFP
Given an fp-group G, which includes the relation g=( Id)(G) amongst its relations, create a new fp-group which has as its presentation the relations of G with this relation omitted.
DeleteRelation(G, i) : GrpFP, RngIntElt -> GrpFP
Given an fp-group G, create a new fp-group which has as its presentation the relations for G with the i-th relation deleted.
ReplaceRelation(G, s, r) : GrpFP, RelElt, RelElt -> GrpFP
ReplaceRelation(G, h, r) : GrpFP, GrpFPElt, RelElt -> GrpFP
ReplaceRelation(G, s, g) : GrpFP, RelElt, GrpFPElt -> GrpFP
ReplaceRelation(G, h, g) : GrpFP, GrpFPElt, GrpFPElt -> GrpFP
Given an fp-group G, which includes the relation s or h=( Id)(G) amongst its relations, create a new fp-group which has as its presentation the relations for G with the relation s replaced by the relation r or g=( Id)(G).
ReplaceRelation(G, i, r) : GrpFP, RngIntElt, RelElt -> GrpFP
Given an fp-group G and a relation r in the generators of G, create a new fp-group which has as its presentation the relations for G with relation number i replaced by the relation r.
ReplaceRelation(G, i, g) : GrpFP, RngIntElt, GrpFPElt -> GrpFP
Given an fp-group G and an element g of G, create a new fp-group which has as its presentation the relations for G with relation number i replaced by the relation g=( Id)(G).

Example GrpFP_2_Replace (H71E1)

We use the function ReplaceRelation to vary a particular relation in a presentation. The order of the resulting group together with the index of a particular subgroup is determined.

> G<x,y,z,h,k,a> := Group< x, y, z, h, k, a | 
>    x^2, y^2, z^2, (x,y), (y,z), (x,z), h^3, k^3, (h,k), 
>    (x,k), (y,k), (z,k), x^h*y, y^h*z, z^h*x, a^2, a*x*a*y,
>    a*y*a*x, (a,z), (a,k), (a*h)^2 >;
> for i := 0 to 1 do
>     for j := 0 to 1 do
>         for k := 0 to 1 do
>              for l := 0 to 2 do
>                 rel := G.1^i*G.2^j*G.3^k*G.5^l*(G.6*G.4)^2 = Id(G);
>                 K := ReplaceRelation(G, 21, rel);
>                 print Order(K), Index(K, sub< K | K.6, K.4>);
>             end for;
>         end for;
>     end for;
> end for;

<0, 0, 0, 0> 144 24
<0, 0, 0, 1> 144 8
<0, 0, 0, 2> 144 8
<0, 0, 1, 0> 18 3
<0, 0, 1, 1> 18 1
<0, 0, 1, 2> 18 1
<0, 1, 0, 0> 72 3
<0, 1, 0, 1> 72 1
<0, 1, 0, 2> 72 1
<0, 1, 1, 0> 36 6
<0, 1, 1, 1> 36 2
<0, 1, 1, 2> 36 2
<1, 0, 0, 0> 18 3
<1, 0, 0, 1> 18 1
<1, 0, 0, 2> 18 1
<1, 0, 1, 0> 144 6
<1, 0, 1, 1> 144 2
<1, 0, 1, 2> 144 2
<1, 1, 0, 0> 36 6
<1, 1, 0, 1> 36 2
<1, 1, 0, 2> 36 2
<1, 1, 1, 0> 72 12
<1, 1, 1, 1> 72 4
<1, 1, 1, 2> 72 4

Low Level Operations on Words

The functions described in this section perform low level string operations like substitution, elimination or substring matching on elements of fp-groups.

Eliminate(u, x, v) : GrpFPElt, GrpFPElt, GrpFPElt -> GrpFPElt
Given words u and v, and a generator x, all belonging to a group G, return the word obtained from u by replacing each occurrence of x by v and each occurrence of x - 1 by v - 1.
Eliminate(U, x, v) : { GrpFPElt }, GrpFPElt, GrpFPElt -> { GrpFPElt }
Given a set of words U, a word v, and a generator x, all belonging to a group G, return the set of words obtained by taking each element u of U in turn, and replacing each occurrence of x in u by v and each occurrence of x - 1 by v - 1.
Match(u, v, f) : GrpFPElt, GrpFPElt, RngIntElt -> BoolElt, RngIntElt
Suppose u and v are words belonging to the same group G, and that f is an integer such that 1 ≤f ≤# u. The function seeks the least integer l such that:
(a)
l≥f; and
(b)
v appears as a subword of u, starting at the l-th letter of u.

If such an integer l is found Match returns the value true and l. If no such l is found, Match returns the value false.
RotateWord(u, n) : GrpFPElt, RngIntElt -> GrpFPElt
The word obtained by cyclically permuting the word u by n places. If n is positive, the rotation is from left to right, while if n is negative the rotation is from right to left. In the case where n is zero, the function returns u.
Substitute(u, f, n, v) : GrpFPElt, RngIntElt, RngIntElt, GrpFPElt -> GrpFPElt
Given words u and v belonging to a group G, and non-negative integers f and n, this function replaces the substring of u of length n, starting at position f, by the word v. Thus, if u = xi1e1 ... xifef ... x_(if + n - 1)ef + n - 1 ... ximem then the substring xifef ... x_(if + n - 1)ef + n - 1 is replaced by v. If the function is invoked with v = Id(G), then the substring xifef ... x_(if + n - 1)ef + n - 1 of u is deleted.
Subword(u, f, n) : GrpFPElt, RngIntElt, RngIntElt -> GrpFPElt
The subword of the word u comprising the n consecutive letters commencing at the f-th letter of u.

Example GrpFP_2_WordOps (H71E2)

We demonstrate some of these operations in the context of the free group on generators x, y, and z.

> F<x, y, z> := FreeGroup(3);
> u := (x, y*z);
> w := u^(x^2*y);
> #w;
12
> w;
y^-1 * x^-3 * z^-1 * y^-1 * x * y * z * x^2 * y
We replace each occurrence of the generator x in w by the word y * z^ - 1.

> Eliminate(w, x, y*z^-1);
y^-1 * z * y^-1 * z * y^-1 * z * y^-1 * z^-2 * y * z * y * z^-1 * y * z^-1 * y
We count the number of occurrences of each generator in w.

> [ ExponentSum(w, F.i) : i in [1..Ngens(F)] ];
[ 0, 0, 0 ]
> GeneratorNumber(w);
-2
We locate the start of the word u in the word w.

> b, p := Match(w, u, 1);
> b, p;
true 4
We now replace the subword u in w by the word y * x.

> t := Substitute(w, p, #u, y*x);
> t;
y^-1 * x^-2 * y * x^3 * y
We create the set of all distinct cyclic permutations of the word u.

> rots := { RotateWord(u, i) : i in [1 ..#u] };
> rots;
{ y^-1 * x * y * z * x^-1 * z^-1,  x * y * z * x^-1 * z^-1 * y^-1, 
x^-1 * z^-1 * y^-1 * x * y * z,  z * x^-1 * z^-1 * y^-1 * x * y, 
z^-1 * y^-1 * x * y * z * x^-1,  y * z * x^-1 * z^-1 * y^-1 * x }

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]

Version: V2.19 of Mon Dec 17 14:40:36 EST 2012