This short chapter is included for the benefit of anyone wishing to implement some other variety of many-object structures, for example ringoids, which are rings with many objects; Lie groupoids, which are Lie groups with many objects; and so on.
Structures with many objects, and their elements, are defined in a manner similar to the single object case. For elements we have:
DeclareCategory( "IsMultiplicativeElementWithObjects", IsMultiplicativeElement );
DeclareCategory( "IsMultiplicativeElementWithObjectsAndOnes", IsMultiplicativeElementWithObjects );
DeclareCategory( "IsMultiplicativeElementWithObjectsAndInverses", IsMultiplicativeElementWithObjectsAndOnes );
DeclareCategory( "IsGroupoidElement",
IsMultiplicativeElementWithObjectsAndInverses );
as well as various category collections. For the various structures we have:
DeclareCategory( "IsDomainWithObjects", IsDomain );
DeclareCategory( "IsMagmaWithObjects", IsDomainWithObjects and IsMultiplicativeElementWithObjectsCollection );
DeclareCategory( "IsSemigroupWithObjects", IsMagmaWithObjects and IsAssociative );
DeclareCategory( "IsMonoidWithObjects", IsSemigroupWithObjects and IsMultiplicativeElementWithObjectsAndOnesCollection );
IsMultiplicativeElementWithObjectsAndInversesCollection );
DeclareCategory( "IsGroupoid", IsMonoidWithObjects and IsGroupoidElementCollection );
Among the groupoids constructed earlier are the single piece Gd8
and the five component union U5
:
gap> CategoriesOfObject( Gd8 ); [ "IsListOrCollection", "IsCollection", "IsExtLElement", "CategoryCollections(IsExtLElement)", "IsExtRElement", "CategoryCollections(IsExtRElement)", "CategoryCollections(IsMultiplicativeElement)", "IsGeneralizedDomain", "IsMagma", "IsDomainWithObjects", "CategoryCollections(IsMultiplicativeElementWithObjects)", "CategoryCollections(IsMultiplicativeElementWithObjectsAndOnes)", "CategoryCollections(IsMultiplicativeElementWithObjectsAndInverses)\ ", "CategoryCollections(IsGroupoidElement)", "IsMagmaWithObjects", "IsMagmaWithObjectsAndOnes", "IsMagmaWithObjectsAndInverses", "IsGroupoid" ] gap> FamilyObj( Gd8 ); ## these numbers vary from one run to another NewFamily( "GroupoidFamily", [ 2722 ], [ 53, 54, 79, 80, 81, 82, 92, 93, 116, 117, 119, 120, 123, 205, 501, 2690, 2703, 2707, 2711, 2715, 2718, 2720, 2721, 2722 ] ) gap> KnownAttributesOfObject( Gd8 ); [ "Name", "Size", "ObjectList", "GeneratorsOfMagmaWithObjects", "GeneratorsOfGroupoid" ] gap> KnownTruePropertiesOfObject( Gd8 ); [ "IsNonTrivial", "IsFinite", "IsDuplicateFree", "IsAssociative", "IsSinglePieceDomain", "IsDirectProductWithCompleteDigraphDomain" ] gap> RepresentationsOfObject( Gd8 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsMWOSinglePieceRep" ] gap> RepresentationsOfObject( U5 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPiecesRep" ]
Similarly, for arrows, we have:
gap> [ a78, e2 ]; [ [m2 : -7 -> -8], [(1,3) : -8 -> -7] ] gap> CategoriesOfObject(a78); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithObjects" ] gap> FamilyObj( a78 ); ## again these numbers vary NewFamily( "MultiplicativeElementWithObjectsFamily", [ 2702 ], [ 79, 80, 81, 82, 116, 119, 122, 2702 ] ) gap> CategoriesOfObject(e2); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithObjects", "IsMultiplicativeElementWithObjectsAndOnes", "IsMultiplicativeElementWithObjectsAndInverses", "IsGroupoidElement" ] gap> FamilyObj( e2 ); NewFamily( "GroupoidElementFamily", [ 2714 ], [ 79, 80, 81, 82, 116, 119, 122, 2702, 2706, 2710, 2714 ] )
Homomorphisms of structures with many objects have a similar heirarchy. A few examples:
DeclareCategory( "IsGeneralMappingWithObjects", IsGeneralMapping );
DeclareSynonymAttr( "IsMagmaWithObjectsGeneralMapping", IsGeneralMappingWithObjects and RespectsMultiplication );
DeclareSynonymAttr( "IsMagmaWithObjectsHomomorphism", IsMagmaWithObjectsGeneralMapping and IsMapping );
DeclareCategory("IsGroupoidHomomorphism",IsMagmaWithObjectsHomomorphism);
Two forms of representation are used: for mappings to a single piece; and for unions of such mappings:
DeclareRepresentation( "IsMappingToSinglePieceRep", IsMagmaWithObjectsHomomorphism and IsAttributeStoringRep and IsGeneralMapping, [ "Source", "Range", "SinglePieceMappingData" ] );
DeclareRepresentation( "IsMappingWithObjectsRep", IsMagmaWithObjectsHomomorphism and IsAttributeStoringRep and IsGeneralMapping, [ "Source", "Range", "PiecesOfMapping" ] );
In previous chapters, hom1
was an endofunction on M78
; homd8
was a homomorphism from Gd8
to Gs3
; and aut3
was an automorphism of Ga4
. All homomorphisms have family GeneralMappingWithObjectsFamily
. Perhaps it would be better to have separate families for each structure?
gap> FamilyObj(hom1); NewFamily( "GeneralMappingWithObjectsFamily", [ 2726 ], [ 79, 80, 81, 82, 116, 119, 122, 126, 130, 149, 412, 2726 ] ) gap> KnownAttributesOfObject( hom1 ); [ "Range", "Source", "SinglePieceMappingData" ] gap> KnownTruePropertiesOfObject( hom1 ); [ "CanEasilyCompareElements", "CanEasilySortElements", "IsTotal", "IsSingleValued", "RespectsMultiplication", "IsGeneralMappingToSinglePiece", "IsGeneralMappingFromSinglePiece", "IsInjectiveOnObjects", "IsSurjectiveOnObjects" ] gap> CategoriesOfObject( homd8 ); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithOne", "IsMultiplicativeElementWithInverse", "IsAssociativeElement", "IsGeneralMapping", "IsGeneralMappingWithObjects", "IsGroupoidHomomorphism" ] gap> KnownAttributesOfObject( homd8 ); [ "Range", "Source", "SinglePieceMappingData", "ImagesOfObjects", "ImageElementsOfRays", "ObjectTransformationOfGroupoidHomomorphism", "RootGroupHomomorphism" ] gap> KnownAttributesOfObject( aut3 ); [ "Order", "Range", "Source", "SinglePieceMappingData", "ImagesOfObjects", "ImageElementsOfRays", "ObjectTransformationOfGroupoidHomomorphism", "RootGroupHomomorphism" ]
generated by GAPDoc2HTML