Viewing monoid rings as rings with identity in GAP

46 Views Asked by At

I look at monoid algebra of finite monoids with GAP and want to force GAP to view them as algebras with one. But it seems it does not work:

LoadPackage("smallsemi");
n:=6;
W:=AllSmallSemigroups(n,IsMonoidAsSemigroup,true);
U:=W[2];
T:=FreeMagmaRing(Rationals,U);
TT:=AsAlgebraWithOne(Rationals,T);
HasIdentity(TT);

$T$ is the the free magma ring of the finite monoid $U$ and GAP does not seem to know that it has an identity. So I use the command AsAlgebraWithOne to make GAP realise that this algebra has an identity but I still get the output "fail".

Question: Is there an easy fix to make GAP view the algebra $T$ as an algebra with identity?

More generally, I want to use this command also to check whether a given finite semigroup algebra has an identity and then view the semigroup algebra as an algebra with identity.

1

There are 1 best solutions below

7
On BEST ANSWER

Actually already AsAlgebraWithOne returns fail here. This is a fundamental misunderstanding about what this command does.

Anyway, since your examples are tiny, one can simply achieve what you want by constructing an actual monoid (in the category of monoids, instead of the category of semigroups) as in this example.

Note that HasIdentity at first still returns false. This is because this function does not test whether an identity elements exists. Rather, it tests if a value for the Identity attribute of the algebra T exists (this attribute in turn is an alias for the One attribute). Thus after asking for One(T), the return value of HasOne changes to true -- because the explicit request for One(T) computed an identity element, which was cached.

Here is the example code

gap> M:=MonoidByMultiplicationTable(MultiplicationTable(U));
<monoid of size 6, with 6 generators>
gap> T:=FreeMagmaRing(Rationals,M);
<algebra-with-one over Rationals, with 6 generators>
gap> IsAlgebraWithOne(T);
true
gap> HasIdentity(T);
false
gap> HasOne(T);
false
gap> One(T);
(1)*m6
gap> HasOne(T);
true
gap> HasIdentity(T);
true