Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admit non-fields as left acting domains for free (associative or Lie) algebras, and fix the zero-dimensional case #4245

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/algebra.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3381,8 +3381,8 @@ BindGlobal( "FreeAlgebraConstructor", function( name, magma )
od;
x := Zero(R);
y := [One(R)];
return VectorSpace(R, List(B[degree+1],
p->ElementOfMagmaRing( F, x, y, [p] )));
return FreeLeftModule(R, List(B[degree+1],
p->ElementOfMagmaRing( F, x, y, [p] )), Zero(A));
end));

# Return the result.
Expand Down
5 changes: 3 additions & 2 deletions lib/alglie.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3752,8 +3752,9 @@ InstallGlobalFunction( FreeLieAlgebra, function( arg )
od; od;
od;
od;
return VectorSpace( R, List( B[degree],
p->ElementOfMagmaRing( F, zero, [ one ], [ p[3] ] )));
if degree<1 then B := []; else B := B[degree]; fi;
return FreeLeftModule( R, List( B,
p->ElementOfMagmaRing( F, zero, [ one ], [ p[3] ] )), Zero(L));
end) );
# Return the ring.
return L;
Expand Down
13 changes: 13 additions & 0 deletions tst/testbugfix/2021-02-04-zero-dim-hom_components.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# zero-dimensional hom_components #4245
gap> l := FreeLieAlgebra(Integers,1);
<free left module over Integers, and ring, with 1 generators>
gap> List([0..2],Grading(l).hom_components);
[ <free left module over Integers, with 0 generators>,
<free left module over Integers, with 1 generators>,
<free left module over Integers, with 0 generators> ]
gap> a := FreeAssociativeAlgebra(Integers,2);
<free left module over Integers, and ring, with 2 generators>
gap> List([0..2],Grading(a).hom_components);
[ <free left module over Integers, with 0 generators>,
<free left module over Integers, with 2 generators>,
<free left module over Integers, with 4 generators> ]