Construct the free group F of rank n, where n is a positive integer.The i-th generator of F may be referenced by the expression F.i, i = 1, ..., n. Note that a special form of the assignment statement is provided which enables the user to assign names to the generators of F. In this form of assignment, the list of generator names is enclosed within angle brackets and appended to the variable name on the left hand side of the assignment statement: F< v_1, ..., v_n > := FreeGroup(n);
> F := FreeGroup(2);creates the free group of rank 2. Here the generators may be referenced using the standard names, F.1 and F.2.
The statement
> F<x, y> := FreeGroup(2);defines F to be the free group of rank 2 and assigns the names x and y to the two generators.
The operations in this section apply to both, free groups and arbitrary fp-groups.
Given a group G defined on r generators and a sequence [i_1, ..., i_s] of integers lying in the range [ - r, r], excluding 0, construct the word G.|i_1|^(epsilon_1) * G.|i_2|^(epsilon_2) * ... * G.|i_s|^(epsilon_s) where epsilon_j is +1 if i_j is positive, and -1 if i_j is negative.
Construct the identity element, represented as the empty word, for the fp-group G. For a sample application of this function, see Example H26E3.
A random word of length l in the generators of the group G, where m <= l <= n. For a sample application of this function, see Example H26E3.
This section describes some basic access functions for words. These operations apply to both, free groups and arbitrary fp-groups.
The length of the word w.
The sequence Q obtained by decomposing the word w into its constituent generators and generator inverses. Suppose w is a word in the group G. Then, if w = G.i_1^(e_1) ... G.i_m^(e_m), with each e_i equalling plus or minus 1, then Q[j] = i_j if e_j = + 1 and Q[j] = - i_j if e_j = (-1), for j = 1, ..., m.
Given a word w, and the name of a generator x of a group G, compute the sum of the exponents of the generator x in the word w. For a sample application of this function, see Example H26E3.
Suppose w is a word belonging to a group G. Assume x is the name of the i-th generator of G. Then
- (i)
- if w = Identity(G), GeneratorNumber(w) is 0;
- (ii)
- if w = x * w', w' a word in G, GeneratorNumber(w) is i;
- (iii)
- if w = x^(-1) * w', w' a word in G, GeneratorNumber(w) is -i.
Suppose w is a word belonging to a group G. If w = x^epsilon * w', w' a word in G, x a generator of G and epsilon in {-1, + 1}, the functions returns x^epsilon. If w= Identity(G), it returns Identity(G). For a sample application of this function, see Example H26E3.
The parent group G of the word w.
> F<u,v,w,x,y,z> := FreeGroup(6);and the sequence of words
> rels := [ (u*v)^42, (v,x), (x*z^2)^4, > v^2*y^3, (v*z)^3, y^4, (x*z)^3 ];The abelianised relation matrix of the quotient < u, v, w, x, y, z | (uv)^(42), (v, x), (xz^2)^4, v^2y^3, (vz)^3, y^4, (xz)^3 > can be obtained using the following construction
> R := Matrix(Integers(), > [ [ Weight(r, F.j) : j in [1..6] ] : r in rels ]); > R; [42 42 0 0 0 0] [ 0 0 0 0 0 0] [ 0 0 0 4 0 8] [ 0 2 0 0 3 0] [ 0 3 0 0 0 3] [ 0 0 0 0 4 0] [ 0 0 0 3 0 3](The function Matrix constructs a matrix from a sequence of row vectors.)
Suppose G is an fp-group for which generators have already been defined. This subsection defines the elementary arithmetic operations on words that are derived from the multiplication and inversion operators. The availability of the operators defined here enables the user to construct an element (word) of G in terms of the generators as follows:
Given words u and v belonging to the same fp-group G, return the product of u and v.
The n-th power of the word u, where n is an integer. When invoked with n = (-1), the function computes the inverse of u. When invoked with n = 0, the function returns the identity element.
Given words u and v belonging to the same fp-group G, return the conjugate v^(-1) * u * v of the word u by the word v.
Given words u and v belonging to the same fp-group G, return the commutator u^(-1)v^(-1)uv of the words u and v.
Given the n words u_1, ..., u_n belonging to the same fp-group G, return their commutator. Commutators are left-normed, so that they are evaluated from left to right.
Words in an fp-group may be compared both for equality and for their relationship with respect to a natural lexicographic ordering. It should be noted that even when a pair of words belong to a group defined by non-trivial relations, only the free reductions of the words are compared. Thus, a pair of words belonging to a group G may be declared to be distinct even though they may represent the same element of G.
The words of an fp-group G are ordered first by length and then lexicographically. The lexicographic ordering is determined by the following ordering on the generators and their inverses: G.1 < G.1^(-1) < G.2 < G.2^(-1) < ... Here, u and v are words belonging to some common fp-group.
Return true if the free reductions of the words u and v are identical.
Return true if the free reductions of the words u and v are not identical.
Return true if the word u precedes the word v, with respect to the ordering defined above for elements of an fp-group. The words u and v are freely reduced before the comparison is made.
Return true if the word u either precedes, or is equal to, the word v, with respect to the ordering defined above for elements of an fp-group. The words u and v are freely reduced before the comparison is made.
Return true if the word u either follows, or is equal to, the word v, with respect to the ordering defined above for elements of an fp-group. The words u and v are freely reduced before the comparison is made.
Return true if the word u follows the word v, with respect to the ordering defined above for elements of an fp-group. The words u and v are freely reduced before the comparison is made.
We construct the free group on three generators and generate a random word w of length between 4 and 6.
> F<a,b,c> := FreeGroup(3); > > w := Random(F, 4, 6); > w; b^-1 * a^-1 * b^2 * a^-1We print the length of w and the weight (the exponent sum) of generator a in w.
> #w; 5 > > Weight(w, a); -2We now strip the generators from w one by one, using arithmetic and comparison operators for words and the access function LeadingGenerator.
> while w ne Identity(F) do > g := LeadingGenerator(w); > print g; > w := g^-1 * w; > end while; b^-1 a^-1 b b a^-1
A relation is an equality between two words in a fp-group. To facilitate working with relations, a relation type is provided.
Given words w_1 and w_2 over the generators of an fp-group G, create the relation w_1 = w_2. Note that this relation is not automatically added to the existing set of defining relations R for G. It may be added to R, for example, through use of the quo-constructor (see below).
Given a relation r over the generators of G, return the left hand side of the relation r. The object returned is a word over the generators of G.
Given a relation r over the generators of G, return the right hand side of the relation r. The object returned is a word over the generators of G.
Redefine the left hand side of the relation r to be the word w.
Redefine the right hand side of the relation r to be the word w.
Given a homomorphism of the group G for which r is a relation, return the image of r under f.
Group over which the relation r is taken.
> F<x, y> := FreeGroup(2);
> rels := { x^2 = y^3, (x*y)^4 = Id(F) } ;
To replace one side of a relation, the easiest way is to reassign the relation. So for example, to replace the relation x^2=y^3 by x^2=y^4, we go:
> r := x^2 = y^3; > r := LHS(r) = y^4;