%
\Chapter{Some interesting nearrings}
%

One motivation for creating SONATA was to study
particular near-rings associated with a given
group $G$: the *inner automorphism nearring*
$I(G)$, the *automorphism nearring* $A(G)$, and
the *endomorphism nearring* $E(G)$. 
The nearring $I(G)$ is the smallest subnearring of the
nearring $M(G)$ of all mappings from $G$ into $G$ that
contains all inner automorphisms; similarly $A(G)$ and $E(G)$
are defined. \cite{meldrum85:NATLWG} contains 
a lot of information on these near-rings.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\Section{Nearrings generated by endomorphisms on a group}


Let us compute the nearring $I(A_4)$, which is the nearring of all
zero-symmetric polynomial functions on the group $A_4$.
\beginexample
    gap> I := InnerAutomorphismNearRing ( AlternatingGroup ( 4 ) );
    InnerAutomorphismNearRing( Alt( [ 1 .. 4 ] ) )
    gap> Size (I);
    3072
\endexample

For a polynomial function, we can ask for a polynomial that induces it.

\beginexample
    gap> p := Random( I );
    <mapping: AlternatingGroup( [ 1 .. 4 ] ) -> AlternatingGroup( [ 1 .. 4 ] ) >
    gap> PrintAsTerm( p );
     - g1 + g2 - x - g2 + g1 + g2 + g1 - x + g2 - x + 2 * g1 - 
    3 * x - g1 + x + g2 - x - g2 + g1 + x - g1 + x - g1 + x + 
    g1 + x - g2 - x + g2 - g1 - x + g1 + x
    gap> GeneratorsOfGroup( AlternatingGroup( 4 ) );
    [ (1,2,3), (2,3,4) ]
\endexample

We get a polynomial (not necessarily the shortest possible polynomial) that induces
the polynomial function. The expressions `g1' and `g2' stand for the first and second
generator of the group respectively.

Now we compute the nearring that is additively generated by the automorphisms
of the dihedral group of order 8. This nearring is usually called
$A (D_8)$.  
\beginexample
    gap> A := AutomorphismNearRing ( DihedralGroup ( 8 ) );
    AutomorphismNearRing( <pc group of size 8 with 3 generators> )
    gap> Size (A);
    32
\endexample

Much attention has been devoted to the nearring $E (S_4)$, which
is the nearring additively generated by the endomorphisms on the
symmetric group on four letters.
\beginexample
    gap> EndS4 := EndomorphismNearRing ( SymmetricGroup ( 4 ) );
    EndomorphismNearRing( Sym( [ 1 .. 4 ] ) )
    gap> Size ( EndS4 );
    927712935936
    gap> F1 := last;;
    gap> Collected ( Factors( F1 ));
    [ [ 2, 35 ], [ 3, 3 ] ]
\endexample
In the last example, we have computed the size 
of $E (S_4)$ as $2^{35} \cdot 3^3$.

We have also included some less popular examples of nearrings.
One of those is the nearring $H (G, U)$. This is the nearring
that is generated by all endomorphisms on $G$ whose range lies in
the subgroup $U$ of $G$.
We do an example on the group $16/8$ in the classification of
Thomas and Wood. It is a subdirectly irreducible group of order 16,
and the factor modulo the monolith is isomorphic to the elementary abelian group
of order 8.
\beginexample
    gap> G := GTW16_8;
    16/8
    gap> U := First ( NormalSubgroups( G ), N -> Size(N) = 2 );
    Group([ ( 1, 5)( 2,10)( 3,11)( 4,12)( 6,15)( 7,16)( 8, 9)(13,14) ])
    gap> HGU := RestrictedEndomorphismNearRing (G, U);
    RestrictedEndomorphismNearRing( 16/8, Group(
    [ ( 1, 5)( 2,10)( 3,11)( 4,12)( 6,15)( 7,16)( 8, 9)(13,14) ]) )
    gap> Size (HGU);
    8
\endexample
It is interesting to compare this nearring to the nearring of
all functions $e$ in the endomorphism nearring $E (G)$ with the
property $e (G) \subseteq U$.
\beginexample
    gap> EofG := EndomorphismNearRing ( G );
    EndomorphismNearRing( 16/8 )
    gap> EGU := NoetherianQuotient ( EofG, U, G );
    NoetherianQuotient( Group(
    [ ( 1, 5)( 2,10)( 3,11)( 4,12)( 6,15)( 7,16)( 8, 9)(13,14) ]) ,16/8 )
    gap> Size ( EGU );
    128
\endexample
If $N$ is a transformation nearring on $G$, and $U, V$ are subsets of $G$ then
`NoetherianQuotient (N,U,V)' returns the collection of all mappings
$f \in N$ such that $f(V) \subseteq U$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\Section{More information than just the size}


In this section, we use SONATA to produce some interesting information
about the nearring $I(S_3)$, which is the nearring of all zero-symmetric polynomial
functions on the group $S_3$. 
 
\beginexample 
    gap> G := SymmetricGroup ( 3 );
    Sym( [ 1 .. 3 ] )
    gap> I := InnerAutomorphismNearRing ( G );
    InnerAutomorphismNearRing( Sym( [ 1 .. 3 ] ) )
    gap> Size( I );
    54
\endexample

Now we would like to see how many of these 54 functions are idempotent.
First a complicated version.
\beginexample
    gap> Filtered ( I,
    >       t -> ForAll( G, g -> Image(t, g) = Image(t, Image(t, g)) ) );;
    gap> Length( last );
    18
\endexample
Now a simpler version.
\beginexample
    gap> Filtered ( I, i -> i^2 = i );;
    gap> Length( last );
    18
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\Section{Centralizer nearrings}


Let $\Phi$ be a subset of the endomorphisms of a group $G$.
Then we define $M_{\Phi} (G)$ as the set of all
mappings $m : G \to G$ that satisfy $m \circ \varphi =
\varphi \circ m$ for all $\varphi \in \Phi$.
This set is closed under addition and composition of
mappings, and hence a subnearring of $M(G)$.
The set $M_{\Phi} (G)$ is called the centralizer nearring
of $G$ determined by $\Phi$. It need not necessarily be
zero-symmetric.

In the following examples, we compute the centralizer nearring
$M_{End (S_3)} (S_3)$.
\beginexample
    gap> G := SymmetricGroup( 3 );
    Sym( [ 1 .. 3 ] )
    gap> endos := Endomorphisms( G );
    [ [ (2,3), (1,2,3) ] -> [ (), () ],
      [ (2,3), (1,2,3) ] -> [ (2,3), () ],
      [ (2,3), (1,2,3) ] -> [ (1,2), () ], 
      [ (2,3), (1,2,3) ] -> [ (1,3), () ], 
      [ (1,2,3), (1,2) ] -> [ (1,2,3), (2,3) ], 
      [ (2,3), (1,2,3) ] -> [ (1,2), (1,3,2) ], 
      [ (2,3), (1,2,3) ] -> [ (1,3), (1,3,2) ], 
      [ (2,3), (1,2,3) ] -> [ (2,3), (1,2,3) ], 
      [ (2,3), (1,2,3) ] -> [ (1,2), (1,2,3) ], 
      [ (2,3), (1,2,3) ] -> [ (2,3), (1,3,2) ] ]
    gap> C := CentralizerNearRing( G, endos );
    CentralizerNearRing( Sym( [ 1 .. 3 ] ), ... )
    gap> Size ( C );
    6
\endexample

An *ideal* of a nearring $(N,+,*)$ is a subset $I$ such that
$I$ is a normal subgroup of $(N,+)$, and
for all $i \in I$, $n,m \in N$, we have
$(m+i)*n - m*n \in I$ and $n*i \in I$. Ideals are in
one-to-one correspondence to the congruence relations
on $(N,+,*)$.


Do you think that this nearring is simple? Alan Cannon does not think so,
and, in fact, SONATA tells us:
\beginexample
    gap> I := NearRingIdeals( C );
    [ < nearring ideal >, < nearring ideal >, < nearring ideal >, 
      < nearring ideal > ]
    gap> List( I, Size );
    [ 1, 2, 3, 6 ]
\endexample 
So, we have ideals of size 1,2,3 and 6.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\Section{Finding affine complete groups}


We shall now construct all compatible (= congruence preserving) functions
on the group 16/6 (Thomas-Wood-notation); this is the $6^{th}$ group
of order $16$ in \cite{thomaswood80:GT}.
It is the direct
product of $D_8$ and $C_2$. Let $G$ be this group. We first
construct the nearring $P(G)$ of all polynomial functions.
Then we construct all those functions that can be interpolated
at every subset of $G$ with at most two elements by a function in
$P(G)$ by using the function `LocalInterpolationNearRing': 
these are the compatible functions on $G$ (see \cite{Pilz:Nearrings}). 
\beginexample  
    gap> P := PolynomialNearRing( GTW16_6 );
    PolynomialNearRing( 16/6 )
    gap> Size( P );
    256
    gap> C := LocalInterpolationNearRing(P, 2);
    LocalInterpolationNearRing( PolynomialNearRing( 16/6 ), 2 )
    gap> Size (C);
    256
\endexample
Hence the group $16/6$ is $1$-affine complete. A much faster algorithm for
computing the nearring of compatible functions can be used.
\beginexample
    gap> C := CompatibleFunctionNearRing( GTW16_6 );
    < transformation nearring with 7 generators >
    gap> Size(C);
    256;
\endexample
Finally, the fastest way to decide 1-affine completeness is to use the function 
`Is1AffineComplete'.
\beginexample
    gap> Is1AffineComplete( GTW16_6 );
    true
\endexample

When studying polynomial functions on direct products of groups, it is
important to know the smallest positive number $l$ such
that the zero-function can be expressed by a term
$a_1 + e_1.x + a_2 + \cdots + e_n.x + a_{n+1}$ with
$\sum e_i = l$. 
This $l$ has been called the *length* of the group
by S.D.Scott.

\beginexample
    gap> ScottLength( SymmetricGroup( 3 ) );
    2
\endexample




%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "manual"
%%% End: 
