Let A be a generic abelian group defined over U (Universe(U)). Then an element e of U (Universe(U)) is an element of A if and only if e can be expressed as a linear combination of the generators of A. If A is not a proper subset of U (Universe(U)), then naturally, any element of U (Universe(U)) is an element of A.
Given an 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 not a proper subset of its underlying domain, then this always succeeds. 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 an abelian group A and an element g of A or of a subgroup of A, return g.
Given a generic abelian group A with generators e_1, ..., e_n and a sequence Q = [a_1, ..., a_n] of integers, construct the element a_1 e_1 + ... + a_n e_n of A. The length of the sequence must equal the number of generators of A. Here we understand e_1, ..., e_n to be the reduced set of generators of A obtained when computing the structure of A.
Construct the identity element for the abelian group A.
Return a random element of A.
Let A be a generic abelian group defined over U (Universe(U)). If g is an element of A, then U!g (or Universe(U)!g is an element of U (Universe(U)).
An element of a generic abelian group A can be represented by a sequence of integers giving the coefficients of its linear combination of a given set S of elements of A. This S can be the reduced set of generators of A as obtained from the group structure computation. But S can also be the user-supplied set of generators, or any user-specified set of elements of A.
The algorithm which computes the representation of an element is the same as the one used to compute the structure of a group from a set of generators.
Let A be a generic abelian group with the reduced set of generators e_1, ..., e_n and suppose g is an element of A, where g = a_1 e_1 + ... + a_n e_n. These functions return the sequence Q of n integers defined by Q[i] = (a_i), for i = 1, ..., n. Moreover, each a_i, 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 u_1, ..., u_n and suppose g is an element of A, where g = a_1 u_1 + ... + a_n u_n. These functions return the sequence Q of n integers defined by Q[i] = (a_i), for i = 1, ..., n. Moreover, each a_i, i = 1, ..., n, is the integer residue modulus the order of the ith generator.
Let A be a generic abelian group and let S = [s_1, ..., s_m] be any sequence of elements of A. Assume g is an element of A such that b g = a_1 s_1 + ... + a_m s_m. This function returns as its first value the sequence Q of m integers defined by Q[i] = (a_i), for i = 1, ..., m. The second value returned is the coefficient b of g. Note that b might not be 1.
> Generators(GA_Zm); [ 30087, 17191, 29489, 9155 ] > g := GA_Zm ! [1, 4, -9, 0]; > g; 4913 > Representation(g); [ 1, 0, 3, 0 ] > g := Random(GA_Zm); > Representation(g); [ 1, 1, 3, 346 ] > > S := []; > for i in [1..2] do > d := Random(GA_Zm); > Include(~S, d); > end for; > seq, coeff := Representation(S, g); > seq; coeff; [ -4, -56 ] 6Next, for GA_(qf):
> Generators(GA_qf); [ <2,2,500001>, <206,-102,4867> ] > g := GA_qf ! [5, 6]; > g; <837,-766,1370> > Representation(g); [ 1, 6 ] > > g := Random(GA_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(GA_qf); > Include(~S, d); > end for; > seq, coeff := Representation(S, g); > seq; coeff; [ -170, -3, 0 ] 1