  
  [1X4 Green's Relations[0X
  
  
  [1X4.1 Introduction[0X
  
  This chapter contains instructions on how to use the functions for computing
  Green's  relations  and  related  notions  for transformation semigroups and
  monoids that are implemented in [5XMONOID[0m.
  
  The  theory  behind  these  algorithms  is  developed  in  [LPRR98]  and the
  algorithms  themselves  are  described  in  [LPRR02].  Another  reference is
  [LM90].
  
  Green's  relations  can  be  calculated when [5XMONOID[0m is loaded using the same
  commands  that  you  would  used  when [5XMONOID[0m is not loaded; see [14X'Reference:
  Semigroups'[0m. For example, in [5XGAP[0m with the [5XMONOID[0m package loaded:
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a:=Transformation([2,1,1,2,1]);;[0X
    [4Xgap> b:=Transformation([3,4,3,4,4]);;[0X
    [4Xgap> c:=Transformation([3,4,3,4,3]);;[0X
    [4Xgap> d:=Transformation([4,3,3,4,4]);;[0X
    [4Xgap> S:=Semigroup(a,b,c,d);[0X
    [4X<semigroup with 4 generators>[0X
    [4Xgap> GreensRClasses(S);[0X
    [4X[ {Transformation( [ 2, 1, 1, 2, 1 ] )}, {Transformation( [ 1, 2, 1, 2, 2 ] )}[0X
    [4X  , {Transformation( [ 1, 2, 1, 2, 1 ] )}, [0X
    [4X{Transformation( [ 2, 1, 1, 2, 2 ] )} ][0X
  [4X------------------------------------------------------------------[0X
  
  Without the [5XMONOID[0m package loaded:
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a:=Transformation([2,1,1,2,1]);;[0X
    [4Xgap> b:=Transformation([3,4,3,4,4]);;[0X
    [4Xgap> c:=Transformation([3,4,3,4,3]);;[0X
    [4Xgap> d:=Transformation([4,3,3,4,4]);;[0X
    [4Xgap> S:=Semigroup(a,b,c,d);[0X
    [4X<semigroup with 4 generators>[0X
    [4Xgap> GreensRClasses(S);[0X
    [4X[ {Transformation( [ 1, 2, 1, 2, 1 ] )}, {Transformation( [ 1, 2, 1, 2, 2 ] )}[0X
    [4X  , {Transformation( [ 1, 2, 2, 1, 1 ] )}, [0X
    [4X{Transformation( [ 1, 2, 2, 1, 2 ] )} ][0X
  [4X------------------------------------------------------------------[0X
  
  The  only  noticable  differences are the representatives of the classes and
  the  order  the  classes appear in the list. These differences are caused by
  the  differences  in  the  methods for [10XGreensRClasses[0m in [5XMONOID [0m and the [5XGAP[0m
  library.
  
  Most  of  the  commands  in this section relate to how Green's relations are
  calculated  in [5XMONOID[0m. Although some of the commands might be used for other
  purposes, if all that is required is to calculate Green's classes, relations
  and so on, then this is done in the exactly the same way as described in the
  [5XGAP[0m manual; see [14X'Reference: Green's Relations'[0m.
  
  Due  to  inherent  difficulties with computing Green's L- and D-classes, the
  methods  used  to  compute  with Green's R-classes are the most efficient in
  [5XMONOID[0m.  Thus wherever possible it is advisable to use the commands relating
  to  Green's  R-classes  rather  than  those  relating  to Green's L-classes,
  D-classes, or H-classes.
  
  For small examples of semigroups, say with fewer than 40 elements, it may be
  more  efficient  to  use  the methods from the library than those in [5XMONOID[0m.
  This stems from the fact that there are higher overheads in the methods used
  in  [5XMONOID[0m.  In  either  case,  with  such  small examples computing Green's
  relations does not take much time.
  
  The  methods  in  [5XMONOID[0m allow the computation of individual Green's classes
  without the need to compute all the elements of the underlying semigroup. It
  is  also  possible  to compute all the R-classes, the number of elements and
  test  membership  in  a  transformation  semigroup without computing all the
  elements.  This  may  be  useful if you want to study a very large semigroup
  where computing all the elements of the semigroup is infeasible.
  
  
  [1X4.2 Data Structures[0X
  
  [1X4.2-1 GreensData[0m
  
  [2X> GreensData( [0X[3XC[0X[2X ) _________________________________________________[0Xoperation
  
  --    if   [10XC[0m  satisfies  [2XIsGreensRClass[0m  ([14XReference:  IsGreensRClass[0m),  then
        [10XGreensData[0m returns the value of [2XGreensRClassData[0m ([14X4.2-2[0m) with argument
        [10XC[0m.
  
  --    if   [10XC[0m  satisfies  [2XIsGreensLClass[0m  ([14XReference:  IsGreensLClass[0m),  then
        [10XGreensData[0m returns the value of [2XGreensLClassData[0m ([14X4.2-3[0m) with argument
        [10XC[0m.
  
  --    if   [10XC[0m  satisfies  [2XIsGreensHClass[0m  ([14XReference:  IsGreensHClass[0m),  then
        [10XGreensData[0m returns the value of [2XGreensHClassData[0m ([14X4.2-4[0m) with argument
        [10XC[0m.
  
  --    if   [10XC[0m  satisfies  [2XIsGreensDClass[0m  ([14XReference:  IsGreensDClass[0m),  then
        [10XGreensData[0m returns the value of [2XGreensDClassData[0m ([14X4.2-5[0m) with argument
        [10XC[0m.
  
  [1X4.2-2 GreensRClassData[0m
  
  [2X> GreensRClassData( [0X[3XC[0X[2X ) ___________________________________________[0Xattribute
  
  if    [10XC[0m   satisfies   [2XIsGreensRClass[0m   ([14XReference:   IsGreensRClass[0m),   then
  [10XGreensRClassData[0m  returns  an  object  in  the  category  [2XIsGreensRClassData[0m
  ([14X4.2-6[0m)  with representation [2XIsGreensRClassDataRep[0m ([14X4.2-8[0m) and the following
  four components:
  
  --    [10Xrep[0m the representative of the R-class.
  
  --    [10Xstrongorb[0m the strong orbit of the image of [10Xrep[0m under the action of the
        semigroup on sets.
  
  --    [10Xperms[0m  a  list  of  permutations  that  map  the  image  of [10Xrep[0m to the
        corresponding   image  in  [10Xstrongorb[0m,  that  is,  [10XOnSets(strongorb[i],
        perms[i])=strongorb[1][0m.
  
  --    [10Xschutz[0m  the  group  of  permutations  arising  from  elements  of  the
        semigroup  that  stabilise the image of [10Xrep[0m (called the [13X (generalized)
        right Schutzenberger group[0m).
  
  The  components [10Xstrongorb[0m, [10Xperms[0m, and [10Xschutz[0m are obtained using the function
  [2XStrongOrbitOfImage[0m  ([14X3.4-5[0m). Further details can be found in Algorithm C, D,
  E, F, and U of [LPRR02].
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a:=Transformation( [ 2, 1, 4, 5, 6, 3 ] );;[0X
    [4Xgap> b:=Transformation( [ 2, 3, 1, 5, 4, 1 ] );;[0X
    [4Xgap> M:=Semigroup(a,b);;[0X
    [4Xgap> rc:=GreensRClassOfElement(M, a*b*a);[0X
    [4X{Transformation( [ 4, 1, 6, 5, 2, 2 ] )}[0X
    [4Xgap> GreensRClassData(rc);[0X
    [4XGreensRClassData( Transformation( [ 4, 1, 6, 5, 2, 2 ] ), [ [ 1, 2, 4, 5, 6 ], [0X
    [4X[ 1, 2, 3, 5, 6 ], [ 1, 2, 3, 4, 6 ], [ 1, 2, 3, 4, 5 ] ], [ (), (1,2)[0X
    [4X(3,6,5,4), (3,5)(4,6), (1,6,3,2)(4,5) ], Group( [ (), (2,4,6), (2,6,4), [0X
    [4X(1,2,6)(4,5) ] ) )[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-3 GreensLClassData[0m
  
  [2X> GreensLClassData( [0X[3XS, f[0X[2X ) ________________________________________[0Xattribute
  
  if    [10XC[0m   satisfies   [2XIsGreensLClass[0m   ([14XReference:   IsGreensLClass[0m),   then
  [10XGreensLClassData[0m  returns  an  object  in  the  category  [2XIsGreensLClassData[0m
  ([14X4.2-6[0m)  with representation [2XIsGreensLClassDataRep[0m ([14X4.2-8[0m) and the following
  five components:
  
  --    [10Xrep[0m the representative of the L-class.
  
  --    [10Xstrongorb[0m  the  strong  orbit of the kernel of [10Xrep[0m under the action of
        the semigroup by [2XOnTuplesOfSetsAntiAction[0m ([14X3.2-1[0m).
  
  --    [10Xrelts[0m a list of relations such that
  
  KernelOfTransformation(relts[i]*x)=strongorb[1]
  
        whenever [10Xx[0m has
  
  KernelOfTransformation(x)=strongorb[i].
  
  --    [10Xinvrelts[0m the inverses of the relations [10Xrelts[0m, so that
  
  KernelOfTransformation(invrelts[i]*rep)=strongorb[i].
  
  --    [10Xschutz[0m the (generalised) left Schutzenberger group.
  
  Further details can be found in Algorithm G, H, I, and J of [LPRR02].
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gens:=[ Transformation( [ 4, 1, 4, 5, 3 ] ),[0X
    [4X> Transformation( [ 5, 3, 5, 4, 3 ] ) ];;[0X
    [4Xgap> S:=Semigroup(gens);;[0X
    [4Xgap> C:=GreensLClassOfElement(S, gens[1]*gens[2]*gens[1]);[0X
    [4X{Transformation( [ 5, 3, 5, 4, 3 ] )}[0X
    [4Xgap> GreensLClassData(C);[0X
    [4XGreensLClassData( Transformation( [ 5, 3, 5, 4, 3 ] ), [0X
    [4X[ [ [ 1, 3 ], [ 2, 5 ], [ 4 ] ] ], [ Binary Relation on 5 points ], [0X
    [4X[ Binary Relation on 5 points ], Group( [ (), (3,5,4), (3,5) ] ) )[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-4 GreensHClassData[0m
  
  [2X> GreensHClassData( [0X[3XS, f[0X[2X ) ________________________________________[0Xattribute
  
  if    [10XC[0m   satisfies   [2XIsGreensHClass[0m   ([14XReference:   IsGreensHClass[0m),   then
  [10XGreensLClassData[0m  returns  an  object  in  the  category  [2XIsGreensHClassData[0m
  ([14X4.2-6[0m)  with representation [2XIsGreensHClassDataRep[0m ([14X4.2-8[0m) and the following
  two components:
  
  --    [10Xrep[0m the representative of the H-class.
  
  --    [10Xschutz[0m  the  intersection  of  the left Schutzenberger group and right
        Schutzenberger  group  of  the  L-class  and  R-class  containing  the
        representative  [10Xrep[0m (that is, the intersection of the [10Xschutz[0m component
        of    [2XGreensRClassData[0m   ([14X4.2-2[0m)   and   the   [10Xschutz[0m   component   of
        [2XGreensLClassData[0m ([14X4.2-3[0m)).
  
  Further details can be found in Algorithm K, L, M, and N of [LPRR02].
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gens:=[ Transformation( [ 2, 2, 5, 2, 3 ] ), [0X
    [4X> Transformation( [ 2, 5, 3, 5, 3 ] ) ];;[0X
    [4Xgap> S:=Semigroup(gens);;[0X
    [4Xgap> f:=Transformation( [ 5, 5, 3, 5, 3 ] );;[0X
    [4Xgap> GreensHClassData(GreensHClassOfElement(S, f));[0X
    [4XGreensHClassData( Transformation( [ 5, 5, 3, 5, 3 ] ), Group( () ) )[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-5 GreensDClassData[0m
  
  [2X> GreensDClassData( [0X[3XS, f[0X[2X ) ________________________________________[0Xattribute
  
  if    [10XC[0m   satisfies   [2XIsGreensDClass[0m   ([14XReference:   IsGreensDClass[0m),   then
  [10XGreensDClassData[0m  returns  an  object  in  the  category  [2XIsGreensDClassData[0m
  ([14X4.2-6[0m)  with representation [2XIsGreensDClassDataRep[0m ([14X4.2-8[0m) and the following
  five components:
  
  --    [10Xrep[0m the representative of the D-class.
  
  --    [10XR[0m the result of [2XGreensRClassData[0m ([14X4.2-2[0m) with argument [10Xrep[0m.
  
  --    [10XL[0m the result of [2XGreensLClassData[0m ([14X4.2-3[0m) with argument [10Xrep[0m.
  
  --    [10XH[0m the result of [2XGreensHClassData[0m ([14X4.2-4[0m) with argument [10Xrep[0m.
  
  --    [10Xcosets[0m  a transversal of right cosets of the Schutzenberger group of [10XH[0m
        in the Schutzenberger group of [10XR[0m.
  
  Note that only the first three components are displayed. Further details can
  be found in Algorithm O, P, Q, R, S, and T of [LPRR02].
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gens:=[ Transformation( [ 4, 1, 5, 2, 4 ] ), [0X
    [4X> Transformation( [ 4, 4, 1, 5, 3 ] ) ];;[0X
    [4Xgap> S:=Semigroup(gens);;[0X
    [4Xgap> f:=Transformation( [ 5, 5, 3, 3, 3 ] );;[0X
    [4Xgap> GreensDClassData(GreensDClassOfElement(S, f));[0X
    [4XGreensDClassData( Transformation( [ 5, 5, 3, 3, 3 [0X
    [4X] ), GreensRClassData( Transformation( [ 5, 5, 3, 3, 3 [0X
    [4X] ) ), GreensLClassData( Transformation( [ 5, 5, 3, 3, 3 ] ) ) )[0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X4.2-6 IsGreensData[0X
  
  [2X> IsGreensData( [0X[3Xobj[0X[2X ) ______________________________________________[0XCategory
  [2X> IsGreensRClassData( [0X[3Xobj[0X[2X ) ________________________________________[0XCategory
  [2X> IsGreensLClassData( [0X[3Xobj[0X[2X ) ________________________________________[0XCategory
  [2X> IsGreensHClassData( [0X[3Xobj[0X[2X ) ________________________________________[0XCategory
  [2X> IsGreensDClassData( [0X[3Xobj[0X[2X ) ________________________________________[0XCategory
  
  returns  [10Xtrue[0m  if [10Xobj[0m lies in the category [10XIsGreensData[0m, [10XIsGreensRClassData[0m,
  [10XIsGreensLClassData[0m,  [10XIsGreensHClassData[0m,  [10XIsGreensDClassData[0m,  respectively.
  The  objects  created  using  the  functions  [2XRClassData[0m ([14X4.2-7[0m), [2XLClassData[0m
  ([14X4.2-7[0m),  [2XHClassData[0m  ([14X4.2-7[0m),  and [2XDClassData[0m ([14X4.2-7[0m) lie in the categories
  [10XIsGreensRClassData[0m,          [10XIsGreensLClassData[0m,         [10XIsGreensHClassData[0m,
  [10XIsGreensDClassData[0m,  respectively, and all these categories are contained in
  the category [10XIsGreensData[0m.
  
  
  [1X4.2-7 XClassData[0X
  
  [2X> RClassData( [0X[3Xrec[0X[2X ) ________________________________________________[0Xfunction
  [2X> LClassData( [0X[3Xrec[0X[2X ) ________________________________________________[0Xfunction
  [2X> HClassData( [0X[3Xrec[0X[2X ) ________________________________________________[0Xfunction
  [2X> DClassData( [0X[3Xrec[0X[2X ) ________________________________________________[0Xfunction
  
  These  function  construct  objects  in  the  categories  [2XIsGreensRClassData[0m
  ([14X4.2-6[0m),   [2XIsGreensLClassData[0m   ([14X4.2-6[0m),   [2XIsGreensHClassData[0m  ([14X4.2-6[0m),  and
  [2XIsGreensDClassData[0m  ([14X4.2-6[0m)  subcategories of [2XIsGreensData[0m ([14X4.2-6[0m) using the
  output    from    [2XGreensRClassData[0m    ([14X4.2-2[0m),   [2XGreensLClassData[0m   ([14X4.2-3[0m),
  [2XGreensHClassData[0m ([14X4.2-4[0m), [2XGreensDClassData[0m ([14X4.2-5[0m).
  
  
  [1X4.2-8 IsGreensXClassDataRep[0X
  
  [2X> IsGreensRClassDataRep( [0X[3Xobj[0X[2X ) _______________________________[0XRepresentation
  [2X> IsGreensLClassDataRep( [0X[3Xobj[0X[2X ) _______________________________[0XRepresentation
  [2X> IsGreensHClassDataRep( [0X[3Xobj[0X[2X ) _______________________________[0XRepresentation
  [2X> IsGreensDClassDataRep( [0X[3Xobj[0X[2X ) _______________________________[0XRepresentation
  
  returns   [10Xtrue[0m  if  [10Xobj[0m  has  [10XIsGreensRClassDataRep[0m,  [10XIsGreensLClassDataRep[0m,
  [10XIsGreensHClassDataRep[0m,   or   [10XIsGreensDClassDataRep[0m,   respectively   as   a
  representation.
  
  These   representations   each   have   several   components   detailed   in
  [2XGreensRClassData[0m   ([14X4.2-2[0m),   [2XGreensLClassData[0m   ([14X4.2-3[0m),   [2XGreensHClassData[0m
  ([14X4.2-4[0m), [2XGreensDClassData[0m ([14X4.2-5[0m), respectively.
  
  [1X4.2-9 IsAssociatedSemigpTransSemigp[0m
  
  [2X> IsAssociatedSemigpTransSemigp( [0X[3XC[0X[2X ) _______________________________[0Xproperty
  
  returns  [10Xtrue[0m  if  [10XC[0m  is  a  Green's class of a transformation semigroup and
  returns [10Xfalse[0m otherwise.
  
  This attribute is required so that a Green's class knowns that it belongs to
  a  transformation  semigroup,  so that the methods defined in the [5XMONOID[0m are
  used in preference to those in the library.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> a:=Transformation( [ 2, 1, 4, 5, 6, 3 ] );;[0X
    [4Xgap> b:=Transformation( [ 2, 3, 1, 5, 4, 1 ] );;[0X
    [4Xgap> M:=Semigroup(a,b);;[0X
    [4Xgap> GreensLClassOfElement(M,a);[0X
    [4X{Transformation( [ 2, 1, 4, 5, 6, 3 ] )}[0X
    [4Xgap> IsAssociatedSemigpTransSemigp(last);[0X
    [4Xtrue[0X
    [4Xgap> f:=FreeSemigroup(3);;[0X
    [4Xgap> a:=f.1;; b:=f.2;; c:=f.3;; [0X
    [4Xgap> s:=f/[[a^2, a], [b^2,b], [c^2,c], [a*b,a], [b*a,b], [a*c,a], [0X
    [4X> [c*a,c], [b*c,b],[c*b,c]];[0X
    [4X<fp semigroup on the generators [ s1, s2, s3 ]>[0X
    [4Xgap> Size(s);[0X
    [4X3[0X
    [4Xgap> GreensLClassOfElement(s,a);[0X
    [4X{s1}[0X
    [4Xgap> IsAssociatedSemigpTransSemigp(last);[0X
    [4Xfalse[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-10 SchutzenbergerGroup[0m
  
  [2X> SchutzenbergerGroup( [0X[3XD[0X[2X ) ________________________________________[0Xattribute
  
  if  [10XD[0m  satisfies  [2XIsGreensRClassData[0m  ([14X4.2-6[0m),  [2XIsGreensLClassData[0m  ([14X4.2-6[0m),
  [2XIsGreensHClassData[0m    ([14X4.2-6[0m),    or    [2XIsGreensDClassData[0m   ([14X4.2-6[0m),   then
  [10XSchutzenbergerGroup[0m returns the [10Xschutz[0m component of [10XD[0m.
  
  If  [10XD[0m  satisfies  [2XIsGreensRClass[0m ([14XReference: IsGreensRClass[0m), [2XIsGreensLClass[0m
  ([14XReference:  IsGreensLClass[0m),  [2XIsGreensHClass[0m  ([14XReference:  IsGreensHClass[0m),
  [2XIsGreensDClass[0m ([14XReference: IsGreensDClass[0m), then [10XSchutzenbergerGroup[0m returns
  the [10Xschutz[0m component of [10XGreensData[0m with argument [10XD[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gens:=[ Transformation( [ 4, 4, 3, 5, 3 ] ), [0X
    [4X> Transformation( [ 5, 1, 1, 4, 1 ] ), [0X
    [4X> Transformation( [ 5, 5, 4, 4, 5 ] ) ];;[0X
    [4Xgap> f:=Transformation( [ 4, 5, 5, 5, 5 ] );;[0X
    [4Xgap> SchutzenbergerGroup(GreensDClassOfElement(S, f));[0X
    [4XGroup([ (), (4,5) ])[0X
    [4Xgap> SchutzenbergerGroup(GreensRClassOfElement(S, f));[0X
    [4XGroup([ (), (4,5) ])[0X
    [4Xgap> SchutzenbergerGroup(GreensLClassOfElement(S, f));[0X
    [4XGroup([ (), (4,5) ])[0X
    [4Xgap> SchutzenbergerGroup(GreensHClassOfElement(S, f));[0X
    [4XGroup([ (), (4,5) ])[0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-11 Idempotents[0m
  
  [2X> Idempotents( [0X[3XX[, n][0X[2X ) ____________________________________________[0Xfunction
  
  returns a list of the idempotents in the transformation semigroup or Green's
  class [10XX[0m.
  
  If the optional second argument [10Xn[0m is present, then a list of the idempotents
  in [10XS[0m of rank [10Xn[0m is returned. If you are only interested in the idempotents of
  a given rank, then the second version of the function will likely be faster.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S:=Semigroup([ Transformation( [ 2, 3, 4, 1 ] ), [0X
    [4X> Transformation( [ 3, 3, 1, 1 ] ) ]);;[0X
    [4Xgap> Idempotents(S, 1);[0X
    [4X[  ][0X
    [4Xgap> Idempotents(S, 2);                        [0X
    [4X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ), [0X
    [4X  Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][0X
    [4Xgap> Idempotents(S, 3);                        [0X
    [4X[  ][0X
    [4Xgap> Idempotents(S, 4);                        [0X
    [4X[ Transformation( [ 1, 2, 3, 4 ] ) ][0X
    [4Xgap> Idempotents(S);[0X
    [4X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 2, 3, 4 ] ), [0X
    [4X  Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), [0X
    [4X  Transformation( [ 4, 2, 2, 4 ] ) ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X4.2-12 PartialOrderOfDClasses[0m
  
  [2X> PartialOrderOfDClasses( [0X[3XS[0X[2X ) _____________________________________[0Xattribute
  
  returns  the  partial  order  of  the  [10XD[0m-classes of [10XS[0m as a directed graph in
  [5XGRAPE[0m, if it is installed, using the command
  
  [4X---------------------------  Example  ----------------------------[0X
    [4XGraph(Group(()), [1..Length(GreensDClasses(S))], OnPoints, function(x,y)[0X
    [4Xreturn y in poset[x]; end, true); ;[0X
  [4X------------------------------------------------------------------[0X
  
  where [10Xy[0m in [10Xposet[x][0m if and only if [10XS^1yS^1[0m is a subset of [10XS^1 xS^1[0m.
  
  If [5XGRAPE[0m is not loaded, then the list [10Xposet[0m is returned instead.
  
