Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 2779

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<html><head><title>[SONATA] 4 Arbitrary functions on groups: EndoMappings</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP003.htm">Previous</a>] [<a href ="CHAP005.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>4 Arbitrary functions on groups: EndoMappings</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP004.htm#SECT001">Defining endo mappings</a>
<li> <A HREF="CHAP004.htm#SECT002">Properties of endo mappings</a>
<li> <A HREF="CHAP004.htm#SECT003">Operations for endo mappings</a>
<li> <A HREF="CHAP004.htm#SECT004">Nicer ways to print a mapping</a>
</ol><p>
<p>
An <strong>endomapping</strong> is a mapping with equal source and range, say <var>G</var>,
where <var>G</var> is a group. An endomapping  on <var>G</var> then acts on <var>G</var> by
<strong>transforming</strong> each element of <var>G</var> into (precisely one) element of <var>G</var>.
Endomappings are special cases of Mappings.
<p>
Endomappings are created by the constructor functions 
<code>EndoMappingByPositionList</code>, <code>EndoMappingByFunction</code>, <code>IdentityEndoMapping</code>,
<code>ConstantEndoMapping</code>, and are represented as mappings.
The functions described in
this section can be found in the file <code>grptfms.g?</code>. 
<p>
<p>
<h2><a name="SECT001">4.1 Defining endo mappings</a></h2>
<p><p>
<a name = "SECT001"></a>
<li><code>EndoMappingByPositionList ( </code><var>G</var><code>, </code><var>list</var><code> )</code>
<p>
The constructor function <code>EndoMappingByPositionList</code> returns the 
the endomapping that maps the i-th element of the group (in the
ordering given by AsSortedList)
to the i-th element of list.
<p>
<pre>
    gap&gt; G := GTW4_2;
    4/2
    gap&gt; t1 := EndoMappingByPositionList ( G, [1, 2, 4, 4] );
    &lt;mapping: 4/2 -&gt; 4/2 &gt;
</pre>
<p>
<a name = "SECT001"></a>
<li><code>EndoMappingByFunction( </code><var>G</var><code>, </code><var>fun</var><code> )</code>
<p>
The constructor function <code>EndoMappingByFunction</code> returns the
function <var>fun</var> that maps elements of the group <var>G</var> into <var>G</var> as an
endomapping.
<p>
<pre>
    gap&gt; t2 := EndoMappingByFunction ( GTW8_2, g -&gt; g^-1 );
    &lt;mapping: 8/2 -&gt; 8/2 &gt;
    gap&gt; IsGroupHomomorphism ( t2 );
    true
    gap&gt; t3 := EndoMappingByFunction ( GTW6_2, g -&gt; g^-1 );
    &lt;mapping: 6/2 -&gt; 6/2 &gt;
    gap&gt; IsGroupHomomorphism ( t3 );
    false
</pre>
<p>
<code>EndoMappings</code> and <code>GroupGeneralMappings</code> are different
kinds of objects in <font face="Gill Sans,Helvetica,Arial">GAP</font>: <code>GroupGeneralMappings</code> model homomorphisms between
two different groups, whereas <code>EndoMappings</code> model nonlinear functions
on one group.
However, <code>GroupGeneralMappings</code> can be transformed into
<code>Endomappings</code> if they have equal source and range.
<p>
<a name = "SECT001"></a>
<li><code>AsEndoMapping( </code><var>map</var><code> )</code>
<p>
The constructor function <code>AsEndoMapping</code> returns the mapping <var>map</var> 
as an endomapping.
<p>
<pre>
    gap&gt; G1 := Group ((1,2,3), (1, 2));
    Group([ (1,2,3), (1,2) ])
    gap&gt; G2 := Group ((2,3,4), (2, 3));
    Group([ (2,3,4), (2,3) ])
    gap&gt; f1 := IsomorphismGroups ( G1, G2 );
    [ (1,2,3), (1,2) ] -&gt; [ (2,3,4), (2,3) ]
    gap&gt; f2 := IsomorphismGroups ( G2, G1 );
    [ (2,3,4), (2,3) ] -&gt; [ (1,2,3), (1,2) ]
    gap&gt; AsEndoMapping ( CompositionMapping ( f1, f2 ) );
    &lt;mapping: Group( [ (2,3,4), (2,3) ] ) -&gt; Group( [ (2,3,4), (2,3)
    ] ) &gt;
</pre>
<p>
<code>EndoMappings</code> and <code>GroupGeneralMappings</code> are two completely different
kinds of objects in <font face="Gill Sans,Helvetica,Arial">GAP</font>, but they can be transformed into one
another.
<p>
<a name = "SECT001"></a>
<li><code>AsGroupGeneralMappingByImages( </code><var>endomap</var><code> )</code>
<p>
<code>AsGroupGeneralMappingByImages</code> returns the
<code>GroupGeneralMappingByImages</code> that acts on the group the same way as
the endomapping <var>endomap</var>. It only makes sense to use this function
for endomappings that are group endomorphisms.
<p>
<pre>
    gap&gt; m := IdentityEndoMapping ( GTW6_2 );
    &lt;mapping: 6/2 -&gt; 6/2 &gt;
    gap&gt; AsGroupGeneralMappingByImages ( m );
    [ (1,2), (1,2,3) ] -&gt; [ (1,2), (1,2,3) ]
</pre>
<p>
<a name = "SECT001"></a>
<li><code>IsEndoMapping( </code><var>obj</var><code> )</code>
<p>
<code>IsEndoMapping</code> returns <code>true</code> if the object <var>obj</var> is an endomapping
and <code>false</code> otherwise.
<p>
<pre>
    gap&gt; IsEndoMapping ( InnerAutomorphisms ( GTW6_2 ) [3] );
    true
</pre>
<p>
<a name = "SECT001"></a>
<li><code>IdentityEndoMapping( </code><var>G</var><code> )</code>
<p>
<code>IdentitEndoMapping</code> is the counterpart to the <font face="Gill Sans,Helvetica,Arial">GAP</font> standard
library function <code>IdentityMapping</code>. It returns the identity
transformation on the group <var>G</var>.
<p>
<pre>
    gap&gt; AsList ( UnderlyingRelation ( IdentityEndoMapping ( Group ((1,2,3,4)) ) ) );
    [ Tuple( [ (), () ] ), Tuple( [ (1,2,3,4), (1,2,3,4) ] ), 
      Tuple( [ (1,3)(2,4), (1,3)(2,4) ] ), Tuple( [ (1,4,3,2), (1,4,3,2) ] ) 
     ]
</pre>
<p>
<a name = "SECT001"></a>
<li><code>ConstantEndoMapping( </code><var>G</var><code>, </code><var>g</var><code> )</code>
<p>
<code>ConstantEndoMapping</code> returns the endomapping on the group <var>G</var>
which maps everything to the group element <var>g</var> of <var>G</var>.
<p>
<pre>
    gap&gt; C3 := CyclicGroup (3);
    &lt;pc group of size 3 with 1 generators&gt;
    gap&gt; m := ConstantEndoMapping (C3, AsSortedList (C3) [2]);
    MappingByFunction( &lt;pc group of size 3 with 
    1 generators&gt;, &lt;pc group of size 3 with 
    1 generators&gt;, function( x ) ... end )
    gap&gt; List (AsList (C3), x -&gt; Image (m, x));
    [ f1, f1, f1 ]
</pre>
<p>
<p>
<h2><a name="SECT002">4.2 Properties of endo mappings</a></h2>
<p><p>
<a name = "SECT002"></a>
<li><code>IsIdentityEndoMapping( </code><var>endomap</var><code> )</code>
<p>
<code>IsIdentityEndoMapping</code> returns <code>true</code> if <var>endomap</var> is the identity
function on a group.
<p>
<pre>
    gap&gt; IsIdentityEndoMapping (EndoMappingByFunction ( 
    &gt; AlternatingGroup ( [1..5] ), x -&gt; x^31));
    true
</pre>
<p>
<a name = "SECT002"></a>
<li><code>IsConstantEndoMapping( </code><var>endomap</var><code> )</code>
<p>
<code>IsConstantEndoMapping</code> returns <code>true</code> if the endomapping
<var>endomap</var> is constant and <code>false</code> otherwise.
<p>
<pre>
    gap&gt; C3 := CyclicGroup ( 3 );
    &lt;pc group of size 3 with 1 generators&gt;
    gap&gt; IsConstantEndoMapping ( EndoMappingByFunction ( C3,  x -&gt; x^3 ));
    true
</pre>
<p>
<a name = "SECT002"></a>
<li><code>IsDistributiveEndoMapping( </code><var>endomap</var><code> )</code>
<p>
A mapping <var>t</var> on an (additively written) group <var>G</var> is called
<strong>distributive</strong> if for all elements <var>x</var> and <var>y</var> in <var>G</var>:\
<var>t(x+y) = t(x) + t(y)</var>.
The function <code>IsDistributiveEndoMapping</code> returns the according
boolean value <code>true</code> or <code>false</code>.
<p>
<pre>
    gap&gt; G := Group ( (1,2,3), (1,2) );
    Group([ (1,2,3), (1,2) ])
    gap&gt; IsDistributiveEndoMapping ( EndoMappingByFunction ( G, x -&gt; x^3));
    false
    gap&gt; IsDistributiveEndoMapping ( EndoMappingByFunction ( G, x -&gt; x^7));
    true
</pre>
<p>
<p>
<h2><a name="SECT003">4.3 Operations for endo mappings</a></h2>
<p><p>
While the composition operator <code>*</code> is applicable to mappings and
transformations, the operation <code>+</code> (pointwise addition of the images) can
only be applied to transformations.
<p>
The product operator <code>*</code> returns the transformation which is obtained 
from the transformations <var>t1</var> and <var>t2</var> by composition of <var>t1</var> and <var>t2</var>
(i.e. performing <var>t2</var> <strong>after</strong> <var>t1</var>).
<p>
<pre>
    gap&gt; t1 := ConstantEndoMapping ( GTW2_1, ());
    MappingByFunction( 2/1, 2/1, function( x ) ... end )
    gap&gt; t2 := ConstantEndoMapping (GTW2_1, (1, 2));
    MappingByFunction( 2/1, 2/1, function( x ) ... end )
    gap&gt; List ( AsList ( GTW2_1 ), x -&gt; Image ( t1 * t2, x ));
    [ (1,2), (1,2) ]
</pre>
<p>
The add operator <code>+</code> returns the endomapping which is obtained 
from the endomappings <var>t1</var> and <var>t2</var> by pointwise addition 
of <var>t1</var> and <var>t2</var>. (Note that in this context addition means that
for every place <var>x</var> in the source of <var>t1</var> and <var>t2</var>,   
<font face="Gill Sans,Helvetica,Arial">GAP</font> performs the  operation <code>p * q</code>, where
<code>p</code> is the image of <var>t1</var> at <var>x</var> and <code>q</code> is the image of <var>t2</var> at <var>x</var>.) 
<p>
The subtract operator <code>-</code> returns the endomapping which is 
obtained from the endomappings <var>t1</var> and <var>t2</var> by pointwise 
subtraction of <var>t1</var> and <var>t2</var>. (Note that in this context subtraction 
means performing the <font face="Gill Sans,Helvetica,Arial">GAP</font> operation <code>p * q^(-1)</code>,
where
<code>p</code> is the image of <var>t1</var> at a place <var>x</var> and <code>q</code> is the image of <var>t2</var> at <var>x</var>.) 
<p>
<pre>
    gap&gt; G := SymmetricGroup ( 3 );
    Sym( [ 1 .. 3 ] )
    gap&gt; invertingOnG := EndoMappingByFunction ( G, x -&gt; x^-1 );
    &lt;mapping: SymmetricGroup( [ 1 .. 3 ] ) -&gt; SymmetricGroup(
    [ 1 .. 3 ] ) &gt;
    gap&gt; identityOnG := IdentityEndoMapping (G);
    &lt;mapping: SymmetricGroup( [ 1 .. 3 ] ) -&gt; SymmetricGroup(
    [ 1 .. 3 ] ) &gt;
    gap&gt; AsSortedList ( G );
    [ (), (2,3), (1,2), (1,2,3), (1,3,2), (1,3) ]
    gap&gt; List ( AsSortedList (G), 
    &gt;              x -&gt; Image ( identityOnG * invertingOnG, x ));
    [ (), (2,3), (1,2), (1,3,2), (1,2,3), (1,3) ]
    gap&gt; List ( AsSortedList (G),
    &gt;              x -&gt; Image ( identityOnG + invertingOnG, x ));
    [ (), (), (), (), (), () ]
    gap&gt; IsIdentityEndoMapping ( - invertingOnG );
    true
    gap&gt; - invertingOnG = identityOnG;
    true
</pre>
<p>
<p>
<h2><a name="SECT004">4.4 Nicer ways to print a mapping</a></h2>
<p><p>
<a name = "SECT004"></a>
<li><code>GraphOfMapping( </code><var>mapping</var><code> )</code>
<p>
<code>GraphOfMapping</code> returns the set of all pairs (x,m(x)), where
x lies in the source of the mapping. In particular, it returns
List (Source (m), x -&gt; [x, Image (m, x)]);
<p>
<pre>
    gap&gt; G := SymmetricGroup ( 3 );
    Sym( [ 1 .. 3 ] )
    gap&gt; m := ConstantEndoMapping (G, (1,2,3)) + IdentityEndoMapping( G );
    MappingByFunction( Sym( [ 1 .. 3 ] ), Sym( [ 1 .. 3 ] ), function( g ) ... end )
    gap&gt; PrintArray( GraphOfMapping( m ) );
    [ [       (),  (1,2,3) ],
      [    (2,3),    (1,3) ],
      [    (1,2),    (2,3) ],
      [  (1,2,3),  (1,3,2) ],
      [  (1,3,2),       () ],
      [    (1,3),    (1,2) ] ]
</pre>
<p>
<a name = "SECT004"></a>
<li><code>PrintAsTerm( </code><var>mapping</var><code> )</code>
<p>
If <var>mapping</var> is a polynomial function on its source then <code>PrintAsTerm</code>
prints a polynomial that induces the mapping <var>mapping</var>.
<pre>
    gap&gt; G := SymmetricGroup ( 3 );
    Sym( [ 1 .. 3 ] )
    gap&gt; p := Random( PolynomialNearRing( G ) );
    &lt;mapping: SymmetricGroup( [ 1 .. 3 ] ) -&gt; SymmetricGroup( [ 1 .. 3 ] ) &gt;
    gap&gt; PrintAsTerm( p );
    g1 - x - 2 * g1 - g2 - x - g1 - g2 + g1 - x - 2 * g1 - 
    g2 - x - g1 - g2 - 3 * x + g1
    gap&gt; GeneratorsOfGroup( G );
    [ (1,2,3), (1,2) ]
</pre>
<p>
The expressions <code>g1</code> and <code>g2</code> stand for the first and secong generator 
of the group <var>G</var> respectively. The result is not necessarily a 
polynomial of minimal length.
<p>
<p>
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP003.htm">Previous</a>] [<a href ="CHAP005.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<P>
<address>SONATA manual<br>November 2008
</address></body></html>