Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/gaplint-1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
limakzi authored Sep 5, 2024
2 parents 49ee3e5 + be8a516 commit bb7efb3
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
47 changes: 47 additions & 0 deletions lib/properties.gd
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,50 @@ 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 );

#! @Arguments M
#! @Description
#! is a left-alternatve magma <A>M</A>.
#!
#! @BeginExampleSession
#! @EndExampleSession
#!
DeclareProperty( "IsLeftAlternative", IsMagma );

#! @Arguments M
#! @Description
#! is a right-alternatve magma <A>M</A>.
#!
#! @BeginExampleSession
#! @EndExampleSession
#!
DeclareProperty( "IsRightAlternative", IsMagma );
22 changes: 22 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,24 @@ 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);

InstallMethod(IsLeftAlternative, "for a magma", [IsMagma],
function(M)
return ForAll(EnumeratorOfTuples(M, 2), c -> c[1] * ( c[1] * c[2] ) = ( c[1] * c[1] ) * c[2] );
end);

InstallMethod(IsRightAlternative, "for a magma", [IsMagma],
function(M)
return ForAll(EnumeratorOfTuples(M, 2), c -> c[1] * ( c[2] * c[2] ) = ( c[1] * c[2] ) * c[2] );
end);
19 changes: 19 additions & 0 deletions tst/test_properties_magma_ileftrightfpf.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
gap> START_TEST( "test_properties_magma_leftrightisfpf.tst" );

## fixed-point-free failes for operations with fixed points
gap> IsLeftFPFInducted(MagmaByMultiplicationTable([ [1, 1], [2, 2] ] ));
false

## fixed-point-free failes for operations with fixed points
gap> IsRightFPFInducted(MagmaByMultiplicationTable([ [1, 2], [1, 2] ] ));
false

## fixed-point-free failes for operations with fixed points
gap> IsRightFPFInducted(MagmaByMultiplicationTable([ [1, 1], [2, 2] ] ));
false

## no-fixed-point-free-antimagma-is-both-left-hand-and-right-hand
gap> Filtered( Filtered(AllSmallAntimagmas([2 .. 3]), M -> IsLeftFPFInducted(M)), M -> IsRightFPFInducted(M) );
[ ]

gap> STOP_TEST( "test_properties_magma_leftrightisfpf.tst" );
9 changes: 9 additions & 0 deletions tst/test_properties_magma_isleftrightalternative.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
gap> START_TEST( "test_properties_magma_isleftrightalternative.tst" );

gap> ForAny(AllSmallAntimagmas([2 .. 3]), M -> IsLeftAlternative(M) );
false

gap> ForAny(AllSmallAntimagmas([2 .. 3]), M -> IsRightAlternative(M) );
false

gap> STOP_TEST( "test_properties_magma_isleftrightalternative.tst" );

0 comments on commit bb7efb3

Please sign in to comment.