Skip to content

Commit

Permalink
feat: Add IsFPFInduced properties (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
limakzi authored Sep 5, 2024
1 parent ec2ea79 commit f21bc56
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/properties.gd
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,32 @@ DeclareProperty( "IsRightCancellative", IsMagma );
#! @EndExampleSession
#!
DeclareProperty( "IsCancellative", IsMagma );

#! @Arguments M
#! @Description
#! is a left-hand sided fixed-point free inducted <A>m</A>.
#!
#! @BeginExampleSession
#! gap> Display( MultiplicationTable( SmallAntimagma(2, 2) ) );
#! [ [ 2, 2 ],
#! [ 1, 1 ] ]
#! gap> IsLeftFPFInducted( SmallAntimagma(2, 2) );
#! true
#! @EndExampleSession
#!
DeclareProperty( "IsLeftFPFInducted", IsMagma );

#! @Arguments M
#! @Description
#! is a right-hand sided fixed-point free inducted <A>m</A>.
#!
#! @BeginExampleSession
#! gap> Display( MultiplicationTable( SmallAntimagma(2, 1) ) );
#! [ [ 2, 1 ],
#! [ 2, 1 ] ]
#! gap> IsRightFPFInducted( SmallAntimagma(2, 1) );
#! true
#! @EndExampleSession
#!
#!
DeclareProperty( "IsRightFPFInducted", IsMagma );
12 changes: 12 additions & 0 deletions lib/properties.gi
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ InstallGlobalFunction(MagmaIsomorphismInvariantsMatch,
Size,
IsLeftCancellative,
IsRightCancellative,
IsLeftFPFInducted,
IsRightFPFInducted,
CommutativityIndex,
AnticommutativityIndex,
SquaresIndex,
Expand Down Expand Up @@ -230,4 +232,14 @@ end);
InstallMethod(IsCancellative, "for a magma", [IsMagma],
function(M)
return IsLeftCancellative(M) and IsRightCancellative(M);
end);

InstallMethod(IsLeftFPFInducted, "for a magma", [IsMagma],
function(M)
return ForAll(M, m -> Size( Unique( m * Elements(M) ) ) = 1 and First( Unique( m * Elements(M) ) ) <> m);
end);

InstallMethod(IsRightFPFInducted, "for a magma", [IsMagma],
function(M)
return ForAll(M, m -> Size( Unique( Elements(M) * m ) ) = 1 and First( Unique( Elements(M) * m ) ) <> m);
end);
19 changes: 19 additions & 0 deletions tst/test_properties_magma_isfpf.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
gap> START_TEST( "test_properties_magma_isfpf.tst" );

gap> M := MagmaByMultiplicationTable([ [1, 1], [2, 2] ] );;
gap> IsLeftFPFInducted(MagmaByMultiplicationTable([ [1, 1], [2, 2] ] ));
false
gap> IsRightFPFInducted(MagmaByMultiplicationTable([ [1, 1], [2, 2] ] ));
false

gap> M := SmallAntimagma(2, 1);
<magma with 2 generators>
gap> IsLeftFPFInducted( M );
false
gap> IsRightFPFInducted( M );
true

gap> Filtered( Filtered(AllSmallAntimagmas([2 .. 3]), M -> IsLeftFPFInducted(M)), M -> IsRightFPFInducted(M) );
[ ]

gap> STOP_TEST( "test_properties_magma_isfpf.tst" );

0 comments on commit f21bc56

Please sign in to comment.