The following property tests (cf. Properties and Property Tests) are available for algebras.
IsAbelian( A )
:true
if the algebra A is abelian and false
otherwise.
An algebra A is abelian if and only if for every a, b in <A>
the equation a* b = b* a holds.
IsCentral( A, U )
:true
if the algebra A centralizes the algebra U and
false
otherwise.
An algebra A centralizes an algebra U if and only if for all
a in <A> and for all u in <U> the equation a* u = u* a holds.
Note that U need not to be a subalgebra of A but they must have
a common parent algebra.
IsFinite( A )
:true
if the algebra A is finite, and false
otherwise.
IsTrivial( A )
:true
if the algebra A consists only of the zero element,
and false
otherwise. If A is a unital algebra it is of course
never trivial.
All tests expect a parent algebra or subalgebra and return true
if the
algebra has the property and false
otherwise. Some functions may not
terminate if the given algebra has an infinite set of elements.
A warning may be printed in such cases.
gap> IsAbelian( FreeAlgebra( GF(2), 2 ) ); false gap> a:= UnitalAlgebra( Rationals, [ [ [ 1, 0 ], [ 0, 0 ] ] ] ); UnitalAlgebra( Rationals, [ [ [ 1, 0 ], [ 0, 0 ] ] ] ) gap> a.name:= "a";; gap> s1:= Subalgebra( a, [ One(a) ] ); Subalgebra( a, [ [ [ 1, 0 ], [ 0, 1 ] ] ] ) gap> IsCentral( a, s1 ); IsFinite( s1 ); true false gap> s2:= Subalgebra( a, [] ); Subalgebra( a, [ ] ) gap> IsFinite( s2 ); IsTrivial( s2 ); true true
GAP 3.4.4