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.
w_1 = w_2 : GrpAbElt, GrpAbElt -> Rel
Given words w_1 and w_2 over the generators of an abelian group A, create the relation w_1 = w_2. Note that this relation is not automatically added to the existing set of defining relations R for S. It may be added to R, for example, through use of the quo-constructor (see below).
Given a relation r over the generators of A, return the left hand side of the relation r. The object returned is a word over the generators of A.
Given a relation r over the generators of A, return the right hand side of the relation r. The object returned is a word over the generators of A.
Group over which the relation r is taken.
> F<x, y> := FreeAbelianGroup(2);
> rels := { 2*x = 3*y, 4*x + 4*y = Id(F) } ;
To replace one side of a relation, the easiest way is to reassign the relation. So for example, to replace the relation 2 x = 3 y by 2 x = 4 y, we go:
> r := 2*x = 3*y;
> r := LHS(r) = 4*y;