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( "IsMultiplicativeElementWithObjectsAndInversesIfNonzero", IsMultiplicativeElementWithObjectsAndOnes );
DeclareCategory( "IsGroupoidElement",
IsMultiplicativeElementWithObjectsAndInversesIfNonzero );
as well as various category collections. For the various structures we have:
DeclareCategory( "IsDomainWithObjects", IsDomain );
DeclareCategory( "IsMagmaWithObjects", IsDomainWithObjects and IsMagma and IsMultiplicativeElementWithObjectsCollection );
DeclareCategory( "IsMagmaWithObjectsAndOnes", IsMagmaWithObjects and IsMultiplicativeElementWithObjectsAndOnesCollection );
DeclareCategory( "IsMagmaWithObjectsAndInversesIfNonzero", IsMagmaWithObjectsAndOnes and
IsMultiplicativeElementWithObjectsAndInversesIfNonzeroCollection );
DeclareCategory( "IsGroupoid", IsMagmaWithObjectsAndInversesIfNonzero and IsGroupoidElementCollection );
Some of 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(IsMultiplicativeElementWithObjectsAndInversesIfNonzero)\ ", "CategoryCollections(IsGroupoidElement)", "IsMagmaWithObjects", "IsMagmaWithObjectsAndOnes", "IsMagmaWithObjectsAndInversesIfNonzero", "IsGroupoid" ] gap> FamilyObj( Gd8 ); NewFamily( "GroupoidFamily", [ 2275 ], [ 51, 52, 77, 78, 79, 80, 90, 91, 114, 115, 117, 118, 121, 202, 427, 2245, 2256, 2260, 2264, 2268, 2271, 2273, 2274, 2275 ] ) gap> KnownAttributesOfObject( Gd8 ); [ "Name", "Size", "ParentAttr", "GeneratorsOfMagmaWithInverses", "ObjectList", "Pieces" ] gap> KnownPropertiesOfObject( Gd8 ); [ "IsEmpty", "IsTrivial", "IsNonTrivial", "IsFinite", "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", "IsAssociative", "IsCommutative", "IsSinglePieceDomain", "IsDirectProductWithCompleteGraphDomain" ] gap> RepresentationsOfObject( Gd8 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsMWOSinglePieceRep" ] gap> RepresentationsOfObject( U5 ); [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPiecesRep" ] |
Similarly, for elements, we have:
gap> CategoriesOfObject(a78); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithObjects" ] gap> FamilyObj( a78 ); NewFamily( "MultiplicativeElementWithObjectsFamily", [ 2255 ], [ 77, 78, 79, 80, 114, 117, 120, 2255 ] ) gap> CategoriesOfObject(e2); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithObjects", "IsMultiplicativeElementWithObjectsAndOnes", "IsMultiplicativeElementWithObjectsAndInversesIfNonzero", "IsGroupoidElement" ] gap> FamilyObj( e2 ); NewFamily( "GroupoidElementFamily", [ 2267 ], [ 77, 78, 79, 80, 114, 117, 120, 2255, 2259, 2263, 2267 ] ) |
Homomorphisms of structures with many objects have a similar heirarchy.
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", "PieceImages" ] );
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", [ 2279 ], [ 77, 78, 79, 80, 114, 117, 120, 124, 128, 147, 338, 2279 ] ) gap> KnownAttributesOfObject( hom1 ); [ "Range", "Source", "PieceImages" ] gap> KnownPropertiesOfObject( hom1 ); [ "CanEasilyCompareElements", "CanEasilySortElements", "IsTotal", "IsSingleValued", "RespectsMultiplication", "IsGeneralMappingToSinglePiece", "IsGeneralMappingFromSinglePiece", "IsInjectiveWithObjects", "IsSurjectiveWithObjects" ] gap> CategoriesOfObject( homd8 ); [ "IsExtLElement", "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithOne", "IsMultiplicativeElementWithInverse", "IsAssociativeElement", "IsGeneralMapping", "IsGeneralMappingWithObjects", "IsGroupoidHomomorphism" ] gap> KnownAttributesOfObject( homd8 ); [ "Range", "Source", "PieceImages", "ImagesOfObjects", "ImagesOfRays", "ObjectTransformationOfGroupoidHomomorphism", "RootObjectHomomorphism" ] gap> KnownAttributesOfObject( aut3 ); [ "Range", "Source", "PieceImages", "ImagesOfObjects", "ImagesOfRays", "ObjectTransformationOfGroupoidHomomorphism", "RootObjectHomomorphism" ] |
generated by GAPDoc2HTML