  
  [1X3 Homomorphisms of many-object structures[0X
  
  A  [13Xhomomorphism[0m  f  from  a  magma  with objects M to a magma with objects N
  consists  of  a  map f_O from the objects of M to those of N together with a
  map f_A from the arrows of M to those of N which is compatible with tail and
  head and which preserves multiplication:
  
  
       f_A((a : u \to v)*f(b : v \to w)) ~=~ f_A(a*b : u \to w)
  
  
  with tail f_O(u) and head f_O(v).
  
  
  [1X3.1 Homomorphisms of magmas with objects[0X
  
  [1X3.1-1 MagmaWithObjectsHomomorphism[0m
  
  [2X> MagmaWithObjectsHomomorphism( [0X[3Xargs[0X[2X ) _____________________________[0Xfunction
  [2X> MagmaHomomorphismFromSinglePiece( [0X[3Xsrc, rng, hom, imobs[0X[2X ) ________[0Xoperation
  [2X> HomomorphismToSinglePiece( [0X[3Xsrc, rng, images[0X[2X ) ___________________[0Xoperation
  [2X> HomomorphismByUnion( [0X[3Xsrc, rng, homs[0X[2X ) ___________________________[0Xoperation
  
  As  usual,  there  are  a  variety  of  homomorphism constructors. The basic
  construction  is a homomorphism M -> N with both M and N connected, which is
  implemented  as [10XIsHomomorphismToSinglePieceRep[0m with attributes [10XSource[0m, [10XRange[0m
  and [10XPieceImages[0m. We require the following information:
  
  --    a  magma  homomorphism  [10Xf[0m  from  the underlying of M to the underlying
        magma of N.
  
  --    a list [10Ximobs[0m of the images of the objects of M;
  
  In the example we construct endomappings of m and M78.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X[0X
    [4Xgap> tup1 := [ Tuple([m1,m2]), Tuple([m2,m1]), Tuple([m3,m4]), Tuple([m4,m3]) ]; [0X
    [4Xgap> f1 := GeneralMappingByElements( m, m, tup1 ); [0X
    [4Xf1 = <general mapping: m -> m >[0X
    [4Xgap> IsMagmaHomomorphism( f1 ); [0X
    [4Xtrue[0X
    [4Xgap> tup2 := [ Tuple([m1,m1]), Tuple([m2,m1]), Tuple([m3,m1]), Tuple([m4,m1]) ];; [0X
    [4Xgap> f2 := GeneralMappingByElements( m, m, tup2 );; [0X
    [4Xgap> IsMagmaHomomorphism( f2 );[0X
    [4Xtrue [0X
    [4Xgap> map1 := HomomorphismFromSinglePiece( M78, M78, [-8,-7], f1 ); [0X
    [4Xmagma with objects homomorphism : M78 -> M78[0X
    [4Xgap> Display( map1 );[0X
    [4XMapping to single piece magma:[0X
    [4X[ M78 ] -> [ M78 ][0X
    [4Xmagma mapping: <mapping: m -> m >[0X
    [4X   object map: [ -8, -7 ] -> [ -8, -7 ][0X
    [4XHomomorphism to connected magma:[0X
    [4X[ M78 ] -> [ M78 ][0X
    [4X  object map = [ [ -8, -7 ], [ -8, -7 ] ][0X
    [4Xhomomorphism = <homomorphism: m -> m >[0X
    [4Xgap> idm := f1*f1;; [0X
    [4Xgap> idmap := HomomorphismFromSinglePiece( M78, M78, idm, [-7,-8] ); [0X
    [4Xgap> map2 := HomomorphismFromSinglePiece( M78, M78, f2, [-7,-8] ); [0X
    [4X[0X
  [4X------------------------------------------------------------------[0X
  
