Elements of a pc-group are written in terms of the generators. The pc-generators of a group G can always be written as G.1, G.2, ... . Any variables naming the generators, either assigned during the definition of the group, or later using standard assignment statements, can also be used to express the generators. An arbitrary element can be written as a word in the generators using the various element operations.
A word is defined inductively as follows:
It is also possible to create an element of a group G from its exponent vector. That is, the sequence [e1, e2, ..., en] corresponds to the element (G.1)e1 * (G.2)e2 * ... * (G.n)en. The coercion operator ! is used to convert the sequence to the element.
Given the pc-group G and a sequence Q of length n, containing the distinct positive integers (αi), 0≤(αi) < pi for i = 1, ..., n, construct the element x of G given by x = a1α1 ... anαn, 0 ≤αi < pi for i = 1, ..., n.
Given an element x belonging to the pc-group G, where x = a1α1 ... anαn, 0 ≤αi < pi for i = 1, ..., n, return the sequence Q of n integers defined by Q[i] = (αi), for i = 1, ..., n.
Construct the identity element of the pc-group G.
> G := PolycyclicGroup<a,b,c|a^3,b^2,c^2,b^a=c,c^a=b*c>; > G; GrpPC : G of order 12 = 2^2 * 3 PC-Relations: G.1^3 = Id(G), G.2^2 = Id(G), G.3^2 = Id(G), G.2^G.1 = G.3, G.3^G.1 = G.2 * G.3 > x := G.1^2*G.3; > x; G.1^2 * G.3 > x^2; G.1 * G.2 * G.3 > x^3; Id(G)Magma will print the element in normal form even if it is not entered that way.
> G.2*G.1; G.1 * G.3When coercing a sequence into a group element, the sequence is always interpreted as an exponent vector for a normal word.
> y := G![0,1,1]; > y; G.2 * G.3 > x*y; G.1^2 * G.2 > y*x; G.1^2 > (x,y); G.2An element can also be converted into a sequence.
> x^y; G.1^2 * G.2 * G.3 > Eltseq(x^y); [ 2, 1, 1 ]
New elements can be computed from existing elements using standard operations.
Product of the element g and the element h, where g and h belong to some common subgroup G of a pc-group U. If g and h are given as elements belonging to the same proper subgroup G of U, then the result will be returned as an element of G; if g and h are given as elements belonging to distinct subgroups H and K of U, then the product is returned as an element of G, where G is the smallest subgroup of U known to contain both elements.
Replace g with the product of element g and element h.
The n-th power of the element g, where n is a positive or negative integer.
Replace g with the n-th power of the element g.
Quotient of the element g by the element h, i.e. the element g * h - 1. Here g and h must belong to some common subgroup G of a pc-group U. The rules for determining the parent group of g/h are the same as for g * h.
Replace g with the quotient of the element g by the element h.
Conjugate of the element g by the element h, i.e. the element h - 1 * g * h. Here g and h must belong to some common subgroup G of a pc-group U. The rules for determining the parent group of gh are the same as for g * h.
Replace g with the conjugate of the element g by the element h.
Given the n words g1, ..., gn belonging to some common subgroup G of a pc-group U, return the commutator. If g1, ..., gn are given as elements belonging to the same proper subgroup G of U, then the result will be returned as an element of G; if g1, ..., gn are given as elements belonging to distinct subgroups of U, then the product is returned as an element of G, where G is the smallest subgroup of U known to contain all elements. Commutators are left-normed, so that they are evaluated from left to right.
Order of the element x.
The parent group G of the element x.
Elements in the same group can be compared using eq and ne.
Given elements g and h belonging to a common pc-group, return true if g and h are the same element, false otherwise.
Given elements g and h belonging to a common pc-group, return true if g and h are distinct elements, false otherwise.
Returns true if g is the identity element, false otherwise.
Given a group G and elements g and h belonging to G, return the value true if g and h are conjugate in G. The function also returns a second value in the event that the elements are conjugate: an element z such that gz=h.
> G<a,b,c> := PolycyclicGroup<a,b,c|a^3,b^2,c^2,b^a=c,c^a=b*c>; > b^a eq b; falseThe same information can also be obtained by checking the commutator.
> IsIdentity((b,a)); falseIf we assign the result of IsConjugate to a single variable, it will store the boolean result.
> r := IsConjugate(G, c, b); > r; trueIf we simply print IsConjugate, the boolean value and the conjugating element (if any) are displayed. On the other hand, using the multiple assignment, we can capture both of those values.
> IsConjugate(G, c, b); true a^2 > r, x := IsConjugate(G, c, b); > x, r; a^2 true > c^x; b
These functions allow one to work with the set of elements of G, possibly without much knowledge of the structure of G.
A bijective mapping from the group G onto the set of integers {1 ... |G|}. The actual mapping depends upon the current presentation for G.
An element, randomly chosen, from the group G. This function uses an entirely different procedure than that used by RandomProcess (see below). A group element is chosen with uniform probability by generating (pseudo-)random integers in the proper range to form a legal exponent vector for G. The corresponding element is returned. This is an extremely efficient process and is the recommended method for producing random elements of a pc-group.
Slots: RngIntElt Default: 10
Scramble: RngIntElt Default: 20
Create a process to generate randomly chosen elements from the group G. The process uses an `expansion' procedure to construct a set of elements corresponding to fairly long words in the generators of G. At all times, N elements are stored where N is the maximum of the specified value for Slots and Ngens(G) + 1. Initially, these are simply the generators of G and products of pairs of generators of G. Random elements are now produced by successive calls to Random(P), where P is the process created by this function. Each such call chooses an element x stored by the process and returns it, replacing x with the product of x and another random element (multiplied on the left or the right). Setting Scramble := m causes m such operations to be performed initially.
Given a random element process P created by the function RandomProcess(G) for the finite group G, construct a random element of G by forming a random product over the expanded generating set constructed when the process was created.
A representative element of G. For a pc-group, this always returns the identity element.
> G := DihedralGroup(GrpPC,4); > num_map := NumberingMap(G); > for x in G do > print x,"->",num_map(x); > end for; Id(G) -> 1 G.3 -> 2 G.2 -> 3 G.2 * G.3 -> 4 G.1 -> 5 G.1 * G.3 -> 6 G.1 * G.2 -> 7 G.1 * G.2 * G.3 -> 8The inverse map can be used to obtain the group element corresponding to a particular number.
> 6 @@ num_map; G.1 * G.3The Random function is sometimes useful to create a statistical profile of a group. To demonstrate, we take two groups of order 36 from the SmallGroup database.
> G1 := SmallGroup(3^6, 60); > G2 := SmallGroup(3^6, 392);We want to build a histogram of element orders for each group. Since these are 3-groups, each order will be a power of 3 and we use Ilog to get the exponent of the order. First, we define a short function to compute the histogram.
> function hist(G, trials) > // Given a 3-group G, of exponent <= 3^5, > // return a sequence whose ith term is the > // number of elements of order p^(i-1) out > // of trials randomly chosen elements. > table := [0,0,0,0,0,0]; > for i := 1 to trials do > x := Random(G); > n := Ilog(3, Order(x)); > table[n+1] +:= 1; > end for; > return table; > end function;Now, we use this function to compute order distributions for 100 elements in each group.
> t1 := hist(G1,100); > t1; [ 0, 0, 5, 28, 67, 0 ] > t2 := hist(G2,100); > t2; [ 0, 5, 5, 25, 65, 0 ]We can even display them with simple character graphics.
> for e in t1 do print ":","@"^e; end for; : : : @@@@@ : @@@@@@@@@@@@@@@@@@@@@@@@@@@@ : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ : > for e in t1 do print ":","@"^e; end for; : : @@@@@ : @@@@@ : @@@@@@@@@@@@@@@@@@@@@@@@@ : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ :
> set_product := func<G, H, K | { G | x * y : x in H, y in K }>;Given a subgroup H of the pc-group G, construct H as a set of elements of G.
> elements := func<G, H | { G | x : x in H }>;