Skip to content

Commit

Permalink
semifp: Add a method for IsomorphismFpSemigroup
Browse files Browse the repository at this point in the history
This method applies to factorizable inverse monoids of partial perms. Method is
based on the paper Presentations of Factorizable Inverse Monoids by D. Easdown,
J. East, and D. G. FitzGerald (2004).
  • Loading branch information
ChristopherRussell committed Dec 15, 2017
1 parent a93cd9d commit ca8efcb
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 0 deletions.
97 changes: 97 additions & 0 deletions gap/semigroups/semifp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -541,3 +541,100 @@ IsCollsElms, [IsFpSemigroup, IsElementOfFpSemigroup],
function(S, x)
return SEMIGROUPS.ExtRepObjToWord(ExtRepOfObj(x));
end);

InstallMethod(IsomorphismFpSemigroup,
"for an inverse partial perm semigroup",
[IsPartialPermSemigroup and IsInverseActingSemigroupRep],
function(M)
local add_to_odd_positions, S, SS, G, GG, s, g, F, rels, fam, alpha,
beta, lhs, rhs, map, H, o, comp, U, rhs_list, conj, MF, T, inv, rel, x, y, m,
i;

if not IsFactorisableInverseMonoid(M) then
TryNextMethod();
fi;

add_to_odd_positions := function(list, s)
local i;
for i in [1, 3 .. Length(list) - 1] do
list[i] := list[i] + s;
od;
return list;
end;

# FIXME: this shouldn't be necessary but for an error with
# MinimalFactorization
S := Semigroup(IdempotentGeneratedSubsemigroup(M), rec(acting := false));
SS := GeneratorsOfSemigroup(S);
G := GroupOfUnits(M);
GG := GeneratorsOfSemigroup(G);
s := Length(GeneratorsOfSemigroup(S));
g := Length(GeneratorsOfSemigroup(G));

F := FreeSemigroup(s + g);
rels := [];
fam := ElementsFamily(FamilyObj(F));

# R_S - semigroup relations for the idempotent generated subsemigroup
alpha := IsomorphismFpSemigroup(S);
for rel in RelationsOfFpSemigroup(Image(alpha)) do
Add(rels, [ObjByExtRep(fam, ExtRepOfObj(rel[1])),
ObjByExtRep(fam, ExtRepOfObj(rel[2]))]);
od;

# R_G - semigroup relations for the group of units
beta := IsomorphismFpSemigroup(G);
for rel in RelationsOfFpSemigroup(Image(beta)) do
lhs := add_to_odd_positions(ShallowCopy(ExtRepOfObj(rel[1])), s);
rhs := add_to_odd_positions(ShallowCopy(ExtRepOfObj(rel[2])), s);
Add(rels, [ObjByExtRep(fam, lhs), ObjByExtRep(fam, rhs)]);
od;

# R_product
for x in [1 .. s] do
for y in [1 .. g] do
rhs := Factorization(S, SS[x] ^ (GG[y] ^ -1));
Add(rels, [F.(s + y) * F.(x),
EvaluateWord(GeneratorsOfSemigroup(F), rhs) * F.(s + y)]);
od;
od;

map := InverseGeneralMapping(IsomorphismPermGroup(G));
H := Source(map);
o := Enumerate(LambdaOrb(M));
#R_tilde
for m in [2 .. Length(OrbSCC(o))] do
comp := OrbSCC(o)[m];
U := SmallGeneratingSet(Stabilizer(H,
PartialPerm(o[comp[1]], o[comp[1]]),
OnRight));

for i in comp do
rhs_list := Factorization(S, PartialPerm(o[i], o[i]));
rhs := EvaluateWord(GeneratorsOfSemigroup(F), rhs_list);
conj := MappingPermListList(o[comp[1]], o[i]);
for x in List(U, x -> x ^ conj) do
lhs := ShallowCopy(rhs_list);
Append(lhs, Factorization(G, x ^ map) + s);
Add(rels, [EvaluateWord(GeneratorsOfSemigroup(F), lhs), rhs]);
od;
od;
od;

# Relation to indentify One(G) and One(S)
Add(rels, [EvaluateWord(GeneratorsOfSemigroup(F),
Factorization(G, One(G)) + s),
EvaluateWord(GeneratorsOfSemigroup(F),
Factorization(S, One(S)))]);

MF := F / rels; # FpSemigroup which is isomorphic to M, with different gens.
fam := ElementsFamily(FamilyObj(MF));
T := Semigroup(Concatenation(SS, GG)); # M with isomorphic generators to MF

map := x -> ElementOfFpSemigroup(fam, EvaluateWord(GeneratorsOfSemigroup(F),
Factorization(T, x)));
inv := x -> EvaluateWord(GeneratorsOfSemigroup(T),
SEMIGROUPS.ExtRepObjToWord(ExtRepOfObj(x)));

return MagmaIsomorphismByFunctionsNC(M, MF, map, inv);
end);
57 changes: 57 additions & 0 deletions tst/standard/semifp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,63 @@ gap> SEMIGROUPS.ExtRepObjToString([100, 1]);
Error, SEMIGROUPS.ExtRepObjToString: the maximum value in an odd position of t\
he argument must be at most 52,

# Test IsomorphismFpSemigroup (for factorizable inverse monoids)
gap> S := SymmetricInverseMonoid(4);;
gap> iso := IsomorphismFpSemigroup(S);;
gap> BruteForceIsoCheck(iso);
true
gap> BruteForceInverseCheck(iso);
true
gap> G := Group((1, 2, 4, 6)(3, 8, 7, 5), (1, 3, 4, 7)(2, 5, 6, 8),
> (1, 4)(2, 6)(3, 7)(5, 8));;
gap> S := BrandtSemigroup(G, 1);; # G is the quaternion group of order 8
gap> iso := IsomorphismFpSemigroup(S);;
gap> BruteForceIsoCheck(iso);
true
gap> BruteForceInverseCheck(iso);
true
gap> G := MathieuGroup(10);;
gap> S := BrandtSemigroup(G, 1);; # G is the quaternion group of order 8
gap> iso := IsomorphismFpSemigroup(S);;
gap> BruteForceIsoCheck(iso);
true
gap> BruteForceInverseCheck(iso);
true
gap> tst := [InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [4, 5, 2, 3, 1]),
> PartialPerm([1, 3], [1, 3])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4], [1, 2, 3, 4]),
> PartialPerm([1, 2, 3, 4, 5], [3, 1, 5, 4, 2])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [5, 4, 2, 3, 1]),
> PartialPerm([1, 2, 4], [1, 2, 4])]),
> InverseMonoid([PartialPerm([1, 2, 5], [2, 1, 5]),
> PartialPerm([1, 2], [1, 2])]),
> InverseMonoid([PartialPerm([1, 2, 3], [1, 4, 5]),
> PartialPerm([1, 2, 3, 4, 5], [1, 5, 4, 2, 3])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [3, 1, 5, 4, 2]),
> PartialPerm([1, 2, 3, 4, 5], [5, 1, 3, 4, 2])]),
> InverseMonoid([PartialPerm([1, 2, 5], [2, 3, 5:]),
> PartialPerm([1, 2, 3, 5], [2, 3, 1, 5])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [4, 2, 3, 1, 5]),
> PartialPerm([1, 2, 3, 4, 5], [5, 3, 2, 1, 4])]),
> InverseMonoid([PartialPerm([1, 2, 3, 5], [2, 1, 3, 5]),
> PartialPerm([1, 2, 3, 5], [5, 2, 1, 3])]),
> InverseMonoid([PartialPerm([1, 2, 3], [5, 4, 1]),
> PartialPerm([1, 2, 3, 4, 5], [2, 3, 5, 1, 4])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [4, 3, 5, 2, 1]),
> PartialPerm([1, 2, 4, 5], [5, 4, 2, 1]),
> PartialPerm([1, 4], [3, 2]), PartialPerm([1, 2, 3, 4, 5], [2, 3, 5, 1, 4]),
> PartialPerm([1, 2, 5], [2, 3, 4])]),
> InverseMonoid([PartialPerm([1, 2, 3, 4, 5], [2, 4, 1, 5, 3]),
> PartialPerm([1, 3, 4], [2, 1, 3]),
> PartialPerm([1, 2, 3, 4, 5], [4, 1, 2, 5, 3]), PartialPerm([1, 3], [5, 4]),
> PartialPerm([1, 3, 5], [2, 4, 1])])];;
gap> ForAll(tst, IsFactorisableInverseMonoid);
true
gap> ForAll(tst, S -> BruteForceIsoCheck(IsomorphismFpSemigroup(S)));
true
gap> ForAll(tst{[1 .. 10]}, S -> BruteForceInverseCheck(IsomorphismFpSemigroup(S)));
true

#T# SEMIGROUPS_UnbindVariables
gap> Unbind(BruteForceInverseCheck);
gap> Unbind(BruteForceIsoCheck);
Expand Down

0 comments on commit ca8efcb

Please sign in to comment.