From f21bc5659d4f63f58ed5f46dbb85e4a81f68d69b Mon Sep 17 00:00:00 2001 From: Kamil Zabielski <50334623+limakzi@users.noreply.github.com> Date: Thu, 5 Sep 2024 22:13:48 +0200 Subject: [PATCH] feat: Add IsFPFInduced properties (#89) --- lib/properties.gd | 29 +++++++++++++++++++++++++++++ lib/properties.gi | 12 ++++++++++++ tst/test_properties_magma_isfpf.tst | 19 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 tst/test_properties_magma_isfpf.tst diff --git a/lib/properties.gd b/lib/properties.gd index 2c18442..721476a 100644 --- a/lib/properties.gd +++ b/lib/properties.gd @@ -291,3 +291,32 @@ DeclareProperty( "IsRightCancellative", IsMagma ); #! @EndExampleSession #! DeclareProperty( "IsCancellative", IsMagma ); + +#! @Arguments M +#! @Description +#! is a left-hand sided fixed-point free inducted m. +#! +#! @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 m. +#! +#! @BeginExampleSession +#! gap> Display( MultiplicationTable( SmallAntimagma(2, 1) ) ); +#! [ [ 2, 1 ], +#! [ 2, 1 ] ] +#! gap> IsRightFPFInducted( SmallAntimagma(2, 1) ); +#! true +#! @EndExampleSession +#! +#! +DeclareProperty( "IsRightFPFInducted", IsMagma ); \ No newline at end of file diff --git a/lib/properties.gi b/lib/properties.gi index 4629df2..bc5f82e 100644 --- a/lib/properties.gi +++ b/lib/properties.gi @@ -59,6 +59,8 @@ InstallGlobalFunction(MagmaIsomorphismInvariantsMatch, Size, IsLeftCancellative, IsRightCancellative, + IsLeftFPFInducted, + IsRightFPFInducted, CommutativityIndex, AnticommutativityIndex, SquaresIndex, @@ -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); \ No newline at end of file diff --git a/tst/test_properties_magma_isfpf.tst b/tst/test_properties_magma_isfpf.tst new file mode 100644 index 0000000..1e82301 --- /dev/null +++ b/tst/test_properties_magma_isfpf.tst @@ -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); + +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" ); \ No newline at end of file