Skip to content

Commit

Permalink
Fix for computing quotients of certain algebra modules
Browse files Browse the repository at this point in the history
The issue was originally reported by Rudolf Tange on the GAP
support mailing list.
  • Loading branch information
fingolfin committed Sep 5, 2017
1 parent 4cc13d3 commit cad8d1e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/algrep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3177,6 +3177,19 @@ InstallMethod( Coefficients,
end );


#############################################################################
##
#M \in( <V>, <v> )
##
InstallMethod( \in,
"for vector and a sparse rowspace",
IsElmsColls,
[ IsSparseRowSpaceElement, IsFreeLeftModule and IsSparseRowSpaceElementCollection ],
function( v, V )
return Coefficients(Basis(V),v) <> fail;
end );


#############################################################################
##
#M FullSparseRowSpace( <F>, <n> ) . . . . . . for a ring and an integer
Expand Down
19 changes: 19 additions & 0 deletions tst/testinstall/algrep.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
gap> START_TEST("algrep.tst");

#
gap> L:=FullMatrixLieAlgebra(GF(5),2);
<Lie algebra over GF(5), with 3 generators>
gap> V:=AdjointModule(L);
<left-module over <Lie algebra over GF(5), with 3 generators>>
gap> s:=List([0..3],r->SymmetricPowerOfAlgebraModule(V,r));;
gap> V:=DirectSumOfAlgebraModules(s);
<35-dimensional left-module over <Lie algebra over GF(5), with 3 generators>>
gap> BV:=Basis(V);;
gap> lst:=[BV[5]];;
gap> W:=SubAlgebraModule(V,lst,"basis");
<1-dimensional left-module over <Lie algebra over GF(5), with 3 generators>>
gap> V/W;
<34-dimensional left-module over <Lie algebra over GF(5), with 3 generators>>

#
gap> STOP_TEST( "algrep.tst", 1);

0 comments on commit cad8d1e

Please sign in to comment.