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

fix a mutation/mutability problem in MTX.SubGModule #5477

Merged
merged 1 commit into from
Jul 25, 2023
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
2 changes: 1 addition & 1 deletion lib/meataxe.gi
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
if IsList(v) and Length(v)=0 then
return [];
elif IsMatrix(v) then
TriangulizeMat(v);
v:= TriangulizedMat(v);

Check warning on line 399 in lib/meataxe.gi

View check run for this annotation

Codecov / codecov/patch

lib/meataxe.gi#L399

Added line #L399 was not covered by tests
ans:=Filtered(v,x->not IsZero(x));
elif IsList(v) and IsVectorObj(v[1]) then
v:=TriangulizedMat(Matrix(F,v));
Expand Down
17 changes: 14 additions & 3 deletions tst/testinstall/meataxe.tst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#@local G,M,M2,M3,M4,M5,V,bf,bo,cf,homs,m,mat,qf,randM,res,sf,subs,mats,Q
#@local G,M,M2,M3,M4,M5,V,bf,bo,cf,homs,m,mat,qf,randM,res,sf,subs,mats,Q,orig,S
gap> START_TEST("meataxe.tst");

#
Expand Down Expand Up @@ -184,6 +184,17 @@ gap> Display(res[5]);
. . . . 1 .
. . . . . 1

#
gap> G:= SymmetricGroup(3);;
gap> M:= PermutationGModule( G, GF(2) );;
gap> mat:= [ [ 1, 1, 1 ], [ 0, 1, 1 ] ] * Z(2);;
gap> orig:= Immutable( mat );;
gap> S:= MTX.SubGModule( M, mat );;
gap> mat = orig; # the function call must not change the 2nd argument
true
gap> S = MTX.SubGModule( M, orig ); # 2nd argument may be immutable
true

#
# Tests for MTX.InvariantQuadraticForm and MTX.OrthogonalSign
# (the documentation is a bit unorthodox)
Expand Down Expand Up @@ -231,8 +242,8 @@ gap> Q:= MTX.InvariantQuadraticForm( m );
fail
gap> MTX.OrthogonalSign( m );
fail
gap> g:= SU(4, 3);;
gap> m:= GModuleByMats( GeneratorsOfGroup( g ), GF(9) );;
gap> G:= SU(4, 3);;
gap> m:= GModuleByMats( GeneratorsOfGroup( G ), GF(9) );;
gap> MTX.InvariantBilinearForm( m );
fail
gap> MTX.InvariantQuadraticForm( m );
Expand Down