GAP (Gpd) - Chapter 2: Groupoids

Goto Chapter: | Top | 1 | 2 | 3 | 4 | 5 | Bib | Ind

### 2. Groupoids

A groupoid is a (mathematical) category in which every element is invertible. It consists of a set of components, each of which is a connected groupoid.

A connected groupoid is determined by a set of objects `obs` and an object group `grp`. Connected groupoids are represented as `IsConnectedGroupoidRep`, a record with components `objects` and `group`. The objects of a connected groupoid are generally chosen to be consecutive negative integers, but any suitable ordered set is acceptable, and `consecutive' is not a requirement. The object groups will usually be taken to be permutation groups, but pc-groups and fp-groups are also supported.

A group is a connected groupoid with one object.

A groupoid is a set of one or more connected groupoids, its connected components, and is represented as `IsGroupoidRep`, with attribute `ComponentsOfGroupoid`.

For the definitions of the standard properties of groupoids we refer to R. Brown's book ``Topology'' [B88], recently revised and reissued as ``Topology and Groupoids'' [B06].

#### 2.1 Groupoids: their elements and attributes

##### 2.1-1 ConnectedGroupoid

`> ConnectedGroupoid`( obs, grp ) | ( operation )

`> GroupAsGroupoid`( obj, grp ) | ( operation )

`> GroupoidByUnion`( comps ) | ( operation )

`> Groupoid`( args ) | ( function )

There are a variety of constructors for groupoids, with one or two parameters. The global function `Groupoid` will normally find the appropriate one to call, the options being:

- a list of objects, the object group;

- a single object, a group being converted to a groupoid;

- a list of groupoids which have already been constructed.

Methods for `ViewObj`, `PrintObj` and `Display` are provided for groupoids and the other types of object in this package. Users are advised to supply names for all the groups and groupoids they construct.

    gap> d8 := Group( (1,2,3,4), (1,3) );;
    gap> SetName( d8, "d8" );
    gap> Gd8 := ConnectedGroupoid( [-9,-8,-7], d8 );
    Perm Connected Groupoid:
    < [ -9, -8, -7 ], d8 >
    gap> c6 := Group( (5,6,7)(8,9) );;
    gap> SetName( c6, "c6" );
    gap> Gc6 := GroupAsGroupoid( -6, c6 );
    Perm Connected Groupoid:
    < [ -6 ], c6 >
    gap> Gd8c6 := GroupoidByUnion( [ Gd8, Gc6 ] );;
    gap> Display( Gd8c6 );
    Perm Groupoid with 2 components:
    < objects: [ -9, -8, -7 ]
        group: d8 = <[ (1,2,3,4), (1,3) ]> >
    < objects: [ -6 ]
        group: c6 = <[ (5,6,7)(8,9) ]> >
    gap> SetName( Gd8, "Gd8" );  SetName( Gc6, "Gc6" );  SetName( Gd8c6, "Gd8+Gc6" );

##### 2.1-2 ComponentsOfGroupoid

`> ComponentsOfGroupoid`( gpd ) | ( attribute )

`> ObjectsOfGroupoid`( gpd ) | ( attribute )

When a groupoid consists of two or more components, we require their object lists to be disjoint. The components are sorted by the first object in their object lists, which must be disjoint. The list `ObjectsOfGroupoid` of a groupoid is the sorted concatenation of the objects in the components.

    gap> ComponentsOfGroupoid( Gd8c6 );
    [ Gd8, Gc6 ]
    gap> ObjectsOfGroupoid( Gd8c6 );
    [ -9, -8, -7, -6 ]

##### 2.1-3 IsPermGroupoid

`> IsPermGroupoid`( gpd ) | ( property )

`> IsPcGroupoid`( gpd ) | ( property )

`> IsFpGroupoid`( gpd ) | ( property )

A groupoid is a permutation groupoid if all its components have permutation groups. Most of the examples in this chapter are permutation groupoids, but in principle any type of group known to GAP may be used.

In the following example `Gf2` is an fp-groupoid, while `Gq8` is a pc-groupoid.

    gap> f2 := FreeGroup( 2 );;
    gap> SetName( f2, "f2" );
    gap> Gf2 := Groupoid( -22, f2 );;
    gap> q8 := SmallGroup( 8, 4 );;
    gap> Gq8 := Groupoid( [ -28, -27 ], q8 );;
    gap> SetName( q8, "q8" );  SetName( Gq8, "Gq8" );
    gap> Gf2q8 := Groupoid( [ Gf2, Gq8 ] );;
    gap> [ IsFpGroupoid( Gf2 ), IsPcGroupoid( Gq8 ), IsPcGroupoid( Gf2q8 ) ];
    [ true, true, false ]
    gap> G4 := Groupoid( [ Gd8c6, Gf2, Gq8 ] );;
    gap> Display( G4 );
    Groupoid with 4 components:
    < objects: [ -28, -27 ]
        group: q8 = <[ f1, f2, f3 ]> >
    < objects: [ -22 ]
        group: f2 = <[ f1, f2 ]> >
    < objects: [ -9, -8, -7 ]
        group: d8 = <[ (1,2,3,4), (1,3) ]> >
    < objects: [ -6 ]
        group: c6 = <[ (5,6,7)(8,9) ]> >
    gap> G4 = Groupoid( [ Gq8, Gf2, Gd8c6 ] );
    true

##### 2.1-4 GroupoidElement

`> GroupoidElement`( gpd, elt, tail, head ) | ( operation )

`> IsElementOfGroupoid`( elt ) | ( property )

`> GroupElement`( elt ) | ( attribute )

`> Tail`( elt ) | ( attribute )

`> Head`( elt ) | ( attribute )

`> Size`( gpd ) | ( attribute )

A groupoid element `e` is a triple consisting of a group element, `GroupElement(e)` or `e![1]`; the tail (source) object, `Tail(e)` or `e![2]`; and the head (target) object, `Head(e)` or `e![3]`.

The `Size` of a groupoid is the number of its elements which, for a connected groupoid, is the product of the size of the group with the square of the number of objects.

Groupoid elements have a partial composition: two elements may be multiplied when the head of the first coincides with the tail of the second. Conjugate a^b is defined when a is a loop at the tail of b.

    gap> e1 := GroupoidElement( Gd8, (1,2)(3,4), -9, -8 );
    [(1,2)(3,4) : -9 -> -8]
    gap> e2 := GroupoidElement( Gd8, (1,3), -8, -7 );;
    gap> Print( [ GroupElement( e2 ), Tail( e2 ), Head( e2 ) ], "\n" );
    [ (1,3), -8, -7 ]
    gap> prod := e1*e2;
    [(1,2,3,4) : -9 -> -7]
    gap> e3 := GroupoidElement( Gd8, (1,3)(2,4), -7, -9 );;
    gap> cycle := prod*e3;
    [(1,4,3,2) : -9 -> -9]
    gap> cycle^2;
    [(1,3)(2,4) : -9 -> -9]
    gap> Order( cycle );
    4
    gap> cycle^e1;
    [(1,2,3,4) : -8 -> -8]
    gap> [ Size( Gd8 ), Size( Gc6 ), Size( Gd8c6 ), Size( Gf2q8 ) ];
    [ 72, 6, 78, infinity ]

##### 2.1-5 IsConnectedGroupoid

`> IsConnectedGroupoid`( gpd ) | ( property )

`> IsDiscreteGroupoid`( gpd ) | ( property )

The forgetful functor, which forgets the composition of elements, maps the category of groupoids and their morphisms to the category of digraphs and their morphisms. Applying this functor to a particular groupoid gives the underlying digraph of the groupoid. A groupoid is connected if its underlying digraph is connected (and so complete). A groupoid is discrete if it is a union of groups, so that all the arcs in its underlying digraph are loops. It is sometimes convenient to call a groupoid element a loop when its tail and head are the same object.

#### 2.2 Subgroupoids

##### 2.2-1 SubgroupoidByComponents

`> SubgroupoidByComponents`( gpd, obhoms ) | ( operation )

`> Subgroupoid`( args ) | ( function )

`> FullSubgroupoid`( gpd, obs ) | ( operation )

`> MaximalDiscreteSubgroupoid`( gpd ) | ( attribute )

`> DiscreteSubgroupoid`( gpd, obs, sgps ) | ( operation )

`> FullIdentitySubgroupoid`( gpd ) | ( attribute )

`> DiscreteIdentitySubgroupoid`( gpd ) | ( attribute )

A subgroupoid `sgpd` of `gpd` has as objects a subset of the objects of `gpd`. It is wide if all the objects are included. It is full if, for any two objects in `sgpd`, the `Homset` is the same as in `gpd`. The elements of `sgpd` are a subset of those of `gpd`, closed under multiplication and with tail and head in the chosen object set.

There are a variety of constructors for a subgroupoid of a groupoid. The operation `SubgroupoidByComponents` is the most general. Its two parameters are a groupoid and a list of connected components, where each component is specified as a list `[obs,sgp]`, `obs` is a subset of the objects in one of the components of `gpd`, and `sgp` is a subgroup of the group in that component.

The `FullSubgroupoid` of a groupoid `gpd` on a subset `obs` of its objects contains all the elements of `gpd` with tail and head in `obs`.

A subgroupoid is discrete if it is a union of groups. The `MaximalDiscreteSubgroupoid` of `gpd` is the union of all the single-object full subgroupoids of `gpd`.

An identity subgroupoid has trivial object groups, but need not be discrete. A connected identity groupoid is sometimes called a tree groupoid.

The global function `Subgroupoid` should call the appropriate operation.

    gap> c4d := Subgroup( d8, [ (1,2,3,4) ] );;
    gap> k4d := Subgroup( d8, [ (1,2)(3,4), (1,3)(2,4) ] );;
    gap> SetName( c4d, "c4d" );  SetName( k4d, "k4d" );
    gap> Ud8 := Subgroupoid( Gd8, [ [[-9, k4d]], [[-8,-7], c4d] ] );;
    gap> SetName( Ud8, "Ud8" );
    gap> Display( Ud8 );
    Perm Groupoid with 2 components:
    < objects: [ -9 ]
        group: k4d = <[ (1,2)(3,4), (1,3)(2,4) ]> >
    < objects: [ -8, -7 ]
        group: c4d = <[ (1,2,3,4) ]> >
    gap> FullSubgroupoid( Gd8c6, [-7,-6] );
    Perm Groupoid with components:
    < [ -7 ], d8 >
    < [ -6 ], c6 >
    gap> DiscreteSubgroupoid( Gd8c6, [-9,-8], [ c4d, k4d ] );
    Perm Groupoid with components:
    < [ -9 ], c4d >
    < [ -8 ], k4d >
    gap> FullIdentitySubgroupoid( Ud8 );
    Perm Groupoid with components:
    < [ -9 ], id(k4d) >
    < [ -8, -7 ], id(c4d) >

#### 2.3 Stars, Costars and Homsets

##### 2.3-1 ObjectStar

`> ObjectStar`( gpd, obj ) | ( operation )

`> ObjectCostar`( gpd, obj ) | ( operation )

`> Homset`( gpd, tail, head ) | ( operation )

The star at `obj` is the set of groupoid elements which have `obj` as tail, while the costar is the set of elements which have `obj` as head. The homset from `obj1` to `obj2` is the set of elements with the specified tail and head, and so is bijective with the elements of the group. Thus every star and every costar is a union of homsets.

In order not to create unneccessary long lists, these operations return objects of type `IsHomsetCosetsRep` for which an `Iterator` is provided. (An `Enumerator` is not yet implemented.)

    gap> star9 := ObjectStar( Gd8, -9 );
    <star at [ -9 ] with group d8>
    gap> for e in star9 do
    >      if ( Order( e![1] ) = 2 ) then Print( e, "\n" ); fi;
    >    od;
    [(1,4,3,2) : -9 -> -9]
    [(1,4,3,2) : -9 -> -8]
    [(1,4,3,2) : -9 -> -7]
    [(1,2,3,4) : -9 -> -9]
    [(1,2,3,4) : -9 -> -8]
    [(1,2,3,4) : -9 -> -7]
    gap> costar6 := ObjectCostar( Gc6, -6 );
    <costar at [ -6 ] with group c6>
    gap> hset78 := Homset( Ud8, -7, -8 );
    <homset -7 -> -8 with group c4d>
    gap> for e in hset78 do  Print( e, "\n" );  od;
    [() : -7 -> -8]
    [(1,3)(2,4) : -7 -> -8]
    [(1,4,3,2) : -7 -> -8]
    [(1,2,3,4) : -7 -> -8]

##### 2.3-2 IdentityElement

`> IdentityElement`( gpd, obj ) | ( operation )

The identity groupoid element `1\_{o}` of `gpd` at object `o` is `[e,o,o]` where `e` is the identity group element in the object group. It is a left identity for the star and a right identity for the costar at that object.

    gap> i7 := IdentityElement( Gd8, -7 );;
    gap> i8 := IdentityElement( Gd8, -8 );;
    gap> L := [ i7, i8 ];;
    gap> for e in hset78 do  Add( L, i7*e*i8 = e );  od;
    gap> L;
    [ [() : -7 -> -7], [() : -8 -> -8], true, true, true, true ]

#### 2.4 Left, right and double cosets

##### 2.4-1 RightCoset

`> RightCoset`( G, U, elt ) | ( operation )

`> RightCosetRepresentatives`( G, U ) | ( operation )

`> RightCosetsNC`( G, U ) | ( operation )

`> LeftCoset`( G, U, elt ) | ( operation )

`> LeftCosetRepresentatives`( G, U ) | ( operation )

`> LeftCosetRepresentativesFromObject`( G, U, obj ) | ( operation )

`> LeftCosetsNC`( G, U ) | ( operation )

`> DoubleCoset`( G, U, elt, V ) | ( operation )

`> DoubleCosetRepresentatives`( G, U, V ) | ( operation )

`> DoubleCosetsNC`( G, U, V ) | ( operation )

If `U` is a wide subgroupoid of G, the right cosets of U in G are the equivalence classes of the relation on the elements of G where g1 is related to g2 if and only if g2 = u*g1 for some element u of U. The right coset containing g is written Ug. These right cosets refine the costars of G and, in particular, U1_o is the costar of U at o, so that (unlike groups) U is itself a coset only when G has a single object.

The right coset representatives for U in G form a list containing one groupoid element for each coset where, in a particular component of U, the group element chosen is the right coset representative of the group of U in the group of G.

Similarly, the left cosets gU refine the stars of G, while double cosets are unions of left cosets and of right cosets. The operation `LeftCosetRepresentativesFromObject( G, U, obj )` is used in Chapter 4, and returns only those representatives which have tail at `obj`.

As with stars and homsets, these cosets are implemented with representation `IsHomsetCosetsRep` and provided with an iterator. Note that, when U has more than one component, cosets may have differing lengths.

    gap> re2 := RightCoset( Gd8, Ud8, e2 );
    RightCoset(c4d,[(1,3) : -8 -> -7])
    gap> for x in re2 do Print( x, "\n" ); od;
    [(1,3) : -8 -> -8]
    [(1,3) : -7 -> -8]
    [(2,4) : -8 -> -8]
    [(2,4) : -7 -> -8]
    [(1,4)(2,3) : -8 -> -8]
    [(1,4)(2,3) : -7 -> -8]
    [(1,2)(3,4) : -8 -> -8]
    [(1,2)(3,4) : -7 -> -8]
    gap> rcrd8 := RightCosetRepresentatives( Gd8, Ud8 );
    [ [() : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7], [(2,4) : -9 -> -9],
      [(2,4) : -9 -> -8], [(2,4) : -9 -> -7], [() : -8 -> -9], [() : -8 -> -8],
      [() : -8 -> -7], [(2,4) : -8 -> -9], [(2,4) : -8 -> -8], [(2,4) : -8 -> -7]
     ]
    gap> lcr7 := LeftCosetRepresentativesFromObject( Gd8, Ud8, -7 );
    [ [() : -7 -> -9], [(2,4) : -7 -> -9], [() : -7 -> -8], [(2,4) : -7 -> -8] ]

More examples of these operations may be found in the example file `gpd/examples/gpd.g`.

Top of Book | Previous Chapter | Next Chapter

Goto Chapter: | Top | 1 | 2 | 3 | 4 | 5 | Bib | Ind

generated by GAPDoc2HTML