Open olexandr-konovalov opened 1 year ago
There is nothing for determining commutativity of the crossed product in the Wedderga code for crossed product, except a comment and a commented out block of code: https://github.com/gap-packages/wedderga/blob/bd2837555a2442ca8a99cab16e84a191d8d8f796/lib/crossed.gi#L603-L606
It happens that the commutativity is determined elsewhere, namely in lib/magma.gd
:
gap> f:=ApplicableMethod(IsCommutative,[U]);
function( D ) ... end
gap> PageSource(f);
Showing source in /Users/obk1/gap/gap-4.12.2/lib/magma.gd (from line 1009)
## <C><A>GeneratorsOfStruct</A>( <A>D</A> )</C> commute.
## </Description>
## </ManSection>
##
BindGlobal( "IsCommutativeFromGenerators", function( GeneratorsStruct )
return function( D )
local gens, # list of generators
i, j; # loop variables
# Test if every element commutes with all the others.
gens:= GeneratorsStruct( D );
for i in [ 2 .. Length( gens ) ] do
for j in [ 1 .. i-1 ] do
if gens[i] * gens[j] <> gens[j] * gens[i] then
return false;
fi;
od;
od;
# All generators commute.
return true;
end;
end );
The fix is to install a proper method for IsCommutative
for objects in IsCrossedProduct
.
There is a problem with applying a function designed for algebras to one of the "crossed product algebras" produced by the "WedderburnDecomposition" function, because these crossed product algebras are not designed to be algebras in the usual sense. In wedderga, to get output that is a list of simple algebras over their centers, one should use "WedderburnDecompositionAsSCAlgebras". If they use this function they will get the answer they are expecting.
One way to decide if a crossed product is commutative is by comparing the center with the Leftactingdomain. The crossed product is commutative if and only if its center and its left acting domain coincide.
The fix is to install a proper method for
IsCommutative
for objects inIsCrossedProduct
.
I think that would just paper over a deeper (design?) issue with the code in question. Your code offers this:
gap> IsAlgebra(U);
true
gap> gens:=GeneratorsOfLeftOperatorRingWithOne(U);
[ (ZmodnZObj( 1, 4 ))*(1), (ZmodnZObj( 3, 4 ))*(1) ]
gap> a:=gens[1];; b:=gens[2];;
gap> a*b = b*a;
true
So U
is an algebra and it generators commute, and hence GAP decides it is commutative.
But it isn't, and the discrepancy is caused by GAP being mislead: U
isn't actually an algebra (in the sense GAP defines it): the GAP manual states:
An algebra is a vector space equipped with a bilinear map (multiplication).
But your multiplication is not bilinear in GAP's sense, otherwise these three products all would evaluate to the same result:
gap> E(4) * (b * a);
(ZmodnZObj( 3, 4 ))*(-E(4))
gap> (E(4) * b) * a;
(ZmodnZObj( 3, 4 ))*(-E(4))
gap> b * (E(4) * a);
(ZmodnZObj( 3, 4 ))*(E(4))
(There are other ways to define "bilinear" but in all definitions of "algebra over a field" I know, this one is used).
This definition ensures that "the non-commutativity is in the basis/generators", and not hidden in the interaction between scalars and generators as is the case here for the crossed products.
To fix this, you either need to rewrite this as an algebra over the rationals (of correspondingly higher dimension), or change the implementation to not imply IsAlgebra
.
Otherwise I am sure there are other algorithms that will return "wrong" results.
Reported by email by Rene Marczinzik. This calculation reports that
U
is commutative, while it is not: