From 8cdbb1c0997d608b21076802fd6c0792d3389042 Mon Sep 17 00:00:00 2001
From: Kamil Zabielski <50334623+limakzi@users.noreply.github.com>
Date: Tue, 3 Sep 2024 23:40:33 +0000
Subject: [PATCH] feat: Add IsLeftFPFInducted property
---
lib/properties.gd | 22 ++++++++++++++++++++++
lib/properties.gi | 10 ++++++++++
tst/test_properties_magma_isfpf.tst | 19 +++++++++++++++++++
3 files changed, 51 insertions(+)
create mode 100644 tst/test_properties_magma_isfpf.tst
diff --git a/lib/properties.gd b/lib/properties.gd
index 2c18442..96a635d 100644
--- a/lib/properties.gd
+++ b/lib/properties.gd
@@ -291,3 +291,25 @@ DeclareProperty( "IsRightCancellative", IsMagma );
#! @EndExampleSession
#!
DeclareProperty( "IsCancellative", IsMagma );
+
+#! @Arguments M
+#! @Description
+#! is a left-hand sided fixed-point free inducted m.
+#!
+#! @BeginExampleSession
+#! @EndExampleSession
+#!
+DeclareProperty( "IsLeftFPFInducted", IsMagma );
+
+#! @Arguments M
+#! @Description
+#! is a left-hand sided fixed-point free inducted m.
+#!
+#! @BeginExampleSession
+#! gap> List(AllSmallAntimagmas(2), M -> IsLeftFPFInducted(M) );
+#! [ false, true ]
+#! gap> List(AllSmallAntimagmas(2), M -> IsRightFPFInducted(M) );
+#! [ true, false ]
+#! @EndExampleSession
+#!
+DeclareProperty( "IsRightFPFInducted", IsMagma );
\ No newline at end of file
diff --git a/lib/properties.gi b/lib/properties.gi
index 4629df2..c5af2d3 100644
--- a/lib/properties.gi
+++ b/lib/properties.gi
@@ -230,4 +230,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