Unless otherwise stated, the operations in this section apply to fp-abelian groups and generic abelian groups.
Given an abelian group A with generators e1, ..., er and a sequence Q = [a1, ..., ar] of integers, construct the element a1 e1 + ... + ar er of A.
Given a generic abelian group A and an element e of the domain over which it is defined, return e as an element of A. If A is a proper subset of its underlying domain, then e must be a linear combination of the generators (which may be user-supplied) of A.
Given a generic abelian group A and an element g of the underlying set X of A, return g as an element of A.
Given an abelian group A with exactly one generator x, construct the element n x.
Given either a finite fp-abelian group or a generic abelian group A, return a random element of A.
Construct the identity element (empty word) for the abelian group A.Let A be a generic abelian group defined in the universe U of A. If g is an element of A, then U!g is an element of U.
An element g of an abelian group A can be represented as a linear combination with respect to a given generating sequence. The coefficients appearing in this linear combination provide an alternative representation for g. If A is a fp-group, the generating set will be the one on which the group was defined. In the case of a generic group, the generating set can either be that obtained when constructing a presentation for A or a user-supplied generating set.
Let A be an abelian group with generating set e1, ..., en and suppose g is an element of A, where g = a1 e1 + ... + an en. These functions return the sequence Q of n integers defined by Q[i] = (ai), for i = 1, ..., n. Moreover, each ai, i = 1, ..., n, is the integer residue modulus the order of the ith generator.
Let A be a generic abelian group with a user-supplied set of generators u1, ..., un and suppose g is an element of A, where g = a1 u1 + ... + an un. This function returns the sequence Q of n integers defined by Q[i] = (ai), for i = 1, ..., n. Moreover, each ai, i = 1, ..., n, is the integer residue modulus the order of the ith generator.
Let A be a generic abelian group and let S = [s1, ..., sm] be any sequence of elements of A. Assume g is an element of A such that b g = a1 s1 + ... + am sm. This function returns as its first value the sequence Q of m integers defined by Q[i] = (ai), for i = 1, ..., m. The second value returned is the coefficient b of g. Note that b might not be 1.
> Generators(QF); [ <2,2,500001>, <206,-102,4867> ] > g := QF ! [5, 6]; > g; <837,-766,1370> > Representation(g); [ 1, 6 ] > > g := Random(QF); > Representation(g); [ 1, 270 ] > > UserRepresentation(g); [ 377, 0, 515, 0, 0, 0, 0, 0, 0, 0 ] > > S := []; > for i in [1..3] do > d := Random(QF); > Include(~S, d); > end for; > seq, coeff := Representation(S, g); > seq; coeff; [ -170, -3, 0 ] 1
If the generic abelian group A has been constructed with the flag UseRepresentation set true, then arithmetic with elements of A is trivial.
Given elements u and v belonging to the same abelian group A, return the sum of u and v.
The inverse of element u.
Given elements u and v belonging to the same abelian group A, return the sum of u and the inverse of v.
Given an integer m, return the element w + w + ... w (|m| summands), where w = u, if m is positive and w = - u if m is negative.