Skip to content

Commit

Permalink
semirel: add family check to GreensXClassOfElement
Browse files Browse the repository at this point in the history
This commit adds a check that the family of the object and the elements
family of the family of the semigroup passed to the methods
GreensXClassOfElement, where X in [R, L, H, D, J], are equal. This
prevents the creation of Green's classes with wholly the wrong type of
objects as representatives.
  • Loading branch information
James Mitchell authored and markuspf committed Oct 13, 2017
1 parent 1c9ebc6 commit 65ab02e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/semirel.gi
Original file line number Diff line number Diff line change
Expand Up @@ -250,33 +250,38 @@ end);
#O GreensHClassOfElement(<semigroup>, <representative>)
##

InstallMethod(GreensRClassOfElement, "for a semigroup and object",
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
InstallMethod(GreensRClassOfElement, "for a semigroup and object",
IsCollsElms,
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
function(s,e)
return EquivalenceClassOfElementNC( GreensRRelation(s), e );
end);

InstallMethod(GreensLClassOfElement, "for a semigroup and object",
IsCollsElms,
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
function(s,e)
return EquivalenceClassOfElementNC( GreensLRelation(s), e );
end);


InstallMethod(GreensHClassOfElement, "for a semigroup and object",
IsCollsElms,
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
function(s,e)
return EquivalenceClassOfElementNC( GreensHRelation(s), e );
end);


InstallMethod(GreensDClassOfElement, "for a semigroup and object",
IsCollsElms,
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
function(s,e)
return EquivalenceClassOfElementNC( GreensDRelation(s), e );
end);

InstallMethod(GreensJClassOfElement, "for a semigroup and object",
IsCollsElms,
[IsSemigroup and HasIsFinite and IsFinite, IsObject],
function(s,e)
return EquivalenceClassOfElementNC( GreensJRelation(s), e );
Expand Down

0 comments on commit 65ab02e

Please sign in to comment.