Skip to content

Commit

Permalink
fix: Fix MagmaIsomorphism method (#19)
Browse files Browse the repository at this point in the history
* fix: Fix MagmaIsomorphism
  • Loading branch information
limakzi authored Jul 14, 2024
1 parent d2245b7 commit a7453af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils.gi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ InstallGlobalFunction(MagmaIsomorphism,
function(M, N)
local psi, n, p, m, elms;
if Size(M) <> Size(N) then
return false;
return fail;
fi;

n := Size(M);
Expand All @@ -46,7 +46,7 @@ InstallGlobalFunction(MagmaAntiisomorphism,
local psi, n, p, m, elms;

if Size(M) <> Size(N) then
return false;
return fail;
fi;

n := Size(M);
Expand Down
10 changes: 10 additions & 0 deletions tst/test_utils.tst
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,15 @@ gap> Filtered(AllSmallAntimagmas(2), M -> IsCancellative(M) );
gap> Filtered(AllSmallAntimagmas(3), M -> IsCancellative(M) );
[ ]

gap> Ms_2 := AllSmallAntimagmas(2);;

gap> Ms_3 := AllSmallAntimagmas(3);;

gap> List(Cartesian(Ms_2, Ms_3), M -> IsMagmaIsomorphic(M[1], M[2]));
[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ]

gap> List(Cartesian(Ms_2, Ms_3), M -> MagmaIsomorphism(M[1], M[2]));
[ fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail ]

gap> STOP_TEST( "test_utils.tst" );

0 comments on commit a7453af

Please sign in to comment.