From 57f37b0b8f7400017272ea8cb31e643b1e9e6702 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 26 Jun 2023 09:55:35 +0200 Subject: [PATCH] acting: add WeakInverse method for all types --- gap/main/setup.gi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gap/main/setup.gi b/gap/main/setup.gi index cd1c1e3be..a7705f4d5 100644 --- a/gap/main/setup.gi +++ b/gap/main/setup.gi @@ -1268,3 +1268,29 @@ InstallMethod(WeakInverse, "for a partial perm", InstallMethod(WeakInverse, "for a bipartition", [IsBipartition], Star); + +InstallMethod(WeakInverse, "for a matrix over ff", +[IsMatrixObjOverFiniteField], RightInverse); + +InstallMethod(WeakInverse, "for a McAlister triple semigroup element", +[IsMcAlisterTripleSemigroupElement], INV); + +InstallMethod(WeakInverse, "for a Rees 0-matrix semigroup", +[IsReesZeroMatrixSemigroupElement], +function(x) + local R, mat, i, j, k, l; + + R := ReesMatrixSemigroupOfFamily(FamilyObj(x)); + if IsMultiplicativeZero(R, x) then + return x; + fi; + + mat := Matrix(R); + i := x[1]; + j := x[3]; + + k := First(Rows(R), k -> mat[j][k] <> 0); + l := First(Columns(R), l -> mat[l][i] <> 0); + + return RMSElement(R, k, mat[j][k] ^ -1 * x[2] ^ -1 * mat[l][i] ^ -1, l); +end);