Many-object structures

A magma with objects M consists of a set of objects Ob(M), and a set of arrows Arr(M) together with tail and head maps t,h : Arr(M) \to Ob(M), and a partial multiplication * : Arr(M) \to Arr(M), with a*b defined precisely when the head of a coincides with the tail of b. We write an arrow a with tail u and head v as (a : u \to v).

When this multiplication is associative we obtain a semigroup with objects.

A loop is an arrow whose tail and head are the same object. An identity arrow at object u is a loop (1_u : u \to u) such that a*1_u=a and 1_u*b=b whenever u is the head of a and the tail of b. When M is a semigroup with objects and every object has an identity arrow, we obtain a monoid with objects, which is just the usual notion of mathematical category.

An arrow (a : u \to v) in a monoid with objects has inverse (a^{-1} : v \to u) provided a*a^{-1} = 1_u and a^{-1}*a = 1_v. A monoid with objects in which every arrow has an inverse is a group with objects, usually called a groupoid.

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

Magmas with objects
The simplest construction for a magma with objects is to take a magma m and form arrows (u,x,v) for every x in m and every pair of objects (u,v). Multiplication is defined by (u,x,v)*(v,y,w) = (u,x*y,w).

Any finite, ordered set is in principle acceptable as the objects of M, but we will restrict ourselves to sets of negative integers here.

gap> tm := [[1,2,4,3],[1,2,4,3],[3,4,2,1],[3,4,2,1]];; Display( tm ); [ [ 1, 2, 4, 3 ], [ 1, 2, 4, 3 ], [ 3, 4, 2, 1 ], [ 3, 4, 2, 1 ] ] gap> m := MagmaByMultiplicationTable( tm ); <magma with 4 generators> gap> SetName( m, "m" ); gap> m1 := MagmaElement(m,1);; gap> m2 := MagmaElement(m,2);; gap> m3 := MagmaElement(m,3);; gap> m4 := MagmaElement(m,4);; gap> One(m); fail gap> M78 := MagmaWithObjects( [-8,-7], m ); Magma with objects :- objects = [ -8, -7 ] magma = m gap> [ IsAssociative(M78), IsCommutative(M78) ]; [ false, false ]
Elements in a magma with objects lie in the category IsMultiplicativeElementWithObjects. An attempt to multiply two arrows which do not compose resuts in fail being returned.

gap> a78 := MultiplicativeElementWithObjects( M78, m4, -7, -8 ); [m2 : -7 -> -8] gap> b87 := MultiplicativeElementWithObjects( M78, m3, -8, -7 ); [m3 : -8 -> -7] gap> ba := b87*a78; [m4 : -8 -> -8] gap> ab := a78*b87; [m4 : -7 -> -7] gap> a78^2; fail gap> ba^2; [m1 : -8 -> -8]
If the partial composition is forgotten, then a digraph is left (usually with multiple edges and loops). Thus the notion of connected component may be inherited by magmas with objects from digraphs. Unfortunately the terms Component and Constituent are already in considerably use in &GAP;, so (for now?) we use the term IsSinglePiece to describe a connected magma with objects.

gap> IsSinglePiece( M78 ); true gap> IsDirectProductWithCompleteGraph( M78 ); true