<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <!-- %% --> <!-- %A permutat.xml GAP documentation Martin Schönert --> <!-- %A Alexander Hulpke --> <!-- %% --> <!-- %% --> <!-- %Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland --> <!-- %Y Copyright (C) 2002 The GAP Group --> <!-- %% -->
<Chapter Label="Permutations">
<Heading>Permutations</Heading>
&GAP; offers a data type <E>permutation</E> to describe the elements
of permutation groups.
<P/>
The points on which permutations in &GAP; act are the positive
integers up to a certain architecture dependent limit,
and the image of a point <M>i</M> under a permutation <M>p</M> is written
<M>i^p</M>, which is expressed as <M>i</M><C>^</C><M>p</M> in &GAP;.
(This action is also implemented by the function <Ref Func="OnPoints"/>.)
If <M>i</M><C>^</C><M>p</M> is different from <M>i</M>,
we say that <M>i</M> is <E>moved</E> by <M>p</M>,
otherwise it is <E>fixed</E>.
Permutations in &GAP; are entered and displayed in cycle notation,
such as <C>(1,2,3)(4,5)</C>.
<P/>
The preimage of the point <M>i</M> under the permutation <M>p</M> can be
computed as <M>i</M><C>/</C><M>p</M>, see <Ref Var="PERM_INVERSE_THRESHOLD"/>.
<P/>
For arithmetic operations for permutations and their precedence,
see <Ref Sect="Arithmetic Operations for Elements"/>.
<P/>
In the names of the &GAP; functions that deal with permutations,
the word <Q>Permutation</Q> is usually abbreviated to <Q>Perm</Q>,
to save typing.
For example,
the category test function for permutations is <Ref Filt="IsPerm"/>.
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Comparison of Permutations">
<Heading>Comparison of Permutations</Heading>
<Description>
<Index Subkey="for permutations">equality test</Index>
<Index Subkey="for permutations">precedence test</Index>
Two permutations are equal if they move the same points and all these points
have the same images under both permutations.
<P/>
The permutation <A>p1</A> is smaller than <A>p2</A>
if <A>p1</A> <M>\neq</M> <A>p2</A>
and <M>i^{{<A>p1</A>}} < i^{{<A>p2</A>}}</M>,
where <M>i</M> is the smallest point with
<M>i^{{<A>p1</A>}} \neq i^{{<A>p2</A>}}</M>.
Therefore the identity permutation is the smallest permutation,
see also Section <Ref Sect="Comparison Operations for Elements"/>.
<P/>
Permutations can be compared with certain other &GAP; objects,
see <Ref Sect="Comparisons"/> for the details.
<P/>
<Example><![CDATA[
gap> (1,2,3) = (2,3,1);
true
gap> (1,2,3) * (2,3,4) = (1,3)(2,4);
true
gap> (1,2,3) < (1,3,2); # 1^(1,2,3) = 2 < 3 = 1^(1,3,2)
true
gap> (1,3,2,4) < (1,3,4,2); # 2^(1,3,2,4) = 4 > 1 = 2^(1,3,4,2)
false
]]></Example>
</Description>
</ManSection>
<ManSection>
<Attr Name="AsPermutation" Arg="f"/>
<Returns>A permutation or <K>fail</K>.</Returns>
<Description>
Partial permutations and transformations which define permutations
(mathematically) can be converted into &GAP; permutations using
<C>AsPermutation</C>; see Chapters <Ref Chap="Transformations"/> and
<Ref Chap="Partial permutations"/> for more details about transformations
and partial permutations.
<List>
<Mark>for partial permutations</Mark>
<Item>
If the partial permutation <A>f</A> is a permutation of its image, then
<C>AsPermutation</C> returns this permutation. If <A>f</A> does not
permute its image, then <K>fail</K> is returned. <P/>
</Item>
<Mark>for transformations</Mark>
<Item>
A transformation is a permutation if and only if its rank equals its
degree. If a transformation in &GAP; is a permutation, then
<C>AsPermutation</C> returns this permutation. If <A>f</A> is not a
permutation, then <K>fail</K> is returned.
</Item>
</List>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.