Skip to content

Commit

Permalink
greens: fix bug in RightGreensMultiplier for acting semigroups
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Jun 24, 2023
1 parent 4056547 commit 7c0bb98
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/greens-generic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ gap> a := Transformation([5, 5, 4, 4, 5]);;
gap> LeftGreensMultiplier(S, a, a);
Transformation( [ 1, 1, 3, 3, 1 ] )
gap> RightGreensMultiplier(S, a, a);
IdentityTransformation
Transformation( [ 5, 5, 5, 4, 5 ] )
gap> b := Transformation([5, 4, 4, 5, 4]);
Transformation( [ 5, 4, 4, 5, 4 ] )
gap> s := LeftGreensMultiplier(S, a, b);
Expand All @@ -1095,7 +1095,7 @@ Transformation( [ 5, 4, 4, 5, 4 ] )
gap> b := Transformation([4, 4, 5, 5, 4]);
Transformation( [ 4, 4, 5, 5, 4 ] )
gap> s := RightGreensMultiplier(S, a, b);
Transformation( [ 1, 2, 3, 5, 4 ] )
Transformation( [ 4, 4, 4, 5, 4 ] )
gap> a * s = b;
true]]></Example>
</Description>
Expand Down
7 changes: 5 additions & 2 deletions gap/greens/acting.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ InstallMethod(RightGreensMultiplierNC,
"for an acting semigroup and R-related elements",
[IsActingSemigroup, IsMultiplicativeElement, IsMultiplicativeElement],
function(S, a, b)
local o, l, m, result;
local o, l, m, result, p;

o := Enumerate(LambdaOrb(S));
l := Position(o, LambdaFunc(S)(a));
Expand All @@ -1786,7 +1786,10 @@ function(S, a, b)
# out to the same pos. as b
result := result * LambdaOrbMult(o, m, l)[1];

return result * LambdaPerm(S)(a * result, b);
# At this point StabilizerAction(a * result, LambdaPerm(S)(a * result, b)) =
# b.
p := LambdaPerm(S)(a * result, b);
return WeakInverse(a) * StabilizerAction(S)(a * result, p);
end);

#############################################################################
Expand Down
44 changes: 42 additions & 2 deletions tst/standard/greens/acting.tst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#############################################################################
##
#W standard/greens/acting.tst
#Y Copyright (C) 2011-2022 James D. Mitchell
#Y Copyright (C) 2011-2023 James D. Mitchell
##
## Licensing information can be found in the README file of this package.
##
Expand All @@ -11,7 +11,7 @@
#@local BruteForceInverseCheck, BruteForceIsoCheck, CheckLeftGreensMultiplier1
#@local CheckLeftGreensMultiplier2, CheckRightGreensMultiplier1
#@local CheckRightGreensMultiplier2, D, DD, DDD, H, L, L3, LL, R, RR, RRR, S, T
#@local a, acting, b, d, en, inv, it, iter, map, mults, nr, x, y
#@local a, acting, b, d, en, h, inv, it, iter, map, mults, nr, r, x, y
gap> START_TEST("Semigroups package: standard/greens/acting.tst");
gap> LoadPackage("semigroups", false);;

Expand Down Expand Up @@ -1961,6 +1961,46 @@ true
gap> CheckRightGreensMultiplier2(S);
true

# Bug in RightGreensMultiplierNC
gap> S := Monoid(
> Bipartition([[1, 2, -6], [3, 4, -1], [5, -2], [6], [-3], [-4], [-5]]),
> Bipartition([[1, 2, 3, 5, -2, -6], [4, -5], [6, -3, -4], [-1]]),
> Bipartition([[1, 2, 6, -1], [3, -3], [4, 5, -6], [-2], [-4, -5]]),
> Bipartition([[1, 3, -4], [2, 4, 5, -1, -5], [6, -2, -3, -6]]),
> Bipartition([[1, 3, 4, 6, -5], [2, 5, -1, -2, -4], [-3, -6]]));
<bipartition monoid of degree 6 with 5 generators>
gap> d := Bipartition([[1, 3, -2], [2, 4, 5, 6, -1, -6], [-3], [-4], [-5]]);
<bipartition: [ 1, 3, -2 ], [ 2, 4, 5, 6, -1, -6 ], [ -3 ], [ -4 ], [ -5 ]>
gap> D := DClass(S, d);
<Green's D-class: <bipartition: [ 1, 3, -2 ], [ 2, 4, 5, 6, -1, -6 ], [ -3 ],
[ -4 ], [ -5 ]>>
gap> x := Bipartition([[1, 3, -1, -6], [2, 4, 5, 6, -2], [-3], [-4], [-5]]);
<bipartition: [ 1, 3, -1, -6 ], [ 2, 4, 5, 6, -2 ], [ -3 ], [ -4 ], [ -5 ]>
gap> H := HClass(S, x);
<Green's H-class: <bipartition: [ 1, 3, -1, -6 ], [ 2, 4, 5, 6, -2 ], [ -3 ],
[ -4 ], [ -5 ]>>
gap> h := Representative(H);
<bipartition: [ 1, 3, -1, -6 ], [ 2, 4, 5, 6, -2 ], [ -3 ], [ -4 ], [ -5 ]>
gap> r := RightGreensMultiplierNC(S, d, h);;
gap> d * r in D;
true

# This is a bit slow so commented out
# gap> S := Monoid(
# > Bipartition([[1, 2, -6], [3, 4, -1], [5, -2], [6], [-3], [-4], [-5]]),
# > Bipartition([[1, 2, 3, 5, -2, -6], [4, -5], [6, -3, -4], [-1]]),
# > Bipartition([[1, 2, 6, -1], [3, -3], [4, 5, -6], [-2], [-4, -5]]),
# > Bipartition([[1, 3, -4], [2, 4, 5, -1, -5], [6, -2, -3, -6]]),
# > Bipartition([[1, 3, 4, 6, -5], [2, 5, -1, -2, -4], [-3, -6]]));
# gap> CheckLeftGreensMultiplier1(S);
# true
# gap> CheckRightGreensMultiplier1(S);
# true
# gap> CheckLeftGreensMultiplier2(S);
# true
# gap> CheckRightGreensMultiplier2(S);
# true

# Fix bug in HClassReps(LClass)
gap> T := Monoid(Transformation([1, 3, 2, 1]),
> Transformation([3, 3, 2]),
Expand Down

0 comments on commit 7c0bb98

Please sign in to comment.