This section describes the operations and functions available for algebra elements.
Note that algebra elements may exist independently of an algebra, e.g., you can write down two matrices and compute their sum and product without ever defining an algebra that contains them.
Comparisons of Algebra Elements
g = h
:true
if the algebra elements g
and h are equal and to false
otherwise.
g < h
:true
if the algebra elements g and h are not equal
and to false
otherwise.
g < h
g <= h
g = h
g h
The operators <
, <=
, =
and evaluate to
true
if the algebra
element g is strictly less than, less than or equal to, greater than or
equal to and strictly greater than the algebra element h. There is no
general ordering on all algebra elements, so g and h should lie in
the same parent algebra. Note that for elements of finitely presented
algebra, comparison means comparison with respect to the underlying free
algebra (see Elements of Finitely Presented Algebras).
Arithmetic Operations for Algebra Elements
a * b
a + b
a - b
The operators *
, +
and -
evaluate to the product, sum and difference
of the two algebra elements a and b. The operands must of course
lie in a common parent algebra, otherwise an error is signalled.
a / c
returns the quotient of the algebra element a by the nonzero element c of the base field of the algebra.
a ^ i
returns the i-th power of an algebra element a and a positive integer i. If i is zero or negative, perhaps the result is not defined, or not contained in the algebra generated by a.
list + a
a + list
list * a
a * list
In this form the operators +
and *
return a new list where each entry
is the sum resp. product of a and the corresponding entry of list.
Of course addition resp. multiplication must be defined between a and
each entry of list.
GAP 3.4.4