<!-- ------------------------------------------------------------------- -->
<!--                                                                     -->
<!--  cat1.xml            XModAlg documentation               Z. Arvasi  -->
<!--                                                        & A. Odabas  -->
<!--  Copyright (C) 2014-2018, Z. Arvasi & A. Odabas,                    --> 
<!--  Osmangazi University, Eskisehir, Turkey                            --> 
<!--                                                                     -->
<!-- ------------------------------------------------------------------- -->

<?xml version="1.0" encoding="UTF-8"?>

<Chapter Label="chap-cat1">

<Heading>Cat1-algebras</Heading>

<Section>

<Heading>Definitions and examples</Heading>

<Index>cat1-group</Index>

Algebraic structures which are equivalent to crossed modules of algebras include :

<List>
<Item> 
cat<M>^{1}</M>-algebras, (Ellis, <Cite Key="ellis1"/>);
</Item>
<Item> 
simplicial algebras with Moore complex of length 1, 
(Z. Arvasi and T.Porter, <Cite Key="arvasi2"/>);
</Item>
<Item> 
algebra-algebroids, (Gaffar Musa's Ph.D. thesis, <Cite Key="mosa"/>). 
</Item>
</List>

In this section we describe an implementation of cat<M>^{1}</M>-algebras 
and their morphisms. 
<P/>
The notion of cat<M>^{1}</M>-groups was defined as an algebraic model 
of <M>2</M>-types by Loday in <Cite Key="loday"/>. 
Then Ellis defined the cat<M>^{1}</M>-algebras in <Cite Key="ellis1"/>.
<P/>
Let <M>A</M> and <M>R</M> be <M>k</M>-algebras, 
let <M>t,h:A\rightarrow R</M> be surjections, 
and let <M>e:R\rightarrow A</M> be an inclusion. 

<Display>
\xymatrix@R=50pt@C=50pt{ A \ar@{->}@&lt;-1.5pt>[d]_{t} 
\ar@{->}@&lt;1.5pt>[d]^{h} \\ R \ar@/^1.5pc/[u]^{e} 
}
</Display>

If the conditions,
<Display>
\mathbf{Cat1Alg1:} \quad te = id_{R} = he, 
\qquad  
\mathbf{Cat1Alg2:} \quad (\ker t)(\ker h) = \{0_{A}\} 
</Display> 
are satisfied, then the algebraic system 
<M>\mathcal{C} := (e;t,h : A \rightarrow R)</M>
is called a <E>cat<M>^{1}</M>-algebra</E>. 
A system which satisfies the condition
<M>\mathbf{Cat1Alg1}</M> is called a <E>precat<M>^{1}</M>-algebra</E>. 
The homomorphisms <M>t,h</M> and <M>e</M> are called the <E>tail map</E>, 
<E>head map</E> and <E>range embedding</E> homomorphisms, respectively.

<ManSection>
   <Func Name="Cat1Algebra"
         Arg="args" />
   <Oper Name="PreCat1AlgebraByEndomorphisms"
         Arg="t h" />
   <Oper Name="PreCat1AlgebraByTailHeadEmbedding"
         Arg="t h e" />
   <Oper Name="PreCat1Algebra"
         Arg="args" />
   <Prop Name="IsIdentityCat1Algebra"
         Arg="C" />
   <Prop Name="IsCat1Algebra"
         Arg="C" />
   <Prop Name="IsPreCat1Algebra"
         Arg="C" />
<Description>
The operations listed above are used for construction of precat<M>^{1}</M>- 
and cat<M>^{1}</M>-algebra structures. 
The function <C>Cat1Algebra</C> selects the operation from the
above implementations up to user's input. 
The operations <C>PreCat1AlgebraByEndomorphisms</C> 
and <C>PreCat1AlgebraByTailHeadEmbedding</C> 
are used with particular choices of algebra homomorphisms. 

</Description> 
</ManSection> 


<ManSection>
   <Attr Name="Source" Label="for cat1-algebras"
         Arg="C" />
   <Attr Name="Range" Label="for cat1-algebras" 
         Arg="C" />
   <Attr Name="TailMap"
         Arg="C" />
   <Attr Name="HeadMap"
         Arg="C" />
   <Attr Name="RangeEmbedding"
         Arg="C" />
   <Meth Name="Kernel" Label="for cat1-algebras"
         Arg="C" />
   <Attr Name="Boundary" Label="for cat1-algebras"
         Arg="C" />
<Description> 
These are the seven main attributes of a pre-cat<M>^{1}</M>-algebra. 
</Description> 
</ManSection> 

<Example>
<![CDATA[
gap> Ac6 := GroupRing( GF(2), Group( (1,2,3)(4,5) ) );;
gap> Rc3 := GroupRing( GF(2), Group( (1,2,3) ) );;
gap> homAR := AllHomsOfAlgebras( Ac6, Rc3 );;
gap> mgiAR := List( homAR, h -> MappingGeneratorsImages(h) );;
gap> Print( mgiAR, "\n" );
[ [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ <zero> of ... ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*() ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], 
      [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,2,3) ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], 
  [ [ (Z(2)^0)*(1,3,2)(4,5) ], [ (Z(2)^0)*(1,3,2) ] ] ]
gap> homRA := AllHomsOfAlgebras( Rc3, Ac6 );;
gap> mgiRA := List( homRA, h -> MappingGeneratorsImages(h) );;
gap> Print( mgiRA, "\n" );
[ [ [ (Z(2)^0)*(1,2,3) ], [ <zero> of ... ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*() ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3) ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ],
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*()+(Z(2)^0)*(1,3,2) ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,2,3) ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ] ], 
  [ [ (Z(2)^0)*(1,2,3) ], [ (Z(2)^0)*(1,3,2) ] ] ]
gap> C4 := PreCat1AlgebraByTailHeadEmbedding( homAR[6], homAR[6], homRA[8] );
[AlgebraWithOne( GF(2), [ (Z(2)^0)*(1,2,3)(4,5) ] ) -> AlgebraWithOne( GF(2), 
[ (Z(2)^0)*(1,2,3) ] )]
gap> IsCat1Algebra( C4 );
true
gap> Size( C4 );
[ 64, 8 ]
gap> Display( C4 );

Cat1-algebra [..=>..] :- 
: source algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3)(4,5) ]
:  range algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3) ]
: tail homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,3,2) ]
: head homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,3,2) ]
: range embedding maps range generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,3,2) ]
: kernel has generators:
  [ (Z(2)^0)*()+(Z(2)^0)*(4,5), (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,2,3)(4,5), 
  (Z(2)^0)*(1,3,2)+(Z(2)^0)*(1,3,2)(4,5) ]
: boundary homomorphism maps generators of kernel to:
  [ <zero> of ..., <zero> of ..., <zero> of ... ]
: kernel embedding maps generators of kernel to:
  [ (Z(2)^0)*()+(Z(2)^0)*(4,5), (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,2,3)(4,5), 
  (Z(2)^0)*(1,3,2)+(Z(2)^0)*(1,3,2)(4,5) ]
]]>
</Example>

<ManSection>
   <Oper Name="Cat1AlgebraSelect"
         Arg="n gpsize gpnum num" />
<Description> 
The <Ref Oper="Cat1Algebra"/> function may also be used to select a 
cat<M>^{1}</M>-algebra from a data file. 
All cat<M>^{1}</M>-structures on commutative algebras are stored in a list 
in file <File>cat1algdata.g</File>. 
The data is read into the list <C>CAT1ALG_LIST</C> 
only when this function is called.
<P/>
The function <C>Cat1AlgebraSelect</C> may be used in four ways:
<List>
<Item> 
<C>Cat1AlgebraSelect( n )</C> returns the list of possible sizes of groups 
for group algebras with Galois field <M>GF(n)</M>. 
</Item>
<Item> 
<C>Cat1AlgebraSelect( n, m )</C> returns the list of allowable 
group numbers with given Galois field <M>GF(n)</M> 
and groups of size <M>m</M>.
</Item>
<Item> 
<C>Cat1AlgebraSelect( n, m, k )</C> returns the list of possible 
cat<M>^{1}</M>-algebra structures with given Galois field <M>GF(n)</M> 
and group number <M>k</M> of size <M>m</M>.
</Item>
<Item> 
<C>Cat1AlgebraSelect( n, m, k, j )</C> 
(or simply <C>Cat1Algebra( n, m, k, j )</C>) returns the 
<M>j</M>-th cat<M>^{1}</M>-algebra structure with these other parameters.
</Item>
</List>
Now, we give examples of the use of this function.
<P/>
</Description> 
</ManSection> 

<Example>
<![CDATA[
gap> C := Cat1AlgebraSelect( 11 );
|--------------------------------------------------------|
| 11 is invalid number for Galois Field (GFnum)             |
| Possible numbers for GFnum in the Data :              |
|--------------------------------------------------------|
 [ 2, 3, 4, 5, 7 ]
Usage: Cat1Algebra( GFnum, gpsize, gpnum, num );
fail
gap> C := Cat1AlgebraSelect( 4, 12 );
|--------------------------------------------------------|
| 12 is invalid number for size of group (gpsize)        |
| Possible numbers for the gpsize for GF(4) in the Data: |
|--------------------------------------------------------|
 [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
Usage: Cat1Algebra( GFnum, gpsize, gpnum, num );
fail
gap> C := Cat1AlgebraSelect( 2, 6, 3 );
|--------------------------------------------------------|
| 3 is invalid number for group of order 6               |
| Possible numbers for the gpnum in the Data :           |
|--------------------------------------------------------|
 [ 1, 2 ]
Usage: Cat1Algebra( GFnum, gpsize, gpnum, num );
fail
gap> C := Cat1AlgebraSelect( 2, 6, 2 );
There are 4 cat1-structures for the algebra GF(2)_c6.
 Range Alg      Tail                    Head
|--------------------------------------------------------|
| GF(2)_c6      identity map            identity map     |
| -----         [ 2, 10 ]               [ 2, 10 ]        |
| -----         [ 2, 14 ]               [ 2, 14 ]        |
| -----         [ 2, 50 ]               [ 2, 50 ]        |
|--------------------------------------------------------|
Usage: Cat1Algebra( GFnum, gpsize, gpnum, num );
Algebra has generators [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3)(4,5) ]
4
gap> C0 := Cat1AlgebraSelect( 4, 6, 2, 2 );
[GF(2^2)_c6 -> Algebra( GF(2^2), 
[ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)(3,6)+(
    Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ] )]
gap> Size( C0 ); 
[ 4096, 1024 ]
gap> Display( C0 ); 

Cat1-algebra [GF(2^2)_c6=>..] :- 
: source algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,2,3,4,5,6) ]
:  range algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)
    (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
: tail homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)
    (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
: head homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)
    (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
: range embedding maps range generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)(2,5)
    (3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
: kernel has generators:
  [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)
    (2,5)(3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
: boundary homomorphism maps generators of kernel to:
  [ <zero> of ... ]
: kernel embedding maps generators of kernel to:
  [ (Z(2)^0)*()+(Z(2)^0)*(1,2,3,4,5,6)+(Z(2)^0)*(1,3,5)(2,4,6)+(Z(2)^0)*(1,4)
    (2,5)(3,6)+(Z(2)^0)*(1,5,3)(2,6,4)+(Z(2)^0)*(1,6,5,4,3,2) ]
]]>
</Example>

<ManSection> 
   <Oper Name="SubCat1Algebra"
         Arg="arg" />
   <Oper Name="SubPreCat1Algebra"
         Arg="arg" />
   <Prop Name="IsSubCat1Algebra"
         Arg="arg" />
   <Prop Name="IsSubPreCat1Algebra"
         Arg="arg" />
<Description> 
Let <M>\mathcal{C} = (e;t,h:A\rightarrow R)</M> 
be a cat<M>^{1}</M>-algebra, and let <M>A^{\prime}</M>, 
<M>R^{\prime}</M> be subalgebras of <M>A</M> and <M>R</M> respectively. 
If the restriction morphisms
<Display>
t^{\prime} = t|_{A^{\prime}} : A^{\prime}\rightarrow R^{\prime}, 
\qquad  
h^{\prime} = h|_{A^{\prime}} : A^{\prime}\rightarrow R^{\prime}, 
\qquad 
e^{\prime} = e|_{R^{\prime}} : R^{\prime}\rightarrow A^{\prime}
</Display> 
satisfy the <M>\mathbf{Cat1Alg1}</M> and <M>\mathbf{Cat1Alg2}</M> 
conditions, then the system 
<M>\mathcal{C}^{\prime } = (e^{\prime};t^{\prime},h^{\prime}
  : A^{\prime} \rightarrow R^{\prime})</M> 
is called a <E>subcat<M>^{1}</M>-algebra</E> of 
<M>\mathcal{C} = (e;t,h:A\rightarrow R)</M>. 
<P/> 
If the morphisms satisfy only the <M>\mathbf{Cat1Alg1}</M> condition 
then <M>\mathcal{C}^{\prime }</M> is called a 
<E>sub-precat<M>^{1}</M>-algebra</E> of <M>\mathcal{C}</M>. 
<P/> 
The operations in this subsection are used for constructing 
subcat<M>^{1}</M>-algebras of a given cat<M>^{1}</M>-algebra.

</Description> 
</ManSection> 

<Example>
<![CDATA[
gap> C3 := Cat1AlgebraSelect( 2, 6, 2, 4 );; 
gap> A3 := Source( C3 );
GF(2)_c6
gap> B3 := Range( C3 ); 
GF(2)_c3
gap> eA3 := Elements( A3 );;
gap> eB3 := Elements( B3 );;
gap> AA3 := Subalgebra( A3, [ eA3[1], eA3[2], eA3[3] ] );
<algebra over GF(2), with 3 generators>
gap> [ Size(A3), Size(AA3) ]; 
[ 64, 4 ]
gap> BB3 := Subalgebra( B3, [ eB3[1], eB3[2] ] ); 
<algebra over GF(2), with 2 generators>
gap> [ Size(B3), Size(BB3) ]; 
[ 8, 2 ]
gap> CC3 := SubCat1Algebra( C3, AA3, BB3 );
[Algebra( GF(2), [ <zero> of ..., (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(4,5) 
 ] ) -> Algebra( GF(2), [ <zero> of ..., (Z(2)^0)*() ] )]
gap> Display( CC3 );

Cat1-algebra [..=>..] :-
: source algebra has generators:
  [ <zero> of ..., (Z(2)^0)*(), (Z(2)^0)*()+(Z(2)^0)*(4,5) ]
:  range algebra has generators:
  [ <zero> of ..., (Z(2)^0)*() ]
: tail homomorphism maps source generators to:
  [ <zero> of ..., (Z(2)^0)*(), <zero> of ... ]
: head homomorphism maps source generators to:
  [ <zero> of ..., (Z(2)^0)*(), <zero> of ... ]
: range embedding maps range generators to:
  [ <zero> of ..., (Z(2)^0)*() ]
: kernel has generators:
  [ <zero> of ..., (Z(2)^0)*()+(Z(2)^0)*(4,5) ]
: boundary homomorphism maps generators of kernel to:
  [ <zero> of ..., <zero> of ... ]
: kernel embedding maps generators of kernel to:
  [ <zero> of ..., (Z(2)^0)*()+(Z(2)^0)*(4,5) ]
]]>
</Example>

</Section>


<Section> 

<Heading>Cat<M>^{1}-</M>algebra morphisms</Heading> 

Let <M>\mathcal{C} = (e;t,h:A\rightarrow R)</M>, 
<M>\mathcal{C}^{\prime } = (e^{\prime}; t^{\prime }, h^{\prime } 
                           : A^{\prime} \rightarrow R^{\prime})</M> 
be cat<M>^{1}</M>-algebras, 
and let <M>\phi : A\rightarrow A^{\prime}</M> 
and <M>\varphi : R \rightarrow R^{\prime}</M> be algebra homomorphisms. 
If the diagram
<Display>
\xymatrix@R=50pt@C=50pt{ A \ar@{->}@&lt;-1.5pt>[d]_{t} 
\ar@{->}@&lt;1.5pt>[d]^{h} \ar@{->}[r]^{\phi} &amp; A' \ar@{->}@&lt;-1.5pt>[d]_{t'} 
\ar@{->}@&lt;1.5pt>[d]^{h'} \\ R \ar@/^1.5pc/[u]^{e} \ar@{->}[r]_{\varphi} &amp; R' \ar@/_1.5pc/[u]_{e'}
}
</Display>
commutes, (i.e. <M>t^{\prime} \circ \phi = \varphi \circ t</M>, 
<M>h^{\prime} \circ \phi = \varphi \circ h</M> and 
<M>e^{\prime } \circ \varphi = \phi \circ e</M>), 
then the pair <M>(\phi ,\varphi )</M> is called
a cat<M>^{1}</M>-algebra morphism. 


<ManSection>
   <Oper Name="Cat1AlgebraMorphism"
         Arg="arg" />
   <Meth Name="IdentityMapping" Label="for cat1-algebras" 
         Arg="C" />
   <Oper Name="PreCat1AlgebraMorphismByHoms"
         Arg="f g" />
   <Oper Name="Cat1AlgebraMorphismByHoms"
         Arg="f g" />
   <Prop Name="IsPreCat1AlgebraMorphism"
         Arg="C" />
   <Prop Name="IsCat1AlgebraMorphism"
         Arg="arg" />
<Description> 
These operations are used for constructing cat<M>^{1}</M>-algebra morphisms. 
Details of the implementations can be found in <Cite Key="aodabas1"/>.
</Description>
</ManSection>

<ManSection>
   <Attr Name="Source" Label="for morphisms of cat1-algebras"
         Arg="m" />
   <Attr Name="Range" Label="for morphisms of cat1-algebras"
         Arg="m" />
   <Meth Name="IsTotal" Label="for morphisms of cat1-algebras"
         Arg="m" />
   <Meth Name="IsSingleValued" Label="for morphisms of cat1-algebras"
         Arg="m" />
   <Meth Name="Name" Label="for morphisms of cat1-algebras"
         Arg="m" />
   <Attr Name="Boundary" Label="for morphisms of cat1-algebras"
         Arg="m" />
<Description> 
These are the six main attributes of a cat<M>^{1}</M>-algebra morphism. 
</Description>
</ManSection>

<Example>
<![CDATA[
gap> C1 := Cat1Algebra( 2, 1, 1, 1 );
[GF(2)_triv -> GF(2)_triv]
gap> Display( C1 );

Cat1-algebra [GF(2)_triv=>GF(2)_triv] :-
: source algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
:  range algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: tail homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: head homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: range embedding maps range generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: the kernel is trivial.

gap> C2 := Cat1Algebra( 2, 2, 1, 2 );
[GF(2)_c2 -> GF(2)_triv]
gap> Display( C2 );

Cat1-algebra [GF(2)_c2=>GF(2)_triv] :-
: source algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,2) ]
:  range algebra has generators:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: tail homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: head homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: range embedding maps range generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: kernel has generators:
  [ (Z(2)^0)*()+(Z(2)^0)*(1,2) ]
: boundary homomorphism maps generators of kernel to:
  [ <zero> of ... ]
: kernel embedding maps generators of kernel to:
  [ (Z(2)^0)*()+(Z(2)^0)*(1,2) ]

gap> C1 = C2;
false
gap> R1 := Source( C1 );;
gap> R2 := Source( C2 );;
gap> S1 := Range( C1 );;
gap> S2 := Range( C2 );;
gap> gR1 := GeneratorsOfAlgebra( R1 );
[ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> gR2 := GeneratorsOfAlgebra( R2 );
[ (Z(2)^0)*(), (Z(2)^0)*(1,2) ]
gap> gS1 := GeneratorsOfAlgebra( S1 );
[ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> gS2 := GeneratorsOfAlgebra( S2 );
[ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> im1 := [ gR2[1], gR2[1] ];
[ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> f1 := AlgebraHomomorphismByImages( R1, R2, gR1, im1 );
[ (Z(2)^0)*(), (Z(2)^0)*() ] -> [ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> im2 := [ gS2[1], gS2[1] ];
[ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> f2 := AlgebraHomomorphismByImages( S1, S2, gS1, im2 );
[ (Z(2)^0)*(), (Z(2)^0)*() ] -> [ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> m := Cat1AlgebraMorphism( C1, C2, f1, f2 );
[[GF(2)_triv=>GF(2)_triv] => [GF(2)_c2=>GF(2)_triv]]
gap> Display( m );
Morphism of cat1-algebras :-
: Source = [GF(2)_triv=>GF(2)_triv] with generating sets:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
:  Range = [GF(2)_c2=>GF(2)_triv] with generating sets:
  [ (Z(2)^0)*(), (Z(2)^0)*(1,2) ]
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: Source Homomorphism maps source generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
: Range Homomorphism maps range generators to:
  [ (Z(2)^0)*(), (Z(2)^0)*() ]
gap> IsSurjective( m );
false
gap> IsInjective( m );
true
gap> IsBijective( m );
false

]]>
</Example>

</Section> 

</Chapter>
