Zero and One of Finitely Presented Algebras
A finitely presented algebra A contains a zero element A.zero
.
If the number of generators of A is not zero, the multiplicative neutral
element of A is A.one
, which is the zero-th power of any nonzero
element of A.
Comparisons of Elements of Finitely Presented Algebras
x = y
x < y
Elements of the same algebra can be compared in order to form sets. Note that probably it will be necessary to compute an isomorphic matrix representation in order to decide equality if x and y are not elements of a free algebra.
gap> a:= FreeAlgebra( Rationals, 1 );; gap> a:= a / [ a.1^2 - a.one ]; UnitalAlgebra( Rationals, [ a.1 ] ) gap> [ a.1^3 = a.1, a.1^3 > a.1, a.1 > a.one, a.zero > a.one ]; [ true, false, false, false ]
Arithmetic Operations for Elements of Finitely Presented Algebras
x + y
x - y
x * y
x ^ n
x / c
The usual arithmetical operations for ring elements apply to elements of
finitely presented algebras. Exponentiation ^
can be used to raise
an element x to the n-th power. Division /
is only defined for
denominators in the base field of the algebra.
gap> a:= FreeAlgebra( Rationals, 2 );; gap> x:= a.1 - a.2; a.1+-1*a.2 gap> x^2; a.1^2+-1*a.1*a.2+-1*a.2*a.1+a.2^2 gap> y:= 4 * x - a.1; 3*a.1+-4*a.2 gap> y^2; 9*a.1^2+-12*a.1*a.2+-12*a.2*a.1+16*a.2^2
IsFpAlgebraElement( obj )
returns true
if obj is an element of a finitely presented algebra,
and false
otherwise.
gap> IsFpAlgebraElement( a.zero ); true gap> IsFpAlgebraElement( a.field.zero ); false
FpAlgebraElement( A, coeff, words )
Elements of finitely presented algebras normally arise from arithmetical
operations. It is, however, possible to construct directly the element
of the finitely presented algebra A that is the sum of the words in the
list words, with coefficients given by the list coeff, by calling
FpAlgebraElement( A, coeff, words )
. Note that this function
does not check whether some of the words are equal, or whether all
coefficients are nonzero. So one should probably not use it.
gap> a; UnitalAlgebra( Rationals, [ a.1, a.2 ] ) gap> FpAlgebraElement( a, [ 1, 1 ], a.generators ); a.1+a.2 gap> FpAlgebraElement( a, [ 1, 1, 1 ], List( [ 1..3 ], i -> a.1^i ) ); a.1+a.1^2+a.1^3
GAP 3.4.4