Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/rcwa/doc/   (GAP Algebra Version 4.15.1©)  Datei vom 22.8.2025 mit Größe 505 kB image not shown  

Impressum main.tex   Sprache: Latech

 

% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
documentclassa4paper11]}

\usepackage[top=37mm,bottom=37mm,left=27mm,right=27mm]{geometry}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
0236,.,.}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb{0.8544,.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0

\definecolor\temFree of finite  
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\{}rgb{0.,0.0,0554}
\definecolor{\Wreath products of the above groups with finite groups and
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor{rgb}{589,.,.}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}

%%  for a long time these were red and blue by default,
%%  now black, but keep variables to overwrite
\efinecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}


\usepackage{fancyvrb}

\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{extcomp}


\usepackage[
            pdftex=true,
            =rue,       
            a4paper=true,
            =Written GAPDoc}java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 with java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 62
interchangetwodisjointresidue , \ \{r1 m1 r2,m2 \exttt\45}texttt{45  a simple  has subgroups
            backref=page,
            breaklinks=true,
            linkcolor=linkColor,
            citecolor=citeColor,
            filecolor=fileColor,
            urlcolor=urlColor,
            pdfpagemode={UseNone}, 
           ]{hyperref}

\newcommand{\maintitlesize}{\fontsize{50}

% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\mmediateopenoutpagenrlog \jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\ The readermight whattype canobtainwithjava.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 160
%% were never documented, give conflicts with some additional packages

\newcommand{\GAP}{\textsf{GAP}}

%% nicer description environments, allows long labels
\usepackage{enumitem here than for same questionabout\extsfGAP itself.Thebest way to get familiar  thepackageand its capabilities is
\setdescription{style=nextline}

%% depth of toc
\setcounter{likely to  with the examples discussed in this manual and the groups




\usepackagejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\usepackage{amsxtra}

\tolerance 2500
\hbadness 2500
\emergencystretch out\texttt{symbol{45}of\texttt{symbol{45}}the\texttt{\symbol{45}}box
\hfuzz 0.3pt
\widowpenalty=10000
\enalty10000
\vfuzz \hfuzz
\raggedbottom


%% command for ColorPrompt style examples
\{\}1\{}{bfseries#}java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{residuetexttt{{}class\exttt{\symbol{p


\begin{document}

\logpage
\begin{
\mbox{}\vfill

\begin\ogpage[2,0,0]
\vfill

\hypersetup{pdftitle= RCWA }
\{ mbox}hfill  RCWA  \fill{}
{\Huge \textbf{ Residue\texttt{\symbol{45}}Class\texttt{
\vfill

{\Huge  4.8.0 \mbox{}}\\[1cm]
 22September mbox{}\1]
\mbox{}\\[2cm]
{\Large \textbf{ Stefan Kohl\\
   mbox}}java.lang.NullPointerException
\hypersetup{pdfauthor= Stefan Kohljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\\ \textbf{ Stefan\java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}Email \href{ailto/sk239@st-andrewsacuk {{@t\{45}au}java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
 :\{:/-kohlgithub./ {texttth:/\\symbol{5}kohl.github/}java.lang.NullPointerException
\end{titlepage}

\newpage\setcounter{page}{2}
{ 
\section*{Abstract}
\{ 0,,1]java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
\{RCWA    fortextsfG}\}. It provides implementations of algorithms and methods for
computing in certain infinite permutation groups acting on the computing in certain infinite permutation groups acting on the set 
.  be java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72
and more:
\begin{     \\\\fracrm n+{()}(m}
item java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 82
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 35
\  Freeproducts offinitely many finite groups. 
\item  Direct products of the above groups. 
\ productsofthe above groups with finite groups and
with{\nobreakspace}({\ensuremath{\mathbb Z}},+). 
\item  Subgroups of any such groups. 
\end{itemize}
 With the help of this package, the author has found a countable simple group
which is generated by involutions interchangingthat the \texttt{\symbol{45}class\texttt{symbol{}}wiseaffine
{\ensuremath{\mathbb Z}} and which all the above groups embed into
\texttt{\symbol{45}}\textttpermutations of\}{ensuremath\mathbb Z}} form a countable

  \mbox{}}\\[1cm]
{small 
\section*{Copyright}
\logpage{[ 0, 0Rcwa{\ }}  thelatterby ({ensuremath{\mathbb
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 \textsf{RCWA} is free software: you can redistribute it and/a partition of{\nobreakspace}{\ensuremath{\mathbb Z}} into finitely
 GNUGeneralPublicLicense  by FreeSoftware,
either version 2 of theifthe of moduli of 

 \textsf{RCWA} is distributed in the hope that it could  the `trivial''or ` blocks'  java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 123
withouteven theimpliedwarrantyMERCHANTABILITYFITNESS  
PARTICULAR PURPOSE. See the affine  and \{\{5}groupscan   in the

 }. ,this  providesalsosome support for
{\residuetexttt\{45}texttt{\symbol{45}wiseaffine over$\\mathbb }^$ over  of{\}\\ Z} and
\section*{Acknowledgements}
\logpage{[ 0, 0, 3 ]}
Iamgrateful   P  for thejava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 129
his hint on how to construct wreath products of
java.lang.StringIndexOutOfBoundsException: Range [22, 7) out of bounds for length 70
with{\nobreakspace}({\ensuremath{\mathbb Z}},+) in April 2006. Further, I
Bettina{nobreakspaceEickfor communicating this forjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
suggestionsitsmanual in   before its   
in April 2005. mappings}}\label{se}
 criticism  their helpfulsuggestions.\box{}\1]
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 4\L}{X86BC55648302D643{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

\tableofcontents
\newpageThis     texttt({texttt{\lshape coeffs},where \mbox\mdseriesslshape }is  list$$ coefficienttriples\{coeffs}r+$texttt]\nobreakspace} [${rm},b_rm},r)$texttt{,with r   0to\}m$.

      
chapter\{ { RCWAPackage}}\{:}
\not be integers ,an error is printed    loopis .For
L{83A8C2927FAE2C23{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
{ @Collatz \C conjectureCollatzmapping  package  tocomputemonoids,  groups,
 \{\exttt{{45}ctexttt{symbol45}affine}mappings  thewidest\{symbol45} occurrence sucha
mapping isjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  
\[
  T: \ \ \mathbb{Z} \longrightarrow \mathbb{Z}, \ \  rcwa  ofZ with modulus 2>
           n \ \longmapsto java.lang.NullPointerException

          \frac{n[true ]
          \frac{3n+1}{2} & \text{if!gapAgapinput()A
          \end{cases}
  \]

   to any given positive
(cf.{\nobreakspace}\cite{Lagarias06          |n/       n  ()

 Presently, most  n|> < 3+)2ifin 1(2)
permutation groups, matrix groups, finitely presented groups, polycyclically
presented          
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 2
On  one,  means deal withanother largeclass 
groups which are accessible to   <rcwa mapping of Z with modulus 3
  
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
importantly java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
       
   n |>  4-/ 1(3)
intended to serve as a tool to obtain a better understanding of their rich and
often complicated group theoretical and combinatorial structure. 
\nd{}
 In principle this package permits to construct and investigate all groups
which have  
  !gapp@gap> gapinput()A
many others, the following groups and theirZ \[-1,0  java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
\{itemize}
\item  Finite groups, and certain divisible torsion groups which they embed into. 
\item  
\item\nd{}
\   productsof    
  Wreath of   groups  groups and
with{\nobreakspaceof{nobreakspace}{\ensuremath{\mathbb Z}} can be factored into members of the
\end{itemize}
 This listpermits already to conclude that there are finitely generated
residue\texttt{\symbol{45}
not  finite presentations and such  algorithmicallyunsolvable
membershiplogpage{ 2 2, }nobreak
using this packagehyperdef{}{}{}
entioned there.

 The label{:r }
\\hfilljava.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 34
interchange two disjoint residue{c}
of all types listed above. It is countable,}hfill{scriptsizef}java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
simplesubgroupswhich  by  setsof primes 

 Proofs
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0

 The reader might want to know what java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, and it is simply possibleto  in
general what can be found out with its\{}=!@Afontsize=,rame=single,=java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
likely to
 transpositionsthe  data 

    |n12  in512java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
out\texttt{\symbol{45}}ofjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 11
\Verbatim}
answer
approach.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
subsectiontextcolorChapter}ClassReflection,m}}
to the development\logpage[2,2,2]\nobreak
   one ,developing factorization method for
residue\texttt{\symbol\textcolorFuncColor{java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 158
(see{\nobreakspace}\texttt{FactorizationIntoCSCRCT} (\ref{FactorizationIntoCSCRCT:for \labelClassReflection,m

       
\chapter{\textcolor{Chapter }{Residue\textttlabelClassReflection:}
\logpage{[ 2, }hfill\ (unction}java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
\hyperdef{thereflection $\arsigma_{()$ 
{
   
residue
howTheemphclass \{m} is    of\{ensuremath\mathbb Z} mapsn\ rm  $ +r andwhich  {ensuremath{java.lang.StringIndexOutOfBoundsException: Range [190, 184) out of bounds for length 260

 How to compute with residue\texttt{\symbol{45}
affine isdescribed  detail the nextchapter   is
encouraged to \{}commandchars!Afontsize=,frames,abelExample
chapter, and to   gapprompt@gapA gapinputDisplay((,)A
\section{\textcolor{Chapter }{Basic definitions}}\label{sec:basicdefinitions}
\logpage{[ 2, 1, 0 ]}
\hyperdef{L}{X78ED07E37FC2BD46}{}
{
  \Rcwa permutation of Z with modulus 9, of order 2
residue\texttt{\symbol{45()

 A mapping $f: {          
  
\[
    f|_{r(m\{java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      \apsto \ \raca_r(m} \dot  {(m}{{(m}
  \]

   for {2 ,3]\

 It is easy to see that the
residue\texttt{\{\noindent\textcolor{FuncColor\triangleright$\enspace\texttt{({mdseries ,m1,r2 })index{@\{}, m1, ,m2java.lang.StringIndexOutOfBoundsException: Index 187 out of bounds for length 187
of{\\noindent\textcolortextcolor{${java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 174
that the residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
ermutationsof\nobreakspace}\ensuremath{ Z} form acountable
subgroup ofSym{\nsuremath{\athbb Z})   theformer by
{\{mathbbZ}) and the  by {ensuremath{\mathbb
Z}}). 

 \index{java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apartition{\obreakspace}\\ }   many
residue   class$tau_r_1(m_1,r_2(_)$interchanges   $(1)$and $_2() and fixes the complement of their union pointwise. 
if the set of moduli of its elements is bounded. Rcwa mappings and
\texttt{\\{@texttt{ransposedClasses}   }  \{\symbol{}argument ,thearguments\{{mdseries\ },\mbox{texttt\\m1} mbox{texttt{mdseries\slshaper2}{nobreakspace\mbox{{mdseries\ } stand for r_1,$m_1$ $r_2$ and{nobreakspace}m_2$, . In  \texttt{symbol{45}argumentform, the arguments\mbox{texttt{\\slshape }}and{nobreakspace}mboxtexttt{slshape }standforthe    list  list brackets is permitted The
 rcwa groups are the objects of  . 

 The definitions of residue\texttt{\symbol{45}}
affine  and \\symbol{45}}groups  generalized the
obvious way to suitable rings other than{\nobreakspace}{\ensuremath{\mathbb
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 57
\}\\45wisegroupsover${mathbbZ}$ semilocalizations {}ensuremath\ }}andover
univariate polynomial rings over finite fields. The ring ${\ensuremath{\mathbb allprimefactors  $_$ m_2   mbox\exttt{\ }}Ifoption \d}is ,the    only 4{45}  m_1  m_2  mbox{texttt\\ m} 
domain the  of{\obreakspace}}{\athbb Z}java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
have list of. aclasstranspositionmbox{texttt{mdseries ct}  corresponding 4\symbol45} canbeobtained by \texttt{ExtRepOfObj(\mbox{\texttt{\mdseries\slshape ct}})} 
java.lang.StringIndexOutOfBoundsException: Range [40, 3) out of bounds for length 74
examples rings  nonzero .}

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
lorChapter} residue\\symbol45}\{\ymbol45} affine
mappings}{sec}
\logpage{[ 2,java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
hyperdef{L{}{
{
  Entering an rcwa mapping of{\nobreakspace}{\ensuremathn|>< n)/  n 810)
giving                   n  0(2  ()

This bedoneeasiestbytextttRcwaMapping mbox{texttt{mdseries\coeffs})}  \{texttt{mdseriesslshape coeffs}is  of $$ triplestextttcoeffs}r1\]nobreakspace=[}{()$ b_()$ c_r)$\texttt{} $$ from 0to\}m-1.

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  integers, error messageis     loop is entered For
example[( 0) ())  02,14 )  02,34)  03,1( )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
ntegerscongruent to$1\cdot 0 +4= ${\}mod\nobreakspace}m  divisibleby\nobreakspace}3 

 For the general constructor for     1(),0()), (1(),2(),(1(),2()) (14) 24) 
!@>java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 48
  
    [ () (226,5(12)) (( 912) )]
  <rcwa mapping of Z with modulus 2>
  !gapprompt
  [, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  @>!DisplayA
  
  Surjective rcwa mapping of Z with modulus\}Z}java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 75
  
          /
          | n/2      if n in 0(2)
   n |-> <  (3n+1)/2 if n in 1(2cf.\}\} 
          |
          java.lang.NullPointerException
  
  !gapprompt@gap>A !gapinput@a := RcwaMappingsymbol{45}} all one needs  is
  <rcwa mapping of Z with modulus 3>
  !gap> a;java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  
  !gapprompt@gap>A !gapinputringRlist   sensible '(\ the\extsfGAP}Reference)ischosen optional java.lang.StringIndexOutOfBoundsException: Range [200, 199) out of bounds for length 212
\\Chapterjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 58
  Rcwa permutation of hyperdef{}}
  
          /
          | 2n/3     ,m,java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   n |><(n-3if  in()
          | (4n+1)/3 if n in 2(3)
          java.lang.NullPointerException
  
  !gapprompt@gap>A !gapinput@Support(a);A
  Z \ [ -1, 0, 1 ]
  !gapprompt@gap>A !gapinput@Cycle(a,44);A
  [ 44, 59, 79, 105, 70, 93, 62, 83, 111, 74, 99, 66 ]
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
end{Verbatim}
 \noindent  the class rotat $rho_{r(),u$.
residue\texttt{java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
of  a residue $($   \nobreakspace}$of   {}R,the\{ }$rho_rm,}   rcwa   maps $ in r(m)$ to $un + (1-u)r$ and which fixes $R \setminus r(m)$ pointwise. Class rotations generalize class reflections, as java.lang.StringIndexOutOfBoundsException: Index 297 out of bounds for length 0
 three   particularlystructure(.\FactorizationIntoCSCRCT \{fan   }):

\subsection{\textcolor{Chapter }{ClassShift (r, m)}}
\logpage{[ 2, 2, 1 ]}\nobreak
\}{}
{@((Z_pi(,2,1)1/)A
\label{ClassShift:r, m}
}\hfill{\scriptsize (function)}}\\
noindenttextcolorFuncColor}$triangleright\\texttt{(\mdseriesslshape java.lang.StringIndexOutOfBoundsException: Index 138 out of bounds for length 138
\label{ClassShift:cl| /  + /3if  in 1(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
\\scriptsize ()}java.lang.NullPointerException
\textbf{\indent Returns:\ }
 the class shift $\nu_{r(m)}  



 The \emph{  A!@ =8;java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60

\{}java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 220
begin[=A\E]
  
  !gapprompt@gap>A !gapinput@Display(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 14
  
  Tame rcwa permutation of Z with modulus 12, of order infinity
  
          /
          | n+12 if n in 5(12)
   n |-> <  n    java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 11
          |
          java.lang.NullPointerException
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ClassReflection (r, m)}}
java.lang.NullPointerException
\hyperdef{ In the seq   the general\texttt{symbol{45}}purpose constructor
{noindenttextcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassReflection({\mdseries\slshape r, m})\index{ClassReflection@\texttt{ClassReflection}!but    waysofentering anrcwa  is by 
label{lassReflection:, }
}\hfill{\scriptsize\textcolorFuncColor}\\enspace\extttR(\\ , m,,coeffs}R@texttt{!by ,modulus listofcoefficients}
\noindent\textcolor{\abel{RcwaMapping: ,modulusandlistofcoefficients
labelC:cl
}\hfill{\scriptsize (\noindent\F}{$$\{RcwaMapping\slshapeR }\{\texttt{}!ringandlist  }
f\ Returns: 
\{java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 32



 The \emph label{by  }

 In the one\texttt{\symbol{45}}argument \\textcolor{}$triangleright\\texttt{RcwaMapping{\mdseries\slshape,range)index{@texttt{RcwaMappingby  andrange}
\begin{Verbatim}\abelRcwaMappingb permutationand }
  
! java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 60

  Rcwa permutation of Z with modulus 9, of orderRcwaMapping  andlistof }
  
          /
          -+  n in ()
   n |-> <  n     if n in Z \ 5(9)
          |
          java.lang.NullPointerException
 
\end{Verbatim}
 }

 \pagebreak[4] 

\subsection{\textcolor{Chapter }{java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 32
\logpage{[ 2:by ofringresiduejava.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68
\hyperdef{L}{X8716A75F7DD1C46B}{}
{\noindent\textcolor{FuncColor}{$\trianglerightlabelRcwaMappingby  java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
\label{:r1,m1 r2, }
}\hfill{\scriptsize\label{by
\noindent\textcolor{FuncColortextbf\Returns\}
\label{java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 18
}\hfill{java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
}
 the class residue classes (mod{\nobreakspace   {({java.lang.StringIndexOutOfBoundsException: Range [123, 122) out of bounds for length 355



 Given two disjoint residue classes $r_1(m_1)$ 

 The class transposition $\tau_{r_1(m_1),thelatterorvaluesarechosen  meaningof the argumentsis

 \index{sequel.The above methods return the rcwa mapping 
 classes$1m_1$ m_2 anT.

\ndexClassPairs@ClassPairs}m  list  all class  interchangingclasses  moduli
  or equal to a given bound \mbox{\texttt{\mdseries\ m}}can be obtained by \textttListClassPairs[\{texttt\mdseries\slshapeP},\box{\{\\slshape }},ClassTransposition), thefunction textttClassPairs returns  list  all 4texttt\symbol{45}tuples (,m_1,)   corresponding tothe  pairs disjoint residue classes $r_1(m_1)$ and $r_2(m_2)$ with $m_1$ and $m_2$ less than or equal to the specified bound. If a list of primes is given as
optional argument \mbox{\texttt{\mdseries\slshape P}}, then the returned list contains only those 4\texttt{\symbol{45}}tuples where
all\item{(e)]  of \mbox{texttt\mdseries\ R}}= {\ensuremath{\mathbb Z}} with modulus \mbox{\texttt{\mdseries\slshape m}} and values given by a list \mbox{\texttt{\mdseries\slshape val}} of 2 pairs \texttt{[}preimage\texttt{, }image\texttt{]} per residue \item[()]ofmbox{\\ } \{}{$ \} java.lang.StringIndexOutOfBoundsException: Range [179, 177) out of bounds for length 353

 \\[() an java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 312
ple be obtainedby\texttt{ExtRepOfObj(\mbox{\texttt{\mdseries\slshape ct}})} 

 \index{SplittedClassTransposition@\\{)]an with `r cycles' \{{\\java.lang.StringIndexOutOfBoundsException: Range [112, 111) out of bounds for length 193

 
\begin{Verbatim}[commandchars=!@expression\}\\45}\45}     class
  
  !gapprompt@gap>A !gapinput@Display(ClassTransposition(1,2,8,10):CycleNotation:=false);A
  
  Rcwa  java.lang.StringIndexOutOfBoundsException: Range [18, 13) out of bounds for length 165
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
          
          | 5n+3    if!appromptgap|RcwaMappingR,x1[10x(][+(),,]*();#(|
   n |-> <  (n-3)/5 if n in 8(10)
          | n       if n in 0(2) \ 8(10)
          java.lang.NullPointerException
  
  !gapprompt@gap>A !  Rcwa  ofZ_  ):n > 13n
  [ ( 0(2), 1(2) ), ( 0(2), 1(4) ), ( 0(2), 3(4) ), (  gapprompt|!@ =RcwaMapping[03],[4,13[13]                  |
(0() 23 )(0(,14 java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
   (12,0()) (1(2,24)  1() 2( ,(1() ()) 
    ( 1(4), 3(4) ), ( 2(4), 3(4)    Z_( 2 )- / java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  !gapprompt@rcwa mapping GF(2[x with modulus x+>
  3528138
  !gapprompt@gap>A !gapinput@SplittedClassTransposition(ClassTransposition(0,2,1,4),3);A
   (0(),112 ),(26, 5(12)),(4() 912))java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
V}
 }

 \ The of all java.lang.StringIndexOutOfBoundsException: Range [49, 46) out of bounds for length 84
simple group CT(!@gap|!gapinputlResidueClass(,);|
of{\nobreakspace}{\   () 14,38,716) ]
.\obreakspace\cite{} 

 , andclass ofrings R other{\obreakspace}{ensuremath\mathbb Z} are defined  an entirely
analogous way \texttt{\symbol{45}}\texttt{\symbol{45}} all one needs to   gapprompt@|!@ClassShift,)|
to replace {\ensuremath{\mathbb Z}} by{\nobreakspace}$R$ and to read $<$ and $\leq$ in the sense of the ordering used by{\nobreakspace}\textsf{GAP}. They can also be entered basically as described above
\texttt{\symbol{45}}\texttt{\symbol{45}} just prepend the desired
ring{\nobreakspace}$  true

 On rings which have more than two units, 
permutations whichjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

\subsection{\textcolor{Chapter }{ClassRotation (r, m, u)}}
\logpage{[ 2, 2, 4 ]}\nobreak
\{}X87EB8C1C87F78A17{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{noindent\textcolor{FuncColor}{\triangleright\enspace\texttt{ClassRotation({\mdseries\slshape r, m, u})\index{ClassRotation@\texttt{ClassRotation}!r, m, u}
\abel{ClassRotationr,m }
}\LXF1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
\texttt{ClassRotationjava.lang.StringIndexOutOfBoundsException: Range [124, 123) out of bounds for length 153
\label{ClassRotation:cl, u}
l{scriptsize function)}java.lang.NullPointerException
\textbf{\indent Returns:\ }
 the class rotation $\rho_{r(m),u}$. 



Given a r($  {$    {java.lang.StringIndexOutOfBoundsException: Range [92, 91) out of bounds for length 340

 \index{RotationFactor@\texttt{RotationFactor}!of a class rotation} In the two\texttt{\symbol{45}}argument form, the argument{\nobreakspace}\mbox{\texttt{\mdseries\slshape cl}}}hfill{scriptsize()\\
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
  
   permutationof Z_   withmodulus2 oforderinfinity
  
           apowerof{\nobreakspace\mbox{\mdseriesslshape p}  whosewhose modulushasonlyjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 77
          | 1/3 n + 2/3 if n in 1(2)
   n |-> <  n           if 131,203/, 311/, 71613,35813,179/,/,
          
          java.lang.NullPointerException
  
  !gapprompt@1231/13, 18513 278613,/, 2096/1048/,/13, 262/ 
  !gapprompt@gap>A
  !appromptgapA gapinput@r:=1,,Z8*()Support(cr);java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80
  ( (xZ23)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

  !gapprompt@gap>A !gapinput@Display(cr);A
  
  Rcwa permutation of GF(2^3)[x] with modulus x, of order 7
  
          /
          | Z(2^3)*P + Z(2^3)^3 if P in 1(x)
   P |-> <  Parcwa mapping} There is also an operation \texttt{LaTeXStringRcwaMapping}, which takes as argument an rcwa mapping and returns a corresponding {\LaTeX} string. The output makes use of the {\LaTeX} macro package \textsf{amsmath}. If the option \mbox{\texttt{\mdseries\slshape Factorization}} is set and the argument is bijective, a factorization into class shifts, class
          |
          java.lang.NullPointerException
  
\end{Verbatim}
 }

 \index{IsClassShift@\texttt{IsClassShift}!for an rcwa mapping} \index{IsClassReflection@\texttt{IsClassReflection}!for an rcwa mapping} \index{IsClassRotation@\texttt{IsClassRotation}!for an rcwa mapping} \index{IsClassTransposition@\texttt{IsClassTransposition}!for an rcwa mapping} \index{IsGeneralizedClassTransposition@\texttt{IsGeneralizedClassTransposition}!for an rcwa mapping} \texttt{IsClassShift}, \texttt{IsClassReflection}, \texttt{IsClassRotation}, \texttt{IsClassTransposition} and \texttt{IsGeneralizedClassTransposition} are properties which indicate whether a given rcwa mapping belongs to the
corresponding series. 

 In the sequel we describe the general\texttt{\symbol{45}}purpose constructor
for rcwa mappings. The constructor may look a bit technical on a first glance,
but knowing all possible ways of entering an rcwa mapping is by no means
necessary for understanding this manual or for using this package. 
\subsection{\textcolor{Chapter }{ RcwaMapping (the general constructor) }}\logpage{[ 2, 2, 5 ]}
\hyperdef{L}{X8799551B83644B37}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape R, m, coeffs})\index{RcwaMapping@\texttt{RcwaMapping}!by ring, modulus and list of coefficients}
\label{RcwaMapping:by ring, modulus and list of coefficients}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape R, coeffs})\index{RcwaMapping@\texttt{RcwaMapping}!by ring and list of coefficients}
\label{RcwaMapping:by ring and list of coefficients}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape coeffs})\index{RcwaMapping@\texttt{RcwaMapping}!by list of coefficients}
\label{RcwaMapping:by list of coefficients}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape perm, range})\index{RcwaMapping@\texttt{RcwaMapping}!by permutation and range}
\label{:by and rangejava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}\hfill{\scriptsize (method)}}\\
\FuncColor}$$\exttt{cwaMapping({slshape,values})\index{RcwaMapping@\texttt{RcwaMapping}!by modulus and list of values}
\label{RcwaMapping:by modulus and list of values}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape pi, coeffs})\index{RcwaMapping@\texttt{RcwaMapping}!by set of non-invertible primes and list of coefficients}
\label{RcwaMapping:by set of non-invertible primes and list of coefficients}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\}commandchars=@,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
\label{RcwaMapping:by finite field size, modulus and list of coefficients}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape P1, P2})\index{RcwaMapping@\texttt{RcwaMapping}!by two partitions of a ring into residue classes}
\label{RcwaMapping:by two partitions of a ring into residue classes}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape cycles})\index{RcwaMapping@\texttt{RcwaMapping}!by residue class cycles}
\label{RcwaMapping:by residue class cycles}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape expression})\index{RcwaMapping@\texttt{RcwaMapping}!by arithmetical expression}
\label{RcwaMapping:by arithmetical expression}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 an rcwa mapping. 



 In all cases the argument{\nobreakspace}\mbox{\texttt{\mdseries\slshape R}} is the underlying ring, \mbox{\texttt{\mdseries\slshape m}} is the modulus and \mbox{\texttt{\mdseries\slshape coeffs}} is the coefficient list. A \emph{coefficient list} for an rcwa mapping with modulus $m$ consists of $|R/mR|$ coefficient triples \texttt{[}$a_{r(m)}$, $b_{r(m)}$, $c_{r(m)}$\texttt{]}. Their ordering is determined by the ordering of the representatives of the
residue classes (mod{\nobreakspace}$m$) in the sorted list returned by \texttt{AllResidues(\mbox{\texttt{\mdseries\slshape R}}, \mbox{\texttt{\mdseries\slshape m}})}. In case $R = {\ensuremath{\mathbb Z}}$ this means that the coefficient triple for the residue class $0(m)$ comes first and is followed by the one for $1(m)$, the one for $2(m)$ and so on. 

 If one or several of the arguments \mbox{\texttt{\mdseries\slshape R}}, \mbox{\texttt{\mdseries\slshape m}} and \mbox{\texttt{\mdseries\slshape coeffs}} are omitted or replaced by other arguments, the former are either derived from
the latter or default values are chosen. The meaning of the other arguments is
defined in the detailed description of the particular methods given in the
sequel. The above methods return the rcwa mapping 
\begin{description}
\item[{(a)}]  of \mbox{\texttt{\mdseries\slshape R}} with modulus \mbox{\texttt{\mdseries\slshape m}} and coefficients \mbox{\texttt{\mdseries\slshape coeffs}}, 
\item[{(b)}]  of \mbox{\texttt{\mdseries\slshape R}} = {\ensuremath{\mathbb Z}} or \mbox{\texttt{\mdseries\slshape R}} = ${\ensuremath{\mathbb Z}}_{(\pi)}$ with modulus \texttt{Length(\mbox{\texttt{java.lang.StringIndexOutOfBoundsException: Index 207 out of bounds for length 15
item[c}]of mbox{texttt\mdseries\slshape }} ={\ensuremath{\mathbb Z}with \{Length\mbox{texttt{\mdseries\slshape coeffs}})} and coefficients \mbox{\texttt{\mdseries\slshape coeffs}}, 
{mdseries }  \{\athbb }}permuting any set \texttt{mbox{texttt\mdseries\slshape range}}+k*Length(\mbox{\texttt{\mdseries\slshape range}})} like \mbox{\texttt{\mdseries\slshape perm}} permutes \mbox{\texttt{\mdseries\slshape range}}, 
}} with\mdseries\slshape val}} of 2 pairs \texttt{[}preimage\texttt{, }image\texttt{]} per residue class (mod \mbox{\texttt{\mdseries\slshape m}}), 
\item[{(f)}]  of \mbox{\texttt{\mdseries\slshape R}} = ${\ensuremath{\mathbb Z}}_{(\pi)}$ with modulus \texttt{Length(\mbox{\texttt{\mdseries\slshape coeffs}})} and coefficients \mbox{\texttt{\mdseries\slshape coeffs}} (the set of primes $\pi$ which denotes the underlying ring is passed as argument{\nobreakspace}\mbox{\texttt{\mdseries\slshape pi}}), 
\tem{g)}]   \mbox{\exttt{\dseries\lshape R =(mbox\texttt{\dseries\ }[\{\texttt{mdseries\lshape x}}] with modulus{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}} and coefficients \mbox{\texttt{\mdseries\slshape coeffs}}, 
\item[{(h)}]  an rcwa permutation which induces a bijection between the partitions \mbox{\texttt{\mdseries\slshape P1}} and \mbox{\texttt{\mdseries\slshape P2}} of{\nobreakspace}\mbox{\texttt{\mdseries\slshape R}} into residue classes and which is affine on the elements of \residue classes of the source of an rcwa mapping can be computed with \texttt{\texttt{\symbol{94}}}, the same symbol as used for exponentiation and conjugation. The same works
\item[{(i)}]  an rcwa begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
cyclically, or 
\item[{(j)}]  the rcwa permutation {nobreakspace{ensuremathmathbb Z}givenby the
arithmetical expression \mbox{\texttt{\mdseries\slshape expression}} \texttt{\symbol{45}}\texttt{\symbol{45}} a string consisting of class
transpositions (e.g. \texttt{"(0(2),1(4))"}) or cycles permuting residue classes (e.g. \texttt{"(0(2),1(8),3(4),5(8))"}), class shifts (e.g. \texttt{"cs(4(6))"}, class reflections (e.g  gapprompt@ap|!apinput@15^;
\end{description}
 respectively. The methods for the operation \texttt{RcwaMapping} perform a number of argument checks, which can be skipped by using \texttt{RcwaMappingNC} instead. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@R := PolynomialRing(GF(2),1);; x := X(GF(2),1);; SetName(x,"x");|
  !gapprompt@gap>| !gapinput@RcwaMapping(R,x+1,[[1,0,x+One(R)],[x+One(R),0,1]]*One(R));     # (a)|
  <rcwa mapping of GF(2)[x] with modulus x+1>
  !gapprompt@gap>| !gapinput@RcwaMapping(Z_pi(2),[[1/3,0,1]]);                              # (b)|
  Rcwa mapping of Z_( 2 ): n -> 1/3 n
  !gapprompt@gap>| !gapinput@a := RcwaMapping([;|
  <rcwa mapping of Z with modulus 3>
  !gapprompt@gap>| !gapinput  2(3)
  ( 1(), 2(), 3() )
  !gapprompt@gap>| !gapinput@T = RcwaMapping(2,[[1,2],[2,1],[3,5],[4,2]]);                  # (e)|
  true
  !gapprompt@gap>| !gapinput@RcwaMapping([2],[[1/3,0,{Verbatim}
  Rcwa mapping of Z_( 2 ): n -> 1/3 n
  \ndexPreImageElm@\extttPreImageElm}oa   under rcwamapping}\{PreImagesElm\{} a   underan   index{reImage@textttPreImage}!  of java.lang.StringIndexOutOfBoundsException: Range [225, 224) out of bounds for length 533
  <rcwa mapping of GF(2)[x] with modulus x+1>
  !gappromptresidue    mappingbe computedby \{.java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  !gapprompt@>| !gapinput@                   
  true
  !gapprompt@gap>,16 java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  ( 0(2), 1(4), 3(8), 7(16) )
  !| g@l(,);java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  [0(2 (),38)7)
  !gapprompt@gap>| !gapinput@g := RcwaMapping("((0(4),1(6))*cr(0(6)))^2/cs(2(8))");         # (j)|
  <rcwa permutation of Z with modulus 72>
  !gapprompt@gap>| !gapinput@g = (ClassTransposition(0,4,1,6) * ClassReflection(0,6))^2/|
  gapprompt>gapinput@ClassShift(28;
  true
  
\end{Verbatim}
 }

 Rcwa mappings of {\ensuremath{\mathbb Z}} can be ``translated'' {ensuremath{}}can efficientlywith theoperation tjava.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 236

\subsection{\textcolor{Chapter }{LocalizedRcwaMapping (for an rcwa mapping of Z and a prime)}}
\logpage{[ 2, 2, 6 ]}\nobreak
\hyperdefL}{X7F1A559387D0226E}}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LocalizedRcwaMapping({\mdseries\slshape f, p})\index{LocalizedRcwaMapping@\texttt{LocalizedRcwaMapping}!for an rcwa mapping of Z and a java.lang.StringIndexOutOfBoundsException: Index 202 out of bounds for length 2
\@                  java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}\hfill{ 
\noindent\textcolor{java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 14
\label{SemilocalizedRcwaMapping:for an rcwa mapping  set of rcwa mappings of a ring does not form a ringtexttt{} and \texttt{*}. 
}\hfill{\scriptsize (function)}}\\
\
 the rcwa mapping of ${\ensuremath{\mathbb Z}}_{(p)}$ respectively ${\java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 1



 The argument \mbox{\  gappromptg> b:ClassShift(,3)*a;|
modulus is a power of{\nobreakspace}\mbox{\texttt{\mdseries\slshape p}}, or whose modulus has onlygap>| !apinput@ (a+b) Image(a- ) ];java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
\begin{Verbatim}[commandchars=!@|,fontsize=\
  end{}
  !gappromptindexModulus{describedin\\:EnteringRcwaMappings
  !gapprompt@gap>| ! mentioned  be
  [ 131/13, 203/13, 311/13, 473/13, found inthe\extsf{AP reference manual. For rcwa mappings of rings other
    419/13, 635/13, 959/13, 1445/t{\nobreakspace}{\nsuremath{\mathbb Z}}, not for all operations applicable
    1231/3,1853/, 278613, 1393/13, /13,104813, /13 26213]
  
\end{Verbatim}
 }

 \index{View@\texttt{View}!for an rcwa mapping}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1300 out of bounds for length 76
are options \texttt{CycleNotation}, \texttt{AsClassMapping}, \texttt{PrintNotation} and \texttt{AbridgedNotation} to take influence on how certain rcwa mappings are shown. These options can
either be not set, set to \texttt{true} or set to \texttt{false}. If the option texttt{ is,itistriedharderto  downanrcwapermutation of
{\ensuremath{\mathbb Z}} of finite order as a product of disjoint residue
class cycles, if this is possible. If the option \texttt{AsClassMapping} is set, \texttt{Display} shows which residue classes are mapped to which by the affine partial
mappings, and marks any loops. The option \texttt{PrintNotation} influences the output in favour of \textsf{GAP} \texttt{\symbol{45}} readability, and the option \texttt{AbridgedNotation} can be used to abridge longer names like \texttt{ClassShift}, \texttt{ClassReflection} etc.. By default, the output of the methods for \texttt{Display} and \texttt{Print} describes an rcwa mapping in full. The \texttt{Print}ed representation of an rcwa mapping is \textsf{GAP} \texttt{\symbol{45}} readable if and only if the \texttt{Print}ed representation of the elements of the underlying ring is so. 

 \index{LaTeXStringRcwaMapping@\texttt{LaTeXStringRcwaMapping}!for an rcwa mapping} There is also an operation \texttt{LaTeXStringRcwaMapping}, which takes as argument an rcwa mapping and returns a corresponding {\LaTeX} string. The output makes use of the {\LaTeX} macro package \textsf{amsmath}. If the option \mbox{\texttt{\mdseries\slshape Factorization}} is set and the argument is bijective, a factorization into class shifts, class
reflections, class transpositions and prime switches is printed (cf.immediately from  the coefficients of its affine partial mappings. This holds
by \mbox{\texttt{\mdseries\slshape Indentation}} characters can be obtained by setting this option value accordingly. 
\egin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Print(LaTeXStringRcwaMapping(T));|
    \ 
  \begin{cases}
    /2      &textif n in(2) \
    +1
  \end{cases}
  
\end{Verbatim}
 \index{LaTeXAndXDVI@\texttt{LaTeXAndXDVI}!for an rcwa mapping} There is an operation \texttt{LaTeXAndXDVI} which displays an rcwa mapping in an \textsf{xdvi} window. This works as follows: The string returned by \texttt\noindent\textcolor{java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0

  
\residuetexttt{\45}c\{{}wise
ffinemappings}\label{java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 59
\logpage{[ 2, 3, 0 ]}
\\ 
{
  \{ @cwa mapping!java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 161

 Testing rcwa mappings for java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
lists, hence is cheap. Rcwa mappings pk (an mapping, a   )java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
for \texttt{*}. Rcwa permutations can also be inverted, thus java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 33
negative exponent. Multiplying, inverting and computing powers of tame rcwa
appings  . Computing powersof wild mappings is  expensive
\texttt{\symbol{45}}\texttt{\symbol{45 and an exponent}
normally grow approximately exponentially with the exponent. How expensive
multiplying a couple of wild mappings is, varies very }h{scriptsize(}\java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
rcwa  java.lang.StringIndexOutOfBoundsException: Range [72, 69) out of bounds for length 76
modulus. Whether
operation \texttt{IsTame}. There isbegin{}commandchars=@,\,frame=label]
infinite order. 
\beginVerbatimcommandchars=!|,fontsize=\frame=,label=Example]
  
  !  [ [  ], 0( 2(, Z\0()U(5)  ]
  !gapprompt@gap>| !gapinput@a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; # Collatz' permutation.|
  !gapprompt@gap>| !gapinput@List([-4..4],k->small,frame=single,label=Example]
  [ 256, 64, 16java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  !gapprompt@gap>| !gapinput@IsTame(T) or IsTame(a);|
  false
  !gapprompt@gap>| !gapinput@IsTame(ClassShift(
  true
  !gapprompt@gap>|}java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 48
<java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 38
  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 77
  <rcwa permutation of Z with modulus 21>
  
\end{Verbatim}
 \index{IsInjective@\texttt{IsInjective}!for an rcwa mapping} \index{IsSurjective@\texttt{IsSurjective}!for an rcwa mapping} \index{IsBijective@\texttt{IsBijective}!for an rcwa mapping} \index{Image@\texttt{Image}!of an rcwa mapping} There are methods installed for \texttt{IsInjective}, \texttt{IsSurjective}, \texttt{IsBijective} and \texttt{Image}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@[ IsInjective(T), IsSurjective(T), IsBijective(a) ];|
  [ false, true, true ]
  !gapprompt@gap>| !gapinput@Image(RcwaMapping([[2,0,1]]));|
  0(2)
  
\end{Verbatim}
 \index{rcwa   !gapprompt@>| !gap@         0,3)ClassReflection(2,5)]Sign);
residue ,- 
for partitions of the
\begin\Verbatim
  
  !gapprompt@gap
  23
  !gapprompt@gap>| !gapinput@ResidueClass(1,2)^T;|
  2(3)
  !gapprompt@gap>| !gapinput@List([[0,3],[1,3],[2,3]],ResidueClass)^a;|
  [ 0(2), 1(4), 3(4) ]
  
\Verbatim}
 \index{permutations}\{sec:FactoringRcwaMappings
residue classes under an rcwa mapping can be 
\\hyperdefL}X8475F844869DD060}}
  
  !gapprompt@gap>| !gapinput@PreImagesElm(T,8);|
  [ 5, 16 ]
  !gapprompt@gap>| !gapinput@PreImage(T,ResidueClass(Integers,3,2));|
  Z \ 0(6) U 2(6)
  !gapprompt@gap>| !gapinput@M := [1];; l := [1];;|
  !gapprompt@gap>| !gapinput@while Length(M) < 5000 do M := PreImage(T,M); Add(l,Length(M)); od; l;|
  [ 1, 1, 2, 2, 4, 5, 8, 10, 14, 18, 26, 36, 50, 67, 89, 117, 157, 208, 
    277, 367, 488, 649, 869, 1154, 1534, 2039, 2721, 3629, 4843, 6458 ]
  
\end{Verbatim}
 \index{Support@\texttt{Support}!of an rcwa mapping} \index{MovedPoints@\texttt{MovedPoints}!of an rcwa mapping} \index{RestrictedPerm@\texttt{RestrictedPerm}!for an rcwa permutation and a residue class union} \index{DensityOfSupport@\texttt{DensityOfSupport}!of an rcwa mapping} \index{DensityOfSetOfFixedPoints@\texttt{DensityOfSetOfFixedPoints}!of an rcwa mapping} There is a method for the operation \texttt{Support} for computing the support of an rcwa mapping. A synonym for \texttt{Support} is \texttt{MovedPoints}. The natural density of the support of an rcwa mapping of
{\ensuremath{\mathbb Z}} can be computed efficiently with the operation \texttt{DensityOfSupport}. Likewise, the natural density of the set of fixed points of an rcwa mapping
of {\ensuremath{\mathbb Z}} can be computed efficiently with the operation \texttt{DensityOfSetOfFixedPoints}. There is also a method for \texttt{RestrictedPerm} for computing the restriction of an rcwa permutation to a union of residue
classes which it fixes setwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List([a,a^2],Support);|
  [ Z \ [ -1, 0, 1 ], Z \ [ -3, -2, -1, 0, 1, 2, 3 ] ]
  !gapprompt@gap>| !gapinput@RestrictedPerm(ClassShift(0,2)*ClassReflection(1,2),|
  !gapprompt@>| !gapinput@                  ResidueClass(0,2));|
  <rcwa mapping of Z with modulus 2>
  !gapprompt@gap>| !gapinput@last = ClassShift(0,2);|
  true
  
\end{Verbatim}
 Rcwa mappings can be Factoring  elements intothe membersof some``ice'generators   helpfulIn   we  an 
java.lang.StringIndexOutOfBoundsException: Range [15, 3) out of bounds for length 89

 
\beginjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  gjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 56
  !gapprompt@gap>| !gapinput@[ Image((a + b)), Image((a - b)) ];|
  [ 2(4), [ -2, 0 ] ]
  
\end{Verbatim}
 \index{Modulus@\texttt{Modulus}!of an rcwa mapping} \index{Mod@\texttt{Mod}!for an rcwa mapping} \index{Coefficients@\texttt{Coefficientsgiven, the iterates are reduced (mod{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}}). 
meaning of the return values is as described in Section{\nobreakspace}\ref{sec:EnteringRcwaMappings}. 

 General documentation for most operations mentioned in this section can be
found in the \textsf{GAP} reference manual. For rcwa mappings of rings other
than{\nobreakspace}{\ensuremath{\mathbb Z}}, not for all operations applicable
methods are available. 

 As in general a subring relation $R_1<R_2$ does \emph{not} give rise to a natural embedding of RCWA($R_1$) into RCWA($R_2$), there is no coercion between rcwa mappings or rcwa groups over different
rings. }

  
\section{\textcolor{Chapter }{ Attributes and properties of
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings }}\label{sec:AttributesAndPropertiesOfRcwaMappings}
\logpage{[ 2, 4, 0 ]}
\hyperdef{L}{X7C16D22C7BD40FDC}{}
{
  \index{class-wise translating@class\texttt{\symbol{45}}wise translating!definition} \index{integral@integral!definition} \index{balanced@balanced!definition} \index{sign-preserving@sign\texttt{\symbol{45}}preserving!definition} \index{maximal shift@maximal shift!definition} \index{rcwa mapping@rcwa mapping!prime set} \index{rcwa mapping@rcwa mapping!maximal shift} \index{rcwa mapping@rcwa mapping!class-wise translating} \index{rcwa mapping@rcwa mapping!integral} \index{rcwa mapping@rcwa mapping!balanced} \index{rcwa mapping@rcwa mapping!class-wise order-preserving} \index{rcwa mapping@rcwa mapping!sign-preserving} \index{Multiplier@\texttt{Multiplier}!of an rcwa mapping} \index{Mult@\texttt{Mult}!for an rcwa mapping} \index{Divisor@\texttt{Divisor}!of an rcwa mapping} \index{Div@\texttt{Div}!for an rcwa mapping} \index{PrimeSet@\texttt{PrimeSet}!of an rcwa mapping} \index{MaximalShift@\texttt{MaximalShift}!of an rcwa mapping of Z} \index{IsClassWiseTranslating@\texttt{IsClassWiseTranslating}!for an rcwa mapping} \index{IsIntegral@\texttt{IsIntegral}!for an rcwa mapping} \index{IsBalanced@\texttt{IsBalanced}!for an rcwa mapping} \index{IsClassWiseOrderPreserving@\texttt{IsClassWiseOrderPreserving}!for an rcwa mapping} \index{IsSignPreserving@\texttt{IsSignPreserving}!for an rcwa mapping} A number of basic attributes and properties of an rcwa mapping are derived
immediately from the coefficients of its affine partial mappings. This holds
for example for the multiplier and the divisor. These two values are stored as
attributes \texttt{Multiplier} and \texttt{Divisor}, or for short \texttt{Mult} and \texttt{Div}. The \emph{prime set} of an rcwa mapping is the set of prime divisors of the product of its modulus
and its multiplier. It is stored as an attribute \texttt{PrimeSet}. The \emph{maximal shift} of an rcwa mapping of {\ensuremath{\mathbb Z}} is the maximum of the absolute
values of its coefficients $b_{r(m)}$ in the notation introduced in Section{\nobreakspace}\ref{sec:basicdefinitions}. It is stored as an attribute \texttt{MaximalShift}. An rcwa mapping is called \emph{class\texttt{\symbol{45}}wise translating} if all of its affine partial mappings are translations, it is called \emph{integral} if its divisor equals{\nobreakspace}1, and it is called \emph{balanced} if its multiplier and its divisor have the same prime divisors. A
class\texttt{\symbol{45}}wise translating mapping has the property \texttt{IsClassWiseTranslating}, an integral mapping has the property \texttt{IsIntegral} and a balanced mapping has the property \texttt{IsBalanced}. An rcwa mapping of the ring of integers or of one of its semilocalizations
is called \emph{class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving} if and only if all coefficients $a_{r(m)}$ (cf.{\nobreakspace}Section{\nobreakspace}\ref{sec:basicdefinitions}) in the numerators of the affine partial mappings are positive. The
corresponding property is \texttt{IsClassWiseOrderPreserving}. An rcwa mapping of{\nobreakspace}{\ensuremath{\mathbb Z}} is called \emph{sign\texttt{\symbol{45}}preserving} if it does not map nonnegative integers to negative integers or vice versa.
The corresponding property is \texttt{IsSignPreserving}. All elements of the simple group CT({\ensuremath{\mathbb Z}}) generated by
the set of all class transpositions are sign\texttt{\symbol{45}}preserving. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;A
  !gapprompt@gap>A !gapinput@IsBijective(u);; Display(u);A
  
  Rcwa permutation of Z with modulus 5
  
          /
          | 3n/5     if n in 0(5)
          | (9n+1)/5 if n in 1(5)
   n |-> <  (3n-1)/5 if n in 2(5)
          | (9n-2)/5 if n in 3(5)
          | (9n+4)/5 if n in 4(5)
          \
  
  !gapprompt@gap>A !gapinput@Multiplier(u);A
  9
  !gapprompt@gap>A !gapinput@Divisor(u);A
  5
  !gapprompt@gap>A !gapinput@PrimeSet(u);A
  [ 3, 5 ]
  !gapprompt@gap>A !gapinput@IsIntegral(u) or IsBalanced(u);A
  false
  !gapprompt@gap>A !gapinput@IsClassWiseOrderPreserving(u) and IsSignPreserving(u);A
  true
  
\end{Verbatim}
 There are a couple of further attributes and operations related to the affine
partial mappings of an rcwa mapping: 

\subsection{\textcolor{Chapter }{LargestSourcesOfAffineMappings (for an rcwa mapping)}}
\logpage{[ 2, 4, 1 ]}\nobreak
\hyperdef{L}{X7C21406085B69C30}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LargestSourcesOfAffineMappings({\mdseries\slshape f})\index{LargestSourcesOfAffineMappings@\texttt{LargestSourcesOfAffineMappings}!for an rcwa mapping}
\label{LargestSourcesOfAffineMappings:for an rcwa mapping}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 the coarsest partition of \texttt{Source(\mbox{\texttt{\mdseries\slshape f}})} on whose elements the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is affine. 



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@LargestSourcesOfAffineMappings(ClassShift(3,7));|
  [ Z \ 3(7), 3(7) ]
  !gapprompt@gap>| !gapinput@LargestSourcesOfAffineMappings(ClassReflection(0,1));|
  [ Integers ]
  !gapprompt@gap>| !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;|
  !gapprompt@gap>| !gapinput@List( [ u, u^-1 ], LargestSourcesOfAffineMappings );|
  [ [ 0(5), 1(5), 2(5), 3(5), 4(5) ], [ 0(3), 1(3), 2(9), 5(9), 8(9) ] ]
  !gapprompt@gap>| !gapinput@kappa := ClassTransposition(2,4,3,4) * ClassTransposition(4,6,8,12)|
  !gapprompt@>| !gapinput@          * ClassTransposition(3,4,4,6);|
  <rcwa permutation of Z with modulus 12>
  !gapprompt@gap>| !gapinput@LargestSourcesOfAffineMappings(kappa);|
  [ 2(4), 1(4) U 0(12), 3(12) U 7(12), 4(12), 8(12), 11(12) ]
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{FixedPointsOfAffinePartialMappings (for an rcwa mapping)}}
\logpage{[ 2, 4, 2 ]}\nobreak
\hyperdef{L}{X7D6D0F2783AD02F4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FixedPointsOfAffinePartialMappings({\mdseries\slshape f})\index{FixedPointsOfAffinePartialMappings@\texttt{FixedPointsOfAffinePartialMappings}!for an rcwa mapping}
\label{FixedPointsOfAffinePartialMappings:for an rcwa mapping}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 a list of the sets of fixed points of the affine partial mappings of the rcwa
mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} in the quotient field of its source. 



 The returned list contains entries for the restrictions of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} to all residue classes modulo \texttt{Mod(\mbox{\texttt{\mdseries\slshape f}})}. A list entry can either be an empty set, the source of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} or a set of cardinality{\nobreakspace}1. The ordering of the entries
corresponds to the ordering of the residues in \texttt{AllResidues(Source(\mbox{\texttt{\mdseries\slshape f}}),\mbox{\texttt{\mdseries\slshape m}})}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@FixedPointsOfAffinePartialMappings(ClassShift(0,2));|
  [ [  ], Rationals ]
  !gapprompt@gap>| !gapinput@List([1..3],k->FixedPointsOfAffinePartialMappings(T^k));|
  [ [ [ 0 ], [ -1 ] ], [ [ 0 ], [ 1 ], [ 2 ], [ -1 ] ], 
    [ [ 0 ], [ -7 ], [ 2/5 ], [ -5 ], [ 4/5 ], [ 1/5 ], [ -10 ], [ -1 ] ] ]
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{Multpk (for an rcwa mapping, a prime and an exponent)}}
\logpage{[ 2, 4, 3 ]}\nobreak
\hyperdef{L}{X7A2E308C860B46E3}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Multpk({\mdseries\slshape f, p, k})\index{Multpk@\texttt{Multpk}!for an rcwa mapping, a prime and an exponent}
\label{Multpk:for an rcwa mapping, a prime and an exponent}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 the union of the residue classes $r(m)$ such that $p^k||a_{r(m)}$ if $k \geq 0$, and the union of the residue classes $r(m)$ such that $p^k||c_{r(m)}$ if $k \leq 0$. In this context, $m$ denotes the modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}, and $a_{r(m)}$ and $c_{r(m)}$ denote the coefficients of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} as introduced in Section{\nobreakspace}\ref{sec:basicdefinitions}. 



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);; # The Collatz mapping.|
  !gapprompt@gap>| !gapinput@[ Multpk(T,2,-1), Multpk(T,3,1) ];|
  [ Integers, 1(2) ]
  !gapprompt@gap>| !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;|
  !gapprompt@gap>| !gapinput@[ Multpk(u,3,0), Multpk(u,3,1), Multpk(u,3,2), Multpk(u,5,-1) ];|
  [ [  ], 0(5) U 2(5), Z \ 0(5) U 2(5), Integers ]
  
\end{Verbatim}
 }

 \index{ClassWiseOrderPreservingOn@\texttt{ClassWiseOrderPreservingOn}} \index{ClassWiseConstantOn@\texttt{ClassWiseConstantOn}} \index{ClassWiseOrderReversingOn@\texttt{ClassWiseOrderReversingOn}} There are attributes \texttt{ClassWiseOrderPreservingOn}, \texttt{ClassWiseConstantOn} and \texttt{ClassWiseOrderReversingOn} which store the union of the residue classes (mod{\nobreakspace}\texttt{Mod(\mbox{\texttt{\mdseries\slshape f}})}) on which an rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} of{\nobreakspace}{\ensuremath{\mathbb Z}} or of a semilocalization thereof is
class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving,
class\texttt{\symbol{45}}wise constant or class\texttt{\symbol{45}}wise
order\texttt{\symbol{45}}reversing, respectively. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List([ClassTransposition(1,2,0,4),ClassShift(2,3),|
  !gapprompt@>| !gapinput@         ClassReflection(2,5)],ClassWiseOrderPreservingOn);|
  [ Integers, Integers, Z \ 2(5) ]
  
\end{Verbatim}
 \index{ShiftsUpOn@\texttt{ShiftsUpOn}} \index{ShiftsDownOn@\texttt{ShiftsDownOn}} Also there are attributes \texttt{ShiftsUpOn} and \texttt{ShiftsDownOn} which store the union of the residue classes (mod{\nobreakspace}\texttt{Mod(\mbox{\texttt{\mdseries\slshape f}})}) on which an rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} of{\nobreakspace}{\ensuremath{\mathbb Z}} induces affine mappings $n \mapsto n + c$ for $c > 0$, respectively, $c < 0$. 

 Finally, there are epimorphisms from the subgroup of RCWA({\ensuremath{\mathbb
Z}}) formed by all class\texttt{\symbol{45}}wise
order\texttt{\symbol{45}}preserving elements to ({\ensuremath{\mathbb Z}},+)
and from RCWA({\ensuremath{\mathbb Z}}) itself to the cyclic group of
order{\nobreakspace}2, respectively: 

\subsection{\textcolor{Chapter }{Determinant (of an rcwa mapping of Z)}}
\logpage{[ 2, 4, 4 ]}\nobreak
\hyperdef{L}{X7B1E53127D9AE52F}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Determinant({\mdseries\slshape f})\index{Determinant@\texttt{Determinant}!of an rcwa mapping of Z}
\label{Determinant:of an rcwa mapping of Z}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 the determinant of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} of{\nobreakspace}{\ensuremath{\mathbb Z}}. 



 The \emph{determinant} of an affine mapping $n \mapsto (an+b)/c$ whose source is a residue class $r(m)$ is defined by $b/|a|m$. This definition is extended additively to determinants of rcwa mappings. 

 Let $f$ be an rcwa mapping of the integers, and let $m$ denote its modulus. Using the notation $f|_{r(m)}: n \mapsto (a_{r(m)} \cdot n + b_{r(m)})/c_{r(m)}$ for the affine partial mappings, the \emph{determinant} det($f$) of{\nobreakspace}$f$ is given by 
      
\[
        \sum_{r(m) \in \mathbb{Z}/m\mathbb{Z}} b_{r(m)}/(|a_{r(m)}| \cdot m).
      \]

       The determinant mapping is an epimorphism from the group of all
class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving rcwa
permutations of{\nobreakspace}{\ensuremath{\mathbb Z}} to
({\ensuremath{\mathbb Z}},+), see{\nobreakspace}\cite{Kohl05}, Theorem{\nobreakspace}2.11.9. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List([ClassTransposition(0,4,5,12),ClassShift(3,7)],Determinant);|
  [ 0, 1 ]
  !gapprompt@gap>| !gapinput@Determinant(ClassTransposition(0,4,5,12)*ClassShift(3,7)^100);   |
100 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 50
  
\end{Verbatim}
 }

 

\ Z)}}
\ ,5]nobreak
\L{}{}
{\noindent\textcolor  />java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 58
\label{SignSo  shownwindow  the following structure.
}\hfill{\scriptsize (attribute)}}\\
\f{indent Returns:\ }
 the sign of      ┌───────────────────┐



               │

\[├──────────────────┤
        (-1)^{\│  row   │    
             s{()\a_rm<}m-2}{java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      \]

        mapping anepimorphismfrom RCWA{ensuremathmathbbZ}  
group ${A case,theheights  widths  computed.rt
java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 75
The Z}})is subgroupofkernel. 
\{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gappromptthose applications forwhichone justhas to collect thedata to beshown
  !dash; java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 49
   1-,-1 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  
\nd{erbatim}
 }

 }

  
\in Chapternbsp;Ref java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 38
permutations}}\label{sec:FactoringRcwaMappings}
\logpage{ 2,,0 }
\yperdefL}{X8475F844869DD060}}
O applications may provide only asubset,or  further functionality,
  java.lang.StringIndexOutOfBoundsException: Range [27, 11) out of bounds for length 137
which java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 6
}.Elementsfinitely generated  groupscan factoredinto
`as usual'see\\{} rPreImagesRepresentative:for epi  a  to anrcwa 

\subsection{\textcolor{Chapter }{CTCSCRSplit (for an rcwaminusone  cell)
\[2,5 }nobreak
\hyperdef{}{X829BA0537F2372FF}}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 6
\label{CTCSCRSplit:for an rcwa permutation of Z}
}\hfill{\<C>NCurses.attrs</C>
\textbf{\   Section&bsp< Subsect="ssec:ncursesAttrs">)
 a list of  rcwa permutations $a$, $b$ and $c$ whose product equals \mbox{\texttt{\mdseries\slshape g}}, where $a$ fixes the nonnegative integers setwise, $b ow,or column; this causes also scrolling of the main table
order. 



java.lang.StringIndexOutOfBoundsException: Range [13, 9) out of bounds for length 78
rcwa permutations of {\   andfiltering  rows
setwise aisjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 76
\[!|small,framesingle,]
  
  !Item
  <rcwa permutation of Z the   thiscolumn,
  !appromptgap|gapinput@facts := CTCSCRSplit(g);|
  [ <rcwa permutation the table rows with a fixed 
    (() 
  !gap|!apinput(factsfacts = ;java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  true
  !gapprompt@gap>| !gapinput@List(facts,IsSignPreserving);|
  [ true, number of corresponding data rows,
  !gapprompt@gap>| !java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 6
  [ false, true, true ]
  !gapprompt@gap>| !gapinput@List(facts,IsClassWiseOrderPreserving);|
  [true,true,  ]
  
\end{Verbatim}
 }

 

\(java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 73
{,n
\hyperdef{L}{(java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 68
{\noindent\textcolor{FuncColor}{$\triangleright>
\:  java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 60
}\  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 65
noindenttextcolorF}{triangleright$enspacetextttF(slshapeg)\ndex{Factorization> java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}{java.lang.StringIndexOutOfBoundsException: Range [28, 19) out of bounds for length 32
\{java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 27
 ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
and class java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 75
.



  method returntextttfail}     java.lang.StringIndexOutOfBoundsException: Range [67, 64) out of bounds for length 110
(Notethat the <>Esc</ recognizedas 

 The problem of obtaining a factorization as described the<<B shouldajava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 66
difficult, and although the number of steps might be reduced when the mouse is used.
sophisticatedThe helplines used    of <>of an admissib
obtained by setting the info example,asking for  by <><B key general

 By default, prime switches ($\rightarrow$ \texttt{PrimeSwitch} (\ref{PrimeSwitch:p})) are taken as one factor. If the option \mbox{\texttt{\mdseries\slshape ExpandPrimeSwitches}} java.lang.StringIndexOutOfBoundsException: Index 182 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 12

 By default,the factoring process factorsjava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [48, 5) out of bounds for length 122

 By default, a reasonably <>visual mode>introduced Sectionnbsp;<ef=ec:".
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [26, 10) out of bounds for length 109

 y,at  itischecked productof determined
factorsindeed m\{\ }   can setting java.lang.StringIndexOutOfBoundsException: Range [103, 102) out of bounds for length 148
\java.lang.StringIndexOutOfBoundsException: Range [29, 6) out of bounds for length 77
  
  gjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 86
  @ClassShift,);
  [ClassReflection ),ClassShift(26 )1  ()() ,
    ( 0(tjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 45
  
\end{Verbatim}
 }

 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 77
\java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 136
permutation java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

Thepermutationsthe  java.lang.StringIndexOutOfBoundsException: Range [44, 39) out of bounds for length 75
rcwa permutations of{\from which the current mode had been entered by adding it to the list),
class As soon as the <C< java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 61

\subsectionjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 69
\logpage{[ 2, 5, 3 ]}\nobreak
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{n\extcolorF}$triangleright\\{PrimeSwitch\ p)indexP@{!}
\label{PrimeSwitch:p}
}hfill{ (ethod}\\
\oindentF}{$triangleright\\{({mdseriess  k}\ndex{@\texttt{}p,}
\{PrimeSwitch:,k}
}\hfill{\scriptsize (method   currentcategory oralljava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 72
\oindenttF{\rianglerighte\exttt(\dseries\ p,rm)PrimeSwitch\extttPrimeSwitch!, }
\label{PrimeSwitch:p, r, m}
}\Item
\noindent\textcolor{FuncColor>
\label{PrimeSwitch:p, cl}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent   [ 2, 1, ,1 2, 0, 0, 3 ]
 in the first form the \emph{prime switch} $\sigma_p := \tau_{0(8),1(2p)} \cdot \tau_{4(8),-1(2p)} \cdot \tau_{0(4),1(2p) java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 75
\cdot \tau_{2(4),-1(2p)} \cdot \tau_{2(2p),1(4p)} \cdot \tau_{4(2p),2p+1(4p)}$, in the second form the restriction of $\sigma_p$ by $n \mapsto kn$, and in the third and fourth form the \emph{prime switch} $\sigma_{p,r(m)} := \tau_{r_1(m/2),r_2(m)} \cdot \tau_{r_2(m),r_1(pm/2)} \cdot
\tau_{r(m/2),r_1(pm/2)}$. In the latter case, \mbox{\texttt{\mdseries\slshape cl}} is the residue class $r(m)$, the residue $r_1$ is $1-(r \mod 2)$, and $r_2$    1, 1, 1,1 0,0 0 0, 1, 0, 0 ,  ]



For anodd  $$ the prime switch $\sigma_p$ is  rcwa permutationof\{ensuremath{mathbb } with
modulus  of  residue classes(mod81>   (1) 3781,Integers]
class transpositions whose multiplier and divisor are coprime. 

 Prime switches can be distinguished from other rcwa mappings by their \textsf{GAP} property \texttt{IsPrimeSwitch}. \index{IsPrimeSwitch@\texttt{IsPrimeSwitchjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
\begin{Verbatim}[commandchars=!@B,fontsize
  
  !gapprompt@gap>B !gapinput@Display(PrimeSwitch(3));B
  
  Wild rcwa permutation of Z with modulus 12
  
          /
          +)2  nin 24)
          | n-1      if n\abel{rajectoryfor  mapping,starting point, length, coeff.-spec.}
          | n+1      if n in 1(6)
   n |-> <  \hfill{scriptsize(methodjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
          -       nin 4(12)
          | n        if n in 3(6)
          |
          \
  
  !gapprompt@gap>B !gapinput@Display(PrimeSwitch(3):AsClassMapping);B
  
  Wild rcwapermutation of Z with modulus 12
  
    0(12) -> 0(6)  loop
     1(6) -> 2(6)
     2(4)- (java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
     3(
    4(12)-1(12)
      6)
    8(12) -> 7(12)
  
  !gapprompt@gap>B !gapinput@Factorization(PrimeSwitch(3));B
  [ ( 1(6), 0(8) ), ( 5(6), 4(8) ), ( 0(4), 1(6) ), ( 2(4), 5(6) ), 
    ( 2(),(12)) ( 4(6)4() 712)) ]
  !gapprompt@gap>B !gapinput@Display(PrimeSwitchtask   residueclasseswhoseelements get larger orsmaller
  
  Wild rcwa permutation of Z with modulus 20
  
          /
          | n+1     if n in 0(2)
          | 5n-5    if n in 3(4)
   n |-> <  (n-1)/2 if n in 1(4) \ 1(20)
          | n-1     if n in 1(20)
          |
          \
  
  !gapprompt@begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  3(4)
  !gapprompt@gap>B !gapinput@PrimeSwitch(5,3,4) = PrimeSwitch(5,ResidueClass(3,4));B
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
  gapBgapinput@java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 64
  [( (2), 14 )  (0(10),((,010  ]
  
\end{Verbatim}
 }

 Obtaining a factorization of an rcwa permutation into class shifts, class
reflections and class transpositions is particularly difficult if multiplier
and divisor are coprime. s{java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 86
has been introduced\textcolor{uncColor}{\\enspacet{ransitionGraph\dseries\slshape f, m})\index{TransitionGraph@\texttt{TransitionGraph}!for an rcwa mapping and a modulus}

\subsection{\{}{Knot (for an odd )java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
\logpage{[ 2, 5, 4 ]}\nobreak
\hyperdef{L{}{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{noindent{}{$\triangleright$enspace\extttmKnot({\mdseries\slshape m})\index{mKnot@\texttt{mKnot}!for an odd integer}
\label{mKnot:for an odd integer}
}\hfill{\scriptsize (function)}}\
\textbf{\indent
 the permutation $g_m$ as defined in{\ \index{rcwa mapping@rcwa mapping!transitionindex{rcwa rcwa !transition raph $\Gamma_,} \}$f$for modulus\nobreakspace}m$is as follows: 



 The argument \mbox{\texttt{\mdseries\slshape m}} must be an odd integer greater than{\nobreakspace}1i    anjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 122
\begin{Verbatim}[commandchars=!@A,fontsize=\small,\end{
  
  !gap>A!apinput@isplay()A
  
  Wild rcwa permutation of
  
          /
          /5      in 0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          | (\subsection\extcolor{Chapter }{OrbitsModulo (for an rcwa mapping and a modulus)}}
   n |-> <  (6n-2)/5 if n in 2(5)
          | (4n+3)/5 if n in 3(5)
          | (6n-4)5  n  45)
          \
  
\end{Verbatim}
 }

 \noindent In his article, Timothy P. Keller shows that a permutation of this type cannot
have infinitely many cycles of any given finite length. }

  
\section{\textcolor{Chapter }{ Extracting roots of residue\texttt{\symbol{45}}class\texttt{\java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 0
affine mappings }}\label{sec:ExtractingRoots}
\
\hyperdef{L}{X8141065381B0942B}{}
{
  

\subsection{\textcolor{Chapter }{Root (k-th root of an rcwa mapping)}}
\logpage{[ 2, 6, 1 ]}\nobreak
\hyperdef{L}{X873692CE78433859}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Root({\mdseries\slshape f, k})\index{Root@\texttt{Root}!k-th root of an rcwa mapping}
lRk root of  rcwa }
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 anrcwa mapping texttt{g} such that \texttt{g\texttt{\symbol{94}}\mbox{\texttt{\mdseries\slshape k}}=\mbox{\texttt{\mdseries\slshape f}}}, provided that such a mapping exists and that there is a method available
which can determine java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1



 Currently, extracting roots is implemented for rcwa permutationsoffinite
order. 
beginjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 77
  
  !@ap(lassTransposition21;A
  ( 0(8), 2(8), 4(8), 6(8), 1(8),{)\\
  !gapprompt@gap>
  
  Tame rcwa permutation of Z  The productthereturned is{nobreakspace}mbox\{mdseries }. Theyhave pairwise  supports henceanytwo  commute 
  
          /
          | n+2 if n in Z \ 6(8) U 7(8)
   n |-> <  n-5 if n in 6(8)
          | n-7 if n in 7(8)
          \
  
  !gapprompt@gap>A !gapinput@last^100 = ClassTransposition(0,2,1,2);A
  true
  
\
 }

 }

  
\ection{\{Chapter} Special for nontexttt{symbol{45}} mappings }}\labelsec:}
\logpage{[ 2, 7, 0 ]}
\hyperdef{L}{X8322C6848305EC4C}{}
{
  

\subsection{\textcolor{Chapter  
\logpage{[ 2, 7, 1 ]}\nobreak
\hyperdef{L}{java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
{\java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
\abel{RightInverse:f  injective rcwa mapping}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 ajava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 199



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@twice := 2*IdentityRcwaMappingOfZ;{\oindenttextcolor{FuncColor}{$\triangleright$\enspace\texttt{TransitionMatrix({\mdseries\slshape f, m})\index{TransitionMatrix@\texttt{TransitionMatrix}!for an rcwa mapping and a modulus}
  Rcwa  ofZ: n -> 2n
!gapprompt@gap>| !gapinput@twice *RightInverse(twice)|
  the transition matrix of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} for modulus{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}}. 
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CommonRightInverse (of two injective rcwa\[
\logpage{[ 2, 7, 2 ]}\nobreak
\hyperdef{}{X87C5B9CA7E319233}}
{\noindent\textcolor{FuncColor}{$\\left|\left\{r(\hat{m}) \in\hat{} | r \n r_1(m
\java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 54
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 a mapping $d$ such that \mbox{\texttt{\mdseries\slshape l}}$d$ = \mbox{\texttt{\mdseries\slshape r}}$d$ = 1. 



 The mappings \mbox{\texttt{\mdseries\slshape l}} and \mbox
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@twice := 2*IdentityRcwaMappingOfZ; twiceplus1 := twice+1;A
  Rcwa mapping of Z: n -> 2n
  Rcwa mapping of Z: n -> 2n + 1
  !gapprompt@gap>A !gapinput@Display(CommonRightInverse(twice,twiceplus1));A
  
  Rcwamapping of  2
  
          /
          | n/2     if n in 0(2)
   n |-> <  (n-1)/2 if n in 1(2)
          |
          \
  
\end| !Display((33)|
 }

 

\subsection{\textcolor{Chapter }{ImageDensity (of an rcwa mapping)}}
\logpage{[ 2, 7, 3 ]}\nobreak
\hyperdef{L}{X808D9EDF7BA27467}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ImageDensity({\mdseries\slshape f})\index{ImageDensity@\texttt{ImageDensity}!of an rcwa mapping}
\label{ImageDensity:of an rcwa mapping}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 the \emph{image density} of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 



 In the notation introduced in the definition of an rcwa mapping, the \java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 1
rcwa mapping is{nobreakspace}1 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !apprompt@>|!gapinput@ :=[[102]3,2]];  TheCollatz|
  !gapprompt@gap>| !gapinput@List( [ T, ClassShift(0,1), RcwaMapping([[2,0,1]]) ], ImageDensity );|
  [  /3 , 1/ ]
  
\end{Verbatim}
 }

 \index{InjectiveAsMappingFrom@\texttt{InjectiveAsMappingFrom}!for an rcwa mapping} Given an rcwa mapping \texttt{f}, the function \a list of unions of residue classes modulo the modulus{\nobreakspace}$m$ of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@InjectiveAsMappingFrom(T);|
  02)
  
\end{Verbatim}
 }

  
\section{\java.lang.StringIndexOutOfBoundsException: Range [92, 12) out of bounds for length 92
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings }}\label{sec:Trajectories}
\logpage{[ 2, 8, 0 ]}
\hyperdef{L}{X7A34724386A2E9F3}{}
{
  \textsf{RCWA} provides various methods to compute trajectories of rcwa mappings: 
\subsection{\textcolor{Chapter }{ Trajectory (methods for rcwa mappings) }}\logpage{[ 2, 8, 1 ]}
\!apprompt@ap| !gapinput@Sources(g); Sinks(g);|
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Trajectory({\mdseries\slshape f, n, length})\index{Trajectory@\texttt{Trajectory}!for rcwa mapping, starting point, length}
\label{Trajectory:for rcwa mapping, starting point, length}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Trajectory({\mdseries\slshape f, n, length, m})\index{Trajectory@\texttt{Trajectory}!for rcwa mapping, \endVerbatim}
\label{Trajectory:for rcwa mapping, starting point, length, modulus }
}\hfill{\scriptsize (method)}}\\

\\label
}\hfill{\scriptsize (method)}}\\
\ubsection{\textcolor{Chapter }{Loops (of an rcwa mapping)}}
\label{Trajectory:for rcwa mapping, starting point, set of end points, modulus}
}\{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 the first \mbox{\texttt{\mdseries\slshape length}} iterates in the trajectory of the rcwa\yperdefL}X80221A4D81AF7453{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
mapping{\nobreakspace}\mbox{\texttt{\mdseries\abel{:fan rcwa mapping}



 To save memory when computing long trajectories containing huge iterates, the
mod}{\ })is eachtime beforean iterate place thering
element{\nobreakspace}\mbox{\texttt{\mdseriesjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 209
classes. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,which carry a loop, but which \mbox{\texttt{\mdseries\slshape f}} does not fix setwise. 
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);; # The Collatz
  !gapprompt@gap>| !gapinput@Trajectory(T,27,15); Trajectory(T  he returnedlist may also includesupersets thenamed residue classes
  [, 107, 161,, 242 121,,182, 91,137,206, 103 ]
  [ 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 0, 3, 0, 0, 3 ]
   Trajectory(T,15,[1]2);java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  [ 15, 23, 35, 53, 80, 40, 20, 10, 5, 8, 4, 2, 1 ]
  [ 1, 1, 1, 1, 0, 0, 0, 0, 1,
  !gapprompt@ap|!gapinput@Trajectory(T,ResidueClass(Integers,3,0),Integers);|
  [ 0(3), 0(3) U 5(9), 0(3) U 5(9) U 7(9) U 8(27), 
    <java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 30
    <union of 73 residue classes (mod 81)>, Z{triangleright\texttt(\dseries\lshapea)i{@\texttt}!fa }
  
endVerbatim
 \extbf\ndentReturns\

 
\subsection{\textcolor{Chapter }{ Trajectory (methods for rcwa mappings \
\hyperdef{L}{X7FFD09837E934853}{}
{
\\extcolorFuncColor$\nspacetT({\slshape f,n length }\{rajectory\{! rcwa   point ,.spec}
\rcwa,starting ,,-}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}  gapprompt@ap> !@C=RcwaMapping[,,][,,];|
\label{Trajectory:for rcwa mapping, starting point, set of end points, coeff.-spec.}
\{scriptsize()\\
\textbf{\indent Returns:\ }
 either the list \texttt{c} of triples of coprime coefficients such that for any{\nobreakspace}\texttt{k} it holds that \texttt{\mbox{\texttt{\mdseries\slshape n} 699714, .,0693833,0710432,0.,0.,0699935,



 The meanings of the arguments \mbox{\texttt{\mdseries\slshape length}} and \mbox{\texttt{\mdseries\slshape terminal}} are the same as in the methods for the operation \texttt{Trajectory} described above. In general, computing only the last coefficient triple (\mbox{\texttt{\mdseries\slshape whichcoeffs}} = \texttt{"LastCoeffs"}) needs considerably less memory than computing the java.lang.StringIndexOutOfBoundsException: Index 387 out of bounds for length 33
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
apinput@Trajectory(T,27,[],LastCoeffs");|
  [ 36472996377170786403, 195820718533800070543, 1180591620717411303424 ]
  !@gap|!gapinput@(ast[1*[])/ast[3;|
  1
  
\end{Verbatim}
 }

 When dealing with problems like the $3n+1$\texttt{\symbol{45}}Conjecture or when determining the degree of transitivity
of the natural action of an rcwa group on its underlying ring, an important
task is to determine the residue classes whose elements get larger or smaller
when applying a given rcwa mapping: 
\subsection{\textcolor{Chapter }{ IncreasingOn \& DecreasingOn (for an rcwa mapping) }}\logpage{[ 2, 8, 3 ]}
\hyperdef{L}{X7E0244A386744185}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IncreasingOn({\mdseries\slshape f})\index{IncreasingOn@\texttt{IncreasingOn}!for anlabel{ikelyContractionCentreof  rcwamapping}
\label{IncreasingOn:for an rcwa mapping}
}\hfill{\scriptsize (attribute)}}\\
noindent\}$$enspacet{ecreasingOn\slshapef}\ndex{@\{}foranrcwamapping
\label{java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
}\hfill{\scriptsize (attribute)}}\\
\{i : }
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 373



thejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 73
representation, an option \texttt{classes} is interpreted; if set, the step of forming the union of the residue classes
in question is omitted, and the list of residue classes is returned instead of
their union. This may save time and memory if the modulus is large. 
\]
  
  !gapprompt@gap>| !gapinput: RcwaMapping[[10,],2]);;# Collatz mapping.
  [ 1(2), 3(4), 
  !gapprompt@gap>| !gapinput@List([1..3],k->DecreasingOn(T^k));|
  [ 0(2), Z \ 3(4), 0(4) U 2(8}
  !gapprompt@gap>| !gapinput@a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; # Collatz'
  !gapprompt@gap> gapinput@List(-.2]k->IncreasingOn(^k);|
  [ Z \ 1(8) U 7(8), 0(2), [  ], Z \ 0(3), 1(9) U 4\ogpage{[ 2,8,12 }\nobreak
  
java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 14
 }

 We assign certain directed graphs to rcwa mappings, which encode the order in
which trajectories may traverse the residue classes modulo some modulus: 

\subsection{\a floating point value value which  intendedtobe arough guess on  fast the
\ ofthe rcwa mapping{nobreakspace\mbox\texttt{\dseries\ f}diverge (eturn value than{nobreakspace}) convergereturn value
\hyperdef{smaller than{\nobreakspace}1). 
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{TransitionGraph({\mdseries\slshape f, m})\index{TransitionGraph@\texttt{TransitionGraph}!for an rcwa mapping and a modulus}
\
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 the transition graph of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} for modulusjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0



 \index{rcwa mapping@rcwa mapping!transition graph} \noindent The \emph{transition graph} $\Gamma_{f,m}$ of{\nobreakspace}$f$ for modulus{\nobreakspace}$m$ is defined as follows: 
\begin{#I  WarningGuessedDivergence:noparticular return value is .
\item  The vertices are the residue classes (mod{\nobreakspace}$m$). 
\item  There is an edge from $r_1(m)$ to $r_2(m)$ if and 
\end{enumerate}
 The assignment of the residue classes (mod{\nobreakspace}$m$) to the vertices of the graph corresponds to the ordering of the residues in \java.lang.StringIndexOutOfBoundsException: Index 145 out of bounds for length 2

 There are a couple of operations and attributes which
graphs:\ection\textcolor{Chapter }{ Saving memory texttt{symbol{45}\exttt{\symbol{45} the sparse

\ubsection{textcolor{Chapter }{OrbitsModulo (for an rcwa mapping and a modulus)}}
\logpage{[ 2, 8, 5 ]}\nobreak
\hyperdef{L}{X7F03CC4179424AA9}{}
{}{$\nspace\extttOrbitsModulo({mdseries\slshape f, m})\index{OrbitsModulo@\texttt{OrbitsModulo}!for an rcwa mapping and a modulus}
\label{OrbitsModulo:for an rcwa mapping and a modulus}
}hfill\ operation)\java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
\\:}
 the partition of \texttt{AllResidues(Source(\mbox{\texttt{\mdseries\slshape f}}),\mbox{\texttt{\mdseries\slshape m}})} corresponding to the weakly connected components of the java.lang.StringIndexOutOfBoundsException: Index 180 out of bounds for length 78
the rcwa mappingrspeed   reducememoryjava.lang.StringIndexOutOfBoundsException: Range [74, 71) out of bounds for length 74



 
b{Verbatimcommandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@OrbitsModulo(ClassTransposition(0
  [ [ 0, 1, 4 ], [ 2, 5, 6 ], [ 3 ], [ 7 ] ]
  
\{java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 }

 

\subsection{\textcolor{Chapter }{FactorizationOnConnectedComponents (for an rcwa mapping and a modulus)}}
l{[ 2,8,6 ]nobreak
h{}java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FactorizationOnConnectedComponents({\mdseries\slshape 
\label{FactorizationOnConnectedComponents
}\java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
\java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 27
 the set of restrictions of the rcwa mapping{\nobreakspace}\mbox\textcolor{}$triangleright\nspacetexttt{SparseRepresentation\\ f)index@\SparseRepresentation   mapping



 The  java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 161
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinputsigma :=ClassTransposition(12,   ClassTransposition(,,4|
  !gapprompt@>| !gapinput@          * ClassTransposition(3,9,6\abel{StandardRepresentationo anrcwa}
  !gapprompt@gap>| !gapinput@List(FactorizationOnConnectedComponents\{scriptsizeoperation}\
  [33(36)U3436  3536,9(6  10()  11() 
    <union of 23 residue classes (mod 36)> \ [ -6, 3 ] ]
  
\end{Verbatim}hfill{\criptsize (peration)}}\\
 }

 

\subsection rcwamapping\mbox{\texttt{\ f}} sparse java.lang.StringIndexOutOfBoundsException: Range [103, 102) out of bounds for length 104
\logpage{[ 2, 8, 7 ]}\nobreak
\hyperdef{L}{X7B6833D67D916EF9}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{TransitionMatrix({\mdseries\slshape f, m})\index{TransitionMatrix@\texttt{TransitionMatrix}!for an rcwa mapping and a modulus}
\label{TransitionMatrix:for an rcwa mapping and a modulus}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 the transition matrix of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} for modulus{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}}. 



 Let $M$ be this matrix. Then for any two residue classes $r_1(m), r_2(m) \in R/mR$, the entry $M_{r_1(m),r_2(m)}$ is defined by 
      
\[
        M_{r_1(m),r_2(m)} \ := \
                 \hat{m}R|}} \cdot
                 \left|\left\{r(\hat{m}) \in R/\hat{m}R | \ r \in r_1(m)
                 \wedge r^f \in r_2(m)\right\}\right|,
      \]

       where $\hat{m}$ is the product of \mbox{\texttt{\mdseries\slshape m}} and the square of the modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. The assignment of the residue classes (mod{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}}) to the rows and columns of the matrix corresponds to the ordering of the
residues in \texttt{java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2

 The transition matrix is a weighted adjacency matrix of the corresponding
transition graph \texttt{TransitionGraph(\mbox{\texttt{\mdseries\slshape f}},\mbox{\!gappromptgap|!gapinput@ = 1,,,)|
to{\nobreakspace}1. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);; # The Collatz mapping.|
  !gapprompt@gap>| ! permutation of Z 288
  [ [  1/8,  1/4,  5/8 ],
    [    0,  1/4rcwa of java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 62
    [    0,  3/8,  5/8 ] ]
  
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{ Sources \& Sinks    [3, 24, 9, 5, 4 ], [ 5, 24, 3, 1,4 ],[ 8, 36,2 -7,9] 
\hyperdef{L}{X81DBA2D58526BE7E}{}
{
\noindent\textcolor{FuncColor}{$[ 15,24,27, 19,4, 17, 48 9 7  , 20,, 3,,4 ] 
label{:ofrcwa}
}\hfill{\scriptsize (attribute)}}\\
\noindent\[ 32, 36, 4,,9]  33,48,,78][ 38 , 9 ,
\label{Sinks:of an rcwa mapping[41,48 ,29,[,, ,58, ], 56 72 1, ,4] ]
}\hfill{\!gapprompt@gap>| gapinput2|
\textbf{\indent Returns:\ }
 alist  unionsof  modulo themodulus{nobreakspace$m of thercwa{nobreakspace}m{texttt\slshapef},as described below. 



 The returned list contains an entry for any strongly connected component of
the transition graph of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} for modulus{\nobreakspace}\texttt{Mod(\mbox{\texttt{\mdseries\slshape f}})} which has only outgoing edges (``source'') or which has only ingoing edges (``sink''), respectively. The list entry corresponding to such a component is the union
of the vertices belonging to it. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@g := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,1,4);;|
  !gapprompt@gap>| !gapinput@Sources(g); Sinks(g);  
  [ 0(4) ]
  [ 1(4) ]
  
\{java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 }

 

\subsection{\textcolor{Chapter }{Loops (of an rcwa mapping)}}
\logpage{[ 2, 8, 9 ]}\nobreak
\hyperdef{L}{X80221A4D81AF7453}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Loops({\mdseries\slshape f})\index{Loops@\texttt{Loops}!of an rcwa java.lang.StringIndexOutOfBoundsException: Index 137 out of bounds for length 10
\label{}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 if \mbox{\texttt{\mdseries\slshape f}} is bijective, the list of non\texttt{\symbol{45}}isolated vertices of the
transition graph of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} for modulus \texttt{Mod(
which  



 The returned list may also include supersets of the named residue classes
instead if \mbox{\texttt{\mdseries\slshape f}} java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 1
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>|!gapinput@oops(ClassTransposition(0,2,1,2)*ClassTransposition(0,2,1,4));|
  [04,1(4) ]
  
\end{Verbatim}
}

 There is a nice invariant of\abel f})\index{IsRcwaMappingOfZ{\textunderscore}pi@\texttt{IsRcwaMappingOfZ{\textunderscore}pi}}

\subsection{\textcolor{Chapter }{GluckTaylorInvariant (of a trajectory)}}
\logpage{[ 2, 8, 10 ]}\nobreak
\hyperdef{L}{X8773152E81A30123}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GluckTaylorInvariant({\mdseries\slshape a})\index{GluckTaylorInvariant@\texttt{GluckTaylorInvariant}!of a trajectory}
\label{GluckTaylorInvariant:of a trajectory}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the invariant defined in{\nobreakspace}\cite{GluckTaylor02. This is $(\sum_{i=1}^l a_i \cdot a_{i \mod l + 1})/(\sum_{i=1}^l a_i^2)$, where $l$ denotes the length of{\nobreakspace}\mbox{\texttt{\mdseries\slshape a}}. 



 The argument \mbox{\texttt{\mdseries\slshape a}} must be a list of integers. noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaMappingOfGFqx\@\{}java.lang.StringIndexOutOfBoundsException: Index 161 out of bounds for length 161
b{Verbatim}[commandchars!@,smallsinglelabelExample
  asemilocalizationof  ring  integers or an rcwa mapping of a
  !gapprompt@gap>| !gapinput@C := RcwaMapping([[1,0,2],[3,1,1]]);;|
  !gapprompt@gap>| !gapinput@List([3,5..49],n->Float(GluckTaylorInvariant(Trajectory(C,n,[1]))));|
  [ 0.701053, 0.696721, 0.708528, 0.707684, 0.706635, 0.695636, 0.711769,
    .699935,
    0.714242, 0.705383, 0.706591, 0.698198, 0.712222, 0.714242, 0.709048,
    0.69612, 0.714241, 0.701076 ]
  
\end{Verbatim}
 }

 Quite often one can make certain ``educated and of its semilocalizations. For this reason there Forreason there \exttt{IsRcwaMappingOfZOrZ{textunderscore}pi} which is the union of \texttt{IsRcwaMappingOfZ} and \texttt{IsRcwaMappingOfZ{\textunderscore}pi}. \index{IsRcwaMappingOfZOrZ_pi@\texttt{IsRcwaMappingOfZOrZ{\textunderscore}pi}} The internal representation of rcwa mappings is called \texttt{IsRcwaMappingStandardRep}. \index{IsRcwaMappingStandardRep@\texttt{IsRcwaMappingStandardRep}} There are methods available for \texttt{ExtRepOfObj} and \texttt{ObjByExtRep}. \index{ExtRepOfObj@\texttt{ExtRepOfObj}} \index{ObjByExtRep
example it it  java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 72
trajectories of theCollatz mappingeventually enter the finite set $\{-136, -91, -82, -68, -61, -55, -41, -37, -34, -25, -17, -10, -7, -5, -1, 0,
1, 2 \}$, or that ``on average'' the next number in a trajectory of the Collatz mapping is smaller than the
preceding one by a factor of $\sqrt{3}/2$. Howevertextbf{indent :}
cannot the  ofthering{n\\{java.lang.StringIndexOutOfBoundsException: Range [87, 78) out of bounds for length 92

\subsection{\textcolor{Chapter }{LikelyContractionCentre
\logpage{[ 2, 8, 11 ]}\nobreak
\hyperdef{L}{X84F6A29280E2F925}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LikelyContractionCentre({\mdseries\slshape
\label{LikelyContractionCentre:of an rcwa mapping}
}hfill\criptsize (operation)}}\\
\textbf{\indent Returns:\ }
 a list of ring elements (see below). 



 This{}{X874A3BB684F0639A}}
with any trajectory of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. The mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is assumed to be \emph{contracting}, i.e. to have such a contraction centre. As in general contraction centres
are In this chapter, we describe how construct
and may return wrong resultsresidue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine groups and how
\[=@,ontsizeframesingle,label=Example]
  
  ,[3,1,2]];;# The  mapping.
  !gapprompt@gap>| !gapinput@S0 := LikelyContractionCentre}}\label{:ContructingRcwaGroups}
  #I  Warning: `LikelyContractionCentre' is highly probabilistic.
  The returned result can only be regarded as a rough guess.
  See ?LikelyContractionCentre for more information.
  [ -136, -91, -82, -68, -61, -55, -41, -37, -34, -25, -17, -10, -7, -5, 
   0 1, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{GuessedDivergence (of an rcwa mapping)}}
\logpage{[ 2, 8, 12 ]}\nobreak
\hyperdef{}X81E0D8E3817B3D16}}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GuessedDivergence({\mdseries\slshape f})\index{GuessedDivergence@\texttt{GuessedDivergence}!of an 
\label{GuessedDivergence:of an rcwa mapping}
}\false
\textbf{\indent Returns:\ }
 a floating point value which is intended to be a rough guess on how fast the
trajectories of the rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} diverge (returnAn rcwa group isomorphic to a given group can be obtained by taking the 
smaller than{\nobreakspace}1). 



 Nothing particular is guaranteed. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@GuessedDivergence(T);|
  #I  Warning: GuessedDivergence: no particular return value is guaranteed.
  0.866025
  
\end{Verbatim}
 }

 }

  
section{textcolorChapter } Saving memory texttt{symbol{}texttt{\symbol{45}} the sparse
representation of rcwa mappings }}\label{sec:SparseRepresentationOfRcwaMappings}
\logpage{[ 2, 9, 0 ]}
\hyperdef{L}{X86F0E0D17E6A9663}{}
{
  \ndex{cwa mapping@ mapping!sparserepresentation} \index{RcwaMapping@\texttt{RcwaMapping}!by list of coefficients, sparse representation} It is quite common that an rcwa mapping with large modulus has only few
distinct affine partial mappings. In thisgroups,for free products finite groups and for freegroups.The  for
is.  thereisrepresentationof
rcwa mappings, the ``sparse'' representation. Depending .g Section\}B {n}) and themethod for free groups uses an adaptation of the construction given
representation may speed up computations and reduce onpage\nobreakspace} {nobreakspace}\cite{LaHarpe00} from PSL(2,{\ensuremath{\mathbb C}}) to RCWA({\ensuremath{\mathbb Z}}). 
orders of magnitude. For rcwa mappings with almost as many distinct affine
partial mappings as there are residue classes modulo the modulus, using sparse
representation makes computations slower and more
memory\texttt{\symbol{45}}consuming!gapprompt@gap|!apinputF: FreeProduct(Group(1,)34,13(2,),(123),
only available for rcwa mappings of {\ensuremath{\mathbb Z}}. 

 The sparse representation of an gappromptgap|!gapinputIsomorphismRcwaGroup)|
list of 5\texttt{\symbol{45}}tuples $(r,m,a_{r(m)},b_{r(m)},c_{r(m)})$ of integers. Any such 5\texttt ,f2,f3,f4,  > rcwapermutation of withmodulus 12>java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
the restriction $n \mapsto (a_{r(m)} \cdot n + b_{r(m)})/c_{r(m)}$ of     rcwapermutationof Zwith modulus 36 java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
into residue classes [,f2 ]->[<wild rcwa permutation ofZ modulus8>
is affine. Also the list     wild permutation of Z with modulus 8> ]
is unique. 

 Changing the representation of rcwa mappings does not change their behaviour
with   `texttt{}'' and ``texttt{{\textless}}'' The product of two rcwa mappings in sparse representation is in sparse
representation again, just like the product of two rcwa mappings in standard
representation java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 14
representation. The product of two rcwa mappings in different representation
may be inany of the representations of the factors. 

\subsection{\textcolor{Chapter }{SparseRepresentation andby taking wreath products with finite groups or with the infinite
\logpage{[ 2, 9, 1 ]cyclic group: 
\hyperdef{L}{java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
{\noindent\textcolor{FuncColorlogpage{ 3 1 2 ]\nobreak
\label anrcwa }
}\hfill{\scriptsize (operation)}}\\
noindent{\SparseRep{mdseries\slshape )\index{SparseRep@\texttt{}!  rcwa mapping}
\label{SparseRep:of an rcwa mapping}
\ o)}\
\noindent\}hfill\ (ethod)}\java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
\label{StandardRepresentation:of an rcwa mapping}
}\hfill{\scriptsize (operationnobreakspace}{ensuremath{\mathbb Z}} given as arguments. 
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{StandardRep({\mdseries\slshape f})\index{StandardRep@\texttt{StandardRep}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\label{StandardRep:of an rcwa mapping}
}\hfill{\scriptsize (operation)}}\\
\textbf{
 the rcwa mapping \mbox{\texttt{\mdseries\slshape f}} in sparse, respectively, standard representation. 



 Appropriate attribute values and properties are copied over to the rcwa
mapping in the ``newgapprompt@>|!gapinput@F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;|
\begin{Verbatimgapprompt@> !@F2xF2 =DirectProductF2,F2)|
  
  !gapprompt@gap>| !gapinput@a := ClassTransposition(1,2,4,6);|
  ( 1(2), 4(6) )
  !gappromptgapinput@ : ClassTransposition(1,,6);java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  ( 1(3), 2(6) )
  !gapprompt@gap>| !gapinput@c := ClassTransposition(2,3,4,6);|
  ( 2(3), 4(6) )
   
  < java.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 42
  !gapprompt@gap>| !gapinput@h := SparseRep(g);|
  <rcwa permutation of Z with modulus 288 \subsection{\textcolor{Chapter }{ WreathProdu group  , apermutation groupor
  !gapprompt@gap>| !gapinput@g = h;|
  true
  !gapprompt@gap>| !gapinput@Coefficients(h);|
  [ [ 0, 6, 1, 0, 1 ], [ 1, 3, 16, -1, 3 ], [ 2, 96, 9, 14, 16 ], 
    ntextcolorFuncColor{\$\\exttt{reathProduct(\dseries\slshape G, Z})\index{WreathProduct@\texttt{WreathProduct}!for an rcwa group over Z and the infinite cyclic group}
    [ 9, 48, 27, 29, 8 ], [ 11, 24, 9, 5, 4 ], [ 14, 48, 27, 38, 8 ], 
    [ 15, 24, 27groupisomorphicto java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 59
    [ 21, 24, 1, -3, 6 ], [ 23, 24, 27, 19, 4 ], [ 26,group\obreakspace}box{\texttt{mdseries\slshape P}} or with the infinite cyclic group{\nobreakspace}\mbox{\texttt{\mdseries\slshape Z}}, respectively. 
    [ 32, 36, 4, -11, 9 ], [ 33, 48, 9, 7, 8 ], [ 38, 48, 9, 10, 8 ], 
    [ 41, 48, 27, 29, 8 ], [ 50, 96, 27, 58, 16 ], [ 56, 72, 1, 0, 4 ] ]
  !gapprompt@gap>| !gapinput@h^2;|
  <rcwa permutation of Z with modulus 13824 and 71 begin{erbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 2
  <cwa permutation of Z with modulus 663552and 201  affine parts
  
\ndVerbatim}
 Memory consumption may differ a lot between sparse\texttt{\symbol{45}} and
standard representation: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@MemoryUsage(h^3);               # on a 64-bit machine|
  18254
  !gapprompt@gap>| !gapinput@MemoryUsage(StandardRep(h^3));  # on a 64-bit machine|
  42467894
\end{Verbatim}
 }

 }

  
\section{\textcolor{Chapter }{The categories and families of rcwa mappings}}\label{sec:CategoriesOfRcwaMappings}
\logpage{[ 2, 10, 0 ]}
\hyperdef{L}{X83FA71DD842377F0}{}
{
  

\subsection{\textcolor{wild rcwa group over Z with group over Z with 2 generators>
\logpage{[ 2, 10, 1 ]}\nobreak
\hyperdef{L}{X7927C13782729CE9}{}
{\noindent\textcolor{FuncColor}{$\triangleright[ ClassShift(Z) ]->
\label{IsRcwaMapping}
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaMappingOfZ({\mdseries\slshape f})\index{IsRcwaMappingOfZ@\texttt{IsRcwaMappingOfZ}}
\abelIsRcwaMappingOfZ}
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaMappingOfZ{\textunderscore}pi({\mdseries\slshape f})\index{IsRcwaMappingOfZ{\textunderscore}pi@\texttt{IsRcwaMappingOfZ{\textunderscore}pi  
\label{IsRcwaMappingOfZuScorepi
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaMappingOfGFqx({\mdseries\slshape f})\index{java.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 69
\label{IsRcwaMappingOfGFqx}
}\hfill{\scriptsize (filter)}}\\
\textbf{\indent Returns:\ }
 \true} if \mbox{\texttt{\mdseries\slshape f}} is an rcwa mapping, an rcwa mapping of the ring of integers, an rcwa mapping
of a semilocalization of the ring of\[3 , 4 ]\nobreak
olynomialring inoneovera respectively and\f} 



 Often the same methods can be used for rcwa mappings of the ring of integers
and  its . java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 610

 

\subsection{\textcolor{Chapter }{RcwaMappingsFamily (of a ring)}}
\logpage{[ 2, 10, 2 ]}\roughly spoken,anextension of mbox{texttt{\mdseries\slshape G}} by an involution which ``merges'' \mbox{\texttt{\mdseries\slshape points}} into \mbox{\texttt{\mdseries\slshape point}}. 
\hyperdef{L}{X825DD365822934AF}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\The arguments of this operation are a finite permutatio\\dseries\G} set\box\texttt\mdseries\slshape points} of moved by mbox{texttt{mdseries\slshape G}} and a single point \mbox{\texttt{\mdseries\slshape point}} moved by \mbox{\texttt{\mdseries\slshape G}} which is not in \mbox{\texttt{\mdseries\slshape points}}. 
\label{RcwaMappingsFamily:of a ring}
}\hfill{\scriptsize (function)}}\\
\textbf{indentReturns:\}
 the family of rcwa mappings of the ring{\nobreakspace}\mbox{\texttt{\mdseries\slshape R}}. 

}

 }

  }

       
\chapter{\textcolor{Chapter }{Residue\texttt{\symbol{45}}Class\texttt{!apprompt@>|!apinput@ : MergerExtension(roup(123)[1,]3)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
\[3 ,0]java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
\L{874}
{
   In this chapter,we describehow to construct
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine groups and how
to compute with them.  
\section{\!gapprompt@gap>| !gapinput@List(B,Length);|
groups}}\label{sec:ContructingRcwaGroups}
\logpage{[ 3, 1, 0 ]}
\hyperdef{L}{X81242A6586A604A3}{}
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
  \index{Group!appromptgap> !gapinput# Second example -- a group isomorphic to Thompson's group V:|
(rcwa\texttt{\symbol{45}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));|
  <rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@IsTame(G); Size(G); IsSolvable(G); IsPerfect(G);|
  true
  infinity
  alse
  false
  
\end{Verbatim}
 An rcwa group isomorphic to a given group can be obtained by taking the image[1,4 ,28, 69, 170170,413]
of a faithful rcwa representation gapprompt@gap> gapinput@,,14][,,2,],|

bsection{\textcolor{Chapter {IsomorphismRcwaGroup(for aa group,over a  ring)}java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
\logpage{[ 3, 1, 1 ]}\nobreak
\hyperdef{L}{X7EB8A301790290C7}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace
\label{IsomorphismRcwaGroup:for a group, over a given ring}
}\hfill{scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsomorphismRcwaGroup({\mdseries\slshape G})\index{IsomorphismRcwaGroup@\texttt{IsomorphismRcwaGroup}!for a group}
\label{IsomorphismRcwaGroup:for a group}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 a monomorphism from the group \mbox{\texttt{\mdseries\slshape G}} to{\nobreakspace}RCWA(\mbox{\texttt{\mdseries\slshape R}}) or to{\nobreakspace}RCWA({\ensuremath{\mathbb Z}}), respectively. 



 The best\texttt{\symbol{45}}supported case is \mbox{\texttt{\mdseries\slshape R}} = {\ensuremath{\mathbb Z}}. Currently there are methods available for finite
groups, for free products of finite groups and for free groups. The method for
free products of finite groups uses the Table\texttt{\symbol{45}}Tennis Lemma
(cf. e.g. Section{\nobreakspace}II.B. in{\nobreakspace}\cite{LaHarpe00}), and the method for free groups uses an adaptation of the construction given
on page{\nobreakspace}27 in{\nobreakspace}\cite{LaHarpe00} from PSL(2,{\ensuremath{\mathbb C}}) to RCWA({\ensuremath{\mathbb Z}}). 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F := FreeProduct(Group((1,2)(3,4),(1,3)(2,4)),Group((1,2,3)),|
  !gapprompt@>| !gapinput@                    SymmetricGroup(3));|
  <fp group on the generators [ f1, f2, f3, f4, f5 ]>
  !gapprompt@gap>| !gapinput@IsomorphismRcwaGroup(F);|
  [ f1, f2, f3, f4, f5 ] -> [ <rcwa permutation of Z with modulus 12>,
    <rcwa permutation of Z with modulus 24>,
    <rcwa permutation of Z with modulus 12>,
    <rcwa permutation of Z with modulus 72>,
    <rcwa permutation of Z with modulus
  !gapprompt@gap>| !gapinput@IsomorphismRcwaGrouplabel{GroupByResidueClasses:he  `ermuting a given list of residue classes'}
  [ f1, f2 ] -> [ <wild rcwa permutation of Z with modulus 8>,
    <wild rcwa permutation of Z with modulus 8> ]
  gap| java.lang.StringIndexOutOfBoundsException: Range [35, 28) out of bounds for length 48
  <wild rcwa disjointresidue classes in mbox{{mdseries\slshape classes}}. 
  
\end{Verbatim}
 }

 Further, new rcwa groups can be constructed from  The argument \mbox{\texttt{\mdseries\slshape classes}} list residue classes. 
products and by taking wreath products with finite groups or with the infinite
cyclic group: 

\subsection{\textcolor{Chapter }{DirectProduct (for rcwa groups over Z)}}
\logpage{[ 3, 1, 2 ]}\nobreak
\yperdefL{X79CAE48981C11FE8}}
{\noindent\textcolor{FuncColor}{$\triangleright
labelDirectProductfor rcwa java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 44
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 an rcwa group isomorphic to the direct product!apprompt@gap>| !gapinput@HGroup(ist[[02,,][,,,][,2,4,[,,2,],
over{\nobreakspace}{\ensuremath{\mathbb Z}} given as arguments. 



 There is certainly no unique or canonical way to embed a direct product of
rcwa groups into RCWA({\ensuremath{\mathbb Z}}). This method chooses to embed
the groups \mbox{\texttt{\mdseries\slshape G1}}, \mbox{\!gapprompt@gap>| gG= H|
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F2 := Image(IsomorphismRcwaGroup(FreeGroup(2))}
  !gapprompt@gap waysconstructrcwa   based  certain monomorphisms from
  <he group RCWA$R)into itself.Examples java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 93
  !gapprompt@java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 62
  true
  
\end{Verbatim}
 }

 
subsection{\textcolor{ChapterWreathProduct (slshape,ofrcwagroup,by  rcwa
(]}
\hyperdef{L}{X80D13D2A7AD73C2C}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{WreathProduct({\mdseries\slshape G, P})\index{WreathProduct@\texttt{WreathProduct}!for an rcwa group over Z and a permutation group}
\label{reathProduct:for an rcwa group over Z and a permutation group}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{WreathProduct({\java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 0
\label{WreathProduct:for an rcwa group over Z and the infinite cyclic group}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 an rcwa group isomorphic to the wreath product of the rcwa
group{\nobreakspace}\mbox{\texttt{\
roup\nobreakspace}\mbox{\texttt{\mdseries\slshape P}} or with the infinite cyclic group{\nobreakspace}\{\{\mdseries\slshape Z},respectively. 



 The first\texttt{\symbol{45}}mentioned method embeds the \texttt{NrMovedPoints(\mbox{\texttt{\mdseries\slshape P}})}th direct power of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} using the method for \texttt{java.lang.StringIndexOutOfBoundsException: Index 227 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [36, 8) out of bounds for length 143
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;|
  !gapprompt@gap>| !gapinput@F2wrA5 := WreathProduct(F2,AlternatingGroup(5));;|
  !gapprompt@gap>| !gapinput@Embedding(F2wrA5,1);|
  [ <wild rcwa permutation of Z with modulus 8>,
    <wild rcwa permutation of Z with modulus 8> ] ->
  [ <wild rcwa permutation of Z with modulus 40>,
    <wild java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  !gapprompt@gap>| !gapinput@Embedding
  [ (1,2,3,4,5), (3,4,5) ] -> [ ( 0(5)hL{X82171D7287CBED95{}
    ( 2(5), 3(5), 4(5) ) ]
  !gapprompt@gap>| !gapinput@ZwrZ := WreathProduct(Group}\criptsize(operation}\java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  <wild rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Embedding(ZwrZ,1);|
  [ ClassShift( Z ) ] ->
  [ <tame rcwa permutation of Z with modulus 4, of order infinity> ]
  !gapprompt@gap>| !gapinput@Embedding(ZwrZ,2);|
  [ ClassShift( Z ) ] -> [ <wild rcwa permutation of Z with modulus 4> ]
  
\end{Verbatim}
 }

 Also, rcwa groups can be obtained as particular extensions of finite
permutation groups: 

\subsection{\textcolor{Chapter }{MergerExtension (for finite permutation groups)}}
\ogpage[, ,4 ]}\nobreak
\hyperdef{L}{X8794913B878DD5C4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{MergerExtension({\mdseries\slshape G, points, point})\index{MergerExtension@\texttt{MergerExtension}!for finite permutation groupstrue
\label{MergerExtension:for finite permutation groups}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 roughly spoken, an extension of \mbox{\texttt{\mdseries\slshape G}} by an involution which ``merges'' \mbox{\texttt{\mdseries\slshape points}} into \mbox{\texttt{\mdseries\slshape point}}. 



 java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 365

 Let $n$ be the largest moved point of \mbox{\texttt{\mdseries\slshape G}}, and let $H$ be the tame subgroup of CT({\ensuremath{\mathbb Z}}) which respects the
partition $\{P}$of {ensuremath{\mathbb Z}} into the residue classes (mod{\nobreakspace}$n$), and which acts on $\mathcal{P}$ as \mbox{\texttt{\mdseries\slshape G}} acts on $\{1, \dots, n\}$. Further assume that \mbox{\texttt{\mdseries\slshape points}} = $\{p_1, \dots, p_k\}$ and \mbox{\texttt{\mdseries\slshape point}} = $p$, and put $r_i := p_i-1, \
little complicated, but really the code of the method is only about half as
long as this description. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@# First example -- a group isomorphic to PSL(2,Z):|
  !gapprompt@elements in java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 155
  <rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Size(G); |
  infinity
  !gapprompt@gap>| !gapinput@GeneratorsOfGroup(G);|
  [ ( 0(3), 1(3), 2(3) ), ( 0(3), 2(6) ) ( 1(3), 5(6) ) ]
  !gapprompt@gap>| !gapinput@B := Ball(G,One(G),6:Spheres);;|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 3, 4, 6, 8, 12, 16 ]
  !gapprompt@gap>| !gapinput@#|
  !gapprompt@gap>| !gapinput@# Second example -- a group isomorphic to Thompson's group V:|
  !gapprompt@gap>| !gapinput@G := MergerExtension(Group((1,2,3,4),(1,2)),[1,2],3);|
  <rcwa over Z with 3  generators
  !gapprompt@gap>| !gapinput@Size(G);|
  infinity
  !gapprompt@gap>| !gapinput@GeneratorsOfGroup(G);|
  [ ( (4, 1(4) 2((), 3(4)),(0(,1(4) )
    ( 0(4), 2(8) ) ( 1(4), 6(8) ) ]
  !gapprompt@gap>| !gapinput@B := Ball(G,One(G),6:Spheres);;|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 4, 11, 28, 69, 170, 413 ]
  !gapprompt@gap>|!gapinput@G = (([0,2,1,2],[1,2,2,4],02,1,4],[1,4,2,4]],|
@|gapinput                  ))|
   gapprompt> g@         IsIntegralIsClassWiseOrderPreserving,IsSignPreserving]f>f(G))|
  
\end{Verbatim}
 }

 It is also possible to build an rcwa group from a list of residue classes: 

\subsection{\textcolor{Chapter }{GroupByResidueClasses (the group `permuting All rcwa groups a ring$$ are  ofRCWA(R). group RCWA($R$) itself is not finitely generated, thus cannot be constructed as described
\logpage{[ 3, 1, 5 ]}\nobreak
\hyperdef{L}{X8143AB647801F438}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GroupByResidueClasses({\mdseries\slshape classes})\index{GroupByResidueClasses@\texttt{GroupByResidueClasses}!the group `permuting a given list of residue classes'}
\{GroupByResidueClasses:the group `permuting a given list of residue classes'}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the group which is generated by all class transpositions which interchange
disjoint {\noindent{}{$\riangleright\nspaceRCWA{\ })index@textttR! groupformed all   ofa }



 The argument \mbox{\texttt{\mdseries\extbf{indent Returns: }

 If the residue classes in \mbox{\texttt{\mdseries\slshape classes}} arepermutations of the ring{nobreakspace}\mbox{\texttt{\mdseries\slshape R}}. 
trivial. In many other cases, the returned group is infinite. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := GroupByResidueClasses(List([[0,2],[0,4],[1,4],[2,4],[3,4]],|
    !apprompt@ap| !gapinput@RCWA_Z : RCWAIntegers))|
  <  RCWA(Z)
  !gap> !apinput@ : Group(ist[[02,12][1,,2,4],[0,2,1,4,1,424]]|
  !
  <(0(2),1(2)),(1(2),2(4)),(0(2),1(4)),(1(4),2(4))>
  !gapprompt@gap>| !gapinput@G = H;|
  true
  
\end{Verbatim}
 }

 java.lang.StringIndexOutOfBoundsException: Range [73, 8) out of bounds for length 78
the group RCWA($R$) into itself. Examples    infinity, 218 ]
products described above. The support of the image of such a monomorphism is
the image of a given injective rcwa mapping. For this reason, these
monomorphisms are called \emph{restriction monomorphisms}. The following operation computes images of rcwa mappings and
texttts{45}groups RCWA$$)into itself: 
ring{nobreakspace}R $) Thisgroup ishandled as a  case as well: 
rcwa mapping) }}\logpage{[ 3, 1, 6 ]}
\hyperdef{L}{X852EF2C079E4D7FF}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Restriction({\mdseries\slshape g, f})\index{Restriction@\texttt{Restriction}!of an rcwa mapping, by an java.lang.StringIndexOutOfBoundsException: Index 174 out of bounds for length 29
\label{Restriction:of an rcwa mapping, by an injective rcwa mapping}
}\hfill{\scriptsize (operation{noindenttextcolor{FuncColor}{$\triangleright$\enspace\texttt{CT({\mdseries\slshape R})\index{CT@\texttt{CT}!the group generated by all class transpositions of a ring}
\noindentt{uncColor}{t$enspace\textttRestriction(mdseries\slshape,f}\ndex{Restriction@{}!of an rcwa group,by  injective rcwa mapping}
\label{Restriction:of an rcwa group, by an injective rcwa mapping}
\{scriptsize (operation}}java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
\textbf{\indent Returns:\ }
 the restriction of the rcwa mapping \mbox{\texttt{\mdseries\slshape g}} (respectively the rcwa group \mbox{\texttt{\mdseries\slshape G}}) by the injective rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 



 By definition, the \emph{restriction} $g_f$ of an rcwa mapping \mbox{\texttt{\mdseries\slshape g}} by an injective rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is the unique rcwa mapping which satisfies the equation $f \cdot g_f = g \cdot f$ and which 

 The \emph{restriction} of an rcwa group{\\begin{Verbatim}[commandchars=!@|,fontsize=\smalljava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
of{\!gapprompt gapinput@sSimpleGroup( # One of a number of stored attributes/properties.|
\begin{Verbatim}[commandchars=!@|,fontsize=\
  
  !gapprompt[2 ]()
  <wild rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Support(F2tilde);|
  3(5)
  
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{ Induction (of an rcwa mapping or \texttt{\symbol{45}}group, by an injective
rcwa mapping) }}\logpage{[ 3, 1, 7 ]}
\hyperdef{L}{X82171D7287CBED95}{}
{
\noindent$\enspace\textttInduction({\mdseries\slshape , f}\index{Induction@texttt{nduction}of an mapping aninjectivercwamapping
ofanmapping  an java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 66
}\hfill{\scriptsize (operation)}}\\
\noindentendVjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
\label{Induction:of an rcwa group}group ({{mathbb}) hasanouterautomorphism 
\hfill{scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 theinduction of   mapping\box{\texttt{\mdseries\slshape g}} (respectively the rcwa group \mbox{\texttt{\mdseries\slshape G}}) by the injective rcwa mapping{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 



 \mph{nduction  therightinverse of ,i. ittexttt{InductionRestriction(\mbox\\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape f}}),\mbox{\texttt{\mdseries\slshape f}}) = \mbox{\texttt{\mdseries\slshape g}}} and \texttt{Induction(Restriction(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape f}}),\mbox{\texttt{\mdseries\slshape f}}) = \mbox{( 0(), (6))
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap> !apinput@Induction(F2tilde,RcwaMapping([[5,3,1]])) = F2;|
  java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 61
  
\end{Verbatim}
 }

 \index{SmallGeneratingSet@\texttt{SmallGeneratingSet}} Once having constructed an rcwa group, it is sometimes possible to obtain a
smaller generating set by the operation \texttt{SmallGeneratingSet}. 

i{\{! an  indexDisplay\{!  rcwa group} \index{!  }index\{}   }arethet}\{}   java.lang.StringIndexOutOfBoundsException: Range [297, 296) out of bounds for length 335

\{ @rcwa! {groupgroup} rcwa!}{grouprcwagroup!prime set}\{ rcwagroupclass }\{ @ indexrcwa@ group!- -}\rcwa}ofrcwa}}  }java.lang.StringIndexOutOfBoundsException: Range [474, 473) out of bounds for length 1140
  aret}\Multiplier\{} . } an is of  java.lang.StringIndexOutOfBoundsException: Range [173, 172) out of bounds for length 187
exists, i.e. if the group is tame, and 0 otherwise. The \emph{multiplier} respectively \emph{divisor} of an rcwa group is the lcm of the multipliers java.lang.StringIndexOutOfBoundsException: Index 158 out of bounds for length 29
   $$The\primeset}anis java.lang.StringIndexOutOfBoundsException: Range [113, 110) out of bounds for length 155
}java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 568
{\java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 74
integers. The latter holds for any subgroup of CT({\ensuremath{\mathbb Z\{java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 32
(cf. below). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,6),|
  !gapprompt@>| !gapinput@              ClassReflection(2,4));|
  <rcwa group over Z with 3 generators>
  !gap| !gapinput@([odulusMultiplier,Divisor,PrimeSet,IsClassWiseTranslating,|
  !gapprompt@>| !gapinput@         IsIntegral,IsClassWiseOrderPreserving,IsSignPreserving],f->f(G));|
  [ 24, 2, 2, [ 2, 3 ], false, false, false, false ]
  
\end{Verbatim}
 All rcwa groups over a ring $R$ are subgroups of RCWA($R$). The group RCWA($R$) itself is not finitely generated, thus cannot be constructed as described
 It asspecialcase 

\by{}\texttt{Z}, the infinite dihedral group is denoted by{\nobreakspace}\texttt{D0} and free groups of rank $2,3,4,\dots$ are denoted by{\nobreakspace}\texttt{F2}, \texttt{F3}, \texttt{F4},{\nobreakspace}$\dots$. While for  thesymbol{java.lang.StringIndexOutOfBoundsException: Range [276, 274) out of bounds for length 364
\logpage{[ 3, 1, 8 ]}\nobreak
\hyperdef{L}{X79450C1C8756FEB3}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RCWA({\mdseries\slshape R})\index{RCWA@\texttt{RCWA}!the group formed by all rcwa permutations of a ring}
\label{RCWA:the group formed by all rcwa permutations of a ring}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the group RCWA(\mbox{\texttt{\mdseries\slshape R}}) of all residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
permutations of the ring{\nobreakspace}\mbox{\texttt{\mdseries\slshape R}}. 



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@RCWA_Z := RCWA(Integers);|
  RCWA(Z)
  most  it happensthat  is a large section on which nostructural
true
  
end{Verbatim}
 }

 Examples of rcwa permutations can be obtained via \texttt{Random(RCWA(\mbox{\texttt{\mdseries\slshape R}}))}, see Section{\nobreakspace}\ref{sec:Random}. \index{NrConjugacyClassesOfRCWAZOfOrder@\texttt{NrConjugacyClassesOfRCWAZOfOrder}} The number of conjugacy classes of RCWA({\ensuremath{\mathbb Z}}) of elements
of given order is known, cf. Corollary{\nobreakspace}2.7.1{\nobreakspace}(b)
in{\nobreakspacejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{Verbatim!|fontsizejava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 77
  
  !gapprompt@gap>| !gapinput@List([2,105],NrConjugacyClassesOfRCWAZOfOrder);|
  [ infinity  gapprompt@>| !apinput@             ClassShift(2,4)ClassReflection(12);|
  
\end{Verbatim}
 We denote the group which is generated by all class transpositions of the
ring{\nobreakspace}$R$ by CT($R  Z.(2java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

\subsection{\textcolor{Chapter }{CT ( gapprompt@> !java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 93
\logpage{[ 3, 1, 9 ]}\nobreak
\hyperdef{L<ildrcwa  over  with  generators>
{C3  C2  F2
label{Tthe group generated by all class transpositions of a ring}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CT({\mdseries\slshape P, Integers})\index{CT@\texttt{CT}!subgroup of CT(Z)}
\label{CT:subgroup of CTjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the group CT(\mbox{\texttt{\mdseries\slshape R}}) which is generated by all class transpositions of the ring{\nobreakspace}\mbox{\texttt{\mdseries\  !gapprompt@gap>| !gapinput@G := Group(Collatz,ClassShift(0,1));;|
of{\nobreakspace}{\ensuremath{\mathbb Z}} which interchange residue classes
java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 14



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame  ggap> ((java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 57
  
  !gapprompt@gap>|gappromptgap|!@(CTIntegers,java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 83
  CT(Z)
  !gapprompt@gap>| !gapinput@IsSimpleGroup(CT_Z); # One of a number of stored attributes/properties.|
  true
  !gapprompt@gap>| !gapinput@V := CT([2],Integers);|
  CT_[ 2 ](Z)
  @!java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 51
  [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 0(2), 1(4) ), ( 1(4), 2(4!@gap 
  !gapprompt@gap>| !gapinput@G := CT([2,3],Integers); |
  CT_[ 2, 3 ](Z)
  !gapprompt@gap>| !gapinput@GeneratorsOfGroup(G);|
[  (2), 1(2) )  03) ( ,(1(3, 3 , (0() ( ,
    (02,6 ) (0(,( )]
  
\end{Verbatim}
 }

 \index{Mirrored@\texttt{Mirrored}} Thejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
given by conjugation with $n \mapsto -n - 1$. This automorphism can be applied to an rcwa mapping of {\ensuremath{\mathbb
Z}} or to an rcwa group over {\ensuremath{\mathbb Z}} by the operation \texttt{Mirrored}. The group \texttt{Mirrored(}\mbox{\texttt{\mdseries\slshape G}}\texttt{)} acts on the nonnegative integers as \mbox{\texttt{\mdseries\slshape G}} acts on the negative integers, and vice versa. 
=Example
  
determined operation.a wildgroup java.lang.StringIndexOutOfBoundsException: Range [98, 97) out of bounds for length 136
  ( 0(2), 1(6) )
  \texttt\{45} linearrepresentations. is
  ( 1(2), 4(6) )
  !gapprompt@gap>| !gapinput@\[java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 77
  !gapprompt@gap>| !gapinput@ShortOrbits(G,[-100..100],100 !gap| !@ =Group(ClassTransposition(,,14,(,);;java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
  [ [ 0 .. 5 ] ]
  !gapprompt@java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 20
  [ [ -6 .. -1 ] ]
  
\end{Verbatim}
 \index{java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 N}0$ {{4))|
Z}  a integer m parametrized thepartitions  \nsuremath{mathbb Z}  $ classes.The of elementsfor  $m   obtained bythe texttt{},and  ofsuch java.lang.StringIndexOutOfBoundsException: Range [302, 301) out of bounds for length 383
\begin{Verbatim
  
  !gapprompt@gap>| !gapinput@NrElementsOfCTZWithGivenModulus{[1..8]};|
  [ 1, 1, 17, 238, 4679, 115181, 3482639, 124225680 ]
  
\end{Verbatim}
 \index{NrConjugacyClassesOfRCWAZOfOrder@\texttt{NrConjugacyClassesOfCTZOfOrder}} The number of conjugacy classes of CT({\ensuremath{\mathbb Z}}) of elements of
given order is also known under the java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 12
Z}}) is [3 2 2]}

  
\section{\textcolor{Chapter }{ Basic routines for investigating
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine groups }}\label{sec:InvestigatingRcwaGroups}
\}\hfill{sm}\
\hyperdef{L}{X80C042BE82EE0F9A}{}
{
  In the previous section we have seen how to construct rcwa groups. The purpose
ofhfill{\ ()}\
anrcwa java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 78
a little (but really only \emph{a very little}!) information on the group structure is a dedicated method for the operation \texttt{StructureDescription}: 

\subsection{\textcolor{Chapter }{StructureDescription (for an rcwa group)}}
\logpage{[ 3, 2, 1 ]}\nobreak
\hyperdef{L}{java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
{\ The argument\mbox{\exttt\mdseries\slshape r}} is the ``search radius'', i.e. the radius of the ball around{\nobreakspace}1 which is scanned for
labelStructureDescription:for an rcwa group}
}\hfill{\scriptsize (method)}}\\
\{indent :\}
 a string which sometimes gives a little glimpse of the structure of the rcwa
group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. 



 The attribute \texttt{StructureDescription} for finite\eginVerbatim}=!@,==labelExample]
infinite groups, and in particular to rcwa groups. 

 Wreath products are denoted by{\nobreakspace}\texttt{wr}, and free products are   !gapprompt@| !@ClassTransposition46,|
by{\nobreakspace}\texttt{Z}, the infinite dihedral group   gap>| g : SparseRep(java.lang.StringIndexOutOfBoundsException: Range [52, 49) out of bounds for length 59
general it standsforan extension whichmay splitornot For wild groups
in most cases it happens that there is a large section on which no structural
information can be obtained. Such sections of the group with unknown structure
are denoted  #I  there are 3 generators and 12 relators of total length 330
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !@gap> !gapinput@G =Group(02,,,ClassShift(,5);|
  !gapprompt@gap>| !gapinput@StructureDescription(G);|
  "Z xZx Z x Z x Zx Z xZ) .(C2 xS7"
  !gapprompt@gap>| !gapinput@[ a^ b2 2 (*c)^, (ab^6, ab**b)^,(*c**c)^, 
  !gapprompt@>| !gapinput@              ClassShift(*12,(**c*c*)12 
  !gapprompt@gap>| !  
  "Z^2.((S3xS3):2\nd{
  !
  !gapprompt@gap>| !gapinput@PSL2Z := Image A  very common  is to factor group elements into generators: 
  !gapprompt@>| !gapinput@                                                   CyclicGroup(2))));;|
  !gapprompt@gap>| !gapinput@G := DirectProduct(PSL2Z,F2);|
  <wild rcwa group over Z with 4 generators>
  !gapprompt@gap>| !gapinput@StructureDescription(G);|
  "(C3 * C2) x F2"
   representative the set theset preimages of{nobreakspace}\mbox{\texttt{\mdseries\slshape g}} under the epimorphism{\nobreakspace}\mbox{\texttt{\mdseries\slshape phi}} from a free group to an rcwa group. 
  <wild rcwa group over Z with 5 generators>
  !gapprompt@gap>| !gapinput@StructureDescription(G);|
  "((C3 * C2) x F2) wr Z"
  !gapprompt@gap>| !gapinput@Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;|
  !gapprompt@gap>| !gapinput@G := Group(Collatz,ClassShift(0,1));;|
  !gapprompt@gap>| !gapinput@StructureDescription(G:short);|
  "<unknown>.Z"
  
\end{Verbatim}
 }

 The extent to which the structure of an rcwa group can be exhibited
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 73
about the structure of \exttt{45}by\\{45}}one. 
functionality described This method method can befor factoringelementsgroups into generatorsjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
manual 

 \index{Size@\textttjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
respected (see{nobreakspace\RespectedPartition}(ref{RespectedPartition:of a tame rcwa group})) is faithful. Hence the problem of computing the order of an rcwa group
reduces to the problem of deciding whether it is tame, the problem of deciding
whether it acts faithfully on a respected partition and the problem of
computing the order of the finite permutation group induced on the respected
partition. 
\begin{Verbatim}[{\nobreakspace}\mbox{\textttjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
  
  !gapprompt@gap>| !gapinput@G); SetName(b,"b");|
  !gapprompt@>| !gapinput@              ClassReflection(0,5));|
  rcwagroup over Z with 3 generators>
  !gapprompt@gap>| !gapinput@Size(G);|
  46080
  
\endVerbatim
 \index{<rcwa permutation Z with modulus 8java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
by\texttt{IsomorphismPermGroup} 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 37
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,3,1,3));;|
  !gapprompt@  true
  () ()) () ) ] ->[(,2),)5,) (12(45 ]
  
\end{Verbatim}
 \index{rcwa group@rcwa group!membership test} \index{OrbitLengthBound@\texttt{OrbitLengthBound}} In general the membership problem  rcwa permutation of with modulus 8>
unsolvable,   (^1*^-^*2*(b*)^*b^2b^-1*a-1*b)^*b^(*^1)2*^1 java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
groups, membership can very often be decided quite quick as well, but
\texttt{\symbol{45}}\texttt{\symbol{45}} as said
\{45} .,  textttg}   in\extttG the membership   return \exttt} provided there    (
etc.). 

 On Info level{\nobreakspace}2 of \texttt{InfoRCWA} the membership test provides information on reasons why the given rcwa
permutation is an element {

The  gin '  \    isset,   f  itcomputedballsof  texttt{    \{  {} theseare still disjoint. Note however   
unsolvability of the membership problem, \textsf{RCWA} has no means to check the correctness of such bound in a given case. So the
orrectof this remain responsibility of 
user. 
\{[=,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
  
  !gapprompt@gap>| !gapinput@G := Group(ClassShift(0,3),ClassTransposition(0,3,2,6));;|begin!@f\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@ ClassShift(2,6)^7 * ClassTransposition(0,3,2,6)|
  !gapprompt@>| !gapinput@  * ClassShift(0,3)^-3 in G;|
  
  !gapprompt@gap>| !gapinput@ClassShift(0,1) in G;|
  false
  
\end{Verbatim}
 \index{rcwa group@rcwa group!conjugacy problem} \index{IsConjugate@\texttt{IsConjugate}!for elements of RCWA(R)} \index{IsConjugate@\texttt{IsConjugate}!for elements of CT(R)} The conjugacy problem for rcwa groups is difficult, and \textsf{RCWA} provides   
\begin{Verbatim}[commandchars=!@|,fontsize=\small 
  
  !@| gapinput@IsConjugateRCWAIntegers),java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  !gapprompt@>| !gapinput@               ClassTransposition(0,2,1,4),ClassShift(0,1));|
  java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
  !gapprompt@gap>
(4,,);java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
  true
  !gapprompt@gap>| !gapinput@g := RepresentativeAction(CT(Integers),thanorequal  textttsmallpointbound} \{\G}java.lang.StringIndexOutOfBoundsException: Range [100, 99) out of bounds for length 119
  !gapprompt\item{\}   java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 112
  of Z modulus48>
  !gapprompt@gap>| !gapinput@ClassTransposition(0,2,\{java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  true
  
\end{Verbatim}
\IsTameIsTame!an rcwa is \{ indicateswhetheran tame  not 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !of mbox\texttt\mdseriesslshapeG}forno group found  themto integers
,ClassShift13));
  g> !java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 40
  true
  !gapprompt!@ap|G: (([[0,2,1,2],[0,3,2,3],[1,2,2,4]],|
  false
  
\end{Verbatim}
 \index{IsSolvableGroup@\texttt{IsSolvableGroup}!for an rcwa group} \index{IsPerfectGroup@\texttt{IsPerfectGroup}!for an rcwa group} \index  <((2)12)(()2())((),()>
as   !gappgap|!gapinput@(G)|
determined by the  
 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 53
finite\texttt{\symbol{45}}dimensional linear representations. There is a
method for \texttt{Exponent} available, which works basically for any rcwa group. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>|       ,=,:="transitive
  !gapprompt@gap>| !gapinput@IsPerfect(G);|
  false
  !gapprompt@gap>| !gapinput@IsSolvable(G);|
  true
  !gapprompt@gap>| !gapinput@D1 := DerivedSubgroup(G);; D2 := DerivedSubgroup(D1);;|
  !gapprompt@gap>| !gapinput@IsAbelian(D2);|
  true
  !gapprompt@gap>| !gapinput@Index(G,D1); Index(D1,D2);|
  infinity
  9
  !gapprompt@gap>| !gapinput@StructureDescription(G); StructureDescription(D1);|
  "(Z x Z x Z) . S3"
  (  Z)C3"
  !gapprompt@gap>| !gapinput@Q := D1/D2;|
  Group([ (), (1,2,4)(3,5,7)(6,8,9), (1,3,6)(2,5,8)(4,7,9) ])
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 55
  !@|G,24][1,,,],
  !gapprompt@gap>| !gapinput@Exponent(G);|
  infinity
  !gapprompt@gap>  ((2,()((,4),14)26)
  !gapprompt@gap>| !gapinput@Display(Image(phi,ClassTransposition(0,2,1,4)));|
  [ [     0,     0,   1/2,  -1/2,     0,     0 ], 
    [     0,     0,     0,     1,     0,     0 ], 
    [     2,     1,     0,     0,     0,     0 ],) ())  1() 6) 
    [     0,     1,     0,     0,     0,     0 ], 
0,0,     ,     ,    ,     , 
    [     0,     0,     0,     0,     0( >
  
\end{Verbatim}
Whenjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 72
generators: 

\subsection{\textcolor{Chapter }{EpimorphismFromFpGroup (for an rcwa =java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 23
\logpage{[ 3, 2, 2 ]}\nobreak
h}java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{EpimorphismFromFpGroup({\mdseries\slshape G, r})\index{EpimorphismFromFpGroup@\texttt        (768,768 ],  =,: ,
\label{EpimorphismFromFpGroup:for an rcwa group and a search radius}
}\hfill{\scriptsize (method!| !java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 77
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{EpimorphismFromFpGroup({\mdseries\slshape G, r, maxparts})\index{EpimorphismFromFpGroup@\texttt{EpimorphismFromFpGroup}  gapprompt@|!gapinput@[.]last)|
\label{EpimorphismFromFpGroup:for rcwa group, search radius and bound on number of affine parts}
}\hfill{\scriptsize (method)}}\\
\textbfindexjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 231
phisma java.lang.StringIndexOutOfBoundsException: Range [41, 31) out of bounds for length 59
group{\nobreakspace}\mbox{\texttt{\\[t{}]     \java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 94



 The argument \mbox{\texttt{\mdseries\slshape r}} is the ``search radius'', i.e. the radius of the ball around{\java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 22
relations. In general, the larger \mbox{\texttt{\mdseries\slshape r}} is chosen the smaller the kernel of the returned epimorphism is. If the
{nobreakspace}m\{mslshape }has  presentations kernel in principle get trivial provided
\\{}listof  of\{mdseriesslshape G} n\symbol}gi \}forlarge\{} \D],for\texttt{  ,... g  LengthD)
b{Verbatim}commandchars=|\framesingle,abelExample]
  
  !gapprompt@gap>| !gapinput@a := ClassTransposition(2,4,3,4);;|
  !gapprompt@gap>| !gapinput@b := ClassTransposition 
  gapprompt@@| !gapinput@ : ClassTransposition(3,,,);java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
(Groupa,)|
  <(2(4),3(4)),(4(6),8(12)),(3(4),4(6))>
  !gapprompt@gap>| !gapinput@phi := EpimorphismFromFpGroup(G,6);|
  #I  there are 3 generators and 12 relators of total length 330
  #I  there are 3 generators and 11 relators of total length 312
   , ] ((4) (),(46,(12 )( (),() ]
  !gapprompt@gap>| !gapinput@RelatorsOfFpGroup(Source(phi));|
  [ a^2, b^2, c^2, (b*c)^3, (5affine ,<rcwa  Z 12 java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70
    (a*b*a*c)^12, ((a*b)^2*a*c)^12, (a*b*(a*c)^2)^12, (a*b*c*a*c*b)^12 ]
  
}
 }

 A related very common task is to factor group elements into generators: 

\subsection{\textcolor{Chapter }{PreImagesRepresentative (for an epi. from a free group to an rcwa group)}}
\logpage{[ 3, 2, 3 ]{
hyperdef{X{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{\noindent\textcolor\{(ethod}}\
an a free  to  group
}\hfill{\scriptsize (method)}}\\ aset}
\textbf{\indent Returns:\ }
 a representative of the set of preimages of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} under the epimorphism{\nobreakspace}\mboxthe  \java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 268



 The epimorphism \mbox{\texttt{\mdseries\slshape phi}} must map The secondargument java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 75
one\texttt{\symbol{45}}by\texttt{\symbol{45}}one. 

 This method can be used for factoring elements of rcwa groups into generators.
The implementation is based on \texttt{RepresentativeActionPreImage}, see \texttt{RepresentativeAction} (\ref{java.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 78

 \index{PreImagesRepresentatives@\texttt{PreImagesRepresentatives}!for an epi. from a free group to an rcwa group} Quite frequently, computing several preimages is not harder than computing
just one, i.e. often several preimages are found simultaneously. The operation \texttt{PreImagesRepresentatives} takes care of this. It takes the same arguments as \texttt{PreImagesRepresentative} and returns a list of preimages. If multiple preimages are found, their
quotients give rise to nontrivial relations among the generators of the image
of{\nobreakspace}\mbox{\texttt{\.
Verbatim[commandchars=\,=single,=java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  
  !gapprompt@gap>| !gapinput@a := RcwaMapping([[2,0,3],[4,-1,3],!g|O(G0;java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  !gapprompt@gap>| !gapinput@b := ClassShift(0,1);; SetName(b,"b");|
  !gapprompt@gap>| !gapinput@G := Group(a,b);; # G = <<Collatz permutation>, n -> n + 1>|g|!gapinputOrbitGResidueClass0,);java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  !gapprompt@gap>| !gapinput@phi := EpimorphismFromFreeGroup(G);;|
  !gapprompt@gap>| !gapinput@g := Comm(a^2*b^4,a*b^3); # a sample element to be factored|
  <rcwa permutation of Z with modulus 8>
  !gapprompt@gap>| !gapinput@PreImagesRepresentative(phi,g); # -> a factorization of g|
  b^-3*(b^-1*a^-1)^2*b^3*a*b^-1*a*b^3
  !gapprompt@gap>| !gapinput@g = b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3; # check|
  true
  !gapprompt@gap>| !gapinput@g := Comm(a*b,Comm!gapprompt@|!@ =Cjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 97
  <rcwa permutation of Z with modulus 8>
  !gapprompt@gap>| !gapinput@pre := PreImagesRepresentatives(phi,g);|
  [ (b^-1*a^-1)^2*b^2*(b*a)^2*b^-2, b^-1*(a^-1*b)^2*b^2*(a*b^-1)^2*b^-1 ]
  !gapprompt@gap>| !gapinput@rel := pre[1]/pre[2]; # -> a nontrivial relation|
  (b^-1*a^-1)^2*b^3*a*b^2*a^-1*b^-2*(b^-1*a)^2*b
  !gapprompt@gap>| !gapinput@rel^phi;|
  IdentityMapping( Integers )
  
\end{Verbatim}
 }

 }

  
\section{\textcolor{Chapter }{ The natural action of an rcwa group on the underlying ring }}\label{sec:ActionOnR}
\logpage{[ 3, 3, 0 ]}
\hyperdef{L}{X8151BE577FFDCE87}{}
{

significantly in computing in it and in obtaining results on its structure.
This holds particularly for the natural action of an rcwa group on its
underlying ring. In this section we describe \textsf{RCWA}'s functionalityjava.lang.StringIndexOutOfBoundsException: Range [74, 29) out of bounds for length 29

 \index{Support@\texttt{Support}!of an rcwa group} \index{MovedPoints@\texttt{MovedPoints}!of an rcwa group} \index{IsTransitive@\texttt{IsTransitive}!for an rcwa group, on its underlying ring} The support, i.e. the set of moved points, of an rcwa group can be determined
by \texttt{Support} or \texttt{MovedPoints} (these are synonyms). Testing for transitivity on the underlying ring or on a
residue classes thereof is often feasible: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frameame=single,label=xample
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(1,2,0,4),ClassShift(0,2));;|
g@> gjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
  true
  
\end{Verbatim}
 
\index{IsTransitiveOnNonnegativeIntegersInSupport@\texttt{IsTransitiveOnNonnegativeIntegersIn- Support}!for an rcwa java.lang.StringIndexOutOfBoundsException: Index 208 out of bounds for length 208
\index{TryIsTransitiveOnNonnegativeIntegersInSupport@\texttt{TryIsTransitiveOnNonnegativeIntegers- InSupport}!for an rcwa group over Z and a search limit}
  \index{TransitivityCertificate@\texttt{TransitivityCertificate}!for an rcwa group over Z and a search limit} \index{TryToComputeTransitivityCertificate@\texttt{TryToComputeTransitivityCertificate}!for an rcwa group over Z and a search limit} \index{SimplifiedCertificate@\texttt{SimplifiedCertificate}!for a transitivity certificate of an rcwa groups over Z} Groups generated by class transpositions of the integers act on the set of
nonnegative integers. There is a property \texttt{IsTransitiveOnNonnegativeIntegersInSupport(\mbox{\texttt{\mdseries\slshape G}})} which indicates whether such group acts transitively on the set of nonnegative
integers\begin{Verbatim}[commandchars=!@|,fontsize=smallframe=single,label=Example]
hard problem, methods may fail. If \texttt{IsTransitiveOnNonnegativeIntegersInSupport} returns \texttt{true}, an attribute \texttt{TransitivityCertificate} is set; this is a record containing components \texttt{phi}, \texttt{words}, \texttt{classes}, \texttt{smallpointbound}, \texttt{status} and \texttt{complete} as follows: 
\begin{description}
\item[{\texttt{phi}}]  is an epimorphism from a free group to \mbox{\texttt{\mdseries\slshape G}} which maps generators to generators. 
item{\words}, texttt{lasses}] two lists. \texttt{\symbol{45}}\texttt{\symbol{45}} \texttt{words[i]} is a preimage under \texttt{phi} of an element of \mbox{\texttt{\mdseries\slshape G}} which maps all sufficiently large positive integers in the residue classes \texttt{classes[i]} to smaller nonnegative integers. 
\item[{\texttt{smallpointbound}}]  in addition to finding a list of group elements $g_i$ such that for any large enough integer $n$ in the support of \mbox{\texttt{\mdseries\slshape G}} there is some $g_i$ such that $n^{g_i} < n$, for verifying transitivity it was necessary to check that all integers less
than or equal to \texttt{smallpointbound} in the support of \mbox{\texttt{\mdseries\slshape G}} lie in the same orbit. 
\item[{\texttt{status}}]  the string \texttt{"transitive"} in case all checks have been completed successfully. 
i[{texttt{}]\texttt}  case all checkshave  successfully. 
\end{description}
 Parts of this information for possibly intransitive groups can be obtained by
the operation \texttt{    4, 4, 6, 5, 5, 3, 4, 2, 3, 4, 4, 2, 3, 4, 4, 2, 3, 3, , 5 3,5,java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
and taken into consideration. This operation interprets an option \texttt{abortdensity} \texttt{\symbol{45}}\texttt{\symbol{45}} if set, the operation returns the
data computed so far once the density of the set of positive integers in the
support of \mbox!apprompt@gap>|java.lang.StringIndexOutOfBoundsException: Range [33, 28) out of bounds for length 79
reaches or drops below \texttt{abortdensity}. A simplified certificate can be obtained via \texttt{SimplifiedCertificate(\mbox{\texttt{\mdseries\slshape cert}})}. 
begin{}=@,fontsize\,=,=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(List([[0,2,1,2],[0,3,2,3],[1,2,2,4]],|
  !gapprompt@>| !gapinput@                   ClassTransposition));|
  <(0(2),1(2)),(0(3),2(3)),(1(2),2(4))>
  !gapprompt@gap>| !gapinput@IsTransitiveOnNonnegativeIntegersInSupport(G);|
  true
  !gapprompt@gap>| !gapinput@TransitivityCertificate(G);|
  rec( 
    classes := [ [ 1(2) ], [ 2(6) ], [ 6(12), 10(12) ], [ 0(12) ], 
        [ 4(12) ] ], complete := true, 
    phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) ) 
       ], smallpointbound := 4, status := "transitive", 
    words := [ a, b, c, b*c, a*b ] )
  !gapprompt@gap>| !gapinput@SimplifiedCertificate(last);|
  rec( classes := [ [ 1(2) ], [ 2(4) ], [ 4(12) ], [ 0(12), 8(12) ] ], 
    complete := true, 
    phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) ) 
       ], smallpointbound := 4, status := "transitive", 
    words := [ a, c, a*b, b*c ] )
  !gapprompt@gap>| !gapinput@G := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],|
  !gapprompt@>| !gapinput@                   ClassTransposition));              # '3n+1 group'|
  <(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>
  !gapprompt@gap>| !gapinput@cert := TryToComputeTransitivityCertificate(G,10);|
  rec(
    classes := [ [ 1(2) ], [ 2(4) ], [ 4(32) ], [ 8(24), 44(48), 20(96) ], 
        [ 0(24), 16(24) ] ], complete := false, 
    phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) ) 
       ], remaining := [ 12(48), 28(48), 52(96), 84(96) ], 
    smallpointbound := 42, status := "unclear", 
    words := [ a, b, (a*c)^2*b*a*b, c, a*c*b ] )
  !gapprompt@gap>| !gapinput@Union(Flat(cert.classes));|
  <union of 90 residue  
  \endjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  12(48) U 28(48) U 52(96) U 84(96)
  !gapprompt@gap>| !gapinput@cert := TryToComputeTransitivityCertificate(G,20); # try larger bound|
  rec(
classes :[[12)][4)]  4(2 ,[(4) (),20(,
        [ 0(24), 16(24) ], [ 12(768), 268(768) ], [ 28(768), 540(768) ] ], 
    complete := false, 
    phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) ) 
       ], 
    remaining := [ 52(96), 84(96), 60(192), 108(192), 124(192), 172(192), 
        76(384), 204(384), 220(384), 348(384)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
        412(768), 652(768) ], smallpointbound := 1074, status := "unclear", 
    words := [ a, b, (a*c)^2*b*a*b, c, a*c*b, (a*c)^3*b*c*b*a*b, 
        (* ])
  !gapprompt@gap>| !gapinput@Difference(Integers,Union(Flat(cert.processed further with many :
  <union of 44 residue java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
  !gapprompt@gap>| !gapinput@Intersection([0..100],last);|
  [ 52, 60, 76, 84 ]
  
\end{Verbatim}
 \index{SupersetOfOrbitRepresentatives@\texttt{SupersetOfOrbitRepresentatives}!for an group   andsearch limitsLet\box{texttt\\G}  subgroup (\java.lang.StringIndexOutOfBoundsException: Range [196, 195) out of bounds for length 231
nontrivial intersection with every orbit of \mbox{\texttt{\mdseries\slshape G}} on ${\ensuremath{\mathbb N}}_0$ can be determined by \hyperdef}XDD}
\begin{description}
\item[{\texttt{R}}]  A set which \texttt{\symbol{45}}\texttt{\symbol{45}} possibly among other
numbers \texttt{\symbol{45}}\texttt{\symbol{45}} contains the smallest
representativestexttt{\mdseries\slshape maxprog}} can be used to control the size of this set. In general, larger values may
make the set smaller. 
\item[{\texttt{D}}]  A list of residue class unions whose union is a (not necessarily proper)
superset the complement of \texttt{R} in {\ensuremath{\mathbb Z}}. The intersection of \texttt{R} and the union of the sets in \texttt{D} is always finite. 
\item[{\texttt{g}}]  A list of elements former texttt\slshape palette}} must be a list of triples of integers in the range $0, \dots, 255$, denoting the RGB values of the colors to be used. In the latter case, \mbox{\texttt{\mdseries\slshape palette}} is not used, and any value can be passed. The picture is written in
\item[{\texttt{phi}}]  An epimorphism from a free group \texttt{F} of rank the number of generators of \mbox{\texttt{\mdseries\slshape G}} to \mbox{\texttt{\mdseries\slshape G}} which maps generators to generators. 
\item[{\texttt{w}}]  A list of words \texttt{w[i]} in \texttt{F} such that \texttt{w[i]\texttt{\symbol{94}}phi = g[i]}, for \texttt{i = 1, ... , Length(w) = Length(g)}. 
\end{description}
 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTranspositionjava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
  !gapprompt@>| !gapinput@              ClassTransposition(2,4,1,6));|
  <(1(3),2(3)),(3(4),4(6)),(2(4),1(6))>
  !gapprompt@gap>| !gapinput@R := SupersetOfOrbitRepresentatives(G,4,6);|
  rec( D := [ 2(3), 4(6), 1(6) ], R := 0(3) U [ 1 ], 
    g := 
      [ ( 1(3), 2(3) ), <rcwa permutation of Z with modulus 12 and 
          5 affine parts>, <rcwa permutation of Z with modulus 12 and 
          5java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
    pi := [ a, b, c ] -> [ ( 1(3), 2(3) ), ( 3(4), 4(6) ), ( 2(4), 1(6) ) ], 
    w := [ a, b, c ] )
  
\end{Verbatim}
 Further, there are methods to compute orbits under the action of an rcwa
group: 
\subsection{\textcolor{Chapter }{ Orbit (for an rcwa group and either a point or a set) }}\logpage{[ 3, 3, 1 ]}
\hyperdef{L}{X7C046BE97EE53692}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Orbit({\mdseries\slshape G, point})\index{Orbit@\texttt{Orbit}!for an rcwa group and a point}
\label{Orbit:for an rcwa group and a point}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Orbit({\mdseries\slshape G, set})\index{Orbit@\texttt{Orbit}!for an rcwa group and a set}
\label{Orbit:for an rcwa group and a set}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 the orbit of the point{\nobreakspace}\mbox{\texttt{\mdseries\slshape point}} respectively the set{\nobreakspace}\mbox{\texttt{\mdseries\slshape set}} under the natural action of the rcwa group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} on its underlying ring. 



 The second argument can either be an element or a subset of the underlying
ring of the rcwa group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. Since orbits under the action of rcwa groups can be finite or infinite, and
since infinite orbits are not necessarily residue class unions, the orbit may
either be returned in the form of a list, in the form of a residue class union
or in the form of an orbit object. It is possible to loop over orbits returned
as orbit objects, they can be compared and there is a membership test for
them. However note that equality and membership for such orbits cannot always
be decided. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassShift(0,2),ClassTransposition(0,3,1,3));|
  <rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Orbit(G,0);|
  Z \ 5(6)
  !gapprompt@gap>| !gapinput@Orbit(G,5);|
  [ 5 ]
  !gapprompt@gap>| !gapinput@Orbit(G,ResidueClass(0,2));|
  [ 0(2), 1(6) U 2(6) U 3(6), 1(3) U 3(6), 0(3) U 1(6), 0(3) U 4(6), 
    1(3) U 0(6), 0(3) U 2(6), 0(6) U 1(6) U 2(6), 2(6) U 3(6) U 4(6), 
    1(3) U 2(6) ]
  !gapprompt@gap>| !gapinput@Length(Orbit(G,ResidueClass(0,4)));|
  80
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,2,1,4),|
  !gapprompt@>| !gapinput@              ClassReflection(0,3));|
  <rcwa group over Z with 3 generators>
  !gapprompt@gap>| !gapinput@orb := Orbit(G,2);|
  <orbit of 2 under <wild rcwa group over Z with 3 generators>>
  !gappromptxtcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortCycles({\mdseries\slshape g, S, maxlng})\index{ShortCycles@\texttt{ShortCycles}!for rcwa permutation, set of points and bound on 
  true
  !n+38],IsPrime));|
  -19
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{java.lang.StringIndexOutOfBoundsException: Range [122, 54) out of bounds for length 122
\logpage{[ 3, 3, 2 ]}\nobreak
\hyperdef{L}{X7B7A3AF97D195E33}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GrowthFunctionOfOrbit({\mdseries\slshape G, n, r{\textunderscore}max, size{\textunderscore}max})\index{GrowthFunctionOfOrbit@\texttt{GrowthFunctionOfOrbit}!for an rcwa group, a point and bounds on radius and sphere size}
\label{GrowthFunctionOfOrbit:for an rcwa group, a point and bounds on radius and sphere size}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{GrowthFunctionOfOrbit({\mdseries\slshape orb, r{\textunderscore}max, java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
   java.lang.StringIndexOutOfBoundsException: Range [85, 84) out of bounds for length 90
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 a list whose ($r+1$)\texttt{\symbol{45}}th entry is the size of the sphere of radius $r$ about \mbox{\texttt{\mdseries\slshape n}} under the action of the group  !gapprompt@gap> !gapinput@CyclesOnFiniteOrbitG,G1G.,)|
once the sphere size exceeds \mbox{\texttt{\mdseries\slshape size{\textunderscore}max}}. 



 An option \texttt{"small"} is interpreted \texttt{\symbol{45}}\texttt{\symbol{45}} see example below. In
place of the group \mbox{\texttt{\mdseries\slshape G}} and the point \mbox{\texttt{\mdseries\slshape n}}, one can pass as first argument also an rcwa group orbit object \mbox{\texttt{\mdseries\slshape orb}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(List([[0,4,1,4],[0,3,5,6],[0,4,5,6]],ClassTransposition));|
  <(0(4),1(4)),(0(3),5(6)),(0(4),5(6))>
  !gapprompt@gap>| !gapinput@GrowthFunctionOfOrbit(G,18,100,20);|
  [ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 5, 6, 8, 6, 5, 
    5, 4, 3, 3, 4, 4, 4, 3, 3, 5, 4, 5, 6, 5, 2, 3, 3, 2, 3, 3, 4, 5, 4, 
    4, 4, 6, 5, 5, 3, 4, 2, 3, 4, 4, 2, 3, 4, 4, 2, 3, 3, 4, 3, 5, 3, 5, 
    4, 5, 6, 5, 3, 4, 5, 6, 5, 4, 3, 5, 4, 5, 5, 4, 4, 5, 5, 3, 4, 5, 3, 
   ,, 5 4 2,,4,4  ]
  !gapprompt@gap>| !gapinput@last = GrowthFunctionOfOrbit(Orbit(G,18),100,20);|
  true
  !gapprompt@gap>| !gapinput@GrowthFunctionOfOrbit(G,18,20,20:small:=[0..100]);|
{:   java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 79
        42, 44, 45, 48, 49, 51, 52, 53, 56, 57, 59, 60, 61, 64, 65, 66, 
        68, 69, 71, 75, 76, 77, 80, 81,index{CycleRepresentativesAndLengths@\texttt{CycleRepresentativesAndLengths}!for rcwa permutation and  }
    spheresizes := [ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 
        5, 6, 8 ] )
  !gapprompt@gap>| !gapinput@G := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],ClassTransposition));|
  <(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>
  !gapprompt@gap>| !gapinput@GrowthFunctionOfOrbit(G,0,100,10000);|
  [ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 6, 7, 9, 12, 14, 19, 21, 28, 
    29, 37, 42, 55, 57, 72, 78, 99, 113, 148, 164, 215, 226, 288, 344, 
    462, 478, 612, 686, 894, 985, 1284, 1416, 1847, 2018, 2620, 2902, 
    3786, 4167, 5432, 5958, 7749, 8568, 11178 ]
  
\end{Verbatim}
}

 index{DistanceToNextSmallerPointInOrbit\{} anrcwa \mbox\{mdseriesslshape }over{ensuremath{\ Z   mboxm\ }\{\{slshape}{,}\{n}} numberd     $$$java.lang.StringIndexOutOfBoundsException: Range [442, 441) out of bounds for length 798
on{\nobreakspace}${\ensuremath{\mathbb Z}}^2$. The pictures are written to files in bitmap\texttt{\symbol{45}}
(bmp\texttt{\symbol{45}}) format. The author has successfully tested this
feature    Windows andthe
processed further with many common graphics programs: 

\subsection{\textcolor{  !gapprompt@>| !gapinput@    );
\ permutation Z 180
\hyperdef{L}{X7D9DFAC97F9F0891}{ !gap|!apinputCycleRepresentativesAndLengths[.100:abortat=00000)|
{noindenttextcolor{}{\riangleright\\exttt{rawOrbitPicture(\s ,p0  , colored, \DrawOrbitPictureDjava.lang.StringIndexOutOfBoundsException: Range [197, 196) out of bounds for length 245
\label{DrawOrbitPicture:G, java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 64
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 nothing.java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10



 Drawsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
generated picture is \mbox{\texttt{\mdseries\slshape h}}{\nobreakspace}x{\nobreakspace}\mbox{\texttt{\mdseries\slshape w}} pixels. The argument \mbox{\texttt{\mdseries\slshape colored}} is a boolean which indicates whether a 24\texttt{\symbol{45}}bit true color
picture or a monochrome picture should be generated. In the former case, \mbox{\texttt{\mdseries\slshape palette}} must be a list of triples of integers in the range $0, \dots, 255$, denoting the RGB values of the colors to be used. In the latter case, \mbox{\texttt{\mdseries\slshape palette}} is not used, and any value can be passed. The picture is written in
bitmap\texttt{\symbol{45}} (bmp\texttt{\symbol{45}}) format to a file named \mbox{\texttt{\mdseries\slshape filename\logpage{ 3 3 8]\nobreak
begin}commandchars=@|fontsize=small,single,Example
  
  !gapprompt@gap>| !gapinput@PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),|
  !gapprompt@>| !gapinput@                                                   CyclicGroup(3))));;|
  !gapprompt@gap>| !gapinput@DrawOrbitPicture(PSL2Z,[0,1],2000,512,512,false,fail,"example1.bmp");|
  !gapprompt@gap>| !gapinput@DrawOrbitPicture(PSL2Z,Combinations([1..4],2),2000,512,512,true,|
  !gapprompt@>| !gapinput@                    [[255,0,0],[0,255,0],[0,0,255]],"\labelFixedResidueClasses:or rcwa mapping and bound on modulus}
  
\end{Verbatim}
 }

 The pictures drawn in the examples are shown on \textsf{RCWA}'s webpage. 

 Finite orbits give rise to finite quotients of a group, and finite cycles can
help to check for conjugacy. Therefore it is important to be able to determine
them: 
\subsection{\textcolor{Chapter }{ ShortOrbits (for rcwa groups) \& }\hfill\scriptsize (operation)}}\
\noindenttextcolorFuncColor{\\FixedResidueClasses({\slshape G,maxmod)index{FixedResidueClasses@texttt{FixedResidueClasses}!for rcwa group and bound on modulus}
{
\oindenttextcolor{}{\triangleright$\nspace{ShortOrbits(\mdseries\slshape , , maxlng})indexShortOrbits@\texttt{ShortOrbits}for  group,setof points and bound on length}
\label{ShortOrbits:for rcwa group, set of points and bound on length}
}\hfill{\scriptsize (operation)}}\\
right$texttt{hortOrbits({mdseries\slshape G, S, maxlng, maxn})\index{ShortOrbits@\texttt{ShortOrbits}!for rcwa group, set of points and bounds on length and points}
\label{ShortOrbits:for rcwa group, set of points and bounds on length and points}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortCycles({\mdseries\slshape g, S, maxlng})\index{ShortCycles@\texttt{ShortCycles}!for rcwa permutation, set of points and bound on length}
\label{ShortCycles:for rcwa permutation, set of points and bound on length}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortCycles({\mdseries\slshape g, S, maxlng, maxn})\index{ShortCycles@\texttt{ShortCycles}!for rcwa permutation, set of points and bounds on length and points}
\label{ShortCycles:for rcwa permutation, set of points and bounds on length and points}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortCycles({\mdseries\slshape g, maxlng})\index{ShortCycles@\texttt{ShortCycles}!for rcwa permutation and bound on length}
\label{ShortCycles:for rcwa permutation and bound on length}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 in the first form a list of all orbits of the rcwa group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} of length at most \mbox{\texttt{\mdseries\slshape maxlng}} which intersect non\texttt{\symbol{45}}trivially with the set{\nobreakspace}\mbox{java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0



 The operation \texttt{ShortOrbits
speed up the computation. If furthermore \mbox{  !gapprompt@gap> !Group(ClassTransposition0,,1,4)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84

{@}} Thereisjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
\begin{Verbatim}[  ansatisfying this doesnot exist,this method either
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(1,4,2,4)*ClassTransposition(1,4,3,4),|
  !gapprompt@>| !gapinput@              ClassTransposition(3,9,6,18)*ClassTransposition(1,6,3,9));;|
  !gapprompt@gap>| !gapinput@List(ShortOrbits(G,[-15..15],100),|
  !gapprompt@>| !gapinput@        orb->StructureDescription(Action(G,orb)));|
  [ "A15", "A4", "1", "1", "C3", "1", "(C2 x C2 x C2) : (C7 : C3)", "1", 
    "1", "C3", "A19" ]
  !gapprompt@gap>| !gapinput@ShortCycles(mKnot(7),[1..100],20);|
  [ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7, 8 ], [ 9, 10 ], 
    [ 11, 12 ], [ 13, 14, 16, 18, 20, 22, 19, 17, 15 ], [ 21, 24 ], 
    [ 23, 26 ], [ 25, 28, 32, 36, 31, 27, 30, 34, 38, 33, 29 ], 
    [ 35, 40 ], [ 37, 42, 48, 54, 47, 41, 46, 52, 45, 39, 44, 50, 43 ], 
    [ 77, 88, 100, 114, 130, 148, 127, 109, 124, 107, 122, 105, 120, 103, 
        89 ] ]
  !gapprompt@gap>| !gapinput@G := Group(List([[0,2,1,2],[0,5,4,5],[1,4,0,6]],ClassTransposition));;|
  !gapprompt@gap>| !gapinput@CyclesOnFiniteOrbit(G,G.1*G.2,0);|
  [ [ 0, 1, 4, 9, 8, 5 ], [ 6, 7 ], [ 10, 11, 14, 19, 18, 15 ], [ 12, 13 ] ]
  !gapprompt@gap>| !gapinput@List(CyclesOnFiniteOrbit(G,G.1*G.2*G.3*G.1*G.3*G.2,32),Length);|
  [ 3148, 3148 ]
  
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{ ShortResidueClassOrbits \& ShortResidueClassCycles }}\logpage{[ 3, 3, 5 ]}
\hyperdef{L}{X80D18D0778A96C16}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortResidueClassOrbits({\mdseries\slshape G, modulusbound, maxlng})\index{ShortResidueClassOrbits@\texttt{ShortResidueClassOrbits}!for rcwa group and bounds on modulus and length}
\label{ShortResidueClassOrbits:for rcwa group and bounds on modulus and length}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ShortResidueClassCycles({\mdseries\slshape g, modulusbound, maxlng})\index{ShortResidueClassCycles@\texttt{ShortResidueClassCycles}!for rcwa permutation and bounds on modulus and length}
\label{ShortResidueClassCycles:for rcwa permutation and bounds on modulus and length}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ResidueClassCyclesThroughResidueClass({\mdseries\slshape g, cl, modulusbound})\index{ResidueClassCyclesThroughResidueClass@\texttt{Residue}\-\texttt{Class}\-\texttt{Cycles}\-\texttt{Through}\-\texttt{Residue}\-\texttt{Class}!for rcwa permutation, residue class and bound on modulus}
\label{ResidueClassCyclesThroughResidueClass:for rcwa permutation, residue class and bound on modulus}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 in the first form a list of all orbits of residue classes under the action of
the rcwa group \mbox{\texttt{\mdseries\slshape G}} which contain a residue class $r(m)$ such that $m$ divides \mbox{\texttt{\mdseries\slshape modulusbound}} and which are not longer than \mbox{\texttt{\mdseries\slshape maxlng}}. In the second form a list of all cycles of residue classes of the rcwa
permutation{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} which contain a residue class $r(m)$ such that $m$ divides \mbox{\texttt{\mdseries\slshape modulusbound}} and which are not longer than \mbox{\texttt{\mdseries\slshape maxlng}}. In the third form a list of all cycles of residue classes of the rcwa
permutation{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} which contain a residue class $r(m)$ which is a subset of the residue class \mbox{\texttt{\mdseries\slshape cl}} on which \mbox{\texttt{\mdseries\slshape g}} is affine and whose modulus $m$ divides \mbox{\texttt{\mdseries\slshape modulusbound}}. 



 We are only talking about a \emph{cycle} of residue classes of an rcwa permutation $g$ if the restrictions of $g$ to all contained residue classes are affine. Similarly we are only talking
about an \emph{orbit} of residue classes under the action of an rcwa group $G$ if the restrictions of all elements of $G$ to all residue classes in the orbit are affine. 

 The returned lists may contain additional cycles, resp., orbits, which do not
contain a residue class $r(m)$ such that $m$ divides \mbox{\texttt{\mdseries\slshape modulusbound}}, but which happen to be found without additional efforts. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@g := ClassTransposition(0,2,1,2)*ClassTransposition(0,4,1,6);|
  <rcwa permutation of Z with modulus 12>
  !gapprompt@gap>| !gapinput@ShortResidueClassCycles(g,Mod(g)^2,20);|
  [ [ 2(12), 3(12) ], [ 10(12), 11(12) ], [ 4(24), 5(24), 7(36), 6(36) ], 
    [ 20(24), 21(24), 31(36), 30(36) ], 
    [ 8(48), 9(48), 13(72), 19(108), 18(108), 12(72) ], 
    [ 40(48), 41(48), 61(72), 91(108), 90(108), 60(72) ], 
    [ 16(96), 17(96), 25(144), 37(216), 55(324), 54(324), 36(216), 24(144) 
       ], 
    [ 80(96), 81(96), 121(144), 181(216), 271(324), 270(324), 180(216), 
        120(144) ] ]
  !gapprompt@gap>| !gapinput@ResidueClassCyclesThroughResidueClass(g,ResidueClass(1,4),2^2*12);|
  [ [ 5(24), 7(36), 6(36), 4(24) ], [ 21(24), 31(36), 30(36), 20(24) ], 
    [ 9(48), 13(72), 19(108), 18(108), 12(72), 8(48) ], 
    [ 41(48), 61(72), 91(108), 90(108), 60(72), 40(48) ] ]
  !gapprompt@gap>| !gapinput@Collected(List(ResidueClassCyclesThroughResidueClass(g,|
  !gapprompt@>| !gapinput@                  ResidueClass(1,4),2^6*12),Length));|
  [ [ 4, 2 ], [ 6, 4 ], [ 8, 6 ], [ 10, 8 ], [ 12, 4 ], [ 14, 2 ] ]
  !gapprompt@gap>| !gapinput@List(ResidueClassCyclesThroughResidueClass(g,|
  !gapprompt@>| !gapinput@        ResidueClass(1,4),2^4*12),cyc->cyc[1]);|
  [ 5(24), 21(24), 9(48), 41(48),1372,6172)17() 9625)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    121(144), 33(192), 161(192) ]
  !gapprompt@gap>| !gapinput@Display(Difference(ResidueClass(1,4),Union(last)));|
  1(36) U 49(144) U 97(144) U 65(192) U 129(192)
  !gapprompt@gap>| !gapinput@G := Group(List([[0,6,5,6],[1,4,4,6],[2,4,3,6]],ClassTransposition));|
  <(0(6),5(6)),(1(4),4(6)),(2(4),3(6))>
  !gapprompt@gap>| !gapinput@ShortResidueClassOrbits(G,48,10);|
  [ [ 7(12) ], [ 8(12) ], [ 1(24), 4(36) ], [ 2(24), 3(36) ], 
    [ 12(24), 17(24), 28(36) ], [ 18(24), 23(24), 27(36) ], 
    [ 37(48), 58(72), 87(108) ], [ 38(48), 57(72), 88(108) ], 
    [ 0(48), 5(48), 10(72), 15(108) ], [ 6(48), 11(48), 9(72), 16(108) ] ]
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ComputeCycleLength (for an rcwa permutation and a point)}}
\logpage{[ 3, 3, 6 ]}\nobreak
\hyperdef{L}{X80C080287A355EFF}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ComputeCycleLength({\mdseries\slshape g, n})\index{ComputeCycleLength@\texttt{ComputeCycleLength}!for an rcwa permutation and a point}
\label{ComputeCycleLength:for an rcwa permutation and a point}

\textbf{\indent Returns:\ }
  thelength, the  point and theposition of the
largest point of the cycle of the rcwa permutation \mbox{\texttt{\mdseries\slshape g}} which contains the point \mbox{\texttt{\mdseries\slshape n}}, provided that this cycle is finite. 



   is based  computing balls of increasingradiusaround\mbox{\texttt{mdseries  {s destination}untiltheynont{symbol45.
  texttt"" to maximum  ofiterates to be tried  aborting.Iterates
are java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 2
utput be suppressed  the option \texttt{quiet}The functionalso interprets an option \texttt{"small"}, which may be set to a range within which small points are recorded and
returned in a component \texttt{smallpoints}. 
begin{erbatim[ommandchars=!@|,fontsize=\small,frame=single,label=Example]
  
 !apprompt@gap| !apinput@g := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],|
  !gapprompt@>| !gapinput@                     ClassTransposition));|
  <rcwa permutation of  Rcwa permutation of Z with modulus 12
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  n = 20: after 10000 steps, the iterate has 1919 binary digits.
  n = 20: after 20000 steps, the iterate has 2908 binary digits.
  n = 20: after 30000 steps, the iterate has 1531 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 29
    20:after 40000 steps iterate has 708 binary digits.
  rec( aborted := false, g := <rcwa permutation of Z with modulus 180>, 
    length := 45961, 
    maximum := 180479928411509527091314790144929480041473309862957394384783\
0525935437431021442346166422201250935268553945158085769924448388724679753
5271669245363980744610119632280105994423399614803956244808653465492205657java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  8650363041608376587943180444494842094693691286183613056599672737336761093
  3101035841077322874883200384115281051837032147150147712534199292886436789\
  7520389780289517825203780151058517520194926468391308525704499649905091899\
  9667529835495635671154681958992898010506577172313321500572646883756736685\
  0158653917532084531267455434808219032998691038943070902228427549279555530\
  6429870190316109419051531138721361826083376315737131067799731181096142797\
  4868525347003646887454985757711743327946232372385342293662007684758208408\
  8635715976464060647431260835037213863991037813998261883899050447111540742\
  5857187943077255493709629738212709349458790098815926920248565399938335540\
  8092502449690267365120996852, maxpos := 19825, n := 20, 
    smallpoints := [ 20, 23, 66, 99, 294, 295, 298, 441, 447, 882, 890, 
        893 ] )
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CycleRepresentativesAndLengths (for rcwa permutation and set of seed points)         
\logpage{[ 3, 3, 7 ]}\nobreak
\hyperdef{L}{X7F76B04E86C77B94}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CycleRepresentativesAndLengths({ 
\label{CycleRepresentativesAndLengths:  !gapprompt@gap>H !gapinput@[6,-3,8]^elm([6-3,],>n^elm) # `OnPoints' allows reorderingH
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 a list of pairs (cycle representative, length of cycle) for all cycles of the
rcwa permutation \mbox{\texttt{\mdseries\slshape g}} which have a nontrivial intersection with the set \mbox{\texttt{\mdseries\slshape S}}, where fixed points are omitted. 



 The rcwa permutation \mbox{\texttt{\mdseries\slshape g}} is assumed to have only finite cycles. If \mbox{\texttt{\mdseries\slshape g}} has an infinite cycle which intersects non\texttt{\symbol{45}}trivially with \mbox{\texttt{\mdseries\java.lang.StringIndexOutOfBoundsException: Index 240 out of bounds for length 44
option \texttt{abortat}. The output can be suppressed by the option \texttt{quiet}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
|gapinput(021,)0,,,6;|
  !gapprompt@gap>| !gapinput@CycleRepresentativesAndLengths(g,[0..50]);|
  [ [ 2, 2 ], [ 4, 4 ], [ 8, 6 ], [ 10, 2 ], [ 14, 2 ], [ 16, 8 ], 
    [ 20, 4 ], [ 22, 2 ], [ 26, 2 ], [ 28,\endVerbatimjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    [ 38, 2 ], [ 40, 6 ], [ 44, 4 ], [ 46, 2 ], [ 50, 2 ] ]
  !gapprompt@gap>| !gapinput@g := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],|
  !gapprompt@>| !gapinput@                     ClassTransposition));|
  <rcwa permutation of Z with modulus 180>
  !gapprompt@gap>| !gapinput@CycleRepresentativesAndLengths(g,[0..100]:abortat:=100000);|
  n = 20: after 10000 steps, the iterate has 1919 binary digits.
  n = 20: after 20000 steps, the iterate has 2908 binary digits.
  n = 20: after 30000 steps, the iterate has 1531 binary digits.
  n = 20: after 40000 steps, the iterate has 708 binary digits.
  n = 79: after 10000 steps, the iterate has 1679 binary digits.
  n = 100: {\noindent\textcolorFuncColor}\triangleright$enspace{ProjectionsToInvariantUnionsOfResidueClassesmdseriesslshape Gmjava.lang.StringIndexOutOfBoundsException: Range [141, 140) out of bounds for length 333
  n = 100: after 20000 steps, the iterate has 2507 binary digits.
  n = }h{ ()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  n = 100: after 40000 steps, the iterate has 3168 binary digits.
  n=100 after 50000 steps,theiterate has 3947 binary digits.
  n = 100: after 60000 steps, the iterate has 4793 binary digits.
  n = 100: after 70000 steps, the iterate has 5325 binary digits.
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  n = 100:  The corresponding corresponding aset representatives the 
  =100 after100000, the     .
  [ [ 0, 7 ], [ 5, 3 ], [ 7, 7159 ], [ 11, 9 ], [ 19, 342 ],
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    [34,19][37,7],[40,5],[41 7 ],[ 46,3],[, 2 ],
    [ 59, 564 ], [ 61, 577 ], [ 65, 3 ], [ 67, 23 ], [ 71, 41 ],
    [ 79, 16984 ], [ 80, 5 ], [ 85, 3 ], [ 86, 3 ], [ 89, 2 ], [ 91, 9 ],
    [ 94, 1355 ], [ 97, 7 ], [ 100, fail ] ]
  
\end{Verbatim}
 }

 Often one also wants to know which residue classes an rcwa mapping or an rcwa
group fixes setwise: 

\subsection{\textcolor{Chapter }{FixedResidueClasses (for rcwa mapping and bound on modulus)}}
\logpage{[ 3, 3, 8 ]}\nobreak
\hyperdef{L}{X8777A62286597D53}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FixedResidueClasses({\mdseries\slshape g, maxmod})\index{FixedResidueClasses@\texttt{FixedResidueClasses}!for rcwa mapping and bound on modulus}
\label{FixedResidueClasses:for rcwa mapping and bound on modulus}
}\filloperation)}\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FixedResidueClasses({\mdseries\slshape G, maxmod})\index{FixedResidueClasses@\texttt{FixedResidueClasses}!for rcwa group and bound on modulus}
\label{FixedResidueClasses:for rcwa group and bound on modulus}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 the set of residue classes with modulus greater than 1 and less than or equal
to \mbox{\texttt{\mdseries\slshape maxmod}} which the rcwa mapping \mbox{\texttt{\mdseries\slshape g}}, respectively the rcwa group \mbox{\texttt{\mdseries\slshape G}}, fixes setwise. 



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@FixedResidueClasses(ClassTransposition(0,2,1,4),8);|
  [ 2(3), 3(4), 4(5), 6(7), 3(8), 7(8) ]
  !gapprompt@gap>| !gapinput@FixedResidueClasses(Group(ClassTransposition(0,2,1,4),|
  !gapprompt@>| !gapinput@                             ClassTransposition(0,3,1,3)),12);|
  [ 2(3), 8(9), 11(12) ]
  
\end{Verbatim}
 }

 Frequently one needs to compute balls of certain radius around points or group
elements, be it to estimate the growth of a group, be it to see how an orbit
looks like, be it to search for a group element with certain properties or be
it for other purposes: 
\subsection{\textcolor{Chapter }{ Ball (for group, element and radius or group, point, radius and action) }}\logpage{[ 3, 3, 9 ]}
\hyperdef{L}{X8735855587CC029F}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Ball({\mdseries\slshape G, g, r})\index{Ball@\texttt{Ball}!for group, element and radius}
\label{Ball:for group, element and radius}
}\hfill{\scriptsize (method)}}\\
\textcolor{FuncColor}$triangleright$\enspace\texttt{Ball({\mdseries\slshape G, p, r, action})\index{Ball@\texttt{Ball}!for group, point, radius and action}
\label{Ball:for group, point, radius and action}
}\{s()}\java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
n\{}$\\texttt(\mdseries\slshape G, ,r}\ndexBall\extttBall}! group point and radius}
\label{Ball:for group, point and radius}
}\hfill{\scriptsize (method)}}\\
t{iReturns: }
 the ball of radius{\nobreakspace}\mbox{\texttt{\[03) 13, ()]



 All balls are understood with respect to \texttt{GeneratorsOfGroup(\mbox{\texttt{\mdseries\slshape G}})}. As membership tests can be expensive, the former method does not check
whether \mbox{\texttt{\mdseries\slshape g}} is indeed an element of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. The methods require that element\texttt{\symbol{45}} / point comparisons are
cheap. They are not only applicable to rcwa groups. If the option \mbox{\texttt{\mdseries\slshape Spheres}} is set, the ball is split up and returned as a list of spheres. There is a
java.lang.StringIndexOutOfBoundsException: Range [77, 7) out of bounds for length 273
whose moduli do not exceed \mbox{\texttt{\mdseries\slshape modulusbound}}, and which can be reached from \mbox{\java.lang.StringIndexOutOfBoundsException: Range [0, 118) out of bounds for length 40
bound on the modulus. \index{RestrictedBall@\texttt{RestrictedBall}!G, g, r, modulusbound} 
=!@|,fontsize\frame=label=xample]
  
  !gapprompt@gap>| !gapinput@PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),|
  !gapprompt@>| !gapinput@                                                   CyclicGroup(3))));;|
  !gapprompt@gap>| !gapinput@List([1..10],k->Length(Ball(PSL2Z,[0,1],k,OnTuples)));|
  [ 4, 8, 14, 22, 34, 50, 74, 106, 154, 218 ]
  !gapprompt@gap>| !gapinput@Ball(Group((1,2),(2,3),(3,4)),(),2:Spheres);|
  [ [ () ], [ (3,4), (2,3), (1,2) ],
    [ (2,3,4), (2,4,3), (1,2)(3,4), (1,2,3), (1,3,2) ] ]
  !gapprompt@gap>| !gapinput@G := Group(List([[1,2,4,6],[1,3,2,6],[2,3,4,6]],ClassTransposition));;|
  !gapprompt@gap>| !gapinput@B := RestrictedBall(G,One(G),20,36:Spheres);; # try replacing 36 by 72|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ]
  
\end{Verbatim}
 }

 It is possible to determine group elements which map a given tuple of elements
of the underlying ring to a given other tuple, if such elements exist: 

\subsection{\textcolor{Chapter }{RepresentativeAction (G, source, destination, action)}}
\logpage{[ 3, 3, 10 ]}\nobreak
\hyperdef{L}{X87A3462C82FD376E}{}
{\noindent\textcolor{FuncColor}{$  !apprompt>|gapinput@IsTame(elm);|
\label{RepresentativeAction:G, source, destination, action}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
 an element of \mbox{\texttt{\mdseries\slshape G}} which maps \mbox{\texttt{\mdseries\slshape source}} to{\nobreakspace}\mbox{\texttt{\mdseries\slshape destination}} under the action given by{\nobreakspace}\mbox{\texttt{\mdseries\slshape action}}. 



 If an element satisfying this condition does not exist, this method either
returns \texttt{fail} or runs into an infinite loop. The problem whether \mbox{\texttt{\mdseries\slshape source}} and \mbox{\texttt{\mdseries\slshape destination}} lie in the same orbit under the action \mbox{\texttt{\mdseries\slshape action}} of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} is hard, and in its general form most likely computationally undecidable. 

 indexRepresentativeActionPreImage@\texttt{}G ,destination,action F} In cases where ratherawordin generators \java.lang.StringIndexOutOfBoundsException: Range [174, 173) out of bounds for length 394
those of \texttt{RepresentativeAction}, and the fifth is a free group whose generators are to be used as letters of
the returned word. Note that \texttt{RepresentativeAction} calls \texttt{RepresentativeActionPreImage} and evaluates the   gapprompt@gap>|!apinput@P1^  ;
most of the time if \mbox{\texttt{\mdseries\slshape G}} is wild and coefficient explosion occurs. 

 Theis based on balls ofincreasing   mbox\exttt{\mdseries\ } and \mbox{texttt\mdseriessdestination} until they  non\texttt\symbol{45}trivially. 
\begin{Verbatim}[commandchars=!@H,fontsize  gapprompt@>| !gapinput             ResidueClassUnionIntegers,3[,2),java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  
  gapprompt@ap>H!a : RcwaMapping([2,,][4-1,][,1,3];;SetName,"a")
  !gapprompt@gap>H !gapinput@b := ClassShift(1,4:Name:="b");; G := Group( <cwapermutation of Z with modulus 6>
  !gapprompt@gap>H !gapinput@elm := RepresentativeAction(G,[7,4,9],[4,5,13],OnTuples);;H
  !gapprompt@gap>H !gapinput@Display(elm);H
  
  Rcwa permutation of Z with modulus 12
  
          /
          | n-3 if n in 1(6) U 10(12)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   n |-> <  n+1 if n in 4(12)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          |
          
  
  !gapprompt@gap>H !gapinput@List([7,->^lm;H
[,5, 13 
  !gapprompt@gap>H\yperdef{L{}
!gap gapinput@(;
  
  Rcwa permutation of Z with modulus 12

          /
          | 2n/3      if n in 0(6) U 3(12)
          | (4n+1)/3  if n in 2(6) U 11(12)
          | (4n-1)/3  if n in 4(6) U 7(12)
   n |-> <  (2n-8)/3  if n in 1(12)
          | (4n
          | (4n-15)/3 if n in 9(12)
          |
          \
  
  !gapprompt@gap>H !gapinput@[6,-3,8]^elm; List([6,-3,8],n->n^elm); # `OnPoints' allows reorderingH
  [ -9, 4, 11 ]
  [ 4, -9, 11 ]
  !gapprompt@gap>H !gapinput@F := FreeGroup  !gapprompt@gap> gapinput@ :=GroupClassTransposition(0,,12,(1,224,A
  !gapH!gapinput@w : RepresentativeActionPreImage(G[,-,,5,4,,13-],java.lang.StringIndexOutOfBoundsException: Range [90, 91) out of bounds for length 90
g@ gapinput OnTuplesH
  a*b^-1*a^-1*(b^-1*a)^2*  gappromptgapAgapinput=
  !gapprompt@gap>H !gapinput@elm := w^phi;H
  <rcwa permutation of Z with modulus 324>
  !gapprompt@>H!gapinput@List([10,-4,9,5],n->n^elm);H
  [ 4, 5, 13, -8 ]
  
\end{Verbatim}
 }

 Sometimes an rcwa group fixes a certain partition of the underlying ring into
unions of residue classes. If this happens, then any orbit is clearly a subset
of exactly one of these parts. Further, such a partition often gives rise to
proper quotients of the group: 

\subsection{\textcolor{Chapter }{ProjectionsToInvariantUnionsOfResidueClasses (for rcwa group and  Rcwa  of  with modulus and 4  
\logpage{[ 3, 3, 11 ]}\nobreak
\hyperdef{L}{X8587246A7F890849}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ProjectionsToInvariantUnionsOfResidueClasses({\mdseries\slshape G, m})\index{ProjectionsToInvariantUnionsOfResidueClasses@\texttt{Projections}\-\texttt{To| (3+1)2if  in1(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
\label{ProjectionsToInvariantUnionsOfResidueClasses:for rcwa group and modulus}
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
 the projections of  



 The corresponding partition of a set of representatives for the residue
classes (mod{\nobreakspace}\mbox{\texttt{\mdseries\slshape m}}) can be obtained by the operation \texttt{OrbitsModulo(\mbox{\texttt{\mdseries!@gapA!B =(015:)A
\{[=!@|fontsize,=singleExample
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,2,1,2),ClassShift(3,4));;|
  gapprompt>!ProjectionsToInvariantUnionsOfResidueClasses;
  [ [ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] -> 
      [ ( 0(4), 1(4) ), IdentityMapping( Integers ) ], 
    [ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] -> 
      [ ( 2(4), 3(4) ), <rcwa permutation of Z with modulus 4> ] ]
)));|
  [ 0(4) U 1(4), 2(4) U 3(4) ]
  
\end{Verbatim}
 }

 Given two partitions of the underlying ring into the same number of unions of
residue classes, there is always an rcwa permutation which maps the one to the
other: 

subsection\extcolor{Chapter }{RepresentativeAction (for RCWA(R) and 2 partitions of R into residue classes)}}
\logpage{[ 3, 3, 12 ]}\nobreak
\hyperdef{L}{X866843D08213067E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RepresentativeAction({\mdseries\slshape RCWA(R), P1,    789,1184,1185,1778,,,  ,501 ,753 1130,
\label{RepresentativeAction:for RCWA(R) and 2 partitions of R into residue classes}
java.lang.StringIndexOutOfBoundsException: Range [68, 32) out of bounds for length 32
\textbf{\indent Returns:\ }
an  $  mapsthe{njava.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 156



 The arguments \mbox{\texttt{\mdseries\slshape P1}} and \mbox{\texttt{\mdseries\slshape P2}} must be partitions of the underlying ring $R$ into the same number of unions of residue classes. The method for    18,9 14,7 6 ,,1]
is no tame 
Theorem{\nobreakspace}2.8.9 in{\nobreakspace}\cite\end}
affine on any residue class in{\nobreakspace}\mbox{\texttt{\java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 2
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@P1 := AllResidueClassesModulo(3);|
  [ 0(3), 1(3), 2(3) ]
  !gapprompt@gap>| !gapinput@P2 := List([[0,2],[1,4],[3,4]],ResidueClass);|
 2,4 )
  !gapprompt}\label{sec:MethodsForTameGroups}
  <rcwa permutation of Z with modulus 3>
  !gapprompt@gap>| !gapinput@P1^elm = P2;|
  true
  !\hyperdef}{{
  false
  !@| !apinput@ : (CWA),1P2:;java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
  <tame rcwa permutation of Z with modulus 24>
  !gapprompt@gap>| !gapinput@P1^elm = P2;|
  true
  !gapprompt@gap>| !gapinput@elm := RepresentativeAction(RCWA(Integers),|
  !gapprompt@>| !gapinput@            [ResidueClass(1,3),|
  !gapprompt@>| !gapinput@             ResidueClassUnion(Integers,3,[0describe of which  for
  !gapprompt@>| !gapinput@            [ResidueClassUnion(Integers,5, {Chapter{ofa rcwa or\\ymbol45}permutation }logpage[3 ,1 }
  !gapprompt@>| !gapinput@             ResidueClassUnion(Integers,5,[0,1,3])]);|
  <rcwa permutation \noindenttextcolorFuncColor{\riangleright$\\texttt{RespectedPartition{\mdseries\slshape })\{java.lang.StringIndexOutOfBoundsException: Range [158, 156) out of bounds for length 179
  !gapprompt@gap>| !gapinput@[ResidueClass(1,3),ResidueClassUnion(Integers,3,[0,2])]^elm;|
  [ 2(5) U 4(5), Z \ 2(5) U 4(5) ]
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CollatzLikeMappingByOrbitTree (for rcwa group, root point and range of radii)}}
\logpage{[ 3, 3, 13 ]}\nobreak
\hyperdef{L}{X82DBAF35788FA239}{}
\noindent\FuncColor}$triangleright\\texttt({mdseries\ G n {textunderscore},{textunderscore}})CollatzLikeMappingByOrbitTreetexttt{CollatzLikeMappingByOrbitTree}for  ,point  ofjava.lang.StringIndexOutOfBoundsException: Range [287, 286) out of bounds for length 287
\label{CollatzLikeMappingByOrbitTree:for rcwa group, root point and java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 0
}\hfill{\scriptsize (operation)}}\\
\textbf{\indent Returns:\ }
mboxtexttt{mdseriesslshape n}theactionof\box{texttt\mdseries\ }}intothe sphere   r1about\{texttt\\n}for $$ranging from mbox\{mdseries\ min\textunderscore}}to \mbox{texttt\dseries\slshape {textunderscore}r}  \texttt{fail} 



 Obviously. either or java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 77
choice of generators of the group. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,2,2,4),A
  !gapprompt@>A !gapinput@              ClassTransposition(1,4,2,6));;A
  !gapprompt@gap>A !gapinput@G := SparseRep(G);;A
  !gapprompt@gap>A !gapinput@f := CollatzLikeMappingByOrbitTree(G,0,4,10);A
  <rcwa mapping of Z with modulus 4 and 4 affine parts>
  !gapprompt@gap>A !gapinput@Display(f);A
  
  Rcwa mapping of Z with modulus 4 and 4 affine parts
  
          /
          | n+1      if n in 0(4)
          | (3n+1)/2 if n in 1(4)
   n |-> <  n/2      if n in 2(4)
java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 33
          |
          \
  
  !gapprompt@gap>A !gapinput@B := Ball(G,0,15:Spheres);A
  [ [ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 6 ], [ 7 ], [ 14 ], [ 9, 15 ], [ 8, 18, 30 ], 
    [ 5, 19, 31 ], [ 4, 10, 38  true
    [ 22, 24, 40, 50, 78, 82, 126 ], [ 23, 33, 51, 79, 83, 127 ], 
    [ 32, 46, 66, 102, 158, 166, 254 ], 
    [ 21, 47, 67, 103, 105, 159, 167, 169, 255\{Verbatim
  !gapprompt@gap>A !gapinput@List([3..15],i->IsSubset(B[i-1],B[i]^f));A
\{Chapter  & }}\logpage{ 3 ,2}
    true ]
  !gapprompt@gap>A !gapinput@Trajectory(f,52,[0,1]);A
  [ 52, 53, 80, 81, 122, 61, 92, 93, 140, 141, 212, 213, 320, 321, 482, 241, 
    362, 181, 272, 273, 410, 205, 308, 309, 464, 465, 698    
    ,1184, 1185, 1778 889 1334,667 , , 500, 501,752 , 1130,java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    565,848 849 1274,637 956 957,1436 1437 ,2157 3236,,
    4856, 4857, 7286, 3643, 3642, 1821, 2732, 2733, 4100, 4101, 6152, 6153, 
    9230, 4615, 4614, 2307, 2306, 1153, 1730, 865, 1298, 649, 974, 487, 486, 
     ,,182,91,90,45,,69 104,105, 158 79, 78 39,38,19 
    18, 9, 14, 7, 6, 3, 2, 1 ]
  
\end{Verbatim}
 }

 }

  
C { attributes 
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 105
\logpage{[ 3, 4, 0 ]}
\hyperdef
{
  There are a couple of attributes which a priori make only sense for tame rcwa
groups. With their help, various structural  The   \{ usesthe packagejava.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 203
group   obtained  havealready seen above  thereare for example
methods for \texttt{IsSolvableGroup}, \texttt{IsPerfectGroup} and \texttt{DerivedSubgroup} available for tame rcwa groups, while testing wild groups for solvability \begin{Verbatim[!|fontsize=\small=label=]
perfectnessjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
to describe the specific attributes of nOnRespectedPartitionG;
computations. 
\subsection{\textcolor{Chapter }{   !gapprompt@gap>| !gapinput@H = Action(G,P
\hyperdef{L}{X7F523A6B87825AB8}{}
{
\noindent\textcolor{FuncColor}{$  6
\label{RespectedPartition:of a  <rcwa    with 3java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}\hfill{\scriptsize (attribute)}}\\
\noindent\ !gapprompt@ap>|!gapinput@ndexG,K|
\label{RespectedPartition:of a tame rcwa permutation}
gappromptgap|!@Listjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 71
\textbf{\indent Returns:\ }
 a shortest and coarsest possible respected partition of the  grouporders [ ,0, ]



 A tame element $g${\nobreakspace} }
group $G${\nobreakspace}$<${\nobreakspace}RCWA($R$), there is a common such partition for all elementsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 Anrcwa group or anrcwa  hasarespected partition  andand only java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
it is tame.This either bydefinition java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 77
in{\nobreakspace}\cite{Kohl05}, depending on how one introduces the notion of tameness. 

 \index{RespectsPartition@\texttt{RespectsPartition}!for an rcwa group} \index{RespectsPartition@\texttt{RespectsPartition}!for an rcwa permutation} There is an operation \texttt{RespectsPartition(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape P}})} / \texttt{RespectsPartition(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape P}})}\{IntegralConjugate\textttIntegralConjugate}!of a tame rcwa group} \index{IntegralConjugate@\texttt{IntegralConjugate}!of a tame rcwa permutation} \index{IntegralizingConjugator@\texttt{IntegralizingConjugator}!of a tame rcwa group} \index{IntegralizingConjugator@\texttt{IntegralizingConjugator}!of a tame rcwa permutation}tame group  determine its    
\begin{Verbatim}[commandchars=!@|,fontsize=\  gapprompt@ap|!apinput@ =Group((0,,,)C(,);|
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));|
  <rcwa group over Z with 2 generators>
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 40
  true
  !gapprompt@gap>| !gapinput@Size(G);|
  infinity
  !gapprompt@gap>| !gapinput@P := RespectedPartition(G);|
  [ 0(4), 2(4), 1(6), 3(6), 5(6) ]
  
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{ ActionOnRespectedPartition \& KernelOfActionOnRespectedPartition }}\logpage{[ 3, 4, 2 ]}
\hyperdef{L}{X831ADC1584DE6113hyperdef{{}{java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
\{FuncColor$triangleright\\{(\\G)index{ctionOnRespectedPartition@\extttActionOnRespectedPartitionfor  rcwagroup}
\label{ActionOnRespectedPartition:for a tame rcwa group}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{KernelOfActionOnRespectedPartition({\mdseries\slshape G})\index{KernelOfActionOnRespectedPartition@\texttt{KernelOfActionOnRespectedPartition}!for a tame java.lang.StringIndexOutOfBoundsException: Range [0, 221) out of bounds for length 2
\label{KernelOfActionOnRespectedPartition:for a tame rcwa group}
}\fill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RankOfKernelOfActionOnRespectedPartition({\mdseries\slshape G})\index{RankOfKernelOfActionOnRespectedPartition@\texttt{Rank}\-\texttt{Of}\-\texttt{Kernel}\-\texttt{Of}\-\texttt{Action}\-\texttt{On}\-\texttt{Respected}\-\texttt{Partition}!for a tame rcwa group}
labelRankOfKernelOfActionOnRespectedPartition:for a tame rcwa group}
}\hfill{\scriptsize (attribute)}}\\
\Rcwa     180
 the action of the tame rcwa group 



 The method for \texttt{KernelOfActionOnRespectedPartition} uses  |(+)   ifn1560) () 3960  ()
of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} on its stored respected partition is \texttt{RankOfKernelOfActionOnRespectedPartition(          3n+       n 13(0
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;|
  !gapprompt@gap>| !gapinput@H := ActionOnRespectedPartition(G);|
  Group([ (1,3), (1,2) ])
  !gapprompt@gap>| !gapinput@H = Action(G,P);|
  true
  !gapprompt@gap>| !gapinput@Size(H);|
  6
  !gapprompt@gap>| !gapinput@K := KernelOfActionOnRespectedPartition(G);|
  <rcwa group over Z with 3 generators>
  !gapprompt@gap>| !gapinput@RankOfKernelOfActionOnRespectedPartition(G);|
  3
  !gapprompt@gap>| !gapinput@Index(G,K);|
  6
  !gapprompt@gap>| !gapinput@List(GeneratorsOfGroup(K),Factorization);|
  [ [ ClassShift( 0(4) ) ], [ ClassShift( 2(4) ) ], [ ClassShift( 1(6) ) ] ]
  !gapprompt@gap>| !gapinput@Image(IsomorphismPcpGroup(K));|
  Pcp-group with orders [ 0, 0, 0 ]
  
\end{Verbatim}
 }

 Let $G$ be a tame rcwa group over{\nobreakspace}{\ensuremath{\mathbb Z}}, let $\mathcal{P}$ be a respected partition of{\nobreakspace}$G$ and put $m := |\mathcal{P}|$. Then there is an rcwa permutation $g$ which maps $\mathcal{P}$ to the partition of{\nobreakspace}{\ensuremath{\mathbb Z}} into the residue
classes (mod{\nobreakspace}$m$), and the conjugate $G^g$ of{\nobreakspace}$G$ under such a permutation is integral (cf. \cite{Kohl05}, Theorem{\nobreakspace}2.5.14). 

 \index{IntegralConjugate@\texttt{IntegralConjugate}!of a tame rcwa group} \index{IntegralConjugate@\texttt{IntegralConjugate}!of a tame rcwa permutation} \index{IntegralizingConjugator@\texttt{IntegralizingConjugator}!of a tame rcwa group} \index{IntegralizingConjugator@\texttt{IntegralizingConjugator}!of a tame rcwa permutation} The conjugate $G^g$ can be determined by the operation \texttt{IntegralConjugate}, and the conjugating permutation{\nobreakspace}$g$ can be determined by the operation \texttt{IntegralizingConjugator}. Both operations are applicable to rcwa permutations as well. Note that a
tame rcwa group does not determine its integral conjugate uniquely. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;|
  !gapprompt@gap>| !gapinput@G^IntegralizingConjugator(G) = IntegralConjugate(G);|
  true
  !gapprompt@gap>| !gapinput@RespectedPartition(G);|
  [ 0(4), 2(4), 1(6), 3(6), 5(6) ]
  !gapprompt@gap>| !gapinput@RespectedPartition(G)^IntegralizingConjugator(G);|
  [ 0(5), 1(5), 2(5), 3(5), 4(5) ]
  !gapprompt@gap>| !gapinput@last = RespectedPartition(IntegralConjugate(G));|
  true
  
\end{Verbatim}
 }

  
\section{\textcolor{Chapter }{Generating pseudo\texttt{\symbol{45}}random elements of RCWA(R) and CT(R)}}\label{sec:Random}
\logpage{[ 3, 5, 0 ]}
\hyperdef{L}{X81941A247942FB99}{}
{
  \index{Random@\texttt{Random}!RCWA(R)} \index{Random@\texttt{Random}!CT(R)} There are methods for the operation \texttt{Random} for RCWA($R$) and CT($R$). These methods are designed to be suitable for generating interesting
examples. No particular distribution is guaranteed. 
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=\{ ,6, }
  
  !gapprompt@gap>B !gapinput@elm := Random(RCWA(Integers));;B
  !gapprompt@gap>B !gapinput@Display(elm);B
  
  Rcwa permutation of Z with modulus 180
  
          /
          | 6n+12     if n in 2(10)
          | 3n+3      if n in 1(20) U 5(20) \ 3 ,1 }nobreak
          | 6n+10     if n in 0(10)
          | (n+1)/2   if n in 15(60) U 27(60) U 39(60) U 51(60)
          | (n+7)/2   if n in 19(60)           L}{X84AFBB997B694A3D}{
          | 3n+1      if n in 13(20)
          | (-n+17)/6 if n in 23(180) U 35(180) U 59(180) U 71(180) U 
   n |-> <                    95(180) U 131(180) U 143(180{IsRcwaGroupOverZ}
          | (-n-1)/6  if n in 11(180) U 47(180) U 83(180) U 155(180)
          | (-n+7)/2  if n in 3(60)
          | (n+3)/2   if n in 7(60)
          | (n-17)/6  if n in 107(180)
          | (-n+11)/6 if n in 119(180)
          | (-n+29)/6 if n in 167(180)
          |
          \
  
\end{Verbatim}
 The elements which are returned by this method are obtained by multiplying
class shifts (see \texttt{ClassShift} (\ref{ClassShift:r, m})), class reflections (see \texttt{ClassReflection} (\ref{ClassReflection:r, m})) and class transpositions (see \texttt{ClassTransposition} (\ref{ClassTransposition:r1, m1, r2, m2})). These factors can be retrieved by factoring: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Factorization(elm);|
  [ ClassTransposition(0,2,3,4), ClassTransposition(1,2,4,6), ClassShift(0,2), 
    ClassShift(1,3), ClassReflection(2,5), ClassReflection(1,3), 
    ClassReflection(1,2) ]
  
\end{Verbatim}
 }

  
\ection{textcolor{Chapter }{The categories of residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise
affine groups}}\label{sec:CategoriesOfRcwaGroups}
\logpage{[ 3, 6, 0 ]}
\hyperdef{L}{X86327F6C83D09798}{}
{
  

\subsection{\textcolor{Chapter }{IsRcwaGroup}}
\logpage{[ 3, 6, 1 ]}\nobreak
\hyperdef{L}{X84AFBB997B694A3D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaGroup({\mdseries\slshape G})\index{IsRcwaGroup@\texttt{IsRcwaGroup}}
\label{IsRcwaGroup}
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaGroupOverZ({\mdseries\slshape G})\index{IsRcwaGroupOverZ@\texttt{IsRcwaGroupOverZ}}
\label{IsRcwaGroupOverZ}
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaGroupOverZ{\textunderscore}pi({\mdseries\slshape G})\index{IsRcwaGroupOverZ{\textunderscore}pi@\texttt{IsRcwaGroupOverZ{\textunderscore}pi}}
\label{IsRcwaGroupOverZuScorepi}
}\hfill{\scriptsize (filter)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsRcwaGroupOverGFqx({\mdseries\slshape G})\index{IsRcwaGroupOverGFqx@\texttt{IsRcwaGroupOverGFqx}}
\label{IsRcwaGroupOverGFqx}
}\hfill{\scriptsize (filter)}}\\
\textbf{\indent Returns:\ }
 \texttt{true} if \mbox{\texttt{\mdseries\slshape G}} is an rcwa group, an rcwa group over the ring of integers, an rcwa group over
a semilocalization of the ring of integers or an rcwa group over a polynomial
ring in one variable over a finite field, respectively, and \texttt{false} otherwise. 



 \index{IsRcwaGroupOverZOrZ_pi@\texttt{IsRcwaGroupOverZOrZ{\textunderscore}pi}} Often the same methods can be used for rcwa groups over the ring of integers
and over its semilocalizations. For this reason there is a category \texttt{IsRcwaGroupOverZOrZ{\textunderscore}pi} which is the union of \texttt{IsRcwaGroupOverZ} and \texttt{IsRcwaGroupOverZ{\textunderscore}pi}. 

 \index{IsNaturalRCWA@\texttt{IsNaturalRCWA}} \index{IsNaturalCT@\texttt{IsNaturalCT}} To allow distinguishing the groups RCWA($R$) and CT($R$) from others, they have the characteristic property \texttt{IsNaturalRCWA} or \texttt{IsNaturalCT}, respectively. }

 }

  }

       
\chapter{\textcolor{Chapter }{Residue\texttt{\symbol{45}}Class\texttt{\symbol{45}}Wise Affine Monoids}}\label{ch:RcwaMonoids}
\logpage{[ 4, 0, 0 ]}
\hyperdef{L}{X81C90F7C7BA25BDF}{}
{
   In this short chapter, we describe how to compute with
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine monoids. \index{rcwa monoid@rcwa monoid!definition} \emph{Residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine} monoids, or \emph{rcwa} monoids for short, are monoids whose elements are
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings.  
\section{\textcolor{Chapter }{Constructing residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
monoids}}\label{sec:ContructingRcwaMonoids}
\logpage{[ 4, 1, 0 ]}
\hyperdef{L}{X83D42E26849D5580}{}
{
  \index{Monoid@\texttt{Monoid}} \index{MonoidByGenerators@\texttt{MonoidByGenerators}} As any other monoids in \textsf{GAP}, residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine monoids can
be constructed by \texttt{Monoid} or \texttt{MonoidByGenerators}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@M := Monoid(RcwaMapping([[ 0,1,1],[1,1,1]]),|
  !gapprompt@>| !gapinput@               RcwaMapping([[-1,3,1],[0,2,1]]));|
  <rcwa monoid over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Size(M);|
  11
  !gapprompt@gap>| !gapinput@Display(MultiplicationTable(M));|
  [ [   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 ], 
    [   2,   8,   5,  11,   8,   3,  10,   5,   2,   8,   5 ], 
    [   3,  10,  11,   5,   5,   5,   8,   8,   8,   2,   3 ], 
    [   4,   9,   6,   8,   8,   8,   5,   5,   5,   7,   4 ], 
    [   5,   8,   5,   8,   8,   8,   5,   5,   5,   8,   5 ], 
    [   6,   7,   4,   8,   8,   8,   5,   5,   5,   9,   6 ], 
    [   7,   5,   8,   6,   5,   4,   9,   8,   7,   5,   8 ], 
    [   8,   5,   8,   5,   5,   5,   8,   8,   8,   5,   8 ], 
    [   9,   5,   8,   4,   5,   6,   7,   8,   9,   5,   8 ], 
    [  10,   8,   5,   3,   8,  11,   2,   5,  10,   8,   5 ], 
    [  11,   2,   3,   5,   5,   5,   8,   8,   8,  10,  11 ] ]
  
\end{Verbatim}
 \index{View@\texttt{View}!for an rcwa monoid} \index{Display@\texttt{Display}!for an rcwa monoid} \index{Print@\texttt{Print}!for an rcwa monoid} \index{String@\texttt{String}!for an rcwa monoid} There are methods for the operations \texttt{View}, \texttt{Display}, \texttt{Print} and \texttt{String} which are applicable to rcwa monoids. All rcwa monoids over a ring $R$ are submonoids of Rcwa($R$). The monoid Rcwa($R$) itself is not finitely generated, thus cannot be constructed as described
above. It is handled as a special case: 

\subsection{\textcolor{Chapter }{Rcwa (the monoid formed by all rcwa mappings of a ring)}}
\logpage{[ 4, 1, 1 ]}\nobreak
\hyperdef{L}{X7B95FCA279E0D6CC}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Rcwa({\mdseries\slshape R})\index{Rcwa@\texttt{Rcwa}!the monoid formed by all rcwa mappings of a ring}
\label{Rcwa:the monoid formed by all rcwa mappings of a ring}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the monoid Rcwa(\mbox{\texttt{\mdseries\slshape R}}) of all residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
mappings of the ring{\nobreakspace}\mbox{\texttt{\mdseries\slshape R}}. 



 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@RcwaZ := Rcwa(Integers);|
  Rcwa(Z)
  !gapprompt@gap>| !gapinput@IsSubset(RcwaZ,M);|
  true
  
\end{Verbatim}
 }

 \index{Restriction@\texttt{Restriction}!for an rcwa monoid, by an injective rcwa mapping} \index{Induction@\texttt{Induction}!for an rcwa monoid, by an injective rcwa mapping} In our methods to construct rcwa groups, two kinds of mappings played a
crucial role, namely the restriction monomorphisms (cf.{\nobreakspace}\texttt{Restriction} (\ref{Restriction:of an rcwa group, by an injective rcwa mapping})) and the induction epimorphisms (cf.{\nobreakspace}\texttt{Induction} (\ref{Induction:of an rcwa group, by an injective rcwa mapping})). The restriction monomorphisms extend in a natural way to the monoids Rcwa($R$), and the induction epimorphisms have corresponding generalizations, also.
Therefore the operations \texttt{Restriction} and \texttt{Induction} can be applied to rcwa monoids as well: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@M2 := Restriction(M,2*One(Rcwa(Integers)));|
  <rcwa monoid over Z with 2 generators, of size 11>
  !gapprompt@gap>| !gapinput@Support(M2);|
  0(2)
  !gapprompt@gap>| !gapinput@Action(M2,ResidueClass(1,2));|
  Trivial rcwa monoid over Z
  !gapprompt@gap>| !gapinput@Induction(M2,2*One(Rcwa(Integers))) = M;|
  true
  
\end{Verbatim}
 }

  
\section{\textcolor{Chapter }5(6) U [ 1 ], 2 ], [ [ -5 ], 1 ], [ [ -4 ], 1 ], [ [ -3 ], 
monoids}}\ptg gActionM,last1,""|
\logpage{[  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 52
\hyperdef{L}{X8759954F7EB1A658}{}
{
\{java.lang.StringIndexOutOfBoundsException: Index 255 out of bounds for length 255
(membership test), and there is a method for \texttt{IsSubset} which checks for a submonoid relation. 

 \index{Support@\texttt{java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0

 \index
  .  \{} and
monoid is
\begin{Verbatim}[commandchars=!@|,java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  
  !gapprompt@gap>| !gapinput@f1 := RcwaMapping([[-1, 1, 1],[ 0,-1, 1]]);;|
  !gapprompt@gap>| !gapinput@f2 := RcwaMapping([[ 1,-1, 1],[-1,-2, 1],[-1, 2, 1]]);; |
  !gapprompt@gap>| !gapinput@f3 := RcwaMapping([[ 1, 0, 1],[-1, 0, 1]]);; |
  !gapprompt@gap>| !gapinput@N := Monoid(f1,f2,f3);;|
  @Size(N);|
  366
  !gapprompt@gap| !gapinput@List(Monoid(f1f2,f1f3,(f2,f3)],Size;java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
  [ 96, 6, 66 ]
  !gapprompt@gap>| !gapinput@f1*f2*f3 in N;|
  true
  !gapprompt@gap>| !gapinput@IsSubset(N,M);|
  false
 gapprompt@> gapinputIsSubset(,f1f2,);
  true
  !gapprompt@gap>| !gapinput@Support(N);|
  Integers
  !gapprompt@gap>| !gapinput@Modulus(N);|
  6
  !gapprompt@gap>| !gapinput@IsTame              |(2mn/       in00+,)+02Z
  true
  !gapprompt@gap>| !   m,n -   (2+1,n1)2)if,) 00Z(02Z
  false
  !gapprompt@gap>| !gapinput@Collected(List(AsList(N),Image)); # The images of the elements of N.|
  [ [ Integers, 2 ], [ 1(2), 2 ], [ Z \ gapprompt@gapE!apinput@Trajectory(hyperbolic,[010000,20)E
    [ 0(6) U 1(6), 4 ], [ Z \  [[0 10000 ,[,5000 ][ ,2500 ] [,1250]  0 625],
 ()  56)  , 16, ],  (  [-  
[ () 36, 4] [16)  5() 40],  26) 44],java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    [ 2 (1+,2
[) ,]   , ,  4]1]   3,1]java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    [ [ -1 ], 1     03+0,Z
    [ [ 5 ], 1 ], [ [ 6 ], 1 ] ]
  
\end{Verbatim}
 Finite forward orbits under the action of an rcwa monoid can be found by the
operation \  !gapprompt@gap>E@> g@g;

\subsection   ^221Z,Z
\logpage{[ 4, 2java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
\hyperdef{L}{X87DB896687475084}{}
{\0,1| m/,m2n-java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
\label{ShortOrbits:for rcwa monoid, set of points and bound on length}
}\hfill{\scriptsize (method)}}\\
\java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 27
 a list of finite forward orbits of the rcwa  < Z java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 66



 
b{}|,fontsize\smallframe,labelExample
  
  !gapprompt@gap>
    5 4,1 , 7,[-,- 1 , ,] [- .4]]
  !gapprompt@gap>| !gapinput@Print(Action(M,last[1]),"\n");|
  
    Transformation( [ 4, 5, 4, 3, 4, 1 ] ) ] )
>(,0.10]100);java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  [ [ -5, -4, -3,
    [ -11, -10, -9, -7, -6, -  
        11,12],
    [ -17, -16, -15, -13, -12, -11, -10, -9, -7,   
         ,, ,, 8 9 , 11,12 13  ,]
  !gapprompt@ (0)(,0Z,Z
  !gapprompt@gap>| !gapinput@List(quots,Size);|
  [ 268, 332, 366 ]
  
\end{  gappromptgap gapinputg2;java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 }

 Balls of given radius around an element of an rcwa monoid can be computed by
the operation \texttt{Ball}. This operation can also be java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
such under the action of an rcwa monoid: 
\subsection{\textcolor{Chapter }{ Ball (for monoid, element and radius or monoid, point, radius and action){
\hyperdef{L}{X787848137DF1C245}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Ball({\mdseries\slshape M, f, r})\index{Ball@\texttt{Ball}!for monoid, element and radius}
\label{Ball:for monoid, element and radius}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Ball({\mdseries\slshape M, p, r, action})\index{Ball@\texttt{Ball}!for monoid, \ClassTransposition}r1 ,r2,L2 for  x)
\ monoidpoint, andaction}
}\hfill{\scriptsize (method\fill{scriptsize function}}\
\textbf{\indent Returns:\ }
 the ball of radius{\nobreakspace\\$\enspace\texttt(\mdseriess, cl2)\index{java.lang.StringIndexOutOfBoundsException: Range [137, 136) out of bounds for length 186



 All balls are understood with respect to \texttt{GeneratorsOfMonoid(\mbox{\texttt{\mdseries\java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 27
method does not check whether \mbox{\texttt{\mdseries\slshape f}} is indeed an element   four\{},  {slshape},mdseriesL1}\\{\\slshape}and\nobreakspace}mbox{texttt\java.lang.StringIndexOutOfBoundsException: Index 737 out of bounds for length 737
cheap. They are not only applicable to rcwa monoids. If the option \mbox{\texttt{\java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 77
\begingappromptgapAjava.lang.StringIndexOutOfBoundsException: Range [53, 28) out of bounds for length 96
  
  !gapprompt@gap>| !gapinput@List([0..12],k->Length(Ball(N java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 64
  [ 1,  mn, 10+(2,1+0,)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  !gapprompt@gap>| !gapinput@Ball(N,[0..3],2,OnTuples);|
  [[ 3,3,  ] [1 3 ,2 ,  1 ,1  ] 
    [-,-1,1- ,[ 1,1 1,1]  - 3,0 -4]  0 - ,- ] 
    [ 0 .. 3 ], [ 1, -1, -1, -1 ], [ 1, 3, 0, 2 ], [ 3, -4, -1, 0 ] ]
  !gapprompt@gap>| !gapinput@l := 2*IdentityRcwaMappingOfZ; r := l+1;|
  Rcwa mapping of Z: n -> 2n
  Rcwa mapping of Z: n -> 2n + 1
!@|gapinput@(,)14OnPointsSpheres;|
  [ [ 1 ], [ 2, 3 ], [ 4, 5, 6, 7 ], [ 8, 9, 10, 11, 12, 13, 14, 15 ], 
    [ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,  !java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 49
  
\end{Verbatim}
 }

  }

  }

       
\chapter{\textcolor{Chapter }{ Residue\texttt{\symbol{45}}Class\texttt{\symbol{45}}Wise Affine Mappings,
Groups and Monoids over ${\ensuremath{\mathbb Z}}^2$ }}\label{ch:ZxZ}
\logpage{[ 5, 0, 0 ]}
\hyperdef{L}{X788EB00B82897762}{}
{
   This chapter describes how to compute with
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings
of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ and with groups and monoids formed by them. 

 The rings on which we have defined
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings so
far have all been principal ideal domains, and it has been crucial that all
nontrivial principal ideals had finite index. However, the rings ${\ensuremath{\mathbb Z}}^d$, $d > 1$ are not principal ideal domains. Furthermore, their principal ideals have
infinite index. Therefore as moduli of
residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine mappings we
can only use lattices of full rank, for these are precisely the ideals of ${\ensuremath{\mathbb Z}}^d$ of finite index. However, on the other hand we can also be more permissive and
look at ${\ensuremath{\mathbb Z}}^d$ not as a ring, but rather as a free {\ensuremath{\mathbb
Z}}\texttt{\symbol{45}}module. The consequence of this is that then an affine
mapping of ${\ensuremath{\mathbb Z}}^d$ is not just given by $v \mapsto (av+b)/c$ for some $a, b, c \in {\ensuremath{\mathbb Z}}^d$, but rather by $v \mapsto (vA+b)/c$, where $A \in {\ensuremath{\mathbb Z}}^{d \times d}$. Also for technical reasons concerning the implementation in \textsf{GAP}, looking at ${\ensuremath{\mathbb Z}}^d$ as a free {\ensuremath{\mathbb Z}}\texttt{\symbol{45}}module is preferable
\texttt{\symbol{45}}\texttt{\symbol{45}} in \textsf{GAP}, \texttt{Integers\texttt{\symbol{94}}d} is not a ring, and multiplying lists of integers means forming their scalar
product.  
\section{\textcolor{Chapter }{ The definition of residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise
affine mappings of ${\ensuremath{\mathbb Z}}^d$ }}\label{sec:DefinitionOfRcwaMappingsOfZxZ}
\logpage{[ 5, 1, 0 ]}
\hyperdef{L}{X781907CA785CC7AC}{}
{
  \index{rcwa mapping@rcwa mapping!of Z x Z, definition} Let $d \in {\ensuremath{\mathbb N}}$. We call a mapping $f: {\ensuremath{\mathbb Z}}^d \rightarrow {\ensuremath{\mathbb Z}}^d$ \emph{residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine} if there is a lattice $L = {\ensuremath{\mathbb Z}}^d M$ where $M \in {\ensuremath{\mathbb Z}}^{d \times d}$ is a matrix of full rank, such that the restrictions of $f$ to the residue classes $r + L \in {\ensuremath{\mathbb Z}}^d/L$ are all affine. This means that for any residue class $r + L \in {\ensuremath{\mathbb Z}}^d/L$, there is a matrix $A_{r+L} \in {\ensuremath{\mathbb Z}}^{d \times d}$, a vector $b_{r+L} \in {\ensuremath{\mathbb Z}}^d$ and a positive integer $c_{r+L}$ such that the restriction of{\nobreakspace}$f$ to $r + L$ is given by $f|_{r + L}: \ r + L \ \rightarrow \ {\ensuremath{\mathbb Z}}^d, \ \ v \
\mapsto \ (v \cdot A_{r+L} + b_{r+L})/c_{r+L}$. For reasons of uniqueness, we assume that $L$ is chosen maximal with respect to inclusion, and that no prime factor of $c_{r+L}$ divides all coefficients of $A_{r+L}$ and{\nobreakspace}$b_{r+L}$. 

 \index{rcwa mapping@rcwa mapping!modulus} \index{rcwa mapping@rcwa mapping!class-wise translating} \index{class-wise translating@class\texttt{\symbol{45}}wise translating!definition} \index{prime set@prime set!definition} We call the lattice $L$ the \emph{modulus} of $f$, written Mod($f$). Further we define the \emph{prime set} of{\nobreakspace}$f$ as the set of all primes which divide the determinant of at least one of the
coefficients $A_{r+L}$ or which divide the determinant of{\nobreakspace}$M$, and we call the mapping{\nobreakspace}$f$ \emph{class\texttt{\symbol{45}}wise translating} if all coefficients{\nobreakspace}$A_{r+L}$ are identity matrices and all coefficients{\nobreakspace}$c_{r+L}$ are equal to{\nobreakspace}1. 

 For the sake of simplicity, we identify a lattice with the Hermite normal form
of the matrix by whose rows it is spanned. }

  
\section{\textcolor{Chapter }{ Entering residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
mappings of ${\ensuremath{\mathbb Z}}^2$ }}\label{sec:EnteringRcwaMappingsOfZxZ}
\logpage{[ 5, 2, 0 ]}
\hyperdef{L}{X7A39FCF08030AB9B}{}
{
{DDAEBB4{
\subsection{\textcolor{Chapter{
\hyperdefnoindent\{}$( Lu\java.lang.StringIndexOutOfBoundsException: Range [127, 125) out of bounds for length 168
{
\\textcolor}$\\{\slshape }\ndexC@!,;for  Z}
\label{RcwaMapping:by ring = Z x Z, modulus\label{ClassRotation:cl, u; for Z x Z}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright}\fill\scriptsize function)}\
\label{RcwaMapping:by two partitions of Z x Z
}\hfill{
\noindent\textcolor $ in\ensuremath\mathbbN$     r{{mathbbZ^$ and a matrix ui{ },ensuremath\ Z)theemph } \ho_{{\Z}d,} is thercwa    $ \inr+\{mathbb}}$to$  (-)    ${\ensuremath\Z}d\setminus +{ rotationZ Ztwo\{}}argumentform the {\\{\exttt\\lshape }forthe\${\ }^$  thelistlist java.lang.StringIndexOutOfBoundsException: Range [720, 719) out of bounds for length 821
\label{RcwaMapping:of Z x Z, by residue class cycles}
\\ ()\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RcwaMapping({\mdseries\slshape f, g})\index{RcwaMapping@\texttt{RcwaMapping}!of Z x Z, by projections to coordinates}
RcwaMappingx
}\hfill{\scriptsize (method)}gapprompt@> !classes:AllResidueClassesModulo2,[21,[03];
textbf\Returns }
 an rcwa mapping of ${\ensuremath{\mathbb Z}}^2$. 



 The above methods return 
\{java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
|(,m2n-)2 mn)in (,)(1Z(0,3Z
\item[{(b)}]  an rcwa permutation which induces a bijection between the partitions \mbox{\texttt{   (,n |-<,)           
\item[{(c)}]  an rcwa permutation with ``residue|
\item[{(d)}]  the rcwa mapping of              \
\end{description}
 respectively. 

 The modulus of an rcwa mapping of ${\ensuremath{\mathbb Z}}^2$ is a lattice of full rank. It is represented by

A list anrcwamapping  {ensuremath\ }^2$withmodulus{nobreakspace}mbox\texttt{mdseriesslshapeL}consistsof |det\mbox{texttt\\slshape })|$coefficient  \texttt{}A_{r{\{\ Z}^2\{texttt{\\ L}$,${r{ensuremath\ }^2\mbox\{\\slshape }}, c_r+{\nsuremath\ }}2mbox{\texttt{\mdseries\slshape L}}}$\texttt{]}. The entries $A_{r+{\ensuremath{\mathbb Z}}^2\mbox{\texttt{\mdseries\slshape L}}}$ are $2 \times 2$ integer matrices, the $b_{r+{\ensuremath{\mathbb Z}}^2\mbox{\texttt{\mdseries\slshape L}}}$ are elements of ${\ensuremath{\mathbb Z}}^2$, i.e. lists of two integers, and the $c_{r+{\ensuremath{\mathbb Z}}^2\mbox{\texttt{\mdseries\slshape L}}}$ are integers. The ordering of the coefficient triples is determined by the
ordering of the representatives of the residue classes $r+{}^2\mbox{\texttt{\mdseries\slshape L}}$ in the sorted list returned by \texttt{AllResidues(Integers\texttt{\symbol{94}}2,\mbox{\texttt{\mdseries\slshape L}})}. 

 The methods for the operation \texttt{RcwaMapping} perform a number of argumentchecks  canbe skipped by  texttt{cwaMappingNC .

 Last but not least, regarding Method{\nobreakspace}(d) it should be mentioned
that only very special rcwa mappings of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ have projections to coordinates. 
\begin{Verbatim}[commandchars=!@E,fontsize=\small,frame=single,label=Example]
  
!gapprompt@gap>R := Integers^2;E
  !gapprompt@gap>E !gapinput@twice := RcwaMapping(R,[[1,0],[0,1]],E
  !gapprompt@>E !gapinput@                          java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  Rcwa mapping  ^2:(m,) - (m2njava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  !gapprompt@gap>E !gapinput@[4,5]^twice;E
  [ 8, 10 ]
  !gapprompt@gap>E !gapinput@twice1 := RcwaMapping(R,[[1,0],[0,\t{{\\\{cl }i{\{! ;  Z
  !gapprompt@>E !gapinput@                           [[[[2,0],[0,1]],[0,0],1]]);      # method (a)E
  Rcwa mapping of Z^2: (m,n) -> (2m,n)
  !gapprompt@gap>E !gapinput@[4,5]^twice1;E
  [ 8, 5 ]
  !gapprompt@gap>E !gapinput@Image(twice1);E
((0Z(1Z
  !gapprompt@gap>E !gapinput@hyperbolic := RcwaMapping(R,[[1,0],[0,2]],E
  !gapprompt@>E !gapinput@                               [[[[4,0],[0,1]],[0, 0],2],E
  > @[[40,01][-,];# method (a)E
  <rcwa mapping of Z^2 with modulus (1,0)Z+(0,2)Z>
  !gapprompt@gap>E !gapinput@IsBijective(hyperbolic);E
  true
  !gapprompt@gap>E !gapinput@Display(hyperbolic);E
  
  Rcwa   Tame rcwa  Z2 (,)-(+1,)
  
              /
              | (2m,n/2)       if (m,n) in (0,0)+(1,0)Z+(0,  gapprompt@ap> (;java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   (m,n) |-> <  (2m+1,(n-1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z
              |
              \
  
  !gapprompt@gap>E !gapinput@Trajectory(hyperbolic,[0,(n -   m  m,) 00)()+01Z
  [ [ 0, 10000 ], [ 0, 5000 ], [ 0, 2500 ], [ 0, 1250 ], [ 0, 625 ], 
    [ 1, 312 ], [ 2, 156 ], [ 4, 78 \end{erbatim}
    [ 71, 4 ], [ 142, 2 ], [ 284, 1 ], [ 569, 0 ], [ 1138, 0 ], 
    [ 2276, 0 ], [ 4552, 0 ], [ 9104, 0 ], [ 18208, 0 ] \{\{foranmappingZx index@IsClassRotation rcwaZ }\IsClassShift@\texttt{IsClassShift}!for an rcwa mapping of Z x Z} As for other rings, class transpositions, class rotations and class shifts
  gapprompt@>!P1 java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 77
  [ (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    (1,1)+(2,1)Z+(0,2)Z ]
  !gapprompt@gap>E !gapinput@P2 := AllResidueClassesModulo(R,[[1,0],[0,4]]);E
  [ (0,0)+(1,0)Z+(0,4)Z, (0,1)+(1,0)Z+(0,4)Z, (0,2)+(1,0)Z+(0,4)Z,
    (0,3)+(1,0)Z+(0,4)Z ]
  !gapprompt@gap>E !gapinput@g := RcwaMapping(P1,P2);                                 # method (b)E
<java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 54
  !gapprompt@gap>E\{description}
  true
  !java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  
{\mathbb Z}}^d ]\ points / finite sets  residue ) texttt,, \texttt{Multpk}, \texttt{ClassWiseOrderPreservingOn}, \C}, \java.lang.StringIndexOutOfBoundsException: Range [273, 272) out of bounds for length 295
  
     [m,n] mod (2,1)Z+(0,2)Z   |              Image of [m,n]
  -----------------------------+-------------------------------------------
   [0,0]                       | [m/2,-m+2n]
   [0,1]                       | [m/2,-m+2n-1]
   [1,0]                       | [(m-1)/2,-m+2n+3]
   [1,1]                       | [(m-1)/2,-m+2n+2]
  
  !gapprompt@gap>E !gapinput@\label{ProjectionsToCoordinates:for an java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 61
  gapprompt>!java.lang.StringIndexOutOfBoundsException: Range [46, 25) out of bounds for length 84
  [ (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,4)Z, (1,1)+(4,2)Z+(0,4)Z ]
  !gapprompt@gap>E !gapinput@g := RcwaMapping([classes]);                             # method (c)E
rcwa of ^ 42Z(4Z order >
ifthe first / second coordinate of the image of a point depends  the
  12java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  !gapprompt\{}=A=s,java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 77
  (,0)(21)+(2)  (,0)+21)+04Z 11java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  !gapprompt@gap>E !gapinput@Display(g);E
  
  Rcwa permutation of Z^2 with modulus (4,2)Z+(0,4)Z, of order 3
  
              /
              | (m+1,(-m+4n)/2)   if (m,n) in (0,0               (m+1,n)if(n(0+,)+,Z
|(m-,m2+1/2  m 1)(1Z(4)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
   (m,n) |-> <  ((m-1)/2,(n-1)/2) if (m,n) in (1,1)+(4,2)Z+(0,4)Z
|mn)             java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
              |
              \
  
  !gapprompt@gap>E !gapinput@g := RcwaMapping(ClassTransposition(0,2,1,2),E
  !gapprompt@>E !gapinput@                    ClassReflection(0,2));                  # method (d)E
  <rcwa mapping of Z^2 with modulus (2,0)Z+(0,2)Z>
  !
  
  mapping  Z2 modulus(0Z(,)java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
  
              /
              | (m+1,-n) java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
              +1) (n) 01+(,)+(,2)Z
   (,n |)Z(0,)Z
              | (m-1,n)  if (m,n) in

              \
  
  java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 34
  IdentityMapping( ( Integers^2 ) )
!g>E!@ListProjectionsToCoordinates(g),Factorization);E
  [ [ ( 0(2), 1(2) ) ], [ ClassReflection( 0(2) ) ] ]
  
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{ ClassTransposition (for ${\ensuremath{\mathbb Z}}^2$) }}\logpage{[ 5, 2, 2 ]}
\hyperdef{L}{X7B450EE17B465E02}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassTransposition({\mdseries\slshape r1, L1, r2, L2})\index{ClassTransposition@\texttt{ClassTransposition}!r1, L1, r2, L2 (for Z x Z)}
\label{ClassTransposition:r1, L1, r2, L2 (for Z x Z)}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassTransposition({\mdseries\slshape cl1, cl2})\index{ClassTransposition@\texttt{ClassTransposition}!cl1, cl2 (for Z x Z)}
\label{ClassTransposition:cl1, cl2 (for Z x Z)}
}\hfill{\scriptsize (function)}}\\
\textbf{\textbf{\indent java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 27
\+\\athbb2,+{ensuremathZ}^L_2}.java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103



 Let $d \in {\ensuremath{\mathbb N}}$, and let $L_1, L_2 \in {\ensuremath{\mathbb Z}}^{d \times d}$ be matrices of full rank which are in Hermite normal form. Further let $r_1 + {\ensuremath{\mathbb Z}}^d L_1$ and $r_2 + {\ensuremath{\mathbb Z}}^d L_2$ be disjoint residue classes, and assume that the java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\in {\rm Sym}({\ensuremath{\mathbb Z}}^d)$ as the involution which interchanges $r_1 + k L_1$ and $r_2 + k L_2$ for all $k \in {

 The class transposition $\tau_{r_1+{\ensuremath{\mathbb Z}}^d L_1, r_2+{\ensuremath{\mathbb Z}}^d L_2}$ interchanges the residue classes $r_1+{\ensuremath{\mathbb Z}}  SL(2Integers)
transpositions of{\nobreakspace}${\ensuremath{\mathbb Z}}^d$ generates the simple group CT(  !gapprompt@gap>B !gapinput@phi := IsomorphismRcwaGroup(sl,ResidueClass([1,0],[[2,2],[0,3]]));B

 \index{TransposedClasses@\texttt{TransposedClasses}!of a class transposition of Z  [ [ [ ,1  ] [1,0]],[[ 1,1], [,1]]]- 
residue classes $r_1+{\ensuremath{\mathbb Z}}^2 L_1$ and $r_2+{\ensuremath{\mathbb Z}}^2 L_2$ are stored as [ClassRotation(1,)(2,+03)Z[,1][0]], 

 \index{SplittedClassTransposition@\texttt{SplittedClassTransposition}!for a class transposition of Z x Z} There is also a method for \texttt{SplittedClassTransposition} available for class transpositions of ${\ensuremath{\mathbb Z}}^2$. This method takes as first argument the class transposition, and as second
argument a list of two integers. These integers are the numbers  !gap> gapinputg = 2,);
which the   GL(2,Integersjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
product of the returned class transpositions is not always equal to the class
transposition passed as first argument. However this equality holds if the
first entry of the second argument is{\nobreakspace}1. 

 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@ct := ClassTransposition([0,0],[[2,1],[0,2]],[1,0],[[2,1],[0,4]]);A
  ( (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,0)2)+(03)Z,[[1,1][0,1]]) ]
  !gapprompt@gap>A !gapinput@Display( gapprompt@gap> !gapinput@[47-37][,48]]^hi
  
  Rcwa permutation of Z^2 with modulus (2,1)Z+(0,4)Z, of order 2
  
              /
              | (m+1,(-m+4n)/2)  if (m,n) in (0,0)+(2,1)Z+(0,2)Z
   (m,n) |-> <  (m-1,(m+2n-1)/4) if (m,n) in (1,0)+(2,1)Z+(0,4)Z
|(m,n)            otherwise
              \
  
  !gapprompt@gap>A !gapinput@TransposedClasses(ct);A
  [ (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,4)Z ]
  !gapprompt@gap>A !gapinput@ct = ClassTransposition(last);A
  true
  !gapprompt@gap>A !gapinput@SplittedClassTransposition(ct,[1,2]);A
  [ ( (0,0)+(2,1)Z+(0,4)Z, (1,0)+(2,1)Z+(0,8)Z ), 
    ( (0,2)+(2,1)Z+(0,4)Z, (1,4)+(2,1)Z+(0,8)Z ) ]
  !gapprompt@gap>
  true
  (ct,[,];java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  [ ( (0,0)+(4,0)Z+(0,2)Z, (1,0)+(4,2)Z+(0,4)Z ), 
    (,1)(,)+(02,(,)(,)+(0) )]
  !gapprompt@gap>A !gapinput@Product(last) = ct;A
  false
  
{
 }

 
\subsection{\textcolor{Chapter }{ ClassRotation (for ${\ensuremath{\mathbb Z}l{DrawGridU,yrange, java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 44
\hyperdef{L}{X828438127DDAEBB4}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassRotation({\mdseries\slshape r, L, u})\index{ClassRotation@\texttt{ClassRotation}!r, L, u; for Z x Z}
\label{ClassRotation:r, L, u; for Z x Z}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassRotation({\mdseries\slshape cl, u})\index{ClassRotation@\texttt{ClassRotation}!cl, u; for Z x Z}
\label{ClassRotation:cl, u; for Z x Z}
}\hfilljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\textbf{\indent Returns:\ }
 the class rotation $\rho_{r(m),u}$. 



 Let \box\texttt{\mdseries filename}  the name, iethefullpath name ofthe  .If the first
\begin{Verbatim}[commandchars=!@B,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>B !gapinput@interchange := ClassRotation([0,0],[[1,0],[0,is \$\{Z}^ residue  produced , and
ClassRotation(Z,[[0,1]  1,0]])
  !gapprompt@gap>B !gapinput@Display(interchange);B
  Rcwa   }
  !gapprompt@gap>B !gapinput@java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
  [ (0,0)+(2,1)Z+\\  oftexttt\45}\45}WiseAffine
    (1,0)+(2,1)Z+(0,3)Z, (1,1)+(2,1)Z+(0,3)Z, (1,2)+(2,1)Z+(0,3)Z ]
  !gapprompt@gap>B !gapinput@transvection := ClassRotation(classes[5],[[1,1],[0,1]]);B
  ClassRotation((1,1)+(2,1)Zcan  loaded  {GAP java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 87
  !gapprompt@gap>B !gapinput@Display(transvection);B
  
  Tame rcwa permutation of Z^2 with modulus (2,1)Z+(0,3)Z, of order infinity
  
              /
     |(,3+2n3/2)if mn in(1+Z+(0,)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
   (m,n) |-> <  (m,n)           otherwise
              |
              \
  
\{java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 }

 
\subsection{\textcolor{Chapter }{ ClassShift (for ${\ensuremath{\mathbb Z}}^2$) }}\logpage{[ 5, 2, 4 ]}
\hyperdef{L}{X7A14A8F48247E651}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassShift({\mdseries\slshape r, L, k})\index{ClassShift@\texttt{ClassShift}!r, L, k; for Z x Z}
\label{ClassShift:r, L, k; for Z x Z}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClassShift({\mdseries\slshape cl, k})\index{ClassShift@\texttt{ClassShift}!cl, k; for Z x Z}
\label{ClassShift:cl, k; for Z x Z}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the class shift $\nu_{r+{\ensuremath{\mathbb Z}}^dL,k}$. 



 Let $d \in {\ensuremath{\mathbb N}}$. Given a residue class $r+{\ensuremath{\mathbb Z}}^dL$ and an integer $k \in \{1, \dots, d\}$, the \emph{class shift} $\nu_{r+{\ensuremath{\mathbb Z}}^dL,k}$ is the rcwa mapping which maps $v \in r+{\ensuremath{\mathbb Z}}^dL xamplesof rcwa groups and \exttt{symbol{}}appings  from thefile\texttt{pkg//examples/examples.g}got bound 

 In the two\texttt{\symbol{45}}argument form, the argument{\nobreakspace}\mbox{\texttt{\mdseries\slshape cl}} stands for the residue class{\nobreakspace}$r+{\ensuremath{\mathbb Z}}^dL$. Enclosing the argument list in list brackets is permitted. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@shift1 := ClassShift([0,0],[[1,0],[0,1]],1);A
  ClassShift( Z^2, 1 )
  !gapprompt@gap>A !gapinput@Display(shift1);A
  Tame rcwa permutation of Z^2: (m,n) -> (m+1,n)
  !gapprompt@gapA !@ : (ResidueClass[,1],[2,,[,]),;java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
  ClassShift((1,1)+(2,1)Z+(0,2)Z,2)
  !gapprompt@gap>A !gapinput@Display(s);A
  
  Tame rcwa permutation of Z^2 with modulus (2,1)Z+(0,2)Z, of order infinity
  
              /
              | (m,n+2) if (m,n) in (1,1)+(2,1)Z+(0,2)Z
   (m,n) |-> <  (m,n)   if (m,n) in (0,0)+(2,0)Z+(0,1)Z U 
              |                     (1,0)+(2,1)Z+(0,2)Z
              \
  
\end{Verbatim}
 }

 \index{IsClassTransposition@\texttt{IsClassTransposition}!for an rcwa mapping of Z x Z} \index{IsClassRotation@\texttt{IsClassRotation}!for an rcwa mapping of Z x Z} \index{IsClassShift@\texttt{IsClassShift}!for an rcwa mapping of Z x Z} As for other rings, class transpositions, class rotations and class shifts
of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ have the distinguishing properties \texttt{IsClassTransposition}, \texttt{IsClassRotation} and \texttt{IsClassShift}. }

  
\section{\textcolor{Chapter }{ Methods for residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
mappings of ${\ensuremath{\mathbb Z}}^2$ }}\label{sec:MethodsForRcwaMappingsOfZxZ}
\logpage{[ 5, 3, 0 ]}
\hyperdef{L}{X8531E39785FFF8A7}{}
{
  There are methods available for rcwa mappings of ${\ensuremath{\mathbb Z}}^2$ for the following general operations: \index{View@\texttt{View}!for an rcwa mapping of Z x Z} \index{Display@\texttt{Display}!for an ," HigmanThompson", 
\begin{description}
\item[{ Output }]  \texttt    MaybeInfinitelyPresentedGroup" ModuliOfPowers" 
us,\texttt{.
\item[{ Attributes }]  \texttt{Support} /"SlowlyContractingMappings" Syl3_S9" "SymmetrizingCollatzTree 
\item[{ Properties }]  \texttt{IsInjective}, \texttt{IsSurjective}, \texttt{IsBijective}, \texttt{IsTame}, \texttt{IsIntegral}, \texttt{IsBalanced}, \texttt{IsClassWiseOrderPreserving}, \texttt{IsOne}, \texttt{IsZero}. 
\item[{ Action on ${\ensuremath{\mathbb Z}}^d$ }]  \texttt{\texttt{\symbol{94}}} (for points / finite sets / residue class unions), \texttt{Trajectory}, \texttt{ShortCycles}, \texttt{Multpk}, \texttt{ClassWiseOrderPreservingOn}, \texttt{ClassWiseOrderReversingOn}, \texttt{ClassWiseConstantOn}. 
\item[{ Arithmetical operations }]  \texttt{=}, \texttt{*} (multiplication / composition and multiplication by a $2 \times 2$ matrix or an integer), \texttt{\texttt{\symbol{94}}} (exponentiation and    "ameGroupByCommsOfWildPerms, "enturini" ZxZ"]
\end{description}
 above aredocumented either in the \textsf{GAP} Reference or  in this manual. The operations are special
for rcwa mappings of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ are described in the sequel. 

 

\subsection{\textcolor{Chapter }{ProjectionsToCoordinates (for an rcwa mapping of Z x Z)}}
\logpage{[ 5, 3, 1 ]}\nobreak
\hyperdef{L}{X8408B7837C9EED36}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ProjectionsToCoordinates({\mdseries\slshape f})\index{ProjectionsToCoordinates@\texttt{ProjectionsToCoordinates}!for an rcwa mapping of Z x Z}
label{ProjectionsToCoordinatesfor an rcwa  of   Z}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 the projections of the rcwa mapping \mbox{\texttt{\mdseries\slshape f}} of ${\ensuremath{\mathbb Z}}^2$ to the coordinates if such projections exist, and \texttt{fail} otherwise. 



 An rcwa mapping can be projected to the first / second coordinate if and only
if the first / second coordinate of the image of a point depends only on the
first / second coordinate of the preimage. Note that this is a very strong and
restrictive . 
\begin{Verbatimjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  
  !gapprompt@gap>A !gapinput@f := RcwaMapping(ClassTransposition(0,2,1,2),ClassReflection(0,2));;A
  !gapprompt@gap>A !gapinput@Display(f);A
  
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  
              /
              | (m+1,-n) if (m,n) in (0,0)+(2,0)Z+(0,2)Z
              | (m+1,n)  if (m,n) in (0,1)+(2,0)Z+(0,2)Z
   (m,n) |-> <  (m-1,-n) if (m,n) in (1,0)+(2,0)Z+(0,2)Z
              | (m1,n  if (m,n)in (1,1+(2,0)Z+(0,)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
              |
              \
  
  !gapprompt@gap>A !gapinput@List(ProjectionsToCoordinates(f),Factorization);A
  [ [ ( 0(2), 1(2) ) ], [ ClassReflection( 0(2) ) ] ]
  
\end{Verbatim}
 }

 }

  
\section{\textcolor{Chapter }{ Methods for residue\texttt{\symbol{45}}class\texttt{\symbol{45}}wise affine
groups and \texttt{{\\extcolorFuncColor{\$enspace\LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions{mdseries\ )index{@\Load}-texttt{}\\Of}\t{}\}-\texttt{By3}\-\exttt{Class}-\extttTranspositions!small database}
\logpage{[ 5, 4, 0 ]}
\
{
  \index{Rcwa@\texttt{Rcwa}!the monoid formed by all rcwa permutations of Z x Z} \index{RCWA@\texttt{RCWA}!the group formed by all rcwa permutations of Z x Z} \index{CT@\texttt{CT}!the group generated bygroups by 3   whichinterchangeresidueclasses
monoids over ${\ensuremath{\mathbb Z}}^2$ can be entered by \texttt{Monoid} and \texttt{MonoidByGenerators}. The groups RCWA(${\ensuremath{\mathbb Z}}^2$) and CTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 \index{Size@\texttt{Size}!for an rcwa group over Z x Z} \index{IsIntegral@\texttt{IsIntegral}!for\{java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

 There are methods for \texttt{IsomorphismRcwaGroup} (\ref{IsomorphismRcwaGroup:for a group, over a given ring}) which embed the groups SL(2,{\ensuremath{\mathbb Z}}) and
GL(2,{\ensuremath{\mathbb Z}}) into RCWA(${\ensuremath{\mathbb Z}}^2$) in such a way that the support of the image is a specified residue class: 
\subsection{\textcolor{Chapter }{ IsomorphismRcwaGroup (Embeddings of SL(2,{\ensuremath{\mathbb Z}}) and
GL(2,{\ensuremath{\mathbb Z}})) }}\logpage{ ,1]java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
\hyperdef{L}{X79A8F9AD7E839862}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsomorphismRcwaGroup({\mdseries\slshape sl2z, cl})\index{IsomorphismRcwaGroup@\texttt{IsomorphismRcwaGroup}!for SL(2,Z) and a residue class}
\label{IsomorphismRcwaGroup:for SL(2,Z) and a residue class}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{IsomorphismRcwaGroup({\mdseries\slshape gl2z, cl})\index{IsomorphismRcwaGroup@\texttt{IsomorphismRcwaGroup}!for GL(2,Z) and a residue class}
\label{IsomorphismRcwaGroup:for GL(2,Z) and a residue class}
}\hfill{\scriptsize (attribute)}}\\
\textbf{\indent Returns:\ }
 a monomorphism from \mbox{\texttt{\mdseries\slshape sl2z}} respectively \mbox{\texttt{\mdseries\slshape gl2z}} to{\nobreakspace}RCWA(${\ensuremath{\mathbb Z}}^2$), such that the support of the image is the java.lang.StringIndexOutOfBoundsException: Index 212 out of bounds for length 201



 
\begin{RCWA({ensuremath{mathbb }.
  
  !@>Bgapinput@sl: SL(,)B
  SL(2,Integers)
  !gapprompt@gap>B !gapinput@phi := IsomorphismRcwaGroup(sl,ResidueClass([1,0],[[2,2],[0,3]]));B
  [ [ [ 0, 1 ], [ -1, 0 ] ], [ [ 1, 1 ], [ 0, 1 ] ] ] -> 
  [ respected  \grpsi}  \{[]}is infinite,then\respectedpartitions {,i}   lengthof respected oftexttt{[].If{grpsi] is  then\exttt{java.lang.StringIndexOutOfBoundsException: Range [299, 298) out of bounds for length 308
    ClassRotation((1,0)+(2,2)Z+(0,3)Z,item{texttt{}   list  degrees ie numbers ofmoved , in the action
  !gapprompt@gap>B !gapinput@(magephi)B
  (1,0)+(2,2)Z+(0,3)Z
  !gapprompt@gap>B !gapinput@gl := GL(2,Integers);B
  GL(2,Integers)
  !gapprompt@gap>B !gapinput@phi := IsomorphismRcwaGroup(gl,ResidueClass([1,0],[[2,2],[0,3]]));B
  [ [ [ 0, 1 ], [ 1, 0 ] ], [ [ -1, 0 ], [ 0, 1 ] ], 
    [ [ 1, 1 ], [ 0, 1 ] ] ] -> 
  [ ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[0,1],[1,0]]), 
    ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[-1,0],[0,1]]), 
    ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[1,1],[0,1]]) ]
  @gap> !apinput@[[47-][,]]^phi;B
  ClassRotation((1,0)+(2,2)Zmodulo{nobreakspace}2.
  !gapprompt@gap>B !gapinput@Display(last:AsTable);B
  
  Rcwa permutation of Z^2 with modulus (2,2)Z+(0,3)Z, of order 6
  
     [m,n] mod (2,2)Z+(0,3)Z   |              Image of [mc of  groupof order{nobreakspace} but the
  -----------------+----------------------------
   [0,0] [0,1] [0,2] [1,1]     |
   [1,2]                       | [m,n]
   [1,0]                       | [(-263m+122n+266)/3,(-1147m+532n+1147)/6]
  
\enditem[\exttt{}   everymodulus\texttt{}  to 60 ti[m]} is ofof groups of   {ensuremath{mathbb
 }

 \index{DrawOrbitPicture@\texttt{DrawOrbitPicture}!for rcwa groups over Z x Z} The function \texttt{DrawOrbitPicture} (\ref{\item{\texttt{trsstatus}}  A list of strings which describe what is  about whether the groups \texttt{rps]}act transitively on the nonnegative integers in their support, or how the
over{\nobreakspace}${\ensuremath{\mathbb Z}}^2$. Further there is a function which depicts residue classcomputation has failed. 
of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ and partitions of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ into such: 
\subsection{\textcolor{Chapter }{ DrawGrid }}\logpage{[ 5, 4, 2 ]}
\hyperdef{L}{X812135EB87527F01}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{DrawGrid({\mdseries\slshape U, yrange, xrange, filename})\index{DrawGrid@\texttt{DrawGrid}!U, yrange, xrange, filename}
\label{DrawGrid:U, yrange, xrange, filename}
}\hfill{\scriptsize (function)}\\
\noindenttextcolor{uncColor}{\triangleright$enspaceDrawGrid(\slshape ,yrange xrange,filename}index{@texttt{!, yrange,, }
\label{DrawGrid:P, yrange, xrange, filename}
}\hfill{\scriptsize (functionr mentionan,the textttgrps44132}   the `group'\texttt{{45}texttt{symbol}its actiononthe set ofpositive
\textbf{\indent Returns:\ }
 nothing. 



 This function depicts the residue class union \mbox{\texttt{\mdseries\slshape U}} of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ or the partition{\nobreakspace}\mbox{\texttt{\mdseries\slshape P}} of{\java.lang.StringIndexOutOfBoundsException: Index 208 out of bounds for length 2
argument\\slshapefilename}is  ,ie.the   
argument is a residue class union, the output picture is
black\texttt{\symbol{45}}and\texttt{\symbol{45}}white, where black pixels
represent members of{\nobreakspace}\mbox{\texttt{\mdseries\slshape U}} and white pixels represent non\texttt{\symbol{45}}members. If the first
argument is a partition of{\nobreakspace}${\    , "" 
colors are used to denote membership in different parts. }

 }

  }

       
\chapter{\textcolor{Chapter }{ Databases of Residue\texttt{\symbol{45}}Class\texttt{\symbol{45}}Wise Affine
Groups and \texttt{\symbol{45}}Mappings }}\label{ch:Databases}
\logpage{[ 6, 0, 0 ]}
\hyperdef{L}{X81BA344979567342}{}
{
  The \textsf{RCWA} package contains a number of databases of rcwa groups and rcwa mappings. They
can be loaded into a \textsf{GAP} session by the functions described in this chapter.  
\section{\textcolor{Chapter }{The collection of examples}}\label{sec:Examples}
\logpage{[ 6, 1, 0 ]}
\hyperdef{L}{X86CCBF017A746F50}{}
{
  

\subsection{\textcolor{Chapter }{LoadRCWAExamples}}
\logpage{[ 6, 1, 1 ]}\nobreak
4B}{
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LoadRCWAExamples({\mdseries\slshape })\index{LoadRCWAExamples@\texttt{LoadRCWAExamples}}
\label{LoadRCWAExamples}
}scriptsize(unction)}}\
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 27
 the name of the variable to which the record containing the collection of
examples of rcwa groups and \texttt{\symbol{45}}mappings loaded from the file \texttt{pkg/rcwa/examples/examples.g} got bound. 



 The components of the examples record are records which contain the individual
groups and mappings. A detailed description of some of the examples can be
found in Chapter{\nobreakspace}\ref{ch:Examples}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@LoadRCWAExamples();|
  "RCWAExamples"                                
  !gapprompt@gap>| !gapinput@Set(RecNames(RCWAExamples));|
  [ "AbelianGroupOverPolynomialRing", "Basics", "CT3Z", "CTPZ", 
    "CheckingForSolvability", "ClassSwitches", 
,java.lang.StringIndexOutOfBoundsException: Range [70, 67) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 69
    "CoprimeMultDiv", "F2_PSL2Z", "Farkas", "FiniteQuotients", 
    "FiniteVsDenseCycles", "GF2xFiniteCycles", "GrigorchukQuotients", 
    "Hexagon", "HicksMullenYucasZavislak", "HigmanThompson", 
    "LongCyclesOfPrimeLength", "MatthewsLeigh", 
    "MaybeInfinitelyPresentedGroup", "ModuliOfPowers", 
    "OddNumberOfGens_FiniteOrder", "Semilocals", 
    "SlowlyContractingMappings", "Syl3_S9", "SymmetrizingCollatzTree", 
    "TameGroupByCommsOfWildPerms  [[ 0,,30446  ] [ 3,1][ 4,37 ], [ 5,120], [6 1450]  8,18], 
  !gapprompt@gap>| !gapinput@AssignGlobals(RCWAExamples.CollatzMapping);|
  The following global variables have been assigned:
  [ "T", "T5", "T5m", "T5p", "Tm", "Tp" ]
  
\end{Verbatim}
java.lang.StringIndexOutOfBoundsException: Range [59, 2) out of bounds for length 2

 }

  
\section{\textcolor{Chapter }{Databases of rcwa groups}}\label{sec:DatabasesOfRcwaGroups}
\logpage{[ 6, 2, 0 ]}
\hyperdef{L    [ 1920,38 ], [2160 506  , ,34 , [ ,12] 
{
  

\subsection{\textcolor{Chapter }{LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions (small database)}}
\logpage{[ 6, 2, 1 ]}\nobreak
\hyperdef{L}{X793E2C5C7FC935B8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace[["  orbit (m, 593 ,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
\ U DecreasingOnstable and exceededmemory bound" 11 ] 
h}
\textbf{\indent Returns:\ }
 the name of the variable to which the record containing the database of all
groups generated by 3 class transpositions which interchange residue classes
with moduli $\leq 6$ got bound. 



     "seemingly only finite orbits (short)", 4816 ], 
\begin{description}
\item[{\texttt{cts}}]  The list of all 69 class transpositions which interchange residue classes with
moduli $\leq 6$. 
\item[{\texttt{grps}}]  The list of the 52394 groups \texttt{\symbol{45}}\texttt{\symbol{45}} 21948
finite and 30446 infinite ones. 
\item[{\texttt{sizes}}]  The list of group orders \texttt{\symbol{45}}\texttt{\symbol{45" are which linear size ,
\item[{\texttt{mods}}]  The list of moduli of the groups \texttt{\symbol{45}}\texttt{\symbol{45}} it
is \         ] ["transitive, 562 ],
\item[{\texttt{equalityclasses}}]  A list of lists of indices \texttt{i} of groups which are known to be equal, i.e. if \texttt{i} and \texttt{j} lie in the same list, java.lang.StringIndexOutOfBoundsException: Index 171 out of bounds for length 49
\item[{\texttt{samegroups}}]  A list of lists, where \texttt{samegroups[i]} is a list of indices of groups which are known to be equal to \texttt{grps[i]}. 
\item[{\texttt{conjugacyclasses}}]  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RCWA({\ensuremath{\mathbb Z}}). 
\item[{\texttt{subgroups}}]  A list of lists, where \texttt{subgroups[i]} is a list of indices of groups which are known to be proper subgroups of \texttt{grps[i]}. 
\item[{\texttt{supergroups}}]  A list of lists, where \texttt{supergroups[i]} is a list of indices of groups which are known to be proper supergroups of \texttt{grps[i]}. 
 indices of the groups in a
descending of java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
\item[{\texttt{respectedpartitions}}]  The list of shortest respected partitions. If \texttt{grps[i]} is finite, then \texttt{respectedpartitions[i]} is a list of pairs (residue, modulus) endVerbatim}
respected partition \texttt{grps[i]}. If \texttt{grps[i]} is infinite, then \texttt{respectedpartitions[i] = fail}. 
\itemjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
\java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
of the finite groups on their shortest respected partitions. If there is no
respected partition, i.e. if \texttt{grps[i]} is infinite, then \texttt{degrees[i] = 0}. 
\item[{\texttt{orbitlengths}}]  The list of lists of orbit lengths in the action of the finite groups on their
shortest respected{noindent\extcolor{}$triangleright$enspacetLoadDatabaseOfGroupsGeneratedBy4ClassTranspositionsmdseries\})index{oadDatabaseOfGroupsGeneratedBy4ClassTranspositions{\-texttt}-\{}-\exttt{roups}-texttt{Generated\texttt{y4}-texttt}-tT}
\item[{\texttt{permgroupgens}}]  The list of lists of generators of the isomorphic permutation groups induced
by the finite groups on their shortest respected partitions. If \texttt{grps[i]} is infinite,java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 34
\item[{\texttt{stabilize{\textunderscore}digitsum{\textunderscore}base2{\textunderscore}mod2}}]  The list of indices of groups which stabilize the digit sum in base 2
modulo{\nobreakspace}2. 
\item[{\texttt{stabilize{\textunderscore}digitsum{\textunderscore}base2{\textunderscore}mod3}}]  The list of indices of groups which stabilize the digit sum in base 2
{}3
\item[. 
modulo{\nobreakspace}2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\item[{\texttt{freeproductcandidates}}]  A list of indices of groups which may be isomorphic to the free product of 3
copies of the cyclic group of order{\nobreakspace}2. 
\item[{\texttt{freeproductlikes}}]  A list of java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 19
opies of the  group oforder{\obreakspace}, but where the shortest
relation indicating this is relatively long. 
\item[{\texttt{abc{item[\textttgrps4\java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 96

\item[{\texttt{cyclist}}]  A list described in the comments in \texttt{rcwa/data/3ctsgroups6/spheresizecycles.g}. 
[  java.lang.StringIndexOutOfBoundsException: Range [137, 57) out of bounds for length 137
\item[{\texttt{intransitivemodulo}}]  For every modulus \texttt{m} from 1 to 60, \texttt{intransitivemodulo[m]} is the list of indices of groups none of whose orbits on {\ensuremath{\\item[{\texttt{intransitivemodulo}}]  For every modulus \texttt{m} from 1 to 60, \texttt{intransitivemodulo[m]} is the list of indices of groups none of whose orbits on {\ensuremath{\mathbb
Z}} has RCWA{\{\ }).
\item[{\texttt{trsstatus}}]  A list of strings which describe what is known about whether the groups \texttt{grps[i]} act transitively on the nonnegative integers in their support, or how the
computation hasfailed 
\item[{\texttt{orbitgrowthtype}}]  A list of integers and\nddescription}
heuristically on the growth of the orbits of the groups \texttt{grps[i]} on{\nobreakspace}{\ensuremath{\mathbb Z}}. 
\end{description}
 database contains entry for every
3\texttt{\symbol{45}}tuple of distinct class transpositions in \texttt{cts}, which means that it contains multiple copies of equal groups
\texttt!gap|!java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 57

 To mention an example, the group \texttt{grps[44132]} might be called the ``Collatz group'' \texttt{\symbol{45}}\texttt{\symbol{45}} its action on the set of positive
integers which are not multiples of 6 is transitive if and only if the Collatz
conjecture holds. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=!gap>!@Length()
  
  !gapprompt@gap>| !gapinput@LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();  !gapprompt@gap> !gapinput@Size(grps4_3finite[])|
  "3
  !!gappromptgap>| !gapinputsizes4[]|
  The following global variables have 
  [ "3CTsGroupsWithGivenOrbit", "Id3CTsGroup", 
    "ProbablyFixesDigitSumsModulo", "java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 35
    "TriangleTypes"abc_torsion,"hains",","cts", 
    "cyclist", "degrees", "epifromfpgroupto_ct23z", 
    "epifromfpgrouptocollatzgroup_c", "epifromfpgrouptocollatzgroup_t", 
    "java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 4
    "freeproductlikes", "groups", "grps", "intransitivemodulo", 
    "minwordlengthcoprimemultdiv", "minwordlengthnonbalanced", "mods", 
    "orbitgrowthtype", "orbitlengths", "partitionlengths",     java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
"redundant_generator
    "samegroups", "shortresidueclassorbitlengths", "sizes", "sizespos", 
",spheresizebound_12java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 60
  spheresizebound_4,spheresizebound_6" 
    "stabilize_digitsum_base2_mod2", "stabilize_digitsum_base2_mod3", 
    "stabilize_digitsum_base3_mod2", "subgroups", "supergroups", 
    "trsstatus", "trsstatuspos", "trsstatusset" ]
  !gapprompt@gap>| !gapinput@grps[44132]; # the "3n+1 group"|
  <(2(3),4(6)),(1java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  !gapprompt@gap>| !gapinput@trsstatus[44132]; # deciding this would solve the 3n+1 problem|
  "exceeded memory bound"
  !gapprompt@gap>| !gapinput@ 
  1066
  !gapprompt@gap>| !gapinput@Maximum(Filtered(sizes,IsInt)); # order of largest finite group stored|
 7165033589793852697531456980706732548435609645091822296777976465116824959\
  2135499174617837911754921014138184155204934961004073853323458315539461543\
  4480515260818409913846161473536000000000000000000000000000000000000000000\
  000000
  !gapprompt@gap>| !gapinput@PrintFactorsInt(last);                                    |
  2^200*3^103*5^48*7^28*11^16*13^13*17^8*19^6*23^6*29
  !gapprompt@gap>| !gapinput@Positions(sizes,last);                               |
  [ 33814, 36548 ]
  !gapprompt@gap>| !gapinput@grps{last};|
  [ <(1(5),4(5)),(0(3),1(6)),(3(4),0(6))>, 
    <(0(5),3(5)),(2(3),4(6)),(0(4),5(6))> ]
  !gapprompt@gap>| !gapinput@samegroups[1];    |
  abel{oadDatabaseOfProductsOf2ClassTranspositions}
  !gapprompt@gap>| !gapinput@grps[1] = grps[68];|
  true
  !gapprompt@gap>| !gapinput@Maximum(mods);|
  77760
  !gapprompt@gap>| !gapinput@Positions(mods,last);|
  [ 26311, 26313, 26452, 26453, 26455, 26456, 26457, 26459, 26461, 26462, 
    27781, 27784, 27785, 27786, 27788, 27789, 27790, 27791, 27829, 27832, 
    ,,, 30526 ,30532 ,32924,32927 
    32931, 32933 ]
  !gapprompt@gap>| !gapinput@Set# it under the terms of the GNU General Public License as published by
  [ 45509262704640000RANTY; without # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # the same distribution
[  0  ][3 1 [ 4, 37 ] 5,120 , [6  , [ 8, 
    [ 10, 45 ], [ 12, 3143 ], [ 15, 165 ], [ 18, 484 ], [ 20, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    [ 24, 1339 ]  libtool libtool isused (yesno)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    [ 60, 2322 ], [ 72, 2054 ], [ 80, 44 ]# be either empty or ending with a '/' characterset_dir_from )
    108 114 ,  120 782  ] [ ,310 ] [ 160  ] [180, 206,
    [
    [ 360 84 ] [ 432 36][480, 218 ] [, 18 ],[ 720  ,
    [ 810,      -",.\[$lower*:$bject:"<"tjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
 ]    residue with
    [ 4320, 218 ] m$leq6$thus atotalof$69\682 $unordered pairs  distinctsuch transpositions Lookingat
    [ 8640, 16 ], [ 12960, 120 ]e
[30720, ]  38880  ]  51840, ]  ,32]]
  !gapprompt@=java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  [["  orbit mod m)",593 ] 
    [
[java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 63
    [ "U DecreasingOn stable for <maxeq> ## it if -MD -MP comes after the -MF stuff.  Hmm.
     exceededbound, ]  21948 ] 
    [   $java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    [ "seemingly only finite orbits (long)", ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
    [##   supported by the other compilers which use the 'gcc' depmode.
    [ "seemingly only finite orbits (short)", 4816 ], 
  ["eeminglyonlyorbits ( long"  ,
    [ "seemingly only finite orbits (very long, very ## is deleted, the dependency causes make to die (because there is
    [ "seemingly only finite orbits (very## Some versions of the HPUX 10.20 sed can't process this invocation
    [ "there are infinite orbits which have exponential sphere size growth"
,,
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        10881 ],
    [ "there are infinite   exit 1
        86 ], [ "transitive", 562 ], 
    [ "transitive up     $tat
  
\end{Verbatim}
}



\ubsection\textcolor }L  gapprompt@gap>| !gapinput@LoadDatabaseOfProductsOf2ClassTranspositions();|
\ 6,2, 2 \
77java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
   "  for tmpdepfile in "$tmpde " "tmpdepfile3"
\label{LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions:both databases}
}\hfill{\scriptsize (function)}}\\
urns\java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 the  $
groups generated #
with



 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 25
 .If\{texttt\mdseries\slshape{textunderscore}m}isat least the following components (in
java.lang.StringIndexOutOfBoundsException: Range [14, 10) out of bounds for length 14
\java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
item{textttcts}}]   list all264class transpositions  interchange residue classes
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 137
mods[i][j][k]}. "
\s^^]:$object:""tmpdepfile
,ie texttt(RespectedPartitionGroup(\ymbol{123}[j\symbol{125}
\item{\texttt{izes}]java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
\    t$$based
java.lang.StringIndexOutOfBoundsException: Range [11, 9) out of bounds for length 29
\nd{description}
 p
\begin{Verbatim{oindent}triangleright\\({mdseriesslshape i{LoadDatabaseOfNonbalancedProductsOfClassTranspositions
  
   
  "3CTsGroups9"
  !gapprompt@gap>| !gapinput@AssignGlobals(3CTsGroups9);|
  The following global variables have been assigned:    tmpdepfile1=$dir$base.o.d          # libtool 1.5
 [",","ts",""java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
   " ]
  !gapprompt@gap>| !gapinput@
  2java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  
\{Verbatim
 }

 

\#case exists only to depend  !gapprompt@gap>gapinput@Set(ecNames();
\ # This comment above is used by automake to tell side-effect
\hyperdef{L}{X792C90B48692D0D7}{}
{\noindentdo
label{    [ ( 1(2), 2(4) ), ( 2(4), 1(6) ) ], [ ( 1(2), 0(4) ),  ,
sjava.lang.StringIndexOutOfBoundsException: Range [29, 19) out of bounds for length 34
 (0such c//ar  java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 76
    f"$
  java.lang.StringIndexOutOfBoundsException: Range [48, 42) out of bounds for length 76
  \   allgenerated   thejava.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 98
  (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11



java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74

\item[]
moduli $\leq 6$. 
g{\item[{\texttt{grps4{\textunderscore
\java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
listfi
ttsizes4}] }
\item[java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
echo  \  "depfile"
\item[ f$java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 7
RCWA(\\mathbb ) 
item{grps4\extunderscore3{\reps}  Tentativeconjugacy  representatives fromthe list \texttt{grps4{\textunderscore}3finite} \texttt\hyperdef{L}{X7A489A5D79DA9E5C}{}
"
 Notethat the database    This  discusses  examplesof rcwaand
4\
\begin{Verbatim}[   ackage  orderin which isentirely..In
  
  !gapprompt
  "4CTsGroups6
  !gapprompt@gap>| !gapinputjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  The following global variables have been assigned:
  [ "conjugacyclasses4cts", "cts", "grps4_3finite", "grps4_3finite_reps", 
    "grps4_3finitepos", "mods4", "sizes4", "sizes4pos", "sizes4set" ]
  !gapprompt@gap>| !gapinput@Length(grps4_3finite);|
  140947
  !gapprompt@gap>| !gapinput@Length(sizes4);|
  140947
  !gapprompt@gap>| !gapinput@Size(grps4_3finite[1]);|
  518400
  !gapprompt@gap>| !gapinput@sizes4[1];|
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  !gapprompt@gap>| !gapinput@Maximum(Filtered(sizes4,IsInt));|
  <integer 420...000 (3852 digits)>
  !gapprompt@gap>| !gapinput@Modulus(grps4_3finite[1]);|
  12
  !gapprompt@gap>| !gapinput@mods4[1];|
  12
  !gapprompt@gap>| !gapinput@LengthGraham, cf.{\\{Higman74}   that thegroup 
  7339
  !gapprompt@gap>| !gapinput@Length(Set(mods4));|
  
!@ gapinput4];java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  [ [ 1, 23, 563, 867 ], [ 2, 859 ], [ 3, 622 ], [ 4, 16, 868, 873 ] ]
  !gapprompt@gap>| !gapinput@grps4_3finite[1] = grps4_3finite[23];|
  true
  !gapprompt@gap>| !gapinput@grps4_3finite[4] = grps4_3finite[16];|
  false
  
\end{Verbatim}
 }

 }

  
\section{\textcolor{Chapter }{Databases of rcwa mappings}}\label{sec:DatabasesOfRcwaMappings}
\logpage{[ 6, 3, 0 ]}
\yperdef{L{X78A1A8E587C7FFD5}{}
{
  

\subsection{\textcolor{Chapter }{LoadDatabaseOfProductsOf2ClassTranspositions}}
logpage{[63,1]\
\hyperdef{L}{X843E94467A1BB86C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{LoadDatabaseOfProductsOf2ClassTranspositions({\mdseries\slshape })\index{LoadDatabaseOfProductsOf2ClassTranspositions@\texttt{Load}\-\texttt{Database}\-\texttt{Of}\-\texttt{Products}\-\texttt{Of2}\-\texttt{Class}\-\texttt{Transpositions}}
\label{LoadDatabaseOfProductsOf2ClassTranspositions}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 the name of the variable to which the record containing the database of
products of 2 class transpositions got bound. 



 There are 69 class transpositions which interchange residue classes with
moduli $\leq 6$, thus there is a total of $(69 \cdot 68)/2 = 2346$ unordered pairs of distinct such class transpositions. Looking at
intersection\texttt{\symbol{45}} and subset relations between the 4 involved
residue classes, we can distinguish 17 different ``intersection types'' (or 18, together with the trivial case of equal class transpositions). The
intersection type does not fully determine the cycle structure of the product.
\texttt{\symbol{45}}\texttt{\symbol{45}} In total, we can distinguish 88
different cycle types of products of 2 class transpositions which interchange
residue classes with moduli $\leq 6$. 

 The components of the database record are a list \texttt{CTPairs} of all 2346 pairs of distinct class transpositions which interchange residue
 6$ \{}texttt{ and\textttCTPairProductType  well as data lists \texttt{OrdersMatrix}, \texttt{CTPairsProductClassification}, \texttt{CTPairsProductType}, \texttt{CTProds12} and \texttt{CTProds32}. \texttt{\symbol{45}}\texttt{\symbol{45}} For the description of these
components, see the file \texttt{pkg/rcwa/data/ctproducts/ctprodclass.g}. 
\begin{Verbatim}[commandchars=!@|,ontsize=smallframe,label=Example]
  
  !gapprompt@gap>| !gapinput@LoadDatabaseOfProductsOf2ClassTranspositions();|
  "CTProducts"
  !gapprompt@gap>| !gapinput@Set(RecNames(CTProducts));|
  [ "CTPairIntersectionType", "CTPairProductType", "CTPairs", 
    "CTPairsIntersectionTypes", "CTPairsProductClassification", 
   CTPairsProductType",",","" ]
  !gapprompt@gap>| !gapinput@Length(CTProducts.CTPairs);|
  2346
CListCTProductsCTPairsProductType-l[2);#java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
  [ [ 2, 165 ], [ 3, 255 ], [ 4, 173 ], [ 6, 693 ], [ 10, 2 ], 
    [ 12, 345 ], [ 15, 4 ], [ 20, 10 ], [ 30, 120 ], [ 60, 44 ], 

  
\end{Verbatim}
 }

 

subsection\textcolor }LoadDatabaseOfNonbalancedProductsOfClassTranspositions
\logpage{[ 6, 3, 2 ]}\nobreak
\hyperdef{L}{X85B492697ACC4A54}{}
\{\{java.lang.StringIndexOutOfBoundsException: Range [120, 118) out of bounds for length 343
\label{
}\hfill{\scriptsize (function  modulo of{nobreakspace} we  textttGall 11 transpositions interchangeresidue  modulo
2 or{nobreakspace} 
theofthe   java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
non\texttt{\symbol{45}}balanced products of class transpositions  !appromptgap| gapinput@S:=FilteredL(lassPairs()C)|



 This database contains a list of the 24 pairs of class transpositions which
interchange residue classes withmoduli $ 6$and  productis not ,as well  a list of all
distinct triples of such classtranspositions whose product has coprime
multiplier and divisor. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@LoadDatabaseOfNonbalancedProductsOfClassTranspositions();|
  CTProductsNB
  !gapprompt=@,fontsize\small,ramesingle,abel=GAPjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  [ "PairsOfCTsWhoseProductIsNotBalanced", 
    "TriplesOfCTsWhoseProductHasCoprimeMultiplierAndDivisor" ]
  !gapprompt@gap>| !gapinput@CTProductsNB.PairsOfCTsWhoseProductIsNotBalanced;|
  [ [ ( 1(2), 2(4) ), ( 2(4), 3(6) ) ], [ ( 1(2), 2(4) ), ( 2(4), 5(6) ) ], 
    [ ( 1(2), 2(4) ), ( 2(4), 1(6) ) ], [ ( 1(2), 0(4) ), ( 0(4), 1(6) ) ], 
    [ ( 1(2), 0(4) ), ( 0(4), 3(6) ) ], [ ( 1(2), 0(4) ), ( 0(4), 5(6) ) ], 
    [ ( 0(2), 1(4) ), ( 1(4), 2(6) ) ], [ ( 0(2), 1(4) ), ( 1(4), 4(6) ) ], 
    [ ( 0(2), 1(4) ), ( 1(4), 0(6) ) ], [ ( 0(2), 3(4) ), ( 3(4), 4(6) ) ], 
    [ ( 0(2)
    [ ( 1(2), 2(6) ), ( 3(4), 2(6) ) ], [ ( 1(2), 2(6) ), ( 1(4), 2(6) ) ], 
    [ ( 1(2), 4(6) ), ( 3(4), 4(6) ) ], [ ( 1(2), 4(6) ), ( 1(4), 4(6) ) ], 
    [ ( 1(2), 0(6) ), ( 1(4),                                      elsetau := tau^g3; java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    [ ( 0(2), 1(6) ), ( 2(4), 1(6) ) ], java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 2
    [ ( 0(2), 3(6) ), ( 2(4), 3(6) ) ], [ ( 0(2), 3(6) ), ( 0(4), 3(6) ) ], 
    [ ( 0(2), 5(6) ), ( 2(4), 5(6) ) ], [ ( 0(2), 5(6) ), ( 0(4), 5(6) ) ] 
   ]
  
\end{Verbatim}
 }

 }

  }

       
\chapter{\textcolor{Chapter }{Examples}}\label{ch:Examples}
\logpage{[ java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
\hyperdef{L}{X7A489A5D79DA9E5C}{}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  This chapter discusses a number of examples of rcwa mappings and
\texttt{\symbol{45}}groups in detail. All of   !gapprompt@gap>| !gapinput@ReducingConjugator(C3,,,;java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
the package, and the order in  !gap gapinput@gamma :=h2**h1**h1**1*g2*h2*g4*2*h2;java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
particular they are not ordered by degree of difficulty or interest. 

\{LoadRCWAExamplestextttL}\java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 173
be   gappromptgap>!gapinputct;|
containing the examples got assigned to. The global variable assignments made
\e{erbatim
onding sections.

 The discussions of the examples are typically far from being exhaustive. It is
quite likely that in many java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 2
additional easy commands you can find out interesting things yourself

\section{\textcolor{!@> gapinput@ =ClassTransposition0,x,1,x);;|
\[7,1,0]
hyperdef{}{84A058CF7C65A908}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  Thompson's group V, also known as Higman\texttt{\symbol{45}}Thompson group, is
a finitely presented infinite simple group. This group has been found by
Graham Higman,{Verbatim}
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := Group(List([[  texttt{ssignGlobalsLoadRCWAExamples)HigmanThompson)}in to assign  variables definedin section.}
  !gapprompt@>| !gapinput@                   ClassTransposition));|
  <(0(2),1(4)),(0(4),1(4)),(1(4),2(4)),(2(4),3(4))>
  
\end{Verbatim}
 is java.lang.StringIndexOutOfBoundsException: Range [29, 12) out of bounds for length 82
John P. McDermott. We take  
\begin{Verbatim}[commandchars
  
  gapprompt@>| gapinputClassTransposition0212;|
  !gap|@l:=ClassTransposition12,
  |(n1/3 n 2(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  !gapprompt@gap>| !gapinput@n := ClassTransposition(1,4,2,4);;|
  !gapprompt@gap>| !gapinput@H := Group(k,l,m,n);|
  <02,1(),(1(),(4)(()1(),((),())>
  !gapprompt@gap>| !gapinput@G = H; # k, l, m and n generate G as well|
  true
  
\end{Verbatim}
 Now we verify that our four generators satisfy the relations given on
page{\nobreakspace}50 in{\nobreakspace}\cite{Higman74  
\begin{Verbatim}\end{}
   The cycle  'permutation not completely determined
g@>java.lang.StringIndexOutOfBoundsException: Range [50, 47) out of bounds for length 51
!|!^, l2 ^,n^#
  !gapprompt@>| !gapinput@  l*k*m*k* this permutation into  ,. interchanging
  !gapprompt@>| !gapinput@  k*n*l*k*m*n*k*l*n*m*n*l*n*m,                  # (3)        "|
  !gapprompt@>| !gapinput@  (l*k*m*k*l*n)^3, (m*k*l*k*m*n)^3,             # (4)        "|
  !gapprompt@>| !  !gapprompt@gap>| Collatz CTIntegers;# `Collatz' lies in the simple group CT(Z).|
  !gapprompt@>| !gapinput@  (l*n*m*n)^5,                                  # (6)        "|
  !gapprompt@>| !gapinput@  (l*k*n*k*l*n)^3*k*n*k*(m*k*n*k*m*n)^3*k*n*k*n,# (7)        "|
  !gapprompt@>| !gapinput@  ((l*k*m*n)^2*(m*k*l*n)^2)^3,                  # (8)        "|
  !gapprompt@>| !gapinput@  (l*n*l*k*m*k*m*n*l*n*m*k*m*k)^4,              # (9)        "|
  !gapprompt@>| !gapinput@  (m*n*m*k*l*k*l*n*m*n*l*k*l*k)^4,              #(10)        "|
  !gapprompt@>| !gapinput@  (l*m*k*l*k*m*l*k*n*k)^2,                      #(11)        "|
  !gapprompt@>| !gapinput@  (m*l*k*m*k*l*m*k*n*k)^2 ];                    #(12)        "|
  [ IdentityMapping( Integers ), IdentityMapping( Integers ), 
    IdentityMapping( Integers ), IdentityMapping( Integers ), 
    IdentityMapping( Integers ), IdentityMapping( Integers ), 
    IdentityMapping( Integers ), IdentityMapping( Integers ), 
IdentityMapping(  ,(  ),
    decisions taken during the factoring process: 
    IdentityMapping( Integers ), IdentityMapping( Integers ), 
    IdentityMapping( Integers ), IdentityMapping( Integers ) ]
  
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 14
 We conclude that our group is an homomorphic image of Thompson's group V. But
since Thompson's group V is simple and our group is not trivial, this means
indeed that the two

In  it to that texttt  group texttt{T[]Integers which isgenerated   setset   class transpositions 
residue classes modulo powers of{\nobreakspace}2than{\obreakspace}129: 
2 or{\nobreakspace}4: 
\begin{Verbatim}[commandchars=!@\beginVerbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  ,ClassTransposition,java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
  !@java.lang.StringIndexOutOfBoundsException: Range [58, 41) out of bounds for length 81
  [ ( 0(2), 1(2) ), ( 0(2), 1(4) ), ( 0(2), 3(     ()2  (,())(3,( , )6 ,
    ( 0(4), 2(4) ), (
14)4)  ),(4 ), (4)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  !gapprompt@gap>| !gapinput@IsSubset(G,S);|
  true
  
\end{Verbatim}
 Then we give a function which takes a class transposition $\tau \in {\rm CT}_\emptyset({\ensuremath{\mathbb Z}})$, and which returns a factorization of an element $\gamma$ satisfying $\tau^\gamma \in S$ into $g_1 := \tau_{0(2),1(4)} \in S$, $g_2 := \tau_{0(2),3(4)} \in S$, $g_3 := \tau_{1(2),0(4)} \in S$, $g_4 := \tau_{1(2),2(4)} \in S$, $h_1 := \tau_{0(4),1(4)} \in S$ and $h_2 :=( (36,()((36,()) (236,336 ,
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=GAP code]
  
  ReducingConjugator := function ( tau )
  
    local  w, F, g1, g2, g3, g4, h1, h2, h, cls, cl, r;
  
, (,( , ()
 =0,,) =java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 73
    g3 := ClassTransposition(1,2,0,4);
    g4 := ClassTransposition(1,2,2,4);
  
    F := FreeGroup("g1","g2","g3","g4","h1","h2");
  
    w := One(F); if Mod(tau) <= 4 then return w; (()36   () (  ()1718 ,java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  
    # Before we can reduce the moduli of the interchanged residue classes,
    # we must make sure that both of them have at least modulus 4.
    cls := TransposedClasses(tau);
    if Mod(cls[1]) = 2 then
      if Residue(cls[1]) = 0 then
        if Residue(cls[2]) mod 4 = 1 then tau := tau^g2; w
tau : ^g1;w := w F.1; fi;
      else
        if Residue(cls[2]) mod 4 = 0 then tau := tau^g4; w := w * F.4;
                                     else tau := tau^g3; w := w * F.3; fi;
      fi;
    fi;
  
 (> do # Now we can successively reduce the moduli.
      if not
                    cl -> IsEmpty(Intersection(cl,Support(tau))))
      then
        cls := TransposedClasses(tau);
        h := Filtered([h1,h2],
               hi->Length(Filtered(cls,cl->IsSubset(Support(hi),cl)))=1);
        1;tau: tau^;
        if h = h1 then w := w * F.5; else w := w * F.6; fi;
      fi;
      cl := TransposedClasses(tau)[2]; # class with larger modulus
      r  := Residue(cl);
      if   r mod 4 = 1 then tau := tau^g1; w := w * F.1;
      elif r mod 4 = 3 then tau := tau^g2; w := w * F.2;
      elif r mod 4 = 0 then tau := tau^g3; w := w * F.3;
      elif r mod 4 = 2 then tau := tau^g4; w := w * F.4; fi;
    od;
  
    return w;
  end;
  
\end{Verbatim}
 After assigning \texttt{g1}, \texttt{g2}, \texttt{g3  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@ReducingConjugator(ClassTransposition(3,16,34,256));|
  h2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3
  !gapprompt@gap>| !gapinput@gamma := h2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3;|
  <rcwa permutation of Z with modulus 256>
  !gapprompt@gap>| !gapinput@ct := ClassTransposition(3,16,34,256)^gamma;;|
  !gapprompt@gap>| !gapinput@IsClassTransposition(ct);;|
  !gapprompt@gap>| !gapinput@ct;|
  ClassTransposition(1,4,2,4)
  
\end{Verbatim}
 Thompson's group V can also be embedded in a natural way into CT(GF(2)[x]): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@x := Indeterminate(GF(2));; SetName(x,"x");|
  !gapprompt@gap>| !gapinput@R := PolynomialRing(GF(2),1);;|
  !gapprompt@gap>| !gapinput@k := ClassTransposition(0,x,1,x);;|
  !gapprompt@gap>| !gapinput@l := ClassTransposition(1,x,x,x^2);;|
  !gapprompt@gap>| !gapinput@m := ClassTransposition(0,x,1,x^2);;|
  !gapprompt@gap>| !gapinput@n := ClassTransposition(1,x^2,x,x^2);;|
  !gapprompt@gap>| !gapinput@G := Group(k,l,m,n);|
  <rcwa group over GF(2)[x] with 4 generators>
  
\end{Verbatim}
 The correctness of this representation can likewise be verified by simply
checking the defining relations given above. 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().HigmanThompson);} in order to assign the global variables defined in this section. }

  
t{ } java.lang.StringIndexOutOfBoundsException: Range [48, 40) out of bounds for length 122
\logpage{[ 7, 2, 0 ]}
\hyperdefL}X86}{}
{
  In 1932, Lothar Collatz mentioned in his notebook the following permutation of
the integers: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;A
  !gapprompt@gap>A !gapinput@Display(Collatz);A
  
  Rcwa mapping of Z with modulus 3
  
          /
          | 2n/3     if n in 0(3)
   n |-> <  (4n-1)/3 if n in 1(3)
          | (4n+1)/3 if n in 2(3)
          \
  
  !gapprompt@gap>A !gapinput@ShortCycles(Collatz,[-50..50],50); # There are some finite cycles:A
  [ [ 0 ], [ -1 ], [ 1 ], [ 2, 3 ], [ -2, -3 ], [ 4, 5, 7, 9, 6 ], 
    [ -4, -5, -7, -9, -6 ], 
    [ 44, 59, 79, 105, 70, 93, 62, 83, 111, 74, 99, 66 ], 
    [ -44, -59, -79, -105, -70, -93, -62, -83, -111, -74, -99, -66 ] ]
  
\end{Verbatim}
 The cycle structure of Collatz' permutation has not been completely determined
yet. In particular it is not known whether the cycle
containing{\nobreakspace}8 is finite or infinite. Nevertheless, the
factorization routine included in this package can determine a factorization
   , 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20,21,,26,32, 34, 
two disjoint residue classes: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Collatz in CT(Integers);  # `Collatz' lies in the simple group CT(Z).|

  !gapprompt@gap>| !gapinput@Length(Factorization(Collatz));|
  212
  
\end{Verbatim}
 Setting the Info level of \texttt{InfoRCWA} equal to{\nobreakspace}2 (simply issue \texttt{RCWAInfo(2);}) causes the factorization routine to display detailed information on the
progress of the factoring process. For reasons of saving space, this is not
done in this manual. 

 We would like to get a factorization into fewer factors. Firstly, we try to
factor the inverse \texttt{\symbol{45}}\texttt{\symbol{45}} just like the
various options interpreted by the factorization routine, this has influence
on decisions taken during the factoring process: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Length(Factorization(Collatz^-1));|
  129
  
\end{Verbatim}
 This is already a shorter product, but can still be improved. We remember the \texttt{mKnot}'    [17, ,, 113, 640 , 682 ] 
try to factor both \texttt{mKnot(3)} and \texttt{Collatz/mKnot(3)}, and to look java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 71
than{\nobreakspace}129: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=
  
  !gapprompt@gap>| !gapinput@KnotFacts := Factorization(mKnot(3));;|
  !gapprompt@gap>| !gapinput@QuotFacts := Factorization(Collatz/mKnot(3));;|
  !gapprompt@gap>| !gapinput@List([KnotFacts,QuotFacts],Length);|
  [66, , 133 170,211 271,335 424,542686, 873 10961376,
  !gapprompt@gap>| !gapinput@CollatzFacts := Concatenation(QuotFacts,KnotFacts);|
  [ ( 0(6), 4(6) ), ( 0(6), 5(6) ), ( 0(6), 3(6) ), ( 0(6), 1(6) ), 
    ( 0(6), 2(6) ), ( 2(3), 4(6) ), ( 0(3), 4(6) ), ( 2(3), 1(6) ), 
    ( 0(3), 1(6) ), ( 0(36), 35(36) ), ( 0(36), 22(36) ), 
    ( 0(36), 18(36) ), ( 0(36), 17(36) ), ( 0(36), 14(36) ), 
    ( 0(36), 20(36) ), ( 0(36), 4(36) ), ( 2(36), 8(36) ), 
    ( 2(36), 16(36) ), ( 2(36), 13(36) ), ( 2(36), 9(36) ), 
    ( 2(36), 7(36) ), ( 2(36), 6(36) ), ( 2(36), 3(36) ), 
    ( 2(36), 10(36) ), ( 2(36), 15(36) ), ( 2(36), 12(36) ), 
    ( 2(36), 5(36) ), ( 21(36), 28(36) ), ( 21(36), 33(36) ), 
    ( 21(36), 30(36) ), ( 21(36), 23(36) ), ( 21(36), 34(36) ), 
    ( 21(36), 31(36) ), ( 21(36), 27(36) ), ( 21(36), 25(36) ), 
    ( 21(36), 24(36) ), ( 26(36), 32(36) ), ( 26(36), 29(36) ), 
    ( 10(18), 35(36) ), ( 5(18), 35(36) ), ( 10(18), 17(36) ), 
    ( 5(18), 17(36) ), ( 8(12), 14(24)  !gapprompt> java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 99
    ( 3(9), 17(18) ), ( 0(9), 17(18) 
    ( 0(9), 16(18) ), ( 6(9), 11(18) ), ( 3(9), 11(18) ), ( 0(9), 11(18) ),
(, (,4(18 ) ( 0(), ,( 06),1424 ,
    ( 0(6), 2(24) ), ( 8(12), 17(18) ), ( 7(12), 17(18) ), 
    ( 8(12), 11(18) ), ( 7(12), 11(18) ), PrimeSwitch(3)^-1, 
    ( 7(12), 17(18) ), ( 2(6), 17(18) ), ( 0(3), 17(18) ), 
    PrimeSwitch(3)^-1, PrimeSwitch(3)^-1, PrimeSwitch(3)^-1 ]
  !gapprompt@gap>| !gapinput@Product(CollatzFacts) = Collatz; # Check.|
  true
  
\end{Verbatim}
 The factors \texttt{PrimeSwitch(3)} are products of 6 class transpositions (cf.{\nobreakspace}\texttt{PrimeSwitch} (\ref{PrimeSwitch:p})). 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzlikePerms);} in order to assign the global variables defined in this section.\begin{}[ommandchars|fontsize=,=ingleljava.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 77

  
\section{\textcolor{Chapter }{ The $3n+1$ group }}\label{sec:3nplus1Group}
\logpage{[ 7, 3, 0 ]}
\hyperdef{L}{X811919107D5DAAC1}{}
{
  The [ 12, infinityinfinity,  12]
which the $3n+1$ conjecture holds and which are not divisible by 6: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| ! !gapprompt@>|!@ :=a (;java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  !gapprompt@gap>| !gapinput@b := ClassTransposition(1,3,2,6);;|
  !gapprompt@gap>| !gapinput@c :=   Rcwa permutation of Z with modulus 18, of 12
  !gapprompt@gap>| !java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 2
  <(1(2),4(6)),(1(3),2(6)),(2(3),4(6))>
  !gapprompt@gap>| !gapinput@LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions(  (5(6),3236,1618 
  "
  !gapprompt@gap>| !gapinput@3java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  44132
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
\end{Verbatim}
 To see this, consider the action of $G$ on the ``$3n+1$ tree''. The vertices of this tree are the positive integers for which the $3n+1$ conjecture holds, and for every vertex $n$ there is an edge from $n$ to $T(n)$, where $T$ denotes the Collatz mapping 
  
\[
  T: \ \ \mathbb{Z} \longrightarrow \mathbb{Z}, \ \ \ \
    n \ \longmapsto \
    \begin{cases}
      \frac{n}{2}    & \text{if} \ \ n \ \ \text{is even}, \\
      \frac{3n+1}{2} & \text{if} \ \ n \ \ \text{is odd}
    \end{cases}
  \]

   (cf. Chapter{\nobreakspace}\ref{ch:AboutRCWA}). It is easy to check that for  ( 7(12),11()2236   (8,1036 144),13()
trajectory under $T$ reaches 1 quickly: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Ball(G,1,5,OnPoints);|
  [ 1, 2, 4, 5, 8, 10, 16, 32, 64 ]
  !gapprompt@gap>| !gapinput@Ball(G,1,10,OnPoints);|
  [ 1, 2, 3, 4, 5, 8, 10, 13, 16, 20, 21, 26, 32, 40, 52, 53, 64, 80, 85, 
    128, 160, 170, 256, 320, 340, 341, 512, 1024, 2048 ]
  !gapprompt@gap>| !gapinput@Ball(G,1,15,OnPoints);|
  [ 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20, 21, 22, 23, 26, 32, 34, 
    35, 40, 44, 45, 46, 52, 53, 64, 68, 69, 70, 75, 80, 85, 104, 106, 113, 
    128, 136, 140, 141, 151, 160, 170, 208, 212, 213, 226, 227, 256, 272, 
    ,,301 ,320,340 341 ,452 ,,512 ,
    680, 682, 832, 848, 853, 904, 908, 909, 1024, 1280, 1360, 1364, 1365, 
    1664, 1696, 1706, 1808, 1813, 1816, 2048, 2560, 2720, 2728, 4096, 
    5120, 5440, 5456, n2()
    32768, 65536 ]
  !gapprompt@gap>| !gapinput
  [ [ 1 ], [
    3 20,,21, 128 ] ,java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    [ 26, 160, 170, 1024 ], [ 52, 53, 320, 340, 341, 2048 ], 
    [ 17, 104, 106, 113, 640, 680, 682, 4096 ], 
    [ 34, 35, 208, 212, 213, 226, 227, 1280, 1360
     11 ,,7075, 424,452  
       ], 
    [ 22, 23, 136, 140, 141, 151, 832, 848, 853, 904, 908, 909, 5120, 
        5440, 5456, 5461, 32768 ], 
    [ 7, 44, 45, 46, 272, 277, 280, 301, 302, 1664, 1696, 1706, 1808, 
        1813, 1816, 10240, 10880, 10912, 10922, 65536 ] ]
  !gapprompt@gap>| !gapinput@List(Ball(G,1,\}commandchars|fontsize,frame
  [ 1, 2, 1, 1, 2, 2, 4, 2, 4, 4, 6, 8, 12, 14, 17, 20, 26,   
    66, 81, 104, 133, 170, 211, 271, 335, 424, 542, 686, 873, 1096, 1376, 
    1730, 2205, 2794, 3522, 4429, 5611, 7100, 8978, 11343, 14296, 18058, 
    22828, 28924, 36532, 46146, 58399, 73713 ]
  !gapprompt@gap>| !gapinput@FloatQuotientsList(last);|
  [ 2., 0.5, 1., 2., 1., 2., 0.5, 2., 1., 1.5, 1.33333, 1.5, 1.16667, 
    1.21429, 1.17647, 1.3, 1.23077, 1.34375, 1.2093, 1.26923, 1.22727, 
    1.28395, 1.27885, 1.2782, 1.24118, 1.28436, 1.23616, 1.26567, 1.2783, 
    1.26568, 1.27259, 1.25544, 1.25547, 1.25727, 1.27457, 1.26712, 
    1.26056, 1.25752, 1.26688, 1.26537, 1.26451, 1.26342, 1.26034, 
    1.26315, 1.26415, 1.26704, 1.26303, 1.26317, 1.26553, 1.26223 ]
  !gapprompt@gap>| !gapinput@Difference(Filtered([1..100],n->n mod 6 <> 0),Ball(G,1,40,OnPoints));|
  [ 27, 31, 41, 47, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95, 97 ]
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);;|
  !gapprompt@gap>| !gapinput@List(last2,n->Length(Trajectory(T,n,[1])));|
  [ 71, 68, 70, 67, 72, 69, 69, 66, 74, 71, 71, 60, 68, 68, 76 ]
  
\end{Verbatim}
 It is convenient to define an epimorphism from the free group of rank 3 to $G$: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F := FreeGroup("a","b","c");|
  free groupon the generators[, bc ]>
  !gapprompt@gap>| !gapinput@phi := EpimorphismByGenerators(F,G);|
  [ a, b, c ] -> [ ( 1(2), 4(6) ), ( 1(3), 2(6) ), ( 2(3), 4(6) ) ]
  
\end{Verbatim}
 We can compute balls about 1 in $G$: 
\begin{Verbatim}     2592,1360(13824)170(),32()40(),
  
  !gapprompt@gap>| !gapinput@B := Ball(G,One(G),7:Spheres);;|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 3, 6, 12, 24, 48, 96, 192 ]
          104324), 136(432) ,
  [ 12, infinity, infinity, infinity, java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 68
  !gapprompt@gap>| !gapinput@List(B[3],g->PreImagesRepresentative(phi,g));|
  [ b*a, c*b, c*a, b*c 1744(),218(288)],
  !gapprompt@gap>| !gapinput@g := a*b;[5354,25602592,3824) 7278473728),(9216, 
  !gapprompt@gap>| !gapinput@Display(g);|
  
  Rcwa permutation of Z with modulus 18, of order 12
  
  (  !gapprompt@gap@umList(Flat(cycsrc),cl1(cl));|
  ( 5(6), 32(36), 16(18) )

  
\end{Verbatim}
 Spending some more time to compute \texttt{B := Ball(G,One(G),12:Spheres);;}, one can check that $(ab)^{12}$ is the shortest word in the generators of $G$ which does not represent the identity in the free product of 3 cyclic groups
of order 2, but which represents the identity in $G$. However, the group $G$ has elements of other finite orders as well
t{symbol45}}for  
\begin{Verbatim}[java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 59
  
  !gapprompt@gap>| !gapinput@g := (b*a)^3*b*c;; Order(g);;|
  !gapprompt@gap>| !gapinput@Display(g);|
  
  Rcwa permutation of Z with modulus 36, of order 105
  
  ( 8(9), 16(18), 64(72), 256(288), 85(96), 128(144), 32(36) )
  ( 7(12), 11(18), 22(36) ) ( 5(18), 10(36), 40(144), 13(48), 
    20(72) ) ( 1(24), 2(36), 4(72) ) ( 14(36), 28(72), 112(288), 
    104(324),136(
  
  !gapprompt@gap>| !gapinput@Order(a*c*b*a*b*c*a*c);|
  60
  
\end{Verbatim}
 With some more efforts, one finds that e.        (), () 424432 ][3872 ),304(576 ] 
cycles, like e.g. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@g := b*c;;A
  !gapprompt@gap>A !gapinput@Display(g);A
  
  Rcwa permutation of Z with modulus 12
  
          /
          | 4n  if n in 1(3)
          | 2n  if n in 5(6)
   n |-> <  n/2 if n in 2(12)
          | n/4 if n in 8(12)
          | n   if n in 0(3)
          \
  
  !gapprompt@gap>A !gapinput@Sinks(g);A
  [ 4(12) ]
  !gapprompt@gap>A !gapinput@Trajectory(g,last[1],10);A
  [ 4(12), 16(48), 64(192), 256(768), 1024(3072), 4096(12288), 
    16384(49152), 65536(196608), 262144(786432), 1048576(3145728) ]
  !gapprompt@gap>A !gapinput@Trajectory(g,4,20);A
  [ 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 
    16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, 
    68719476736, 274877906944, 1099511627776 ]
  
\end{Verbatim}
 Others seem to have only finite cycles. Some of these appear to have ``on average'' comparatively ``short'' cycles, like e.g. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@g := a*b*a*c*b*c;|
  <rcwa permutation of Z with modulus 144>
  !gapprompt@gap>| !gapinput@cycs := ShortCycles(g,[0..10000],100,10^20);;|
  !gapprompt@gap>| !gapinput@Difference([0..10000],Union(cycs));|
  [  ]
  !gapprompt@gap>| !gapinput@Collected(List(cycs,Length));|
  [ [ 1, 2222 ], [ 3, 1945 ], [ 4, 1111 ], [ 5, 93 ], [ 6, 926 ], 
  ,  ,10] [,289,[11  ,[ 95 ] 
    [ 13, 1 ], [ 14, 31 ], [ 16, 12 ], [ 18, 4 ], [ 20, 1 ] ]
  
\end{Verbatim}
 If the cycle of $g$ containing some $n \in {\ensuremath{\mathbb Z}}$ is finite and has a certain length $l$, then there is some $m \in {\ensuremath{\mathbb Z}}$ such that for java.lang.StringIndexOutOfBoundsException: Index 181 out of bounds for length 2
\texttt{\symbol{45}}\texttt{\symbol{45}} cf. e.g. Collatz' permutation from
Section{\nobreakspace}\ref{sec:FactoringTheCollatzPermutation}.) Wejava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 |(16-1/3    java.lang.StringIndexOutOfBoundsException: Range [46, 28) out of bounds for length 46
  
  !gapprompt@gap>| !gapinput@cycsrc := ShortResidueClassCycles(g,Mod(g),20);|
  [ [ 0(6) ], [ 3(6), 160(288), 20(36) ], 
    [ 7(18), 352(864), 44(108), 28(72) ], 
    [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], 
    [ 13(18), 640(864), 80(108), 52(72) ], [ 10(36) ], [ 34(36) ], 
    [ 1(54), 64(2592), 8(324), 4(216), 16(1152), 2(144) ], 
    [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), 
        208(2304), 26(288) ], 
    [17(54)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        104(324), 136(432) ], 
    [37(54,1792)224(216,784() 98()] 
    [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), 
        1744(2304), 218(288) ], 
    [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), 
        1706(1728), 320(324), 424(432) ], [ 38
    [ 62(72), 94(108), 496(576) ] ]
  !gapprompt@gap>| !gapinput@List(cycsrc,Length);|
  [ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3 ]
  !gapprompt@gap>| !gapinput@Sum(List(Flat(cycsrc),cl->1/Mod(cl)));|
  97459/110592
  !gapprompt@gap>| !gapinput@Float(last); # about 88% 'coverage'|
  0.881248
  !gapprompt@gap>| !gapinput@cycsrc := ShortResidueClassCycles(g,3*Mod(g),20);|
  [ [ 0(6) ], [ 3(6), 160(288), 20(36) ], 
    [ 7(18), 352(864), 44(108), 28(72) ], 
    [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], 
    [ 13
    [ 1rjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), 
        208(2304), 26(288) ], 
    [ 17(54), 832(2592), 4432(13824), 23632(73728), 2954(9216), 554(1728), 
        104(324), 136(432) ], 
    [ 37(54), 1792(2592), 224(324), 148(216), 784(1152), 98(144) ], 
    [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), 
        1744(2304), 218(288) ], 
    [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), 
        1706(1728), 320(324), 424(432) ], [ 38(72), 58(108), 304(576) ], 
    [ 62(72), 94(108), 496(576) ], 
    [ 23(162), 1120(7776), 5968(41472), 746(5184), 140(972), 184(1296), 
        976(6912), 5200(36864), 650(4608), 122(864) ], 
    [ 35(162), 1696(7776), 9040(41472), 48208(221184), 257104(1179648), 
        32138(147456), 6026(27648), 1130(5184), 212(972), 280(1296) ], 
    [ 73(162), 3520(7776), 440(972), 292(648), 1552(3456), 8272(18432), 
        1034(2304), 194(432) ], 
    [ 77(162), 3712(7776), 19792(41472), 2474(5184), 464(972), 616(1296), 
        3280(6912), 17488(36864), 2186(4608), 410(864) ], 
    [89() 42887776,22864() 121936(),650320() 
        81290(147456), 15242(27648), 2858(5184), 536(972), 712(1296) ], 
    [ 127(162), 6112(7776), 764(972), 508(648), 2704(3456), 14416(18432), 
        1802(2304), 338(432) ], 
    [ 14(216), 22(324), 112(1728), 592(9216), 74(1152) ], 
    [ 86(216), 130(324), 688(1728), 3664(9216), 458(1152) ] ]
  !gapprompt@gap>| !gapinput@List(cycsrc,Length);|
  [ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3, 10, 10, 8, 10, 10, 8, 5, 
    5 ]
  !gapprompt@gap>| !gapinput@Sum(List(Flat(cycsrc),Density));|
  5097073/5308416
  !gapprompt    92, 96, 94 98 97,95 96,93,91 88 9290 ,, , ,105 
  0960187
  
\end{Verbatim}
 There are also some elements of infinite order whose cycles seem to be all
finite, but ``on average'' pretty ``long'' \texttt{\symbol{45}}\texttt{\symbol{45}} e.g. 
\begin{109, 108, 106,  104 101 98 ,96, 94,,92, 89, 87,8485, 
  
  !gapprompt@gap>A !gapinput@g := (b*a*c)^2*a;;A
  !gapprompt@gap>A !gapinput@Display(g);A
  
  Rcwa permutation of Z with modulus 288
  
          /
          | (16n-1)/3   if n in 1(3)
           9n+5/4    if n 3()U24
          | (27n+19)/4  if     114, 115, 119, 118, 116,110,107 108,105,,103,100,104 102,
          106,105,109, 110,114,113, 111 ,,115,113 109, 
          | (n-3)/6     106, 103, 104, 101, 9995,,91 ,92 , 94 93 91,92,96 94 
          | (27n+29)/8  if n in 9(48) U 41(48)
          | (9n+7)/8    if n in 17(48) U 33(48)
          | (2n-7)/9    if n in 8(36)
   
          | (27n+38)/8  if n in 14(48)
          | (3n+2)/8    if n in 26(48)
                   | (9+10/8if n in 38(48)
          | (3n+4)/4    if n in 20(72)
          | n/4         if n in 56(72)
          | (9n+14)/16  if n in 2(96)
          | (27n+58)/16 if n in 50(96)
          | n           if n in 0(6)
          \
  
  !gapprompt@gap>A !gapinput@List([1..100],n->Length(Cycle(g,n)));A
  [ 6, 1, 6, 6, 6, 1, 194, 6, 216, 26, 26, 1, 26, 194, 65, 26, 26, 1, 216, 
    26, 6, 216, 46, 1, 640, 26, 70, 194, 216, 1, 70, 26, 216, 216, 26, 1, 
    194, 216, 73, 26, 110, 1, 194, 216, 194, 111, 39, 1, 194, 640, 640, 
    194, 26, 1, 171, 194, 204, 640, 216, 1, 111, 70, 91, 26, 194, 1, 216, 
    216, 26, 111, 65, 1, 50, 194, 26, 216, 640, 1, 502, 26, 111, 40, 110, 
    1, 26, 194, 385, 640, 88, 1, 100, 111, 65, 110, 416, 1, 171, 194, 194, 
    640 ]
  !gapprompt@gap>A !gapinput@Length(Cycle(g,25));A
  640
  !gapprompt@gap>A !gapinput@Maximum(Cycle(g,25));A
  323270249684063829
  !gapprompt@gap>A !gapinput@Length(Cycle(g,25855));java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 2
  4751
  ![1,3,612, ,6,6, 444 6,6 ,3 ,,0,0,, 0 0 java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
  507359605810239426786254778159924369135184044618585904603866210104085
  !gapprompt@gap>A !gapinput@cycs := ShortCycles(g,[0..50000],10000,10^100);;A
  !gapprompt@gap>A !gapinput@S := [0..50000];;A
  !gapprompt@gap>A !gapinput@for cyc in cycs do S := Difference(S,cyc); od;A
  !gapprompt@gap>A !gapinput@S; # no cycle containing some n in [0..50000] has length > 10000 A
  [  ]
  
\end{Verbatim}
 Taking a look at the lengths of the trajectories of the Collatz mapping $T$ starting at the points in a cycle, we can see how a cycle of $g$ goesthe   the generators yieldinganwith java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
\Verbatimcommandchars!@|,ontsize\mallframe=single,abel]
  
  !gapprompt@gap>| !gapinput@List(java.lang.StringIndexOutOfBoundsException: Range [76, 48) out of bounds for length 76
  17 21, , ,31 ,34, ,33, 37 41 ,44,42 , 43,
    41, 45, 44, 42, 43, 40, 38, 35, 39, 37, 41, 40, 44, 48, 46, 50, 49, 
    47, 48, 45, 42, 46, 44, 48, 47, 45, 46, 50, 49, 47, 43, 41, 38, 39, 
    36, 34, 30, 27, 31, 29, 33, 32, 30, 31, 35, 33, 37, 36, 40, 39, 43, 
    41, 45, 44, 42, 43, 47, 51, 55, 53, 57, 56, 54, 55, 59, 58, 62, 66, 
    64, 68, 67, 65, 66, 63, 60, 64, 62, 66, 65, 63, 64, 68, 67, 65, 61, 
    59, 56, 52, 49, 53, 51, 55, 54, 52, 53, 57, 55,  !gapprompt@> !gapinputS(last
    50, 48, 45, 49, 47, 51, 50, 54, 52, 56, 55, 53, 54, 58, 62, 66, 70, 
    74, 72, 76, 75, 79, 83, 87, 91, 90, 94, 93, 97, 95, 99, 98, 96, 97, 
    94, 91, 88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, 
    90, 94, 98, 97, 101, 105, 109, 107, 111, 110, 108, 109, 113, 117, 115, 
    119, 118, 122, 126, 125, 123, 120, 124, 122, 126, 125, 123, 124, 121, 
    119, 116, 117, 114, 111, 115, 113, 117, 116, 114, 115, 119, 123, 122, 
    120, 117, 121, 119, 123, 122, 120, 121, 118, 116, 112, 110, 106, 103, 
    107, 105, 109, 108, 106, 107, 111, 109, 113, 112, 116, 114, 118, 117, 
    115, 116, 113, 110, 111, 108, 104, 102, 99, 103, 101 obvious   regarding $$remain open.}
    106, 110, 109, 107, 108, 112, 111, 109, 105, 102, 103, 100, 98, 95, 
    92, 96, 94, 98, 97, 95, 96, 93, 91, 88, 92, 90, 94, 93, 97, 101, 105, 
    109, 108, 106, 103, 107, 105, 109, 108, 106, 107, 104, 102, 99, 103, 
    101, 105, 104, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, 
    106, 110, 108, 112, 111, 109, 110, 114, 112, 116, 115, 113, 114, 111, 
    107, 105, 102, 103, 100, 98, 95, 99, 97, 101, 100, 104, 103, 107, 105, 
    109, 108, 106, 107, 104, 101, 98, 99, 96, 94, 91, 92, 89, 87, 84, 85, 
    82, 80, 77, 81, 79, 83, 82, 86, 85, 89, 88, 86, 83, 80, 81, 78, 76, 
    73, 74, 71, 68, 72, 70, 74, 73, 71, 72, 76, 80, 79, 83, 87, 91, 90, 
    88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, 90, 94, 
    92, 96, 95, 93, 94, 98, 96, 100, 99, 97, 98, 102, 106, 110, 114, 113, 
    111, 108, 112, 110, 114, 113, 111, 112, 109, 107, 104, 108, 106, 110, 
    109, 113, 117, 115, 119, 118, 116, 117, 114, 111, 115, 113, 117, 116, 
    114, 115, 119, 118, 116, 112, 110, 107, 108, 105, 103, 100, 104, 102, 
    106, 105, 109, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, 
    106, 103, 104, 101, 99, 95, 91, 88, 92, 90, 94, 93, 91, 92, 96, 94, 
    98, 97, 95, 96, 100, 98, 102, 101, 105, 104, 102, 99, 100, 97, 93, 89, 
    87, 84, 85, 82, 80, 77, 74, 78, 76, 80, 79, 77, 78, 75, 73, 69, 67, 
    64, 68, 66, 70, 69, 73, 71, 75, 74, 72, 73, 70, 67, 68, 65, 63, 60, 
    64, 62, 66, 65, 69, 68, 66, 63, 64, 61, 59, 56, 60, 58, 62, 61, 65, 
    64, 62, 59, 60, 57, 55, 51, 48, 49, 46, 44, 40, 37, 34, 35, 32, 28, 
    26, 23, 27, 25, 29, 28, 32, 30, 34, 33, 31, 32, 36, 35, 33, 29, 26, 
    27, 24, 22, 19, 23, 21, 25, 24, 28, 27, 25, 22, 23, 20, 18, 14, 18, 
    22, 20, 24, 23, 21, 22, 19, 16, 20, 18, 22, 21, 19, 20, 24, 23, 21, 
    17, 15, 17, 15, 19, 18, 16 ]
  !gapprompt@gap>| !gapinput@lngs := List(Cycle(g,25855),n->Length(Trajectory(T,n,[1])));;|
  !gapprompt@gap>| !gapinput@Minimum(lngs);|
  55
  !gapprompt@gap>| !gapinput@Maximum(lngs);|
  521
  !gapprompt@gap>| !gapinput@Position(lngs,55);|
  15
  !gapprompt@gap>  gapprompt@gap>| !gapinput@c := ClassTransposition(1,4,0,6);;|
  2807
  
\end{Verbatim}
 Finally let's have a look at elements of $G$ with small modulus: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@B := RestrictedBall(G,One(G),20,36:Spheres);;|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Sum(last);|
  70
  !gapprompt@gap>| !gapinput@Position(last2,0)-2;|
  14
  
\end{Verbatim}
 So we have 70 elements of modulus 36 or less in $G$ which can be reached from the identity by successive multiplication with
generators without passing elements with mudulus exceeding 36. Further we see
that the longest word in the generators yielding an element with modulus at
most 36 has length{\nobreakspace}14. Now we double our bound on the modulus: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@B := RestrictedBall(G,One(G),100,72:Spheres);;|
  !gapprompt@gap>| !gapinput@List(B,Length);|
  [ 1, 3, 6, 12, 22, 14, 18, 22, 24, 26, 26, 34, 35, 32, 37, 38, 46, 58, 
    65, 73, 82, 91, 93, 96, 110, 121, 114, 117, 146, 138, 148, 168, 174, 
    196, 215, 214, 232, 255, 280, 305, 315, 359, 377, 371, 363, 366, 397, 
    419, 401, 405, 405, 401, 407, 415, 435, 424, 401, 359, 338, 330, 332, 
    281, 278, 271, 269, 254, 255, 257, 258, 258, 233, 215, 202, 185, 154, 
    121, 88, 55, 35, 20, 10, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0 ]
  !gapprompt@gap>| !gapinput@Sum(last);|
  15614
  !gapprompt@gap>| !gapinput@Position(last2,0)-2;|
  83
  !gapprompt@gap>| !gapinput@Collected(List(Flat(B),Modulus));|
  [ [ 1, 1 ], [ 6, 3 ], [ 12, 4 ], [ 18, 2 ], [ 24, 4 ], [ 36, 56 ], 
    [ 48, 4 ], [ 72, 15540 ] ]
  
\end{Verbatim}
 We observe that there are 15540 elements in $G$ with modulus 72 which are ``reachable'' from the identity by successive multiplication with java.lang.StringIndexOutOfBoundsException: Index 149 out of bounds for length 77
elements with mudulus exceeding 72. Further we see that the longest word in
thegenerators yielding an element with modulus at most 72 has
length{\nobreakspace}83. 

 It is obvious that many questions regarding the group $G$ remain open. }

  
\section{\textcolor{Chapter }{ A group with huge finite orbits }}\label{sec:GroupWithHugeFiniteOrbits}
\logpage{[ 7, 4, 0 ]}
\hyperdef{L}{X7DCFDC797FF213C5}{}
{
  In this section we investigate a group which has huge finite orbits on
{\ensuremath{\mathbb Z}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@a := ClassTransposition(0,2,1,2);;|
  !gapinputb : ClassTransposition(0,5,4,5);;|
  !gapprompt@gap>| !gapinput@c := ClassTransposition(1,4,0,6);;|
  !gapprompt@gap>| !gapinput@G := Group(a,b,c);|
  <(0(2),1(2)),(0(5),4(5)),(1(4),0(6))>
  !gapprompt@gap>| !gapinput@LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();|
  "3CTsGroups6"
  !gap>| !gapinput@3TsGroups6.Id3CTsGroup(G3CTsGroups6.grps) catalogue number' of G|
  1284
  
\end{Verbatim}
 We look for orbits of length at most 100 containing an integer in the range \texttt{[0..1000]}: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@orbs := ShortOrbits(G,[0..1000],100);;|
  !gapprompt@gap>| !gapinput@List(orbs,Length);|
  [ 16, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, 40, 2, 8, 24, 2, 
    ,2,2 ,2 24,8,2,562 2 2,8 2,8 2 2 8 2,,2,22 
    24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 
    2, 2, 2, 2, 8, 24, 2, 8, 2, 2, 8, 2, 24, 8, 2, 2, 2, 2, 8, 2, 8, 2, 2, 
    8, 2, 8, 2, 2, 2, 24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2 ]
  !gapprompt@gap>| !gapinput@Collected(last);|
  [ [ 2, 67 ], [ 8, 32 ], [ 16, 1 ], [ 24, 9 ], [ 40, 1 ], [ 56, 1 ] ]
  !gapprompt@gap>| !gapinput@Length(Difference([0..1000],Union(orbs)));|
  491
  
\end{Verbatim}
 So almost half of the integers in the range \texttt{[0..1000]} lie in orbits of length larger than 100. In fact there are much larger orbits.
For example: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@B := Ball(G,32,500,OnPoints:Spheres);; # compute ball about 32|
  !gapprompt@gap>| !gapinput@Position(B,[]); # <> fail -> we have exhausted the orbit|
  354
  !gapprompt@gap>| !gapinput@Sum(List(B,Length)); # the orbit length|
  6296
  gapprompt@gap> gapinputMaximum(FlatB)#the integerinthe 
  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  !gapprompt@gap>| !gapinput@B := Ball(G,736,5000,OnPoints:Spheres);; # the same for 736 ...|
  !gapprompt@gap>| !gapinput@Position(B,[]);|
  2997
  !gapprompt@gap>| !gapinput@Sum(List(B,Length)); # the orbit length for this time|
  495448
  !gapprompt@gap>| !gapinput@Maximum(Flat(B));|
  2461374276522713949036151811903149785690151467356354652860276957152301465\
  0546360696627187194849439881973442451686685024708652634593861146709752378\
  847078493406287854573381920553713155967741550498839
  
\end{Verbatim}
 It that cycles of a$completely all  of $, the exceptionofthe orbit  0 's checkthisin theabove
examplesn =736:after50000 steps,the iteratehas 157 .
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame  n =736:after 100000 steps,theiterate has 135binary digits.
  
  !gapprompt  n=736:after 200000 steps, the iterate has 507 binary digits.
  !gapprompt@gap>A !gapinput@Display(g);A
  
  Rcwa permutation of Z with modulus 60
  
          /
          | n-1       if n in 3(30) U 9(30) U 17(30) U 23(30) U 27(30) U 
          |                   29(30)
          | 3n/2      if n in 0(20) U 12(20) U 16(20)
          | n+1       if n in 2(20) U 6(20) U 10(20)
          | (2n+1)/3  if n in 7(30) U 13(30) U 19(30)
          | n+3       if n in 1(30) U 11(30)
   n -   5if nin1530)U(30java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
          | (3n+12)/2 if n in 4(20)
           (3n-12)/ if nin 8(0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
          | n+5       if n in 14(20)
                 n ()
n5(30java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
          | (2n+9)/3  if n in 21(30)
          \
  
  !gapprompt@gap>A !gapinput@Length(Cycle(g,32));A
  6296
  !gapprompt@gap>A !gapinput@Length(Cycle(g,736));A
  495448
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 2
end{erbatim}
 Representatives and lengths of the cycles of $g$ which intersect nontrivially with the range \texttt{[0..1000]} are as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@CycleRepresentativesAndLengths(g,[0..1000]:notify:=50000);|
    [ 652, 8 ],[ 656  , ,2][676  ,  
  n = 736: after 100000 steps, the iterate has 135 binary digits.
  n = 736: after 150000 steps, the iterate has 131 binary digits.
  n = 722 2 , [736 495448 ,[742 2 ] [ 746  , ,1272 ,
  n = 736: after 250000 steps, the iterate has 414 binary digits.
  n = 736: after 300000 steps, the iterate has 457 binary digits.
  n = 736: after 350000 steps, the iterate has 465 binary digits.
  n = 736: after 400000 steps, the iterate has 325 binary digits.
  n = 736: after 450000 steps, the iterate has 534 binary digits.
  n = 896 after 50000 steps, the iterate has 359binary digits.
  n = 896: after 100000 steps, the iterate has 206 binary digits.
  [ [ 1, 15 ], [ 2, 2 ], [ 16, 24 ], [ 22, 2 ], [ 26, 2 ], [ 32, 6296 ], 
    [ 46, 2 ], [ 52, 8 ], [ 56, 296 ], [ 62, 2 ], [ 76, 8 ], [ 82, 2 ], 
    [ 86, 2 ], [ 92, 8 ], [ 106, 2 ], [ 112, 104 ], [ 116, 8 ], 
    [ 122, 2 ], [ 136, 440 ], [ 142, 2 ], [ 146, 2 ], [ 152, 40 ], 
[166,2] [172  ,[176  ][182,2],[196,8]java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
    [ 202, 2 ], [ 206, 2 ], [ 212, 8 ], [ 226, 2 ], [ 232, 24 ], 
    [ 236, 8 ], [ 242, 2 ], [ 256, 56 ], [ 262, 2 ], [ 266, 2 ], 
    [ 272, 408 ], [ 286, 2 ], [ 292, 8 ], [ 296, 104 ], [ 302, 2 ], 
    [ 316, 8 ], [ 322, 2 ], [ 326, 2 ], [ 332, 8 ], [ 346, 2 ], 
    [ 352, 264 ], [ 356, 8 ], [ 362, 2 ], [ 376, 1304 ], [ 382, 2 ], 
    [ 386, 2 ], [ 392, 24 ], [ 406, 2 ], [ 412, 8 ], [ 416, 200 ], 
    [ 422, 2 ], [ 436, 8 ], [ 442, 2 ], [ 446, 2 ], [ 452, 8 ], 
    [ 466, 2 ], [ 472, 104 ], [ 476, 8 ], [ 482, 2 ], [ 496, 24 ], 
    [ 502, 2 ], [ 506, 2 ], [ 512, 696 ], [ 526, 2 ], [ 532, 8 ], 
    [ 536, 3912 ], [ 542, 2 ], [ 556, 8 ], [ 562, 2 ], [ 566, 2 ], 
    [ 572, 8 ], [ 586, 2 ], [ 592, 888 ], [ 596, 8 ], [ 602, 2 ], 
    [616, 728 ] [622 2] [ 626, 2  ,[632, 2776 ]  646,2 ] 
    [ 652, 8 ], [ 656, 24 ], [ 662, 2 ], [ 676, 8 ], [ 682, 2 ], 
    [ 686, 2 ], [ 692, 8 ], [ 706, 2 ], [ 712, 24 ], [ 716, 8 ], 
    [ 722, 2 ], [ 736, 495448 ], [ 742, 2 ], [ 746, 2 ], [ 752, 1272 ], 
    [ 766, 2 ], [ 772, 8 ], [ 776, 376 ], [ 782, 2 ], [ 796, 8 ], 
    [ 802, 2 ], [ 806, 2 ], [ 812, 8 ], [ 826, 2 ], [ 832,   
    [ 836, 8 ], [ 842, 2 ], [ 856, 2264 ], [ 862, 2 ], [ 866, 2 ], 
    [ 872, 24 ], [ 886, 2 ], [ 892, 8 ], [ 896, 132760 ], [ 902, 2 ], 
    [ 916, 8 ], [ 922, 2 ], [ 926, 2 ], [ 932, 8 ], [ 946, 2 ], 
    [ 952, 456 ], [ 956, 8 ], [ 962, 2 ], [ 976, 24 ], [ 982, 2 ], 
    [ 986, 2 ], [ 992, 1064 ] ]
  
\end{Verbatim}
 So far the author has checked that all positive integers less than 173176 lie
in finite cycles of $g$. Several of them are longer than 1000000, and the cycle containing 25952 has
length 245719352. Whether the cycle containing 173176 is finite or infinite
has not been checked so far \texttt{\symbol{45}}\texttt{\symbol{45}} in any
case it is longer than 5700000000, and it exceeds $10^{40000}$. Presumably it is finite as well, but checking this may require a lot of
computing time. 

 On the one hand the cycles of $g$ seem to behave ``randomly'', perhaps as if they would ascend or descendbegin{cjava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 77
certain factor depending on which side a thrown coin falls on.
\texttt{\symbol{45}}\texttt{\symbol{45}} In this ``model'', cycles would be finite with probability 1 since the simple random walk on
{\ensuremath{\mathbb Z}} is recurrent. On the other, there seems to be quite
some structure on them, however little is known so far. 

 First gappromptgap| g@ : ListCycle(h,33,Position(cycle_g,);java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
those shown here): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@h := a*b*c*a*c*b;|
  <rcwa permutation of Z with modulus 360>
  ! !{1.];

  6293 5 15,17 19 ,6261,6263,6265,21 23,25,41,6227 

  
\end{Verbatim}
 One cycle seems to contain the points at the odd positions and the other seems
to contain the points at the even positions in the cycle of $g$: 
begin{}[=!|fontsize=,frame,Example]
  
  !gapprompt@gap>| !gapinput@cycle_g := Cycle(g,32);;|
  !gapprompt@gap>| !gapinput@positions1 := List(Cycle(h,32),n->Position(cycle_g,n));;|
  !gapprompt@gap>| !gapinput@Collected(positions1 mod 2);|
  [ [ 1, 3148 ] ]
  !gapprompt@gap>| !gapinput@positions2 := List(Cycle(h,33),n->Position(cycle_g,n));;|
  !gapprompt@gap>| !gapinput@Collected(positions2 mod 2);|
  [ [ 0, 3148 ] ]
  
\end{Verbatim}
 However,2165 2167,,2171,2175,2177, 2173,2179,2185 2187 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@positions1{[1..200]};|
  [ 1, 6271, 6291, 6281, 6285, 6287, 6283, 6289, 6273, 6275, 6277, 6279, 
    6293, 5, 15, 17, 19, 6259, 6261, 6263, 6265, 21, 23, 25, 41, 6227, 
    6229, 6231, 6233, 6235, 6237, 6239, 43, 53, 55, 57, 63, 59, 61, 65, 
    45, 47, 49, 51, 67, 6223, 6221, 69, 6163, 6215, 6205, 6209, 6211, 
    6207, 6213, 6165, 6171, 6177, 6179, 6181, 6183, 6175, 6173, 6185, 
    6189, 6191, 6187, 6193, 6169, 6167, 6195, 6199, 6201, 6197, 6203, 
    6217, 73, 83, 85, 87, 103, 113, 115, 117, 4357, 4361, 4363, 4359, 
    4365, 4371, 4373, 4375, 4377, 4369, 4367, 4379, 119, 121, 123, 125, 
    129, 131I this, we like  show  $G by thetwopermutations
    155, 159, 161, 157, 163, 169, 175, 4283, 4281, 177, 4271, 4273, 4275, 
    4277, 181, 4255, 4257, 4259, 4261, 4263, 4265, 4267, 183, 2161, 2163, 
    4195, 4199, 4201, 4197, 4203, 4209, 4211, 4213, 4215, 4207, 4205, 
    4217, 2165, 2167, 2169, 2171, 2175, 2177, 2173, 2179, 2185, 2187, 
    2189, 2191, 2183, 2181, 2193, 2195, 2197, 2199, 2201, 2467, 2469, 
    4117, 4121, 4123, 4119, 4125, 4131, 4133, 4135, 4137, 4129, 4127, 
    4139, 2471, 2473, 2475, 2477, 2487, 2489, 2491, 2507, 2517, 2519, 
    2521, 2537, 3923, 3925, 3941, 3943 ]
  
\end{Verbatim}
 }

  
\section{\textcolor{Chapter }{ A group which acts 4\texttt{\symbol{45}}transitively on the positive integers }}\label{sec:FourTransitiveGroup}
\logpage{[ 7, 5, 0 ]}
\hyperdef{L}{X7968C1DF7EF0BD8E}{}
{
 ,    java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 94
b{[commandchars@|fontsize=\mall,frame=singlelabel=Example]
  
  !gapprompt@gap>| !gapinput@a := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);;|
  !gapprompt@gap>| !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;|
  !gapprompt@gap>| !gapinput@SetName(a,"a"); SetName(u,"u") 12,0)05  2), () ]
  
\end{Verbatim}
 which we have already investigated in earlier java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 70
4\texttt{\symbol{45}}transitively on the set of positive integers. Obviously,
it acts on the set of positive integers. First we show that this action is
transitive. We start by checking in which residue classes sufficiently large
positive integers are mapped to smaller ones by a suitable group element: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List([a,a^-1,u,u^-1],DecreasingOn);|
[ 1(2), 0(3), 0(5) U 2(5), 2(3) ]
  !gapprompt@gap>| !gapinput@Union(last);|
  Z \ 4(30) U 16(30) U 28(30)
  
\end{Verbatim}
 We see that we cannot always choose such a group element from the set of
generators and their inverses \texttt{\symbol{45}}\texttt{\symbol{45}}
otherwise the union would be \texttt{Integers}. 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  
  @gap>Agapinput|List([a,^1uu-1,a2a-,u2u-],DecreasingOn);A
  [ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), 
    ()U()U17(25)  2025,2( ( U () ]
  @gapprompt|gap>A @gapinput|Union(last); # Still not enough ...A
  Z \ 4(90) U 58(90) U 76(90)
  @gapprompt|gap>A @gapinput|List([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a
  @gapprompt|>A @ Thus this upper bound thisupper bound is 56. he rest iseasy
  [ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), 
    0(25) Ulessorequal {nobreakspace56:
    3(5) U 0(10) U 7(20) U 9(20), 0(5) U 2(5), 2(3), 3(9) U 4(9) U 8(9) ]
  @gapprompt|gap>A @gapinput|Union(last); # ... but that's it!A
  Integers
  
\end{Verbatim}
 Finally, we have to deal with ``small'' integers. We use the notation for the coefficients of rcwa mappings introduced
at the beginning of this manual. Let $c_{r(m)} > a_{r(m)}$. Then we easily see that $(a_{r(m)}n+b_{r(m)})/c_{r(m)} > n$ implies $n < b_{r(m)}/(c_{r(m)}-a_{r(m)})$. Thus we can restrict our considerations to integers $n < b_{\rm max}$, where $b_{\rm max}$ is the largest second entry of a coefficient triple of one of the group
elements in our list: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a,(a*u)^-1,(u* transitivityof  G  the integers.start  allproductsofat  5
  !gapprompt@>| !gapinput@        f->Maximum(List(Coefficients(f),c->c[2])));|
  [ 1, 1, 4, 2, 7, 7, 56, 28, 25, 17, 17, 11 ]
  !gapprompt@gap>| !gapinput@Maximum(last);|
  56
  
\end{Verbatim}
 Thus this upper  gapprompt@|!gapinput@Length(tups);|
\texttt{\symbol{45}}\texttt{\symbol{45}} all we have to do is to check that
the orbit containing !gappromptjava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
less than or 
bel=Example]
  
  !gapprompt@gap>| !gapinput@S := [1];;|
  !gapprompt@gap>| !gapinput@while not IsSubset(S,[1..56]) do|
  !gapprompt@>| !gapinput@     S := java.lang.StringIndexOutOfBoundsException: Range [71, 42) out of bounds for length 71
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@IsSubset(S,[1..56]);|
  true
  
\end{Verbatim}
 Checking 2\texttt{\symbol{45}}transitivity is computationally harder, and in
the sequel we will omit some steps which are in practice needed to find out ``what{\nobreakspace}to{\nobreakspace}do''. The approach taken here is java.lang.StringIndexOutOfBoundsException: Range [0, 149) out of bounds for length 71
in{\nobreakspace}$G$ acts transitively on the set of positive integers greater
than{\nobreakspace}1. We do this by similar means as used above for showing
the transitivity of the action of $G$ on the positive integers. We start by determining all products of at most 5
generators and their inverses, which stabilize{\nobreakspace}1 (taking at most
4\texttt{\symbol{45}}generator products would not suffice!): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@gens := [a,u,a^-1,u^-1];;|
  !gapprompt@gap>| !gapinput@tups := Concatenation(List([1..5],k->Tuples([1..4],k)));;|
  !gapprompt@gap>| !gapinput@Length(tups);|
  1364
  !gapprompt@gap>| !gapinput@tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],|
  !gapprompt@>| !gapinput@                                     l->PositionSublist(tup,l)=fail));;|
  !gapprompt@gap>| !gapinput@Length(tups);|
  484
  !gapprompt@gap>| !gapinput@stab := [];;|
  !gapprompt@gap>| !gapinput@for tup in tups do|
  !gapprompt@>| !gapinput@     n := 1;|
  !gapprompt@>| !gapinput@     for i in tup do n := n^gens[i]; od;|
  !gapprompt@>| !gapinput@     if n = 1 then Add(stab,tup); fi;|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@Length(stab);|
  118
  !gapprompt@gap>| !gapinput@stabelm := List(stab,tup->Product(List(tup,i->gens[i])));;|
  !gapprompt@gap>| !gapinput@ForAll(stabelm,elm->1^elm=1); # Check.|
  true
  
\end{Verbatim}
 The resulting products have various different not quite small moduli: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List(stabelm,Modulus);|
  [ 4, 3, 16, 25, 9, 81, 64, 100, 108, 100, 25, 75, 27, 243, 324, 243, 
    256, 400, 144, 400, 100, 432, 324, 400, 80, 400, 625, 25, 75, 135, 
    150, 75, 225, 81, 729, 486, 729, 144, 144, 81, 729, 1296, 729, 6561, 
    1024, 1600, 192, 1600, 400, 576, 432, 1600, 320, 1600, 2500, 100, 100, 
    180, 192, 192, 108, 972, 1728, 972, 8748, 1600, 400, 320, 80, 1600, 
    2500, 300, 2500, 625, 625, 75, 675, 75, 75, 135, 405, 600, 120, 600, 
    1875, 75, 225, 405, 225, 225, 675, 243, 2187, 729, 2187, 216, 216, 
    243, 2187, 1944, 2187, 19683, 576, 144, 576, 432, 81, 81, 729, 2187, 
    5184, 324, 8748, 243, 2187, 19683, 26244, 19683 ]
  !gapprompt@gap>| !gapinput@Lcm(last);|
  12597120000
  !gapprompt@gap>| !gapinput@Collected(Factors(last));|
  [ [ 2, 10 ], [ 3, 9 ], [ 5, 4 ] ]
  
\end{Verbatim}
 Similar as before, we determine for any of the above mappings the residue
classes whose elements larger than the largest $b_{r(m)}$ \texttt{\symbol{45}} coefficient of the respective mapping are mapped to
smaller integers: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@decs := List(stabelm,DecreasingOn);;|
  !gapprompt@gap>| !gapinput@List(decs,Modulus);|
  [ 2, 3, 8, 25, 9, 9, 16, 100, 12, 50, 25, 75, 27, 81, 54, 81, 64, 400, 
    48, 200, 100, 72, 108, 400, 80, 200, 625, 25, 75, 45, 75, 75, 225, 81, 
    243, 81, 243, 144, 144, 81, 243, 216, 243, 243, 128, 1600, 64, 400, 
    400, 48, 144, 1600, 320, 400, 2500, 100, 100, 60, 96, 192, 108, 324, 
    144, 324, 972, 400, 400, 80, 80, 400, 2500, 100, 1250, 625, 625, 25, 
    75, 75, 75, 45, 135, 600, 120, 150, 1875, 75, 225, 135, 225, 225, 675, 
    243, 729, 243, 729, 108, 216, 243, 729, 162, 729, 2187, 144, 144, 144, 
    144, 81, 81, 243, 729, 1296, 324, 972, 243, 729, 2187, 1458, 2187 ]
  !gapprompt@gap>| !gapinput@Lcm(last);|
  174960000
  
\end{Verbatim}
 Since the least common multiple of the moduli of these unions of residue
classes is as large as 174960000, directly forming their union and checking
whether it is equal to the set of integers would take relatively much time and
memory. However, starting with the set of integers and subtracting the above
sets one\texttt{\symbol{45}}by\texttt{\symbol{45}}one in a suitably chosen
order is cheap: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@SortParallel(decs,stabelm,|
  !gapprompt@>| !gapinput@     function(S1,S2)|
  !gapprompt@>| !gapinput@       return First([1..100],k->Factorial(k) mod Modulus(S1)=0)|
  !gapprompt@>| !gapinput@            < First([1..100],k->Factorial(k) mod Modulus(S2)=0);|
  !gapprompt@>| !gapinput
  !gapprompt@gap>| !gapinput@S := Integers;;|
  !|!apinputfor i in [1..Length(decs)] do|
  !gapprompt@>| !gapinput@     S_old := S; S := Difference(S,decs[i]);|
  !gapprompt@>| !gapinput@     if S <> S_old then ViewObj(S); Print\nd{}
  !gapprompt@>| !gapinput@     if S = [] then maxind := i; break; fi;|
  !gapprompt@>| !gapinput@   od;|
  (
  2(6) U 4(6)
  <union of 19 residue classes (mod 60) (6 classes)>
  <union of 8 residue classes (mod 30)>
  <union of 120 residue classes  <nion of23 m 5760)
  <union of 112 residue classes (mod 720)>
  <union of 80 residue classes (mod 720)>
  <union of 24 residue classes (mod 720)>
  <union of 16 residue classes (mod 720) (12 classes)>
  <union of 8 residue classes (mod 720)>
  <union of 6 residue classes (mod 720)>
  4(720) U 94(720) U   << 50  ( )
  <union of 24 residue classes (mod 5760)>
  <union of 72 residue classes (mod 51840)>
  <union of 48 residue classes (mod 51840)>
  <union of 204 residue classes (mod 259200)>
  <union of 144 residue classes (mod 259200)>
  <union of 120 residue classes (mod 259200)>
  <union of 84 residue classes (mod 259200)>
  <union of 72 residue classes (mod 259200)>
  <union of 48 residue classes (mod 259200)>
  <union of 24 residue classes (mod 259200)>
  <union of 12 residue classes (mod 259200) (6 classes)>
  <union of 30 residue classes (mod 777600)>
  54004(64800) U 151204(259200) U 216004(259200)
  [  ]
  
\end{Verbatim}
 Similar as above, it remains to check that the ``small'' integers all lie in the orbit containing{\nobreakspace}2. Obviously, it is
sufficient to check that any integer greater than{\nobreakspace}2 is mapped to
a smaller one by some suitably !gapprompt@>| !gapinput@     l := 123;java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
consideration 
\begin{Verbatim}[commandchars=!@|, !gapprompt@| g
  
  !gapprompt@gap>| !gapinput@Maximum(List(stabelm{[1..maxind]},|
  !gapprompt@>| !gapinput@                f->Maximum(List(Coefficients(f),c->c[2]))));|
  6581
  !gapprompt@gap>| !gapinput@Filtered([3..6581],n->Minimumg> gapinputj stab[]do
  [ 4 ]
  
\end{Verbatim}
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 32
\| gapinput     ifelm >fail thenAdd(tabelmelm); fi|
  
  !g>|!1^uu2*^1)|
  1
  !gapprompt@gap>| !gapinput@4^(u*a*u^2*a^-1*u);|
  3
  
\end{Verbatim}
 Now we know that any positive integer greater than{\nobreakspace}1 lies in the

in{\nobreakspace}$G$ as{\nobreakspace}2, thus that this stabilizer!apprompt@| gapinput             [.100,k>Factorial()mod ModulusS2  0;|
2texttt\symbol{45}ofthe  G }\nsuremath\java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 98

 In the following, we essentially repeat the above steps to show that this
action is indeed 3\texttt{\symbol{45}}transitive: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@tups := Concatenation(List([1..6],k->Tuples([1..4],k)));;|
  !gapprompt@gap>| !gapinput@tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],|
  !gapprompt@>| !gapinput@                                     l->PositionSublist(tup,l)=fail));;|
  !gapprompt@gap>| !gapinput@stab := [];;|
  !gapprompt@gap>| !gapinput@for tup in tups do|
  !gapprompt@>| !gapinput@     l := [1,2];|
  !gapprompt@>| !gapinput@     for i in tup do l := List(l,n->n^gens[i]); od;|
  !gapprompt@>| !gapinput@     if l = [1,2] then Add(stab,java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 41
  !gapprompt@< ofof classesmod 576 7 classes)
  !gapprompt@gap>| !gapinput@Length(stab);|
  212
  !gapprompt@gap>| !gapinput@stabelm := List(stab,tup->Product(List(tup,i->gens[i])));;|
  !gapprompt@gap>| !gapinput@decs := List(stabelm,DecreasingOn)< of120   )
  !gapprompt@gap>| !gapinput@SortParallel(decs,stabelm,function(S1,S2)|
  !gapprompt@>| !gapinput@     return First([1..100],k->Factorial(k) mod Mod(S1)=0)|
  !gapprompt@>| !gapinput@          < First([1..100],k->Factorial(k) mod Mod(S2)=0); end);|
  !gapprompt@gap>| !gapinput@S := Integers;;|
  !gapprompt@gap>| !gapinput@for i in [1..Length(decs)] do|
  !gapprompt@>| !gapinput@     S_old :=  92residue (mod)>
  !apprompt@|!gapinput@if <> S_old thenViewObj()Print(")fi;|
  !gapprompt@>| !gapinput@     if S = [] then break; fi;|
  !gapprompt@>| !gapinput@   od;|
  Z \ 1(8) U 7(8)
  <union of 424 residue classes (mod 720)>
  <union of 169 residue classes (mod 720)>
  <union of 51 residue classes (mod 720)>
  <union of 45 residue classes (mod 720)>
  <union of 42 residue classes (mod 720)>
  <union of 35 residue classes (mod 720)>
  <union of 30 residue classes (mod 720)>
  <union of 16 residue classes (mod 720) (10 classes)>
  <union of 11 residue classes (mod 720) (7 classes)>
  <union of 8 residue classes (mod 720) (6 classes)>
  148(360) U 238(360) U 4(720) U 454(720)
  ( )U  720)
  <union of 28 residue classes (mod 5760)>
  <union of 24 residue classes (mod 5760)>
  <union of 23 residue classes (mod 5760)>
  <union of 22 residue classes (mod 5760)>
  <union of 20 residue classes (mod 5760) (14 classes)>
  <union of 19 residue classes (mod 5760) (14 classes)>
  <union of 16 residue classes (mod 5760) (12 classes)>
  <union of 112 residue classes (mod 51840)>
  <union of 96 residue classes (mod 51840)>
  << 90  (51840))>
  <union of 51 residue classes (mod 51840)>
  <union of 21 residue classes (mod 51840)>
  <union java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  <union of 16 residue classes (mod 51840) (12 classes)>
java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
  
  <java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  <java.lang.StringIndexOutOfBoundsException: Range [2, 8) out of bounds for length 6
  <union of 35 residue classes (mod 259200)>
  <union of 32 residue classes (mod 259200)>
  <union of 24 residue classes (mod 259200)>
  <union of 22 residue classes (mod 259200)>
  <union of 20 residue classes (mod 259200) (16 classes)>
  <union of 18 residue classes (mod 259200) (15 classes)>
  <union of 16 residue classes (mod 259200) (13 classes)>
  <union of 15 residue classes (mod 259200) (12 classes)>
  <union of 12 residue classes (mod 259200) (10 classes)>
  <union of 7 residue classes (mod 259200)>
  2164(259200) U 66964(259200) U 228964(259200)
  [  ]
  !gapprompt@gap>| !gapinput@Maximum(List(stabelm,f->Maximum(List(Coefficients(f),c->c[2]))));|
  515816
  !gapprompt@gap>| !gapinput@smallnum := [4..515816];;|
  !gapprompt@gap>| !gapinput@for i in [1..Length(stabelm)] do|
  !gapprompt@>| !gapinput@     smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@smallnum;|
  [  ]
  
\end{Verbatim}
 The same for 4\texttt{\symbol{45}}transitivity: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@tups := Concatenation(List([1..8],k->Tuples([1..4],k)));;|
  !gapprompt@gap>| !gapinput@tups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],|
  !gapprompt@>| !gapinput@                                     l->PositionSublist(tup,l)=fail));;|
  !gapprompt@gap>| !gapinput@stab := [];;|
  !gapprompt@gap>| !gapinput@for tup in tups do|
  !gapprompt@>| !gapinput@     l := [1,2,3];|
  !gapprompt@>| !gapinput@     for i in tup do l := List(l,n->n^gens[i]); od;|
  !gapprompt@>| !gapinput@     if l = [1,2,3] then Add(stab,tup); fi;|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@Length(stab);|
  528
  !gapprompt@gap>| !gapinput@stabelm := [];;|
  !gapprompt@gap>| !gapinput@for i in [1..Length(stab)] do|
  !gapprompt@>| !gapinput@     elm := One(G);|
  !gapprompt@>| !gapinput@     for j in stab[i] do|
  !gapprompt@>| !gapinput@       if Modulus(elm) > 10000 then elm := fail; break; fi;|
  !gapprompt@>| !gapinput@       elm := elm * gens[j];|
  !gapprompt@>| !gapinput@     od;|
  !gapprompt@>| !gapinput@     if elm <> fail then Add(stabelm,elm); fi;|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@Length(stabelm);|
  334
  !gapprompt@gap>| !gapinput@decs := List(stabelm,DecreasingOn);;|
  !gapprompt@gap>| !gapinput@SortParallel(decs,stabelm,|
  !gapprompt@>| !gapinput@     function(S1,S2)|
  !gapprompt@>| !gapinput@       return First([1..100],k->Factorial(k) mod Modulus(S1) = 0)|
  !gapprompt@>| !gapinput@            < First([1..100],k->Factorial(k) mod Modulus(S2) = 0);|
  !gapprompt@>| !gapinput@     end);|
  !gapprompt@gap>| !gapinput@S := Integers;;|
  !gapprompt@gap>| !gapinput@for i in [1..Length(decs)] do|
  !gapprompt@>| !gapinput@     S_old := S; S := Difference(S,decs[i]);|
  !gapprompt@>| !gapinput@     if S <> S_old then ViewObj(S); Print("\n"); fi;|
  !gapprompt@>| !gapinput@     if S = [] then maxind := i; break; fi;|
  !gapprompt@>| !gapinput@   od;|
  Z \ 1(8) U 7(8)
  <union of 24 residue classes (mod 72)>
  <union of 22 residue classes (mod 72)>
  <union of 17 residue classes (mod 72) (9 classes)>
  4(18)
  <union of 28 residue classes (mod 576)>
  <union of 26 residue classes (mod 576)>
  <union of 21 residue classes (mod 576)>
  <union of 20 residue classes (mod 576) (7 classes)>
  <union of 18 residue classes (mod 576) (8 classes)>
  <union of 16 residue classes (mod 576) (6 classes)>
  <union of 15 residue classes (mod 576) (6 classes)>
  <union of 120 residue classes (mod 5184)>
  <union of 45 residue classes (mod 5184)>
  <union of 30 residue classes (mod 5184)>
  <union of 28 residue classes (mod 5184)>
  <union of 6 residue classes (mod 1296)>
  <union of 116 residue classes (mod 32400)>
  <union of 104 residue classes (mod 32400)>
  <union of 92 residue classes (mod 32400)>
  <union of 84 residue classes (mod 32400)>
  <union of 80 residue classes (mod 32400)>
  <union of 210 residue classes (mod 129600)>
  <union of 189 residue classes (mod 129600)>
  <union of 160 residue classes (mod 129600)>
  <union of 136 residue classes (mod 129600)>
  <union of 133 residue classes (mod 129600)>
  <union of 122 residue classes (mod 129600)>
  <union of 114 residue classes (mod 129600)>
  <union of 106 residue classes (mod 129600)>
  <union of 104 residue classes (mod 129600)>
  <union of 100 residue classes (mod 129600)>
  <union of 96 residue classes (mod 129600)>
  <union of 60 residue classes (mod 129600)>
  <union of 52 residue classes (mod 129600)>
  <union of 48 residue classes (mod 129600)>
  <union of 40 residue classes (mod 129600)>
  <union of 36 residue classes (mod 129600)>
  <union of 32 residue classes (mod 129600)>
  <union of 24 residue classes (mod 129600)>
  <union of 16 residue classes (mod 129600) (10 classes)>
  <union of 12 residue classes (mod 129600)>
  <union of 10 residue classes (mod 129600)>
  <union of 8 residue classes (mod 129600)>
  <union of 6 residue classes (mod 129600)>
  57406(129600) U 63076(129600) U 115006(129600) U 120676(129600)
  57406(129600) U 115006(129600) U 192676(259200) U 250276(259200)
  <union of 15 residue classes (mod 777600) (6 classes)>
  <union of 9 residue classes (mod 777600) (6 classes)>
  <union of 30 residue classes (mod 3110400)>
  <union of 26 residue classes (mod 3110400)>
  <union of 22 residue classes (mod 3110400)>
  <union of 19 residue classes (mod 3110400) (10 classes)>
  <union of 14 residue classes (mod 3110400) (8 classes)>
  705406(777600) U 2007076(3110400) U 2649406(3110400) U 2784676(3110400)
  <union of 14 residue classes (mod 9331200) (8 classes)>
  1483006(2332800) U 2649406(9331200) U 2784676(9331200) U 5117476(9331200)
  <union of 16 residue classes (mod 27993600) (6 classes)>
  2784676(9331200) U 5117476(9331200)
  [  ]
  !gapprompt@gap>| !gapinput@Maximum(List(stabelm{[1..maxind]},|
  !gapprompt@>| !gapinput@                f->Maximum(List(Coefficients(f),c->c[2]))));|
  37387
  !gapprompt@gap>| !gapinput@smallnum := [5..37387];;|
  !gapprompt@gap>| !gapinput@for i in [1..maxind] do|
  !gapprompt@>| !gapinput@     smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@smallnum;|
  [  ]
  
\end{Verbatim}
 There is even some evidence that the degree of transitivity of the action of $G$ on the positive integers is higher than{\nobreakspace}4: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@phi := EpimorphismFromFreeGroup(G);|
  [ a, u ] -> [ a, u ]
  !gapprompt@gap>| !gapinput@F := Source(phi);|
  <free group on the generators [ a, u ]>
  !gapprompt@gap>| !gapinput@List([5..20],|
  !gapprompt@>| !gapinput@        n->RepresentativeActionPreImage(G,[1,2,3,4,5],|
  !gapprompt@>| !gapinput@                                          [1,2,3,4,n],OnTuples,F));|
  [ <identity ...>, a^-3*u^4*a*u^-2*a^2, a^-1*(a^-1*u)^4*a^-1*u^-1*a, 
    a^4*u^-2*a^-4, a^-1*u^-4*a, (u^2*a^-1)^2*u^-2, u^-2*a^-2*u^4, 
    a^-1*u^2*a, a^-1*u^-6*a, a^2*u^4*a^2*u^2, u^-4*a*u^-2*a^-3, 
    a^-1*u^-2*a^-3*u^4*a^2, a^2*(a*u^2)^2, (a*u^-4)^2*a^-2, 
    u^-2*a*u^2*a*u^-2, u^-4*a^2*u^2 ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzlikePerms);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ A group which acts 3\texttt{\symbol{45}}transitively, but not
4\texttt{\symbol{45}}transitively on {\ensuremath{\mathbb Z}} }}\label{sec:ThreeButNotFourTransitiveGroup}
\logpage{[ 7, 6, 0 ]}
\hyperdef{L}{X85C529088050BEA3}{}
{
  In this section, we would like to show that the group $G$ generated by the two permutations $n \mapsto n + 1$ and $\tau_{1(2),0(4)}$ acts 3\texttt{\symbol{45}}transitively, but not
4\texttt{\symbol{45}}transitively on the set of integers. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@G := Group(ClassShift(0,1),ClassTransposition(1,2,0,4));A
  <rcwa group over Z with 2 generators>
  !gapprompt@gap>A !gapinput@IsTame(G);A
  false
  !gapprompt@gap>A !gapinput@(G.1^-2*G.2)^3*(G.1^2*G.2)^3; # G <> the free product C_infty * C_2.A
  IdentityMapping( Integers )
  !gapprompt@gap>A !gapinput@Display(G:CycleNotation:=false);A
  
  Wild rcwa group over Z, generated by
  
  [
  Tame rcwa permutation of Z: n -> n + 1
  
  Rcwa permutation of Z with modulus 4, of order 2
  
          /
          | 2n-2    if n in 1(2)
   n |-> <  (n+2)/2 if n in 0(4)
          | n       if n in 2(4)
          \
  
  ]
  
\end{Verbatim}
 This group acts transitively on{\nobreakspace}{\ensuremath{\mathbb Z}}, since
already the cyclic group generated by the first of the two generators does so.
Next we have to show that it acts 2\texttt{\symbol{45}}transitively. We
essentially
that the stabilizer of{\nobreakspace}0 acts transitively on ${\ensuremath{\mathbb Z}} \setminus \{0\}$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small
  
  !gapprompt@gap>| !gapinput@gens := [ClassShift(0,1)^-1,ClassTransposition(1,2,0,4),|
  !gapprompt@>| !gapinput@            ClassShift(0,1)];;|
  !gapprompt@gap>| !gapinput@tups := Concatenation(List([1..6],k->Tuples([-1,0,1],k)));;|
  !gapprompt@gap>| !gapinput@tups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],|
  !gapprompt@>| !gapinput@                                     l->PositionSublist(tup,l)=fail));;|
  !gapprompt@gap>| !gapinput@Length(tups);|
  189
  !gapprompt@gap>| !gapinput@stab := [];;|
  !gapprompt@gap>| !gapinput@for tup in tups do|
  !gapprompt@>| !gapinput@     n := 0;|
  !gapprompt@>| !gapinput@     for i in tup do n := n^gens[i+2]; od;|
  !gapprompt@>| !gapinput@     if n = 0 then Add(stab,tup); fi;|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@stabelm := List(stab,tup->Product(List(tup,i->gens[i+2])));;|
  !gapprompt@gap>| !gapinput@Collected(List(stabelm,Modulus));|
  [ [ 4, 6 ], [ 8, 4 ], [ 16, 3 ] ]
  !gapprompt@gap>| !gapinput@decs := List(stabelm,DecreasingOn);|
  [ 0(4), 3(4), 0(4), 3(4), 2(4), 0(4), 4(8), 2(4), 2(4), 0(4), 1(4), 
    0(8), 3(8) ]
  !gapprompt@gap>| !gapinput@Union(decs);|
  Integers
  
\end{Verbatim}
 Similar as in the previous section, it remains to check that the integers with ``small'' absolute value all lie in the orbit containing{\nobreakspace}1 under the
action of the stabilizer of{\nobreakspace}0: 
\begin{Verbatim}[commandchars=@|B,fontsize=\small,frame=single,label=Example]
  
  @gapprompt|gap>B @gapinput|Maximum(List(stabelm,f->Maximum(List(Coefficients(f),B
  @gapprompt|>B @gapinput|                                        c->AbsInt(c[2])))));B
  21
  @gapprompt|gap>B @gapinput|S := [1];;B
  @gapprompt|gap>B @gapinput|for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;B
  @gapprompt|gap>B @gapinput|IsSubset(S,Difference([-21..21],[0])); # Not yet ..B
  false
  @gapprompt|gap>B @gapinput|for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;B
  @gapprompt|gap>B @gapinput|IsSubset(S,Difference([-21..21],[0])); # ... but now!B
  true
  
\end{Verbatim}
 Now we have to check for 3\texttt{\symbol{45}}transitivity. Since we cannot
find for every residue class an element of the pointwise stabilizer of $\{0,1\}$ which properly divides its elements, we also have to take additions and
subtractions into consideration. Since the moduli of all of our stabilizer
elements are quite small, simply looking at sets of representatives is cheap: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@tups := Concatenation(List([1..10],k->Tuples([-1,0,1],k)));;|
  !gapprompt@gap>| !gapinput@tups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],|
  !gapprompt@>| !gapinput@                                     l->PositionSublist(tup,l)=fail));;|
  !gapprompt@gap>| !gapinput@Length(tups);|
  3069
  !gapprompt@gap>| !gapinput@stab := [];;|
  !gapprompt@gap>| !gapinput@for tup in tups do|
  !gapprompt@>| !gapinput@     l := [0,1];|
  !gapprompt@>| !gapinput@     for i in tup do l := List(l,n->n^gens[i+2]); od;|
  !gapprompt@>| !gapinput@     if l = [0,1] then Add(stab,tup); fi;|
  !gapprompt@>| !gapinput@   od;|
  !gapprompt@gap>| !gapinput@Length(stab);|
  10
  !  [ 1, 1, 2,,2 2 , ,4 4,8,16,8 8,16 32, 16,16 32,,32 
  !gapprompt@gap>| !gapinput@Maximum(List(stabelm,Modulus));|
  8
  !gapprompt@gap>| !gapinput@Maximum(List(stabelm,|
  !gapprompt@>| !gapinput@                f->Maximum(List(Coefficients(f),c->AbsInt(c[2])))));|
  8
  !gapprompt@gap>| !gapinput@decsp := List(stabelm,elm->Filtered([9..16],n->n^elm<n));|
  [ [ 9, 13 ], [ 10, 12, 14, 16 ], [ 12, 16 ], [ 9, 13 ], [ 12, 16 ], 
    [ 9, 11, 13, 15 ], [ 9, 11, 13, 15 ], [ 12, 16 ], [ 12, 16 ], 
    [ 9, 11, 13, 15 ] ]
  !gapprompt@gap>| !gapinput@Union(decsp);|
  [ 9 .. 16 ]
  !gapprompt@gap>| !gapinput@decsm := List(stabelm,elm->Filtered([-16..-9],n->n^elm>n));|
  [ [ -15, -13, -11, -9 ], [ -16, -12 ], [ -16, -12 ], [ -15, -11 ], 
    [ -16, -14, -12, -10 ], [ -15, -11 ], [ -15, -11 ], 
    [ -16, -14, -1,1,1, 1 , 1 ,1,1 1 1 1 ,1 1,1, ,1 , 1 ,1 , 
  !1,,1 1,1,1, 1 1, 1,1 1 1 1,,1,1 1, 1 , ,1 ,,1,
  [ -16 .. -9 ]
  !gapprompt@gap>| !gapinput@S := [2[,3, ,,1  1,31, 1, 63, 1 ]
  !gapprompt@gap>| !gapinput@for elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;|
  !gapprompt@gap>| !gapinput@IsSubset(S,Difference([-8..8],[0,1]));|
  true
  
\end{Verbatim}
 At this point we have established 3\texttt{\symbol{45}}transitivity. It
remains to check that the group $G$ does not act 4\texttt{\symbol{45}}transitively. We do this by checking that it
is not transitive on 4\texttt{\symbol{45}}tuples (mod{\nobreakspace}4). Since $n${\nobreakspace}mod{\nobreakspace}8 determines the image of $ Enter \Ajava.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 131
 
  
  !gapprompt@gap>| !gapinput@orb := [[0,1,2,3]];;|
  gapprompt@gap>|!extend =function )
  !gapprompt@>| !gapinput@     local gen;|
  !gapprompt@>| !gapinput@     for gen in gens do|
  !gapprompt@>| !gapinput@       orb := Union(orb,List(orb,l->List(l,n->n^gen) mod 8));|
  !gapprompt@>| !gapinput@     od;|
  !gapprompt@>| !gapinput@   end;;|
  !gapprompt@gap>| !gapinput@repeat|
  !gapprompt@>| !gapinput@     old := ShallowCopy(orb);|
  !gapprompt@>| !gapinput@     extend(); Print(Length(orb),"\n");|
  !gapprompt@>| !gapinput@   until orb = old;|
  7
  27
  97

  573
  916
  1185
  1313
  1341
  1344
  1344
  !gapprompt@gap>| !gapinput@Length(Set(List(orb,l->l mod 4)));|
  120
  !gapprompt@gap>| !gapinput@last < 4^4;|
  true
  
\end{Verbatim}
 This shows that $G$ acts not 4\texttt{\symbol{45}}transitively
on{\nobreakspace}{\ensuremath{\mathbb Z}}. The corresponding calculation for
3\texttt{\symbol{45}}tuples looks as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@orb := [[0,1,2]];;|
  !gapprompt@gap>| !gapinput@repeat|
  !gapprompt@>| !gapinput@     old := ShallowCopy(orb);|
  !gapprompt@>| !gapinput@     extend(); Print(Length(orb),"\n");|
  !gapprompt@>| !gapinput@   until orb = old;|
  7
  27
  84
  207
  363
  459
  503
  512
  512
  !gapprompt@gap>| !gapinput@Length(Set(List(orb,l->l mod 4)));|
  64
  !gapprompt@gap>| !gapinput@last = 4^3;|
  true
  
\end{Verbatim}
 Needless to say that the latter kind of argumentation is not suitable for
proving, but only for disproving $k$\texttt{\symbol{45}}transitivity. }

  
\section{\textcolor{Chapter }{ An rcwa mapping which seems to be contracting, but very slow }}\label{sec:SlowlyContractingMapping}
\logpage{[ 7, 7, 0 ]}
\hyperdef{L}{X878499AF7889FD9E}{}
{
  The iterates of an integer under the Collatz mapping $T$ seem to approach its contraction centre
tsymbol}\\ymbol45  finitesetjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
trajectories java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 58
\texttt{\symbol{45}}\texttt{\symbol{45}} rather quickly and do not get very
large before doing so (of course this is a purely heuristic statement as the $3n+1$ conjecture has not been proved so far!): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);;|
  !gapprompt@gap>| !gapinput@S0 := LikelyContractionCentre(T,100,1000);|
  #I  Warning: `LikelyContractionCentre' is highly probabilistic.
  The
  See ?LikelyContractionCentre for more information.
  [ -136, -91, -82, -68, -61, -55, -41, -37, -34, -25, -17, -10, -7, -5, 
    -1, 0, 1, 2 ]
  !gapprompt@gap>| !gapinput@S0^T = S0; # This holds by definition of the contraction centre.|
  true
  !gapprompt@gap>| !gapinput@List([1..30],n->Length(Trajectory(T,n,S0)));|
  [ 1, 1, 5, 2, 4, 6, 11, 3, 13, 5, 10, 7, 7, 12, 12, 4, 9, 14, 14, 6, 6, 
  ,,8 ,8,70,13,13,  ]
  !gapprompt@gap>| !gapinput@Maximum(List([1..1000],n->Length(Trajectory(T,n,S0))));|
  113
  !gapprompt@gap>| !gapinput@Maximum(List([1..1000],n->Maximum(Trajectory(T,n,S0))));|
  125252
  
\end{Verbatim}
 The following mapping seems to be contracting as well, but its trajectories
much :
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !@ap>A!gapinput@f6 := RcwaMapping([[ 1,0,6],[ 5, 1,6],[ 7,-2,6],A
  !gapprompt@>A !gapinput@                      [11,3,6],[11,-2,6],[11,-1,6]]);;A
  !gapprompt@gap>A !gapinput@Display(f6);A
  
  Rcwa mapping of Z
  
          /
          | n/6       if n in 0(6)
          | (5n+1)/6  if n in 1(6)
          | (7n-2)/6  if n in 2(6)
   n |-> <  (11n+3)/6 if n in 3(6)
          | (11n-2)/6 if n in 4(6)
          | (11n-1)/6 if n in 5(6)
          |
          \
  
  !gapprompt@gap>A !gapinput@S0 := LikelyContractionCentre(f6,1000,100000);;A
  #I  Warning: `LikelyContractionCentre' is highly probabilistic.
  The returned result can only be regarded as a rough guess.
  See ?LikelyContractionCentre for more information.
  !gapprompt@gap>A !gapinput@Trajectory(f6,25,S0);A
  [ 25, 21, 39, 72, 12, 2 ]
  !gapprompt@gap>A !gapinput@List([1..100],n->Length(Trajectory(f6,n,S0)));A
  [ 1, 1, 3, 4, 1, 2, 3, 2, 1, 5, 7, 2, 8, 17, 3, 16, 1, 4, 17, 6, 5, 2, 
    5, 5, 6, 1, 4, 2, 15, 1, 1, 3, 2, 5, 13, 3, 2, 3, 4, 1, 8, 4, 4, 2, 7, 
    19, 23517, 3, 9, 3, 1, 18, 14, 2, 20, 23512, 14, 2, 6, 6, 1, 4, 19, 
    12, 23511, 8, 23513, 10, 1, 13, 13, 3, 1, 23517, 7, 20, 7, 9, 9, 6, 
    12, 8, 6, 18, 14, 23516, 31, 12, 23545, 4, 21, 19, 5, 1, 17, 17, 13, 
    19, 6, 23515 ]
  !gapprompt@gap>A !gapinput@Maximum(begin{Verbatim}[commandchars=!@|,fontsize,framejava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 77
  7363391777762473304431877054771075818733690108051469808715809256737742295@ !N1 = Subgroup(G,ab,a]);java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  45698886054
  
\end{Verbatim}
 Computing the trajectory of 3224 takes quite a while
\texttt{\symbol{45}}\texttt{\symbol{45}} this trajectory ascends to about $3 \cdot 10^{2197}$, before it approaches the fixed point{\nobreakspace}2 after 19949562 steps. 

 When constructing the mapping \texttt{f6}, the denominators of the partial mappings have been chosen to be equal and
the  gapprompt>!N2: Subgroup,a**c,*c]);;|
denominator, whose product is just a little bit smaller than the \texttt{Modulus(f6)}th power of the denominator. In the example we have $5 \cdot 7 \cdot 11^3 = 46585$ and $6^6 = 46656$. 

 Although the trajectories of \texttt{T} are much shorter than those of \texttt{f6}, it seems likely that this does not make the problem of deciding whether the
mapping{\nobreakspace}\texttt{T} is contracting essentially easier \texttt{\symbol{45}}\texttt{\symbol{45}}
even for mappings with much shorter trajectories than{\nobreakspace}\texttt{T} the problem seems to be equally hard. A solution can usually only be found in
trivial cases, i.e. for example when there is some $k$ such that applying the $k$th power of the respective mapping to any integer decreases its absolute
value.java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

  !apprompt@gap>| !gapinput@Order(a*b);|

  
\section{\textcolor{Chapter }{Checking a result by P. Andaloro}}\label{sec:AndaloroResult}
\logpage{[ 7, 8, 0 ]}
\hyperdef{L}{X84A915BA833E0BDE}{}
{
  In \cite{Andaloro00}, P.{\nobreakspace}Andaloro has shown that proving that trajectories of
integers $n \in 1(16)$ under the Collatz mapping always contain{\nobreakspace}1 would be sufficient
to prove the $3n+1$ conjecture. In the sequel, this result is verified by \textsf{RCWA}. Checking that the union of the images of the residue class 1(16) under
powers of the Collatz mapping{\nobreakspace}$T$ contains ${\ensuremath{\mathbb Z}} \setminus 0(3)$ is obviously enough. Thus we put $S := 1(16)$, and successively unite the set{\nobreakspace}$S$ with its image under{\nobreakspace}$T$: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);|
  <rcwa mapping of Z with modulus 2>
  !gapprompt@gap>| !gapinput@S := ResidueClass(Integers,16,1);|
  1(16)
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  1(16) U 2(24)
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  1() U(24 U 17(48) U33(8)
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 30 residue classes (mod 144)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 42 residue classes (mod 144)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 172 residue classes (mod 432)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 676 residue classes (mod 1296)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 810 residue classes (mod 1296)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 2638 residue  
    words :=List(words,word-Product(word,->gens[i))java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  <union of 33 residue classes (mod 48)>
  !gapprompt@gap>| !gapinput@S := Union(S,S^T);|
  <union of 33 residue classes (mod 48)>
  !gapprompt@gap>| !gapinput@Union(S,ResidueClass(Integers,3,0)); # Et voila ...|
  Integers
  
\end{Verbatim}
 java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 2

 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzMapping);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{Two examples by Matthews and Leigh}}\label{sec:MatthewsLeighExamples}
\logpage{[ 7, 9, 0 ]}
\hyperdef{L}{X7E8CD9B67ED78735}{}
{
  In \cite{MatthewsLeigh87}, K.{\nobreakspace}R.{\nobreakspace}Matthews and
G.{\nobreakspace}M.{\nobreakspace}Leigh have shown that two trajectories of
the following (surjective, but not injective) mappings are acyclic
(mod{\nobreakspace}$x$) and divergent: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@x := Indeterminate(GF(4),1);; SetName(x,"x");A
  !gapprompt@gap>A !gapinput@R := PolynomialRing(GF(2),1);A
  GF(2)[x]
  !gapprompt@gap>A !gapinput@ML1 := RcwaMapping(R,x,[[1,0,x],[(x+1)^3,1,x]]*One(R));;A
  !gapprompt@gap>A !gapinput@ML2 := RcwaMapping(R,x,[[1,0,x],[(x+1)^2,1,x]]*One(R));;A
  !gapprompt@gap>A !gapinput@Display(ML1);A
  
  Rcwa mapping of GF(2)[x] with modulus x
  
          /
          | P/x                     if P in 0(x)
   P |-> <  ((x^3+x^2+x+1)*P + 1)/x if P in 1(x)
          |
          \
  
  !gapprompt@gap>A !gapinput@Display(ML2);A
  
  Rcwa mapping of GF(2)[x] with modulus x
  
          /
          | P/x               if P in 0(x)
   P |-> <  ((x^2+1)*P + 1)/x if P in 1(x)
          |
          \
  
  !gapprompt@gap>A !gapinput@List([ML1,ML2],IsSurjective);A
  [ true, true ]
  !gapprompt@gap>A !gapinput@List([ML1,ML2],IsInjective);A
  [ false, false ]
  !gapprompt@gap>A !gapinput@traj1 := Trajectory(ML1,One(R),16);A
  \ndVerbatim
    x^5 Enter \A(LoadRCWAExamples)OddNumberOfGens{tF) inorder   the variablesdefined . }
    x^11+x^10+x^8+x^7+x^6+x^5+x^2, x^10+x^9+x^7+x^6+x^5+x^4+x, 
    x^9+x^8+x^6+x^5+x^4+x^3+1, x^11+x^8+x^7+x^6+x^4+x+1, 
    x^13+x^12+x^11+x^8+x^7+x^6+x^4, x^12+x^11+x^10+x^7+x^6+x^5+x^3 ]
  !@gap> gjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 75
  [ x^3+x+1, x^4+x+1, x^5+x^3+x^2+x+1, x^6+x^3+1, x^7+x^5+x^4+x^2+x, 
    x^6+x^4+x^3+x+1, x^7+x^4+x^3+x+1, x^8+x^6+x^5+x^4+x^3+x+1, 
    9^^+1 ^+8+^7^5+^++,
    x^11+x^8+x^7+x^5+x^4+x^3+x^2+x+1, x^12+x^10+x^9+x^8+x^7+x^5+1, 
    x^13+x^10+x^7+x^4+x, x^12+x^9+x^6+x^3+1, 
    x^13+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x,gap!p+e;     =x  ;;java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    x^12+x^10+x^9+x^7+x^6+x^4+x^3+x+1 ]
  
\end{Verbatim}
 The pattern which Matthews and Leigh used to show the divergence of the above
trajectories can be recognized easily by looking at the corresponding Markov
chains with the two states 0{\nobreakspace}mod{\nobreakspace}$x$ and 1{\nobreakspace}mod{\nobreakspace}$x$: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@traj1modx := Trajectory(ML1,One(R),400,x);;|
  !gapprompt@gap>| !gapinput@traj2modx := Trajectory(ML2,(x^3+x+1)*One(R),600,x);;|
  !gapprompt@gap>| !gapinput@List(traj1modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);|
  [ 1, 1, 0, 1, 0, 0, 1, 1, 1,  true
    1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 
    1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
  !gapprompt@gap>| !gapinput@List(traj2modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);|
  [1 1, 1,1 0 1 1,1 1 1 1 1 0, 1 0,1,1 1 1 1,1 1, 1 
    1java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 ,,1, 1 1,1, 1,1 1,1,,0,1,0,1 0 1,0 1 , 
    1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1 1 1,1 1 1 1,1, 1 , 1 1,1 1,1 1,1,1, 1,,11, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 
    0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ]
  
\end{Verbatim}
 Whatis important here are theoftheintervals between twochanges
from one state to the other: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@ChangePoints := l->Filtered([1..Length(l)-1],pos->l[pos]<>l[pos+1]);;|
  !gapprompt@gap>| !gapinput@Diffs := l->List([1..Length(l)-1],pos->l[pos+1]-l[pos]);;|
  !  true
  [ 1, 1, 2, 4, 2, 2, 4, 8, 4, 4, 8, 16, 8, 8, 16, 32, 16, 16, 32, 64, 32, 
    32, 64 ]
  !gapprompt@gap>| !gapinput@Diffs(ChangePoints(traj2modx)); # ... and in the second example.|
  [ 1, 7, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1,1 1 1 1 1 49,, 1,1 1 1 1 1 1, 1, 1 1,1 1 1,1 , 1,
    1, 1, 1, 1, 1, 1, 1,[ , 12 , [, 24 ] ]
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1,,,1,1,1 ,1 , ,,1 ,1,1 ,1 1, 1, , , , 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
  !gapprompt> !gapinput@DiffsChangePointslast);#Make this amore obvious.java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
   ,3, ,7 1,15,1, 31, 1,63, 1  ]
  
\end{Verbatim}
 This looks clearly acyclic, thus the trajectories diverge. Needless to say
however that this computational evidence does not replace the proof along
these lines given in the article cited above, but just sheds a light on the
idea behind it. 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().MatthewsLeigh);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }  !gapprompt@gap| !gapinput@Collected(List(orb,DegreeOfLaurentPolynomial)|
\logpage{[ 7, 10, 0 ]}
\hyperdef{L}{X854E9F65817E4F63}{}
{
  We enter some wild rcwa permutation: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;A
  gap> !apinputIsTameu;A
  !gapprompt@gap>A !gapinput@Display(u);A
  
  Wild rcwa permutation of Z with modulus 5
  
          /
          | 3n/5     if n in 0(5)
          | (9n+1)/5 if n in 1(5)
   n |-> <  (3n-1)/5 if n in 2(5)
          | (9n-2)/5 if n in 3(5)
          | (9n+4)/5 if n in 4(5)
          \
  
\{Verbatim
 We would like to compute the order of $[u,n \mapsto n + k]$ and $[u^2,n \mapsto n + k]$ for different values of{\nobreakspace}$k$: 
\begin{Verbatim}[commandchars=@|A,fontsize=\small,frame=single,label=Example]
  
  @gapprompt|gap>A @gapinput|nu := ClassShift(0,1);; # n -> n + 1A
  @gapprompt|gap>A @gapinput|l := Filtered([0..100],k->IsTame(Comm(u,nu^k)));A
  [ 0, 2, 3, 5, 6, 9, 10, 12, 13, 15, 17, 18, 20, 21, 24, 25, 27, 28, 30, 
    32, 33, 35, 36, 39, 40, 42, 43, 45, 47, 48, 50, 51, 54, 55, 57, 58, 
    60, 62, 63, 65, 66, 69, 70, 72, 73, 75, 77, 78, 80, 81, 84, 85, 87, 
    88, 90, 92, 93, 95, 96l\texttt{AssignGlobals(LoadRCWAExamples().AbelianGroupOverPolynomialRing);}in toassign theglobal variables defined in this section. }
  @gapprompt|gap>A @gapinput|List(l,k->Order(Comm(u,nu^k)));A
  [ 1, 6, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, infinity, 
    infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, infinity, 
    infinity, infinity, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, 
    infinity, infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, 
    infinity, infinity, infinity, 5, 3, 5, 5, 3 ]
  @gapprompt|gap>A @gapinput|u2 := u^2;A
  <wild permutationof with 25>
  @gapprompt|gap>A @gapinput|Filtered([1..16],k->IsTame(Comm(u2,nu^k))); # k<15->[u^2,nu^k] wild!A
  [ 15 ]
  (u2nu^))A
  infinity
  @| gjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
  <rcwa permutation of Z with modulus 81>
  @gapprompt|gap>A @gapinput|cycs := ShortCycles(u2nu17,[-100..100],100java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  @gapprompt|gap> gapinput|List(cycs,Length);
  [ 72, 73, 72, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, 
    73, 72, 72, 73, 72, 72 ]
  @gapprompt|gap>A @gapinput|Lcm(last);A
  5256
  @gapprompt|gap>A @gapinput|u2nu17^5256; # This element has indeed order 2^3*3^2*73 = 5256.A
  IdentityMapping( Integers )
  @gapprompt|gap>A @gapinput|u2nu18 := Comm(u2,nu^18);A
  <rcwa permutation of Z with modulus 81>
  @gapprompt|gap>A @gapinput|cycs := ShortCycles(u2nu18,[-100..100],100);;A
  @gapprompt|gap>A @gapinput|List(cycs,Length);A
  [ 21, 22, 22, 22, 21, 22, 22, 21, 22, 22, 21, 22, 21, 22, 22, 21, 22, 
    22, 21, 22, 22, 21, 22 ]
  @gapprompt|gap>A @gapinput|Lcm(last);A
  462
  @gap> @gapinput|^462; This is  orderjava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 87
  IdentityMapping( Integers )
  @gapprompt|gap>A @gapinput|List([Comm(u2,nu^20),Comm(u2,nu^25),Comm(u2,nu^30)],Order);A
  [ 29, 9, 15 ]
  
\end{Verbatim}
 We thatour various orders  the
prime factors of these orders are not all ``very small''. 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzlikePerms);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ An infinite subgroup of CT(GF(2)[x]) with  !gapprompt@gap>| !apinput@ =GroupC(ab),lm;java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
\logpage{[ 7, 11, 0 ]}
\hyperdef{L}{X7F085B867D799293}{}
{
  In java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@x := Indeterminate(GF(2));; SetName(x,"x");A
  !gapprompt@gap>A !gapinput@R := \nobreakspace}\mbox{\texttt{\mdseries}isnot  thisjava.lang.StringIndexOutOfBoundsException: Range [111, 110) out of bounds for length 184
  GF(2)[x]
  !gapprompt@gap>A !gapinput@a := ClassTransposition(0,x,1,x);;A
  !gapprompt@gap>A !gapinput@b := ClassTransposition(0,x^2+1,1,x^2+1);;A
  !gapprompt@gap>A !gapinput@c := ClassTransposition(1,x,0,x^2+x);;A
  !gapprompt@gap>A !gapinput@G := Group(a,b,c);A
  <rcwa group over GF(2)[x] with 3 generators>
  !gapprompt@gap>A !gapinput@Display(G);A
  
  Rcwa group over GF(2)[x], generated by
  
  [
  Rcwa permutation of GF(2)[x]: P -> P + Z(2)^0
  
  Rcwa permutation of GF(2)[x] with modulus x^2+1, of order 2
  
          /
          | P + 1 if P in 0(x^2+1) U 1(x^2+1)
   P |-> <  P     if P in x(x^2+1) U x+1(x^2+1)
          |
          \
  
  
  Rcwa permutation of GF(2)[x] with modulus x{, 14,0]
  
          /
          | (x+1)*P + x+1   if P in 1(x)
   P |-> <  (P + x+1)/(x+1) if P in 0(x^2+x)
          | P               if P in x(x^2+x)
          \
  
  ]
  
\end{Verbatim}
 We can@gapprompt|gapC @gapinput|IsSurjective();# AsexpectedC
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@N1 := Subgroup(G,[a*b,a*c]);|
  <rcwa group over GF(2)[x] with 2 generators>
  !gapprompt@gap>| !gapinput@IsNormal(G,N1);|
  true
  !gapprompt@gap>| !gapinput@Index(G,N1);|
  2
  !gapprompt@gap>| !gapinput@G/N1;|
  Group([ (1,2), (1,2), (1,2) ])
  !gapprompt@gap>| !gapinput@N2 := Subgroup(G,[a*b*c,a*c]);;|
  !gapprompt@gap>| !gapinput@IsNormal(G,N2);|
  true
  !gapprompt@gap>| !gapinput@IsSubgroup(N1,N2);|
  false
  
\end{Verbatim}
 Products of even numbers of generators of{\nobreakspace}\texttt{G} may have infinite order. For example, we have 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Order(a*b);|
  2
  !gapprompt@gap>| !gapinput@Order(a*c);|
  infinity
Orderb*)|
  infinity
  
\end{Verbatim}
 We would like to have a look at orders of products of odd numbers of
generators. In order to restrict our considerations to ``essentially different'' products (as far as we can easily do this), we use the following auxiliary
function: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=GAP code]
  
  NormedWords := function ( F, lng )
  
    local  words, gens, tuples, w;
  
    gens   := GeneratorsOfGroup(F);
    tuples := EnumeratorOfTuples([1..3],lng);
    words  := [];
  
    for w in tuples do
      if    (w[1] = 1 or not 1 in w)
        and PositionSublist(w,[1,1]) = fail
        and PositionSublist(w,[2,2]) = fail
        and PositionSublist(w,[3,3]) = fail
        and PositionSublist(w,[2,1]) = fail
        and w[1] < w[lng]
        and w{[1,lng]} <> [1,2]
        and (w{[1..3]} = [1,2,3] or PositionSublist(w,[1,2,3]) = fail)
      then Add(words,w); fi;
    od;
  
    words := List(words,word->Product(List(word,i->gens[i])));
    return words;
  end;
  
\end{Verbatim}
 Now let's compute the possible orders of products of 3, 5, 7 or 9 generators: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F := FreeGroup("a","b","c");;|
  !gapprompt@gap>| !gapinput@phi := EpimorphismByGenerators(F,G);|
  [ a, b, c ] -> 
  [ ClassTransposition(0,x,1,x), ClassTransposition(0,x^2+1,1,x^2+1), 
    ClassTransposition(1,x,0,x^2+x) ]
  !gapprompt@gap>| !gapinput@B3 := NormedWords(F,3);|
  [ a*b*c ]
  !gapprompt@gap>| !gapinput@B3 := List(B3,g->g^phi);|
  [ <rcwa permutation of GF(2)[x] with modulus x^3+x> ]
  !gapprompt@gap>| !gapinput@List(B3,Order);|
  [ 20 ]
  !gapprompt@gap>| !gapinput@B5 := NormedWords(F,5);|
  [ a*b*c*a*c, a*b*c*b*c ]
  !gapprompt@gap>| !gapinput@B5 := List(B5,g->g^phi);|
  [ <rcwa permutation of GF(2)[x] with modulus x^3+x>, 
    <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x> ]
  !gapprompt@gap>| !gapinput@List(B5,Order);|
  [ 12, 12 ]
  !gapprompt@gap>| !gapinput@B7 := NormedWords(F,7);|
  [ a*b*c*a*c*a*c, a*b*c*a*c*b*c, a*b*c*b*c*a*c, a*b*c*b*c*b*c ]
  !gapprompt@gap>| !gapinput@B7 := List(B7,g->g^phi);|
  [ <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, 
    <rcwa permutation of GF(2)[x] with modulus x^5+x>, 
    <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, 
    <rcwa permutation of GF(2)[x] with modulus x^5+x> ]
  !gapprompt@gap>| !gapinput@List(B7,Order);|
  [ 12, 12, 12, 30 ]
  !gapprompt@gap>| !gapinput@B9 := NormedWords(F,9);|
  [ a*b*c*a*b*c*a*b*c, a*b*c*a*c*a*c*a*c, a*b*c*a*c*a*c*b*c, a*b*c*a*c*b*c*a*c, 
    a*b*c*a*c*b*c*b*c, a*b*c*b*c*a*c*a*c, a*b*c*b*c*a*c*b*c, a*b*c*b*c*b*c*a*c, 
    a*b*c*b*c*b*c*b*c ]
  !gapprompt@gap>| !gapinput@B9 := List(B9,g->g^phi);;|
  !gapprompt@gap>| !gapinput@List(B9,Order);|
  [ 20, 4, 30, 12, 42, 30, 4, 42, 12 ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().OddNumberOfGens{\textunderscore}FiniteOrder);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{An abelian rcwa group over a polynomial ring}}\label{sec:AbelianGroupOverPolynomialRing}
\logpage{[ 7, 12, 0 ]}
\hyperdef{L}{X7A8605E680F664BF}{}
{
  We enter a 2\texttt{\symbol{45}}generated abelian wild rcwa group over GF(4)[$x$]: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@x := Indeterminate(GF(4),1);; SetName(x,"x");|
  !gapprompt@gap>| !gapinput@R := PolynomialRing(GF(4),1);|
  GF(2^2)[x]
  !gapprompt@gap>| !gapinput@e := One(GF(4));;|
  !gapprompt@gap>| !gapinput@p := x^2 + x + e;;    q := x^2 + e;;|
  !gapprompt@gap>| !gapinput@r := x^2 + x + Z(4);; s := x^2 + x + Z(4)^2;;|
  !gapprompt@gap>| !gapinput@cg := List( AllResidues(R,x^2), pol -> [ p, p * pol mod q, q ] );;|
  !gapprompt@gap>| !gapinput@ch := List( AllResidues(R,x^2), pol -> [ r, r * pol mod s, s ] );;|
  !gapprompt@gap>| !gapinput@g := RcwaMapping( R, q, cg );|
  <rcwa mapping of GF(2^2)[x] with modulus x^2+1>
  !gapprompt@gap>| !gapinput@h := RcwaMapping( R, s, ch );|
  <rcwa mapping of GF(2^2)[x] with modulus x^2+x+Z(2^2)^2>
  !gapprompt@gap>| !gapinput@List([g,h],IsTame);|
  [ false, false ]
  !gapprompt@gap>| !gapinput@G := Group(g,h);|
  <rcwa group over GF(2^2)[x] with 2 generators>
  !gapprompt@gap>| !gapinput@IsAbelian(G);|
  true
  !gapprompt@gap>| !gapinput@IsTame(G);|
  false
  
\end{Verbatim}
 It is easy to see that all orbits on GF(4)[$x$] under the action of \texttt{G} are finite. 

 Now we compute the action of the group \texttt{G} on one of its orbits, and make some statistics of the orbits of \texttt{G} containing polynomials of degree less than{\nobreakspace}4: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@orb := Orbit(G,x^5);|
  [ x^5, x^5+x^4+x^2+1, x^5+x^3+x^2+Z(2^2)*x+Z(2)^0, x^5+x^3, 
    x^5+x^4+x^3+x^2+Z(2^2)^2*x+Z(2^2)^2, x^5+x, x^5+x^4+x^3, 
    x^5+x^2+Z(2^2)^2*x, x^5+x^4+x^2+x, x^5+x^3+x^2+Z(2^2)^2*x+Z(2)^0, 
    x^5+x^4+Z(2^2)*x+Z(2^2), x^5+x^3+x, x^5+x^4+x^3+x^2+Z(2^2)*x+Z(2^2), 
    x^5+x^4+x^3+x+1, x^5+x^2+Z(2^2)*x, x    of itssemi can turn :java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  !gapprompt@gap>| !gapinput@H := Action(G,orb);|
  Group([ (1,2,4,7,6,9,12,14)(3,5,8,11,10,13,15,16), 
    (1,3,6,10)(2,5,9,13)(4,8,12,15)(7,11,14,16) ])
  !gapprompt@gap>| !gapinput@IsAbelian(H); # check ...|
  true
  !gapprompt@gap>| !gapinput@IsCyclic(H);  # H, and therefore also G, is not cyclic|
  false
  !gapprompt@gap>| !gapinput@Exponent(H);|
  8
  !gapprompt/
  [ [ 1, 4 ], [ 2, 6 ], [ 4, 12 ], [ 8, 24 ] ]
  
\end{Verbatim}
 Changing the generators a little changes the structure of the group and its
action on the underlying ring a lot: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@cg[1][2] := cg[1][2] + (x^2 + e) * p * q;;|
  !gapprompt@gap>| !gapinput@ch[7][2] := ch[7][2] + x * r * s;;|
  !gapprompt@gap>| !gapinput@g := RcwaMapping( R, q, cg );; h := RcwaMapping( R, s, ch );;|
  !gapprompt@gap>| !gapinput@G := Group(g,h);|
  <rcwa group over GF(2^2)[x] with 2 generators>
  !gapprompt@gap>| !gapinput@IsAbelian(G);|
  false
  !gapprompt@gap>| !gapinput@Support(G);|
  GF(2^2)[x] \ [ 1, Z(2^2), Z(2^2)^2 ]
  !gapprompt@gap>| !gapinput@orb := Orbit(G,Zero(R));;|
  !gapprompt@gap>| !gapinput@Length(orb);|
  87
  !gapprompt@gap>| !gapinput@StructureDescription(Action(G,orb));|
  "A87"
  !gapprompt@gap>| !gapinput@Collected(List(orb,DegreeOfLaurentPolynomial));|
  [ [ -infinity, 1 ], [ 1, 2 ], [ 2, 4 ], [ 3, 16 ], [ 4, 64 ] ]
  !gapprompt@gap>| !gapinput@S := AllResidues(R,x^6);;|
  !gapprompt@gap>| !gapinput@orbs := ShortOrbits(G,S,-1:finite);;|
  !gapprompt@gap>| !gapinput@List(orbs,Length);|
  [ 87, 1, 1, 1, 2, 2, 2, 2, 2, 4, 4, 4, 20, 4, 12, 4, 20, 4, 4, 12, 8, 8, 
    48, 48, 16, 8, 8, 56, 8, 88, 8, 8, 8, 400, 16, 48, 16, 16, 16, 80, 16, 
    16, 16, 96, 32, 192, 32, 16, 16, 416, 16, 48, 16, 16, 880, 16, 16, 16, 
    16 ,,16 ,84816 ,32 ,,16 ,16,,16]
  !gapprompt@gap>| !gapinput@Position(last,880);|
  55
  !gapprompt@gap>| !gapinput@Set(orbs[55],DegreeOfLaurentPolynomial); # all elm's have same degree|
  [ 5 ]
  !gapprompt@gap>| !gapinput@H := Action(G,orbs[55]);;|
  !gapprompt@gap>| !gapinput@IsPrimitive(H,MovedPoints(H));|
  false
  !gapprompt@gap>| !gapinput@List(Blocks(H,MovedPoints(H)),Length);|
  [ 110, 110, 110, 110, 110, 110, 110, 110 ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().AbelianGroupOverPolynomialRing);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{Checking for solvability}}\label{sec:CheckingForSolvability}
\logpage{[ 7, 13, 0 ]}
\hyperdef{L}{X78DFE4B4821E07A6}{}
{
  Presently there is no general method available for testing wild rcwa groups
for solvability. However, sometimes the question for solvability can be
answered anyway. In the example below, the idea is to find a
subgroup{\nobreakspace}\mbox{\texttt{\mdseries\slshape U}} which acts on a finite set{\nobreakspace}\mbox{\texttt{\mdseries\slshape S}} of integers, and which induces on{\nobreakspace}\mbox{\texttt{\mdseries\slshape S}} a non\texttt{\symbol{45}}solvable finite permutation group: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@a := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;|
  !gapprompt@gap>| !gapinput@b := RcwaMapping([[3,0,2],[3,13,4],[3,0,2],[3,-1,4]]);;|
  !gapprompt@gap>| !gapinput@G := Group(a,b);;|
  !gapprompt@gap>| !gapinput@ShortOrbits(Group(Comm(a,b)),[-10..10],100);|
  [ [ -10 ], [ -9 ], [ -30, -21, -14, -13, 
    [ -12, -5, -4, -3, -2, 1 ], [ -1 ], [ 0 ], [ 2 ], [ 3 ], 
    [ 4, 5, 6, 7, 10, 15 ], [ 8 ], [ 9 ] ]
  !gapprompt@gap>| !gapinput@S := [ 4, 5, 6, 7, 10, 15 ];;|
  !gapprompt@gap>| !gapinput@Cycle(Comm(a,b),4);|
  [ 4, 7, 10, 15, 5, 6 ]
  !gapprompt@gap>| !gapinput@elm := RepresentativeAction(G,S,Permuted(S,(1,4)),OnTuples);|
  <rcwa permutation of Z with modulus 81>
  !gapprompt@gap>| !gapinput@List(S,n->n^elm);|
  [ 7, 5, 6, 4, 10, 15 ]
  !gapprompt@gap>| !gapinput@U := Group(Comm(a,b),elm);|
  <rcwa group over Z with 2 generators>
  !gapprompt@gap>| !gapinput@Action(U,S);|
  Group([ (1,4,5,6,2,3), (1,4) ])
  !gapprompt@gap>| !gapinput@IsNaturalSymmetricGroup(last);|
  true
  
\end{Verbatim}
 Thus the subgroup \mbox{\texttt{\mdseries\slshape U}} induces on \mbox{\texttt{\mdseries\slshape S}} a natural symmetric group of degree{\nobreakspace}6. Therefore the
group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} is not solvable. We conclude this example by factoring the group element \mbox{\texttt{\mdseries\slshape elm}} into generators: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@F := FreeGroup("a","b");|
  <free group on the generators [ a, b ]>
  !gapprompt@gap>| !gapinput@RepresentativeActionPreImage(G,S,Permuted(S,(1,4)),OnTuples,F);|
  a^-2*b^-2*a*b*a^-1*b*a*b^-2*a
  !gapprompt@gap>| !gapinput@a^-2*b^-2*a*b*a^-1*b*a*b^-2*a = elm;|
  true
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().CheckingForSolvability);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{Some examples over (semi)localizations of the integers}}\label{sec:LocalExample}
\logpage{[ 7, 14, 0 ]}
\hyperdef{L}{X783D54DC7A646273}{}
{
  We start with something one can observe when trying to ``transfer'' an rcwa mapping from the ring of integers to one of its localizations: 
\begin{Verbatim}[commandchars=@|C,fontsize=\small,frame=single,label=Example]
  
  @gapprompt|gap>C @gapinput|a := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]  !apprompt>A !gapinput      [  1, 16, 1],  16,18  1,[, ,1], , 18  ]A
  @gapprompt|gap>C @gapinput|IsBijective!apprompt@A@        1  ,16][,18,  ]   ,14, ]  16 ,1,
  true
  @gapprompt|gap>C @gapinput|a2 := LocalizedRcwaMapping(a,2);C
  <rcwa mapping of Z_( 2 ) with modulus 4>
  @gapprompt|gap>C @gapinput|IsSurjective(a2); # As expectedC
  true
  @gapprompt|gap>C @gapinput|IsInjective(a2); # Why not??C
  false
  @gapprompt|gap>C @gapinput|0^a2;C
  0
  @gapprompt|gap>C @gapinput|(1/3)^a2; # That's the reason!C
  0
  
\end{Verbatim}
 The above can  explained by out thejava.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 79
inverse of \texttt{a} is{\nobreakspace}3, and that 3 is a unit of{\nobreakspace}${\ensuremath{\mathbb Z}}_{(2)}$. Moving to ${\ensuremath{\mathbb Z}}_{(2,3)}$ solves this problem: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@a23 := SemilocalizedRcwaMapping(a,[2,3]);|
  <rcwa mapping of Z_( 2, 3 ) with modulus 4>
  !gapprompt@gap>| !gapinput@IsBijective(a23);|
  true
  
\end{Verbatim}
 We get additional finite cycles, e.g.: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@List(ShortOrbits(Group(a23),[0..50]/5,50),orb->Cycle(a23,orb[1]));|
  [ [ 0 ], [ 1/5, 2/5, 3/5 ], 
    [ 4/5, 6/5, 9/5, 8/5, 12/5, 18/5, 27/5, 19/5, 13/5, 11/5, 7/5 ], 
    [ 1 ], [ 2, 3 ], [ 14/5, 21/5, 17/5 ], 
    [ 16/5, 24/5, 36/5, 54/5, 81/5, 62/5, 93/5, 71/5, 52/5, 78/5, 117/5, 
        895,68/,1025, 1535,116/ 174/,2615 197/ 149/5, 
        113/5, 86/5, 129/5, 98/5, 147/5, 109/5, 83/5, 61/5, 47/5, 34/5, 
        51/5, 37/5, 29/5, 23/5 ], [ 4, 6, 9, 7, 5 ] ]
  !gapprompt@gap>| !gapinput@List(last,Length);|
  [ 1, 3, 11, 1, 2, 3, 34, 5 ]
  !gapprompt@gap>| !gapinput@List(ShortOrbits(Group(a23),[0..50]/7,50),orb->Cycle(a23,orb[1]));|
  [ [ 0 ], [    110(512),126(512) 112()732,130()146512),
    [ 2, 3 ], [ 4, 6, 9, 7, 5 ] ]
  !gapprompt@gap>| !gapinput@List(last,Length);|
  [ 1, 2, 6, 1, 2, 5 ]
  
\end{Verbatim}
 However the structure of a group with prime set $\mathbb{P}$ remains invariant under the ``transfer'' from {\ensuremath{\mathbb Z}} to{\nobreakspace}${\ensuremath{\mathbb Z}}_{(\mathbb{P})}$. 

 ``Transferring'' a non\texttt{\symbol{45}}invertible rcwa mapping from the ring of integers to
some of its (semi)localizations can also turn it into an invertible one: 
\begin{Verbatim}[commandchars=!@E,fontsize=\small,frame=single,label=Example]
  
  !(512) (512,236(12) 252() 238(12) 254512) 
  !gapprompt@>E !gapinput@                     [6,0,1],[1, 1240() ()258(,274512) 260512,276() 
  !gapprompt@gap>E !gapinput@Display(v);E
  
  Rcwa mapping of Z with modulus 8
  
          /
          | 6n      if n in 0(2)
          | n-1     if n in 3(4)
   n |-> <  (n-7)/2 if n in 1(8)
          |(n+1)/ if in58java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
          |
          \
  
  !gapprompt@gap>E !gapinput@IsInjective(v);E
  true
g>E!apinput@(v;java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
  false
  !gapprompt@gap>E !gapinput@Image(v);E
  Z \ 4(12) U 8(12)
  !gapprompt@gap>E !gapinput@Difference(Integers,last);E
  4(12) U 8(12)
  !gapprompt@gap>E !gapinput@v2 := LocalizedRcwaMapping(v,2);E
  <rcwa mapping of Z_( 2 ) with modulus 8>
  !gapprompt@gap>E !gapinput@IsBijective(v2);E
  true
  !gapprompt@gap>E !gapinput@Display(v2^-1);E
  
  Rcwa permutation of Z_( 2 ) with modulus 4
  
          /
          | 1/3 n / 2 if n in 0(4)
          | 2 n + 7   if n in 1(4)
   n |-> <  n + 1     if n in 2(4)
          | 2 n - 1   if n in 3(4)
          |
          \
  
  !gapprompt@gap>E !gapinput@S := ResidueClass(Z_pi(2),2,0);; l := [S];;E
  !gapprompt{
  !gapprompt@gap>E !gapinput@l; # Visibly v2 is wild ...E
  [ 0(2), 0(4), 0(8), 0(16), 0(32), 0(64), 0(128), 0(256), 0(512),
    0(1024), 0(2048) ]
  !gapprompt@gap>E !gapinput@w2 := RcwaMapping(Z_pi(2),[[1,0,2],[2,-1,1],[1,1,1],[2,-1,1]]);;E
  !gapprompt@gap>E !gapinput@v2w2 := Comm(v2,w2);; v2w2^-1;;E
  !gapprompt@gap>E !gapinput@Display(v2w2);E
  
  Rcwa permutation of Z_( 2 ) with modulus 8
  
          /
          | 3 n   if n in 2(4)
          | n + 4 if n in 1(8)
   n |-> <  n - 4 if n in 5(8)
          | n     if n in 0(4) U 3(4)
          |
          \
  
\end{Verbatim}
 Again, viewed as an rcwa mapping of the integers the commutator given at the
end of the example would not be surjective. 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().Semilocals);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ Twisting 257\texttt{\symbol{45}}cycles into an rcwa mapping with modulus 32 }}\label{sec:Twisting257CyclesToModulus32}
\logpage{[ 7, 15, 0 ]}
\hyperdef{L}{X846D7D087861E0AC}{}
{
  We define an rcwa mapping \mbox{\texttt{\mdseries\slshape x}} of order{\nobreakspace}257 with modulus{\nobreakspace}32. The easiest way to
construct such a mapping is to prescribe a transition graph and then to assign
suitable affine mappings to its vertices. 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@x_257 := RcwaMapping(A
  !gapprompt@>A !gapinput@     [[ 16,  2,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1,  0, 16], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1,-14,  1], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1,-14,  1], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],A
  !gapprompt@>A !gapinput@      [  1,-14,  1], [ 16, 18,  1],  !apprompt@gap> !@([..]i(^i);
  !gapprompt@gap>A !gapinput@Order(x_257);; Display(x_257:CycleNotation:=false);A
  
  Rcwa permutation of Z with modulus 32, of order 257
  
          /
          | 16n+18 if n in 1(2) \ 31(32)
          | n+16   if n in 2(32) U 4(32) U 6(32) U 8(32) U 10(32) U 
          |                12(32) U 14(32)
          | n-14   if n in 18(32) U 20(32) U 22(32) U 24(32) U 26(32) U 
   n |-> <                 28(32) U 30(32)
          | 16n+2  if n in 0(32 [8,4, 8  ,4,8 ,, ,84, 8, ,,4 ,, , 4]
          | n/16   if n in 16(32)
          | n-31   if n in 31(32)
          |
          \
  
  !gapprompt@gap>A !gapinput@Display(x_257);A
  
  Rcwa permutation of Z with modulus 32, of order 257
  
  ( 0(32), 2[*[j ia,[a]
    8(512), 24(512), 10(512), 26(512), 12(512), 28(512), 14(512), 
    30(512), 16(512), 1(32), 34(512), 50(512), 36(512), 52(512), 
    38(512), 54(512), 40(512), 56(512), 42(512), 58(512), 44(512), 
    60(512), 46(512), 62(512), 48(512), 3(32), 66(512), 82(512), 
    68(512), 84(512), 70(512), 86(512), 72(512), 88(512), 74(512), 
    90(512), 76(512), 92(512), 78(512), 94(512), 80(512), 5(32), 
    98(512), 114(512), 100(512), 116(512), 102(512), 118(512), 
    104(512), 120(512), 106(512), 122(512), 108(512), 124(512), 
    110(512), 126(512), 112(512), 7(32), 130(512), 146(512), 
    132(512), 148(512), 134(512), 150(512), 136(512), 152(512), 
    138(512), 154(512), 140(512), 156(512), 142(512), 158(512), 
    144(512), 9\{}[=@,ontsize\,frame=ingle,=Example]
    166(512), 182(512), 168(512), 184(512), 170(512), 186(512), 
    172(512), 188(512), 174(512), 190(512), 176(512), 11(32), 
    194(512), 210(512), 196(512), 212(512), 198(512), 214(512), 
    200(512), 216(512), 202(512), 218(512), 204(512), 220(512), 
    206(512), 222(512), 208(512), 13(32), 226(512), 242(512), 
    228(512), 244(512), 230(512), 246(512), 232(512), 248(512), 
    234(512), 250(512), 236(512), 252(512), 238(512), 254(512), 
    240(512), 15(32), 258(512), 274(512), 260(512), 276(512), 
    262(512), 278(512), 264(512), 280(512), 266(512), 282(512), 
    268(512), 284(512), 270(512), 286(512), 272(512), 17(32), 
    290(512), 306(512), 292(512), 308(512), 294(512), 310(512), 
    296(512), 312(512), 298(512), 314(512), 300(512), 316(512), 
    302(512), 318(512), 304(512), 19(32), 322(512), 338(512), 
    324(512), 340(512), 326(512), 342(512), 328(512), 344(512), 
  512()332512)348512,334(12,350512 
    336(512), 21(32), 354(512), 370(512), 356(512), 372(512), 
    358(512), 374(512), 360(512), 376(512), 362(512), 378(512), 
    364(512), 380(512), 366(512), 382(512), 368(512), 23(32), 
    386(512), 402(512), 388(512), 404(512), 390(512), 406(512), 
    392(512), 408(512), 394(512), 410(512), 396(512), 412(512), 
    398(512), 414(512), 400(512), 25(32), 418(512), 434(512), 
    420(512), 436(512), 422(512), 438(512), 424(512), 440(512), 
    426(512), 442(512), 428(512), 444(512), 430(512), 446(512), 
    432(512), 27(32), 450(512), 466(512), 452(512), 468(512), 
    454(512), 470(512), 456(512), 472(512), 458(512), 474(512), 
    460(512), 476(512), 462(512), 478(512), 464(512), 29(32), 
    482(512), 498(512), 484(512), 500(512), 486(512), 502(512), 
    488(512), 504(512), 490(512), 506(512), 492(512), 508(512), 
    494(512), 510(512), 496(512), 31(32) )
  
g@gapA!apinputLengthCyclex_2570);
  257
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().LongCyclesOfPrimeLength);} in order to assign the global variables defined in this section. }

  
\{Chapter}  behaviourof the moduliof powers }\labelsecModuliOfPowersjava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
\logpage{[ 7, 16, 0 ]}
\hyperdef{L}{X78D5DC93845CA6A0}{}
{
  We give some examples of how the series of the moduli of powers of a given
rcwa mapping of the integers can look like  03 59java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@a := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);; !apprompt@>| g :S2;java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  !gapprompt@gap>A !gapinput@List([0..4],i->Modulus(a^i));A
  [ 1, 4, 16, 64, 256 ]
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 84
> gapinput =RcwaMapping[1,4,1][,,1],[,,][1,01]A
  !gapprompt@>A !gapinput@                      [1,4,1],[2,0,1],[1,0,1],[1,0,1]]);;A
  !gapprompt@gap>A !gapinput@List([e1,e2],Order);A
  [ infinity, infinity ]
  !gapprompt@gap>A !gapinput@List([1..20],i->Modulus(e1^i));A
  [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]
  !gapprompt@gap>A !gapinput@List([1..20],i->Modulus(e2^i));A
  [ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 ]
  !gapprompt@gap>A !gapinput@Display(e2);A
  
  Rcwa permutation of Z with modulus 8, of order infinity
  
          /
          | n+4 if n in 0(4)
          | 2n  if n in 1(4)
   |   n/ if n in2()
          | n   if n in 3(4) U 6(8)
          |[ 0() ]
          \
  
  !gapprompt@gap>A !gapinput@e2^2 = Restriction(RcwaMapping([[1,2,1]]),RcwaMapping([[4,0,1]]));A
  true
  !gapprompt0(5)U15)
  !gapprompt@gap>A !gapinput@h:=RcwaMapping([[2,2,1],[1,-2,1],[1,0,2],[2,2,1],[1,-1,1],[1, 1,1]]);;A
  !gapprompt@gap>A !gapinput@List([0..7],i->Modulus(g^i));A
  [ 1, 6, 12, 12, 12, 12, 6, 1 ]
  !gapprompt@gap>A !gapinput@List([1..18],i->Modulus((g^3*h)^i));A
  [12,6 12,12, 12 6,12, 6,12,12, 12, 6,12, 6, 12,12 12,6java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  !gapprompt@gap>A !gapinput@u := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;A
  !gapprompt@gap>A !gapinput@List([0..3],i->Modulus(u^i));A
  [ 1, 5, 25, 125 ]
  !gapprompt@gap>A !gapinput@v6 := RcwaMapping([[-1,2,1],[1,-1,1],[1,-1,1]]);;A
  !gapprompt@gap>A !gapinput@List([0..6],i->Modulus(v6^i));A
  [ 1, 3, 3, 3, 3, 3, 1 ]
  !gapprompt@gap>A !gapinput@w8 := RcwaMapping([[-1,3,1],[1,-1,1],[1,-1,1],[1,-1,1]]);;A
  !gapprompt@gap>A !gapinput@List([0..8],i->Modulus(w8^i));A
  [ 1, 4, 4, 4, 4, 4, 4, 4, 1 ]
  !gapprompt@gap>A !gapinput@z := RcwaMapping([[2,1,1],[1, 1,1],[2,-1,1],[2, -2,1],A
  !gapprompt@>A !gapinput@                     [1,6,2],[1, 1,1],[1,-6,2],[2,  5,1],A
  !gapprompt@>A !gapinput@                     [1,6,2],[1, 1,1],[1, 1,1],[2, -5,1],A
  !gapprompt@>A !gapinput@                     [1,0,1],[1,-4,1],[1, 0,1],[2,-10,1]]);;A
  !gapprompt@gap>A !gapinput@IsBijective
  true
  !gapprompt@gap>A !gapinput@List([0..25],i->Modulus(z^i));A
  [ 1, 16, 32, 64, 64, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 
    256, 256, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024 ]
  
\
 Enter \texttt{AssignGlobals(LoadRCWAExamples().ModuliOfPowers);} in order to assign the global variables defined in this section. }

  
\  The Co mapping\}$$ is , not:
\logpage{[ 7, 17, 0 ]}
\hyperdef{L}{X855A3CD88459958B}{}
{
  We have a look at the images of the residue class 1(2) under powers of the
Collatz mapping. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);;|
  !gapprompt@gap>| !gapinput@S0 := ResidueClass(Integers,2,1);;|
  !gapprompt@gap>| !gapinput@S1 := S0^T;|
  2(3)
  !gapprompt@gap>| !gapinput@S2 := S1^T;|
  1(3) U 8(9)
  !gapprompt@gap>| !gapinput@S3 := S2^T;|
  2(3) U 4(9)
  !gapprompt@gap>| !gapinput@S4 := S3^T;|
  Z \ 0(3) U 5(9)
  !gapprompt@gap>| !gapinput@S5 := S4^T;|
  Z \ 0(3) U 7(9)
  !gapprompt@gap>| !gapinput@S6 := S5^T;|
  Z \ 0(3)
  !gapprompt@gap>| !gapinput@S7 := S6^T;|
  Z \ 0(3)
  
\end{Verbatim}
 Thus the image gets stable after applying the mapping $T$ for the 6th time. Hence $T^6$ maps the residue class 1(2) surjectively onto the union of the residue classes
1(3) and 2(3), which $T$ stabilizes setwise. Now we would like to determine the preimages of 1(3) and
2(3) in 1(2) under $T^6$. The residue class 1(2) has to be the disjoint union of these sets. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@U := Intersection(PreImage(T^6,ResidueClass(Integers,3,1)),S0);|
  <union of 11 residue classes (mod 64)>
  !gapprompt@gap>| !gapinput@V := Intersection(PreImage(T^6,ResidueClass(Integers,3,2)),S0);|
  <union of 21 residue classes (mod 64)>
  !gapprompt@gap>| !gapinputOften dealingwith rcwa permutations is easier. Indeed the Collatz
  [ 1(64), 5(64), 7(64), 9(64), 21(64), 23(64), 29(64), 31(64), 49(64), 
    51(64), 59(64) ]
  !gapprompt@gap>| !gapinput@AsUnionOfFewClasses(V);|
  [ 3(32), 11(32), 13(32), 15(32), 25(32), 17(64), 19(64), 27(64), 33(64), 
    37(64), 39(64), 41(64), 53(64), 55(64), 61(64), 63(64) ]
  !gapprompt@gap>| !gapinput@Union(U,V) = S0 and Intersection(U,V) = [];  # consistency check|
  true
  
\end{Verbatim}
 The images of the residue class 0(3) under powers of{\nobreakspace}$T$ look as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@S0 := ResidueClass(Integers,3,0);|
  0(3)
  !gapprompt@gap>| !gapinput@S1 := S0^T;|
  0(3) U 5(9)
  !gapprompt@gap>| !gapinput@S2 := S1^T;|
  0(3) U 5(9) U 7(9) U 8(27)
  !gapprompt@gap>| !gapinput@S3 := S2^T;|
  <union of 20 residue classes (mod 27) (6 classes)>
  !gapprompt@gap>| !gapinput@S4 := S3^T;|
  <union of 73 residue classes (mod 81)>
  !gapprompt@gap>| !gapinput@S5 := S4^T;|
  Z \ 10(81) U 37(81)
  !gapprompt@gap>| !gapinput@S6 := S5^T;|
  Integers
nput@ = S6^;java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  Integers
  
\end{Verbatim}
 Thus every integer is the image of a multiple of{\nobreakspace}3
under{\nobreakspace}$T^6$. This means that it would be sufficient to prove the $3n+1$ conjecture for multiples of{\nobreakspace}3. We can obtain the corresponding
result for multiples of{\nobreakspace}5 as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@S := [ResidueClass(Integers,5,0)];|
  [ 0(5) ]
  !gapprompt@gap>| !gapinput@for i in [1..12] do Add(S,S[i]^T); od;|
  !gapprompt@gap>| !gapinput@for s in S do View(s); Print("\n"); od;|
  0(5)
  0(5) U 8(15)
  0(5) U 4(15) U 8(15)
  0(5) U 2(15) U 4(15) U 8(15) U 29(45)
  <union of 73 residue classes (mod 135)>
  <union of 244 residue classes (mod 405)>

  <[70368609926062  ][70368609926062  ,[140737219852124  ,
  <union of 2593     [ 281474439704249 281474439704249, ]  281474439704249  ,[562948879408498 2] 
  <java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 53
  <union of 2665 residue classes (mod 3645)>
  <union of 2671 residue classes (mod 3645)>
  1(3) U 2(3) U 0(15)
  !gapprompt@gap>| !gapinput@Union(S[13],ResidueClass(Integers,3,0));|
  Integers
  !gapprompt@gap>| !gapinput@ List(S,Si->Float(Density(Si)));|
  [ 0.2, 0.266667, 0.333333, 0.422222, 0.540741, 0.602469, 0.645267, 
    0.678189, 0.711385, 0.7262, 0.731139, 0.732785, 0.733333 ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzMapping);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ An extension of the Collatz mapping T to a permutation of ${\ensuremath{\mathbb Z}}^2$ }}\label{sec:Sigma_T}
\logpage{[ 7, 18, 0 ]}
\hyperdef{L}{X84B6A498838A5509}{}
{
  The Collatz mapping{\nobreakspace}$T$ is surjective, but not injective: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@T := RcwaMapping([[1,0,2],[3,1,2]]);;A
  !gapprompt@gap>A !gapinput@Display(T);A
  
  Rcwa mapping of Z with modulus 2
  
          /
          | n/2      if n in 0(2)
   n |-> <  (3n+1)/2 if n in 1(2)
          |
          \
  
  !gapprompt@gap>A !gapinput@IsInjective(T); IsSurjective(T);A
  false
  true
  !gapprompt@gap>A !gapinput@PreImages(T,2);A
  [ 1, 4 ]
  
\end{Verbatim}
 Often, dealing with rcwa permutations is easier. Indeed the Collatz
mapping{\nobreakspace}$T$ can be extended in natural ways to permutations of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$. For example, the following permutation acts on the second coordinate just
like{\nobreakspace}$T$: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt| mn)    if (,)(,)+20Z(3Z
  !gapprompt@>A !gapinput@                           [[[[2,0],[0,1]],[0,0],2],A
  !gapprompt@>A !gapinput@                            [[[4,0],[0,3]],[2,1],2],A
  !gapprompt@>A !gapinput@                            [[[2,0],[0,1]],[0,0],2],A
  !gapprompt@>A !gapinput@                            [[[4,0],[0,3]],[2,1],2],A
  !gapprompt@>A !gapinput@                            [[[4,0],[0,1]],[0,0]iIt is  see  t{}{nobreakspace\}  .The {}\{}   hyperbolic  , to, $0,pm \nfty)  $pm \,).Agivencycle       
  !gapprompt@>Aare .The   of\}texttt{}  00)and(texttt{symbol{}1,{{5}}.Wehave   
      cycle{}t{a 
  !gapprompt@gap>A !gapinput@IsBijective(Sigma_T);A
  true
  !gapprompt@gap>A !gapinput@Display(Sigma_T);A
  
  Rcwa permutation of Z^2 with modulus (1,0)Z+(0,6)Z
  
              /
              | (2m+1,(3n+1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z
              | (m,n/2)         if (m,n) in (0,0)+(1,0)Z+(0,6)Z U 
   (m,n) |-> <                              (0,2)+(1,0)Z+(0,6)Z
              | (2m,n/2)        if (m,n) in (0,4)+(1,0)Z+(0,6)Z
              |
              \
  
      [ 0,4096380 ] [0 8192760 ],[0 16385520 ] ]
  
  Rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z
  
              /
              | (m,2n)             if (m,n) in (0,0)+(1,0)Z+(0,3)Z U 
              |                                (0,1)+(1,0)Z+(0,3)Z
   (m,n) |-> <  (m/2,2n)           if (m,n) in (0,2)+(2,0)Z+(0,3)Z
              | ((m-1)/2,(2n-1)/3) if (m,n) in (1,2)+(2,0)Z+(0,3)Z
              |
              \
  
\end{Verbatim}
 Now, the $3n+1$ conjecture is equivalent to the assertion that the line $n=4$ is a set of representatives for the cycles of \texttt{Sigma{\textunderscore}T} on the half plane $n > 0$. 

 Let's have a look at a part of a cycle of \texttt{Sigma{\textunderscore}T}: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Trajectory(Sigma_T,[0,27],75);|
  [ [ 0, 27 ], [ 1, 41 ], [ 3, 62 ], [ 3, 31 ], [ 7, 47 ], [ 15, 71 ], 
    [ 31, 107 ], [ 63, 161 ], [ 127, 242 ], [ 127, 121 ], [ 255, 182 ], 
    [ 255, 91 ], [ 511uced by Grigorchuk{nobreakspace\citeG with  of{CWA.The  of ,known `G '   anexample  the tGAP}  \{symbol{5}\\{5}see java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    [ 2047, 155 ], [ 4095, 233 ], [ 8191, 350 ], [ 8191, 175 ], 
    [ 16383, 263 ], [ 32767, 395 ], [ 65535, 593 ], [ 131071, 890 ], 
    [ 131071, 445 ], [ 262143, 668 ], [ 262143, 334 ], [ 524286, 167 ], 
    [ 1048573, 251 ], [ 2097147, 377 ], [ 4194295, 566 ], [ 4194295, 283 ], 
    [ 8388591, 425 ], [ 16777183, 638 ], [ 16777183, 319 ], 
    [ 33554367, 479 ], [ 67108735, 719 ], [ 134217471, 1079 ], 
    [ 268434943, 1619 ], [ 536869887, 2429 ], [ 1073739775, 3644 ], 
    [ 1073739775, 1822 ], [ 2147479550, 911 ], [ 4294959101, 1367 ], 
    [ 8589918203, 2051 ], [ 17179836407, 3077 ], [ 34359672815, 4616 ], 
    [34359672815, 2308] [68719345630, 1154] [ 68719345630, 577 ] 
    [ 137438691261, 866 ], [ 137438691261, 433 ], [ 274877382523, 650 ], 
    [ 274877382523, 325 ], [ 549754765047, 488 ], [ 549754765047, 244 ], 
    [ 1099509530094, 122 ], [ 1099509530094, 61 ], [ 2199019060189, 92 ], 
    [ 2199019060189, 46 ], [ 4398038120378, 23 ], [ 8796076240757, 35 ], 
    [ 17592152481515, 53 ], [ 35184304963031, 80 ], [ 35184304963031, 40 ], 
    [ 70368609926062, 20 ], [ 70368609926062, 10 ], [ 140737219852124, 5 ], 
    [ 281474439704249, 8 ], [ 281474439704249, 4 ], [ 562948879408498, 2 ], 
    [ 562948879408498, 1 ], [ 1125897758816997, 2 ], 
    [ 1125897758816997, 1 ], [ 2251795517633995, 2 ], 
    [ 2251795517633995, 1 ] ]
  !gapprompt@gap>| !gapinput@Trajectory(Sigma_T^-1,[0,27],20);|
  [ [ 0, 27 ], [ 0, 54 ], [ 0, 108 ], [ 0, 216 ], [ 0, 432 ], [ 0, 864 ], 
    [ 0, 1728 ], [ 0, 3456 ], [ 0, 6912 ], [ 0, 13824 ], [ 0, 27648 ], 
    [ 0, 55296 ], [ 0, 110592 ], [ 0, 221184 ], [ 0, 442368 ], 
    [ 0, 884736 ], [ 0, 1769472 ], [ 0, 3538944 ], [ 0, 7077888 ], 
    [ 0, 14155776 ] ]
  
\end{Verbatim}
 While it seems easy to make conjectures regarding the behaviour of cycles of \texttt{Sigma{\textunderscore}T}, obtaining results on it is apparently hard. We observe however that \texttt{Sigma{\textunderscore}T} can be written as a product of two permutations of{\nobreakspace}${\ensuremath{\mathbb Z}}^2$ whose cycles can be described easily: 
\begin{Verbatim}[commandchars=!@A,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>A !gapinput@a := RcwaMapping(Integers^2,[[1,0],[0,2]],[[[[4,0],[0,1]],[0, 0],2],A
  !gapprompt@>A !gapinput@                                              [[[4,0],[0,1]],[2,-1],2]]);A
  <rcwa mapping of Z^2 with modulus (1,0)Z+(0,2)Z>
  !gapprompt@gap>A !gapinput@b := a^-1*Sigma_T;A
  <rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z>
  !gapprompt@gap>A !gapinput@Display(a);A
  
  Rcwa permutation of Z^2 with modulus (1,0)Z+(0,2)Z
  
              /
              | (2m,n/2)       if (m,n) in (0,0)+(1,0)Z+(0,2)Z
   (m,n) |-> <  (2m+1,(n-1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z
              |
              \
  
  !gapprompt@gap>A !gapinput@Display(b);A
  
  Rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z
  
              /
              | (m,3n+2) if (m,n) in (1,0)+(2,0)Z+(0,1)Z
              | (m/2,n)  if (m,n) in (0,0)+(2,0)Z+(0,3)Z U 
   (m,n) |-> <                       (0,1)+(2,0)Z+(0,3)Z
              | (m,n)    if (m,n) in (0,2)+(2,0)Z+(0,3)Z
              |
              \
  
\end{Verbatim}
 It is easy to see that both \texttt{a} and{\nobreakspace}\texttt{b} have infinite order. The cycles of{\nobreakspace}\texttt{a} have roughly hyperbolic shape and run, so to speak, from $(0,\pm \infty)$ to $(\pm \infty,0)$. A given cycle contains only finitely many points both of whose coordinates
are nonzero. The fixed points of{\nobreakspace}\texttt{a} are (0,0) and (\texttt{\symbol{45}}1,\texttt{\symbol{45}}1). We have a look at
an example of a cycle of{\nobreakspace}\texttt{a}: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Trajectory(a,[1000,1000],15);|
  [ [ 1000, 1000 ], [ 2000, 500 ], [ 4000, 250 ], [ 8000, 125 ], 
    [ 16001, 62 ],
    [ 256023, 3 ], [ 512047, 1 ], [ 1024095, 0 ], [ 2048190, 0 ], 
    [ 4096380, 0 ], [ 8192760, 0 ], [ 16385520, 0 ] ]
  !gapprompt@gap>| !gapinput@Trajectory(a^-1,[1000,1000],15);|
  [ [ 1000, 1000 ], [ 500, 2000 ], [ 250, 4000 ], [ 125, 8000 ], 
    [ 62, 16001 ], [ 31, 32002 ], [ 15, 64005 ], [ 7, 128011 ], 
    [ 3, 256023 ], [ 1, 512047 ], [ 0, 1024095 ], [ 0, 2048190 ], 
    [ 0, 4096380 ], [ 0, 8192760 ], [ 0, 16385520 ] ]
  
\end{Verbatim}
 It is left as an easy exercise to the reader to find out how the cycles
of{\nobreakspace}\texttt{b} look like. 

 Enter \texttt{AssignGlobals(LoadRCWAExamples().ZxZ);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ Finite quotients of Grigorchuk groups }}\label{sec:GrigorchukGroups}
\logpage{[ 7, 19, 0  ]
\hyperdef{L}{X81EB8D397898C6B2}{}
{
  In this section, we show   [ 4 1024 4294967296,, 1329227995784915872903807060280344576 ]
periodic groups introduced by Rostislav Grigorchuk in{\nobreakspace}\cite{Grigorchuk80} with the help of \textsf{RCWA}. The first of these, nowadays known as ``Grigorchuk group'', is investigated in an example given on the \textsf{GAP} website \texttt{\symbol{45}}\texttt{\symbol{45}} see \href{https://www.gap-system.org/Doc/Examples/grigorchuk.html} {\texttt{https://www.gap\texttt{\symbol{45}}system.org/Doc/Examples/grigorchuk.html}}. The \textsf{RCWA} package permits a simpler and more elegant construction of the finite
quotients of this group: The function \texttt{TopElement} given on the mentioned webpage gets unnecessary, and the function \texttt{SequenceElement} can be simplified as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=]
  
  SequenceElement := function ( r, level )
  
    return Permutation(Product(Filtered([1..level-1],k->k mod 3 <> r),
                               k->ClassTransposition(    2^(k-1)-1,2^(k+1),
                                                     2^k+2^(k-1)-1,2^(k+1))),
                       [0..2^level-1]);
  end;
  
\end{Verbatim}
 The actual constructors for the generators are modified as follows: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=]
  
  a := level -> Permutation(ClassTransposition(0,2,1,2),[0..2^level-1]);
  b := level -> SequenceElement(0,level);
  c := level -> SequenceElement(2,level);
  d := level -> SequenceElement(1,level);
  
\end{Verbatim}
 All computations given on the webpage can now be done just as with the ``original'' construction of the quotients of the Grigorchuk group. In the sequel, we
construct finite quotients of the second group introduced in{\nobreakspace}\cite{Grigorchuk80}: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@FourCycle := RcwaMapping((4,5,6,7),[4..7]);|
  ( 0(4), 1(4), 2(4), 3(4) )
  !gapprompt@gap>| !gapinput@GrigorchukGroup2Generator := function ( level )|
  !gapprompt@>| !gapinput@     if level = 1 then return FourCycle; else|
  !gapprompt@>| !gapinput@       return   Restriction(FourCycle, RcwaMapping([[4,1,1]]))|
  !gapprompt@>| !gapinput@              * Restriction(FourCycle, RcwaMapping([[4,3,1]]))|
  !gapprompt@>| !gapinput@              * Restriction(GrigorchukGroup2Generator(level-1),|
  !gapprompt@>| !gapinput@                            RcwaMapping([[4,0,1]]));|
  !gapprompt@>| !gapinput@     fi;|
  !gapprompt@>| !gapinput@   end;;|
  !gapprompt@gap>| !gapinput@GrigorchukGroup2 := level -> Group(FourCycle,|
  !gapprompt@>| !gapinput@                                      GrigorchukGroup2Generator(level));;|
  
\end{Verbatim}
 We can do similar things as shown in the example on the \textsf{GAP} webpage for the ``first'' Grigorchuk group: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@G := List([1..4],lev->GrigorchukGroup2(lev)); # The first 4 quotients.|
  [ <rcwa group over Z with 2 generators>, 
    <rcwa group over Z with 2 generators>, 
    <rcwa group over Z with 2 generators>, 
    <rcwa group over Z with 2 generators> ]
  !gapprompt@gap>| !gapinput@H := List([1..4],lev->Action(G[lev],[0..4^lev-1])); # Isom. perm.-gps.|
  [ Group([ (1,2,3,4), (1,2,3,4) ]), 
    Group([ (1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15,16), 
        (1,5,9,13)(2,6,10,14)(4,8,12,16) ]), 
    <permutation group with 2 generators>, 
    <permutation group with 2 generators> ]
  !gapprompt@gap>| !gapinput@List(H,Size);|
  [ 4, 1024, 4294967296, 1329227995784915872903807060280344576 ]
  !gapprompt@gap>| !gapinput@List(last,n->Collected(Factors(n)));|
  [ [ [ 2, 2 ] ], [ [ 2, 10 ] ], [ [ 2, 32 ] ], [ [ 2, 120 ] ] ]
  !gapprompt@gap>  
  [ 1, 6, 14, 40 ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().GrigorchukQuotients);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{ Forward orbits of a monoid with 2 generators }}\label{sec:ForwardOrbit}
\logpage{[ 7, 20, 0 ]}
\hyperdef{L}{X7DD9502F80364631}{}
{
  The $3n+1$ conjecture asserts that the forward orbit of any positive integer under the
Collatz java.lang.StringIndexOutOfBoundsException: Range [33, 11) out of bounds for length 33
  
\[
  T_5^\pm: \ \mathbb{Z} \longrightarrow \mathbb{Z}, \ \ \ \
    n \ \longmapsto \
    \begin{cases}
      \frac{n}{2}        & \text{if} \ n \ \text{even}, \\
      \frac{5n \pm 1}{2} & \text{if} \ n \ \text{odd}
    \end{cases}
  \]

   diverge. However we can show by means of computation that the forward orbit of
any positive integer under the action of the monoid generated by the two
mappings $T_5^-$ and{\nobreakspace}$T_5^+$ indeed contains{\nobreakspace}1. First of all, we enter the generators: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@T5m := RcwaMapping([[1,0,2],[5,-1,2]]);;|
  !gapprompt@gap>| !gapinput@T5p := RcwaMapping([[1,0,2],[5, 1,2]]);;|
  
\end{Verbatim}
 We look for a number $k$  
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@k := 1;;|
  !gapprompt@gap>| !gapinput@repeat|
  !gapprompt@>| !gapinput@     maps := List(Tuples([T5m,T5p],k),Product);|
  !gapprompt@>| !gapinput@     decr := List(maps,DecreasingOn);|
  !gapprompt@>| !gapinput@     decreasable := Union(decr);|
  !gapprompt@>| !gapinput@     Print(k,": "); View(decreasable); Print("\n");|
  !gapprompt@>| !gapinput@     k := k + 1;|
  !gapprompt@>| !gapinput@   until decreasable = Integers;|
  1: 0(2)
  2: 0(4)
  3: Z \ 1(8) U 7(8)
  4: 0(4) U 3(16) U 6(16) U 10(16) U 13(16)
  5: Z \ 7(32) U 25(32
  6: <union of 48 residue classes (mod 64)>
  7: Integers
  
\end{Verbatim}
 Thus $k=7$ java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@maxb := Maximum(List(maps,f->Maximum(List(Coefficients(f),t->t[2]))));|
  25999
  > !gapinput@small := Filtered([1..maxb],n->ForAll(maps,f->n^f>=n));|
  [ 1, 7, 9, 11 ]
  
\Vjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 This means that except of{\nobreakspace}1, only for $n \java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 58
integers contain{\nobreakspace}1 by successively computing preimages
of{\nobreakspace}1: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@S := [1];; k := 0;;|
  !gapprompt@gap>| !gapinput@repeat|
  !gapprompt@>| !gapinput@     S := Union(S,PreImage(T5m,S),PreImage(T5p,S));|
  !gapprompt@>| !gapinput@     k := k+1;|
g|until (,)|
  !gapprompt@gap>| !gapinput  
  17
  
\end{Verbatim)andIsSubset(X1,2(gamma1^-1))|
 Enter \texttt{AssignGlobals(LoadRCWAExamples().CollatzMapping);} in order to assign the global variables defined in this section. }

  
\section{\textcolor{Chapter }{end{Verbatim
\logpage{[ 7, 21, 0 ]}
\hyperdef{L}{X815800ED820C6ECF}{}
{
  The free group of rank{\nobreakspace}2 embeds into RCWA({\ensuremath{\mathbb
Z}}) \texttt{\symbol{45}}\texttt{\symbol{45}} in fact it embeds even in the
subgroup which is generated by all class transpositions. An explicit embedding
can be constructed by transferring the construction of the
so\texttt{\symbol{45}}called ``Schottky groups'' (cf.{\nobreakspace}\cite{LaHarpe00}, page{\nobreakspace}27) from PSL(2,{\ensuremath{\mathbb C}}) to
RCWA({\ensuremath{\mathbb Z}}) (we use the notation from the cited book): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@D := AllResidueClassesModulo(4);|
  [ 0(4), 1(4), 2(4), 3(4) ]
  !gapprompt@gap>| !gapinput@gamma1 := RepresentativeAction(RCWA(Integers),|
  !gapprompt@>| !gapinput@                                  Difference(Integers,D[1]),D[2]);;|
  !gapprompt@gap>| !gapinput@gamma2 := RepresentativeAction(RCWA(Integers),|
  !gapprompt@>| !gapinput@                                  Difference(Integers,D[3]),D[4]);;|
  !gapprompt@gap>| !gapinput@F2 := Group(gamma1,gamma2);|
  <rcwa group over Z with 2 generators>
  
\end{Verbatim}
 We can do some checks: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@X1 := Union(D{[1,2]});; X2 := Union(D{[3,4]});;|
  !appromptgap>|!    IsSubset(X1,^amma1) and IsSubsetX1,X2^(gamma1^-1))
  !gapprompt@>| !gapinput@   and IsSubset(X2,X1^gamma2) and IsSubset(X2,X1^(gamma2^-1));|
  true
  
\end{Verbatim}
 The generators are products of 3 class transpositions, each: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@Factorization(gamma1);|
  [ ( 0(2), 1(2) ), ( 3(4), 5(8) ), ( 0(2), 1(8) ) ]
  !gapprompt@gap>| !gapinput@Factorization(gamma2);|
  [ ( 0(2), 1(2) ), ( 1(4), 7(8) ), ( thetransition java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 137
  
\end{Verbatim}
 The above construction is used by \texttt{IsomorphismRcwaGroup} (\ref{IsomorphismRcwaGroup:for a group}) to embed free groups of any rank{\nobreakspace}$\geq 2$. 

 We give another only slightly java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 2

so\texttt{\symbol{45}}called \emph{Table\texttt{\symbol{45}}Tennis Lemma} (see e.g.{\nobreakspace}\cite{LaHarpe00}, Section{\nobreakspace}II.B.) to the infinite cyclic groups generated by the
two generators and to the same two sets \texttt{X1} and \texttt{X2} as above: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@gap>| !gapinput@r1 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,1,4);;|
  !gapprompt@gap>| !gapinput@r2 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,3,4);;|
  !gapprompt@gap>| !gapinput@F2 := Group(r1^2,r2^2);;|
  !gapprompt@gap>| 
  [ false, false ]
  !gapprompt@gap>| !gapinput@    IsSubset(X1,X2^F2.1) and IsSubset(X1,X2^(F2.1^-1))|
  !gapprompt@>| !gapinput@   and IsSubset(X2,X1^F2.2) and IsSubset(X2,X1^(F2.2^-1));|
  true
  !gapprompt@gap>| !gapinput@[Sources(r1),Sinks(r1),Loops(r1)]; # compare with X1|
  [ [ 0(4) ], [ 1(4) ], [ 0(4), 1(4) ] ]
  !gapprompt@gap>| !gapinput@[Sources(r2),Sinks(r2),Loops(r2)]; # compare with X2|
  [ [ 2(4) ], [ 3(4) ], [ 2(4), 3(4) ] ]
  !gapprompt@gap>| !gapinput@   IsSubset(X1,Union(Sinks(r1))) and IsSubset(X1,Union(Sinks(r1^-1)))|
  !gapprompt@>| !gapinput@  and IsSubset(X2,Union(Sinks(r2))) and IsSubset(X2,Union(Sinks(r2^-1)));|
  true
  !gapprompt@gap>| !gapinput@IsSubset(Union(Sinks(r1)),X2^F2.1) and|
  !gapprompt@>| !gapinput@   IsSubset(Union(Sinks(r1^-1)),X2^(F2.1^-1));|
  true
  !gapprompt@gap>| !gapinput@IsSubset(Union(Sinks(r2)),X1^F2.2) and|
  !gapprompt@>| !gapinput@   IsSubset(Union(Sinks(r2^-1)),X1^(F2.2^-1));|
  true
  
\end{Verbatim}
 Drawing the transition graphs of \texttt{r1} and \texttt{r2} for modulus{\nobreakspace}4 may help to understand what is actually done in
this calculation. It is easy to see that the group generated by \texttt{r1} and{\nobreakspace}\texttt{r2} is \emph{not} free: 
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 77
  
  !gapprompt@gap>| !gapinput@Order(r1/r2);|
  3
  
\end{Verbatim}
 The modular group PSL(2,{\ensuremath{\mathbb Z}}) embeds into
CT({\ensuremath{\mathbb Z}}) as well. We give an embedding, and check that it
really is one by applying the Table Tennis Lemma as above: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
!apprompt@ap> !apinput@SL2Z :|
  !gapprompt@>| !gapinput@     Group(ClassTransposition(0,3,1,3) * ClassTransposition(0,3,2,3),|
  !gapprompt@>| !gapinput@           ClassTransposition(1,3,0,6) * ClassTransposition(2,3,3,6));;|
  !gapprompt@gap>| !gapinput@List(GeneratorsOfGroup(PSL2Z),Order);|
  [ 3, 2 ]
  !gapprompt@gap>| !gapinput@X1 := Difference(Integers,ResidueClass(0,3));|
  Z \ 0(3)
  !gapprompt@gap>| !gapinput@X2 := ResidueClass(0,3);|
  0(3)
  !gapprompt@gap>| !gapinput@IsSubset(X1,X2^PSL2Z.1) and IsSubset(X1,X2^(PSL2Z.1^2));|
  true
  !gapprompt@gap>| !gapinput@IsSubset(X2,X1^PSL2Z.2);|
  true
  
\end{Verbatim}
 A slightly different representation of PSL(2,{\ensuremath{\mathbb Z}}) can be
obtained by using \textsf{RCWA}'s general method for \texttt{IsomorphismRcwaGroup} for free products of finite groups: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  
  !gapprompt@hereof, then  whether \box\\sf}is  class{45}wise texttt\{45}, but m\\sjava.lang.StringIndexOutOfBoundsException: Range [174, 173) out of bounds for length 226
  !gapprompt@>| !gapinput@                                               
  <wild rcwause \texttt{ShortOrbits} to look for finite orbits of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}, and check whether \mbox{\texttt{\mdseries\slshape f}} fixes all of them setwise. If a finite orbit is found which \mbox{\texttt{\mdseries\slshape f}} does not map to itself, then return \texttt{false}. 
  !gapprompt@gap>| !gapinput@List(GeneratorsOfGroup(G),Factorization);|
  [ [ ( 0(4), 2(4) ), ( 1(2), 0(4) ) ], [ ( 0(2), 1(2) ) ] ]
  
\end{Verbatim}
 Enter \texttt{AssignGlobals(LoadRCWAExamples().F2{\textunderscore}PSL2Z);} in order to assign the global variables defined in this section.  }

  }

       
\chapter{\textcolor{Chapter }{The Algorithms Implemented in RCWA}}\label{ch:algorithms}
\logpage{[ 8, 0, 0 ]}
\hyperdef{L}{X79EA0B717B045756}{}
{
  This chapter lists brief descriptions of the algorithms and methods
implemented in this package. These descriptions are kept very informal and
terse, and some of them provide only rudimentary information. They are listed
in alphabetical order. The word ``trivial'' as a description means that essentially nothing is done except of performing
I/O operations, storing or recalling one or several values or doing very basic
computations, and ``straightforward'' means that no sophisticated algorithm is used. Note that ``trivial'' and ``straightforward'' are to be read as \emph{mathematically} trivial respectively straightforward, and that the code of a function or
method attributed in this way can still be reasonably long and complicated.
Longer and better descriptions of \emph{some} of the algorithms and methods can be found in{\nobreakspace}\cite{Kohl08b}. 
b{java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
i texttt{ctionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} }]  ``Straightforward'' after having computed a respected partition by \texttt{RespectedPartition}. 
\item[{ \texttt{AllElementsOfCTZWithGivenModulus(\mbox{\texttt{\mdseries\slshape m}})} }]  This function first determines a list of all unordered partitions $\mathcal{P}$ of {\ensuremath{\mathbb\{tIjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 255
\item[{ \texttt{Ball(\mbox{\texttt{\\item[{ \texttt{IsClassRotation(\mbox{\textt )} \}\java.lang.StringIndexOutOfBoundsException: Range [126, 125) out of bounds for length 212
\item[{ \texttt{Ball(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape p}},\mbox{\texttt{\mdseries\slshape r}},\mbox{\texttt{\mdseries\slshape act}})} }]  ``Straightforward''. 
\item[{ \texttt{ClassPairs(\mbox{\texttt{\mdseries\slshape m}})} }]  Runs a loop over all 4\texttt{\symbol{45}}tuples of nonnegative integers less
than \mbox{\texttt{\mdseries\slshape m}}, and filters by congruence criteria and ordering of the entries. 
\item[{ \texttt{ClassReflection(\mbox{\texttt{\mdseries\item[ texttt{(mbox{java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 184
\item[{ \texttt{ClassRotation(\mbox{\texttt{\mdseries\slshape r}},\mbox{\texttt{\mdseries\slshape m}},\mbox{\texttt{\mdseries\slshape u}})} }]  ``Trivial''. 
\item[{ \texttt{ClassShift(\mbox{\texttt{\mdseries\slshape r}},\mbox{\texttt{\mdseries\slshape m}})} }]  ``Trivial''. 
\item[{ \texttt{ClassTransposition(\mbox{\texttt{\mdseries\slshape r1}},\mbox{\texttt{\mdseries\slshape m1}},\mbox{\texttt{\mdseries\If java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 128
\item[{ \texttt{ClassWiseOrderPreservingOn(\mbox{\texttt{\mdseries\slshape f}})}, etc. }]  Forms the union of the residue classes modulo the modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} 
negative, respectively. 
\item[{ \texttt{Coefficients(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{CommonRightInverse(\mbox{\texttt{\mdseries\slshape l}},\mbox{\texttt{\mdseries\slshape r}})} }]  See \texttt{RightInverse}. 
\item[{ \texttt{CT(\mbox{\texttt{\mdseries\slshape R}})} }]  Attributes and properties are set according to{\nobreakspace}\cite{Kohl09}. 
\item[{ \texttt{CycleRepresentativesAndLengths(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape S}})} }]  ``Straightforward''. 
\item[{ \texttt{CyclesOnFiniteOrbit(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape n}})} }]  ``Straightforward''. 
\item[{ \texttt{DecreasingOn(\mbox{\texttt{\mdseries\slshape f}})} }]  Forms the union of the residue classes which are determined by the
coefficients as indicated. 
\item[{ \texttt{DerivedSubgroup(\mbox{\texttt{\mdseries\slshape G}})} }]  No genuine method \texttt{\symbol{45Theorem{\nobreakspace}2..7in{}\Kohl05}to compute`'    integral \{texttt{java.lang.StringIndexOutOfBoundsException: Range [181, 180) out of bounds for length 362
\item[{ \texttt{Determinant(\mbox{\texttt{\mdseries\slshape g}})} }]  Evaluation of the given expression. For the mathematical meaning
(epimorphism!), see Theorem{\nobreakspace}2.11.9 in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{DifferencesList(\mbox{\texttt{\mdseries\slshape l}})} }]  ``Trivial''. 
\item[{ \texttt{DirectProduct(\mbox{\texttt{\mdseries\slshape G1}},\mbox{\texttt{\mdseries\slshape G2}}, ... )} }]  Restricts the groups \mbox{\texttt{\mdseries\slshape G1}}, \mbox{\texttt{\mdseries\slshape G2}}, ... to disjoint residue classes. See \texttt{Restriction} and Corollary{\nobreakspace}2.3.3 in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{Display(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{DistanceToNextSmallerPointInOrbit(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape n}})} }]  ``Straightforward'' \texttt{\symbol{45}}\texttt{\symbol{45}} computes balls of radius $r$ about \mbox{\texttt{\mdseries\slshape n}} for $r = 1, 2, \dots$ until a point smaller than $n$ is found. 
\item[{ \texttt{Divisor(\mbox{\texttt{\mdseries\slshape f}})} }]  Lcm of coefficients, as indicated. 
\item[{ \texttt{DrawGrid(\mbox{\texttt{\mdseries\slshape U}},\mbox{\texttt{\mdseries\slshape range{\textunderscore}y}},\mbox{\texttt{\mdseries\slshape range{\textunderscore}x}},\mbox{\texttt{\mdseries\slshape filename}})} }]  ``Straightforward''. 
\item[{ \texttt{DrawOrbitPicture} }]  Compute spheres of radius $1, \dots, r$ around the given point(s). Choose the origin either in the lower left corner
of the picture (if all points lie in thefirst quadrant or the  of
the picture (if they don't). Mark points of the ball with black pixels in case
of a monochrome picture. Choose colors from the given palette depending on the
distance from the starting points in case of a colored picture. 
\item[{ \texttt{EpimorphismFromFpGroup(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape r}})} }]  Computes ordersjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
of \mbox{\texttt{\mdseries\slshape G}}, \mbox{\texttt{\mdseries\slshape G'}}, \mbox{\texttt{\mdseries\slshape G''}}, etc.. 
\item[{ \texttt{Exponent(\mbox{\texttt{\mdseries\slshape G}})} }]  Check whether \mbox{\texttt{\mdseries\slshape G}} is finite. If it is, then use the \textsf{GAP} Library method, applied to \texttt{Image(IsomorphismPermGroup(\mbox{\texttt{\mdseries\slshape G}}))}. Check whether \mbox{\texttt{\mdseries\slshape G}} is tame. If yes, return \texttt{infinity}. If not, run a loop over \mbox{\texttt{\mdseries\slshape G}} until finding an element of infinite order. Once one is found, return \texttt{infinity}. 

The find non\{symbol{45}  can  
away under the assumption that any finitely generated wild rcwa group has a
ild element  looks   thisholds,but   author 
not know a proof. 
\item[{ \texttt{ExtRepOfObj(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{FactorizationIntoCSCRCT(\mbox{\texttt{\mdseries\slshape g}})}, {\nobreakspace} \texttt{Factorization(\mbox{\texttt{\mdseries\slshape g}})} }]  The method used here is rather sophisticated, and will likely some time be
published elsewhere. At the moment termination is not guaranteed, but in case
of termination the result is certain. The strategy is roughly first to make
the mapping class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving
and balanced, and then to remove all prime factors from multiplier and divisor
one after the other in decreasing order by dividing by appropriate class
transpositions.The remaining integral mapping can be  in a similar
way as a permutation of a finite set can be factored into
\item[{ \texttt{FactorizationOnConnectedComponents(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape If\box{texttt{\mdseries\slshape G}} and \mbox{\texttt{\mdseries\slshape H}} are both tame, then proceed as follows: If the multiplier of \mbox{\texttt{\mdseries\slshape H}} does not divide the multiplier of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, then return \texttt{false}. If \mbox{\texttt{\mdseries\slshape H}} does not respect the stored respected partition of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, then return \texttt{false}. Check whether the finite permutation group induced by \mbox{\texttt{\mdseries\slshape H}} on \texttt{RespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} is a subgroup of \texttt{ActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})}. If yes, return \texttt{true}. Check whether the order of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} is greater than the order of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If so, return \texttt{false}. 
partition of the suitably ``blown up'' coefficient list corresponding to the connected components. 
\item[{ \texttt{FixedPointsOfAffinePartialMappings(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Straightforward''. 
[t(mbox{texttt{m\slshape },mbox{texttt\mdseriesslshape maxmod}})}, {\nobreakspace} \texttt{FixedResidueClasses(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape maxmod}})} }]  Runs a loop over all moduli $m \leq$ \mbox{\texttt{\mdseries\slshape maxmod}} and all residues $r$ modulo these moduli, and selects those residue classes $r(m)$ which are mapped to itself by \mbox{\texttt{\mdseries\slshape g}}, respectively, by all generators of \mbox{\texttt{\mdseries\slshape G}}. 
\item[{ \texttt{FloatQuotientsList(\mbox{\permutation is wild if a transition graph has a
\item[{ \texttt{GluckTaylorInvariant(\mbox{\texttt{\mdseries\slshape a}})} }]  Evaluation of the given expression. 
\item[{ \texttt{GroupByResidueClasses(\mbox{\texttt{\mdseries\slshape classes}})} }]  Finds all pairs of residue classes in the list \mbox{\texttt{\mdseries\slshape classes}} which are disjoint, forms the corresponding class transpositions and returns
the group generated by them. 
\item[{ \texttt{GuessedDivergence(\mbox{\texttt{\mdseries\slshape f}})} }]  Numerical computation of the limit of some series, which seems to converge ``often''. Caution!!! 
\item[{ \texttt{Image(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{Image(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape S}})} }]  ``Straightforward'' if one can compute images of residue classes under affine mappings and unite
and intersect residue classes (Chinese Remainder Theorem). See
Lemma{nobreakspace12.1 in{nobreakspace\cite{Kohl05} 
\item[{ \texttt{ImageDensity(\mbox{\texttt{\mdseries\slshape f}})} }]  Evaluation of the given expression. 
\item[{ \texttt{\mbox{\texttt{\mdseries\slshape g}} in \mbox{\texttt{\mdseries\slshape G}}} (membership test for rcwa groups) }]  Test whether the different generators. The search for such an element may run into an infinite
generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} have determinant{\nobreakspace}0 and \mbox{\texttt{\mdseries\slshape g}} has determinant{\nobreakspace}$\neq 0$. If yes, return \texttt{false}. Test whether the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} is a subset of the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If not, return \texttt{false}. Test whether \mbox{\texttt{\mdseries\slshape G}} fixes the nonnegative integers setwise, but{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} does not. If yes, return \texttt{false}. 

 If \mbox{\texttt{\mdseries\slshape G}} is tame,  $S := r(m)$. Put $S := S \cup S^g$ for all generators} java.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 183
which always contains{\nobreakspace}\texttt{k} to a polycyclically presented group. If{\nobreakspace}\texttt{k} lies in{\nobreakspace}\texttt{K}, return \texttt{true}, otherwise return \texttt{falsewIf  terminates: If $S = {\ensuremath{\mathbb Z}}$, return \texttt{true}, otherwise return \texttt{false}. 

 \{G}   as  java.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 291
groups induced by{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If for one of the examined orbits one of the latter two questions has a
negative answer, then return \texttt{false}. Look for a positive integer{\nobreakspace}$m$ such that \mbox{\texttt{\mdseries\slshape g}} does not java.lang.StringIndexOutOfBoundsException: Range [201, 149) out of bounds for length 201
unions of residue classes (mod{\nobreakspace}$m$) invariant which is fixed by{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If successful, return \texttt{false}. If not, try to factor \mbox{\texttt{\mdseries\slshape g}} into generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} using \texttt{PreImagesRepresentative}. If successful, return \texttt{true}. If \mbox{\texttt{\mdseries\slshape g}} is in \mbox{\texttt{\mdseries\slshape G}}, this terminates after a finite number of steps. Both run time and memory
requirements are exponential in the word length. If \mbox{\texttt{\mdseries\slshape g}} is not in \mbox{\texttt{\mdseries\slshape G}} at this stage, the method runs into an infinite loop. 
\item[{ \texttt{\mbox{\texttt{\mdseries\slshape f}} in \mbox{\texttt{\mdseries\slshape M}}} (membership test for rcwa monoids) }]  Test whether the mapping \mbox{\texttt{\mdseries\slshape f}} is in the list of generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If it is, return \texttt{true}. Test whether the multiplier of \mbox{\texttt{\mdseries\slshape f}} is zero, \java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 105
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 308
generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}. If not, return \texttt{false}. If the underlying ring is {\ensuremath{\mathbb Z}} or a semilocalization
 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 226

 If \mbox{c  
modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} does not divide the modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}. 2.{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is not tame. 3.{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}} is finite, and \mbox{\texttt{\mdseries\slshape f}} is java.lang.StringIndexOutOfBoundsException: Index 323 out of bounds for length 233
\ShortOrbits}   java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 307

 Finally compute balls of increasing radius around{\nobreakspace}1 until \mbox{\texttt{\mdseries\slshape f}} is found to lie in one of them. If that happens, return \texttt{true}. If \mbox{\texttt{\mdseries\slshape f}} is an element of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}, this will eventually terminate, but if at this stage \mbox{\texttt{\mdseries\slshape f}} is not an element of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 34
\item[{ \texttt{\mbox{\texttt{\mdseries\slshape point}} in \mbox{\texttt{\mdseries\slshape orbit}}} (membership test for orbits) }]  Uses the equality test for orbits: The orbit equality test computes balls of
increasing radius around the orbit representatives until they intersect
non\texttt{\symbol{45}}trivially. Once they do so, it returns \texttt{true}. If it finds that one or both of the orbits are finite, it makes use of that
information, and returns \texttt{false} if appropriate. In between, i.e. after having computed balls to a certain
extent depending on the properties of the group, it chooses a suitable
modulus{\nobreakspace}$m$ and computes orbits (modulo{\nobreakspace}$m$). If the representatives of the orbits to be compared belong to different
orbits (mod{\nobreakspace}$m$), it returns \texttt{false}. If this is not the case although the orbits are different, the equality test
runs into an infinite loop. 
\item[{ \texttt{IncreasingOn(\mbox{\texttt{\mdseries\slshape f}})} }]  Forms the union of the residue classes which are determined by the
coefficients as indicated. 
\item[{ \texttt{Index(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape H}})} }]  In general, i.e. if the underlying ring is
not{\nobreakspace}{\ensuremath{\mathbb Z}}, proceed as follows: If both groups \mbox{\texttt{\mdseries\slshape G}} and{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} are finite, return the quotient of their orders. If \mbox{\texttt{\mdseries\slshape G}} is infinite, but \mbox{\texttt{\mdseries\slshape H}} is finite, return \texttt{infinity}. Otherwise return the number of right cosets of \mbox{\texttt{\mdseries\slshape H}} in{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, computed by the \textsf{GAP} Library function \texttt{RightCosets}. 

 If the underlying ring is{\nobreakspace}{\ensuremath{\mathbb Z}}, do
additionally thefollowing before attempting to compute the list of right
cosets: If the group \mbox{\texttt{\mdseries\slshape G}} is class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving, check
whether one of its generators has nonzero determinant, and whether all
generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} have determinant{\nobreakspace}zero. If so, then return \texttt{infinity}. Check whether \mbox{\texttt{\mdseries\slshape H}} is tame, but \mbox{\texttt{\mdseries\slshape G}} is not. If so, then return \texttt{infinity}. If \mbox{\texttt{\mdseries\slshape G}} is tame, then check whether the rank of the largest free abelian subgroup of
the than the corresponding rank
for{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}}. For this check, use \texttt{RankOfKernelOfActionOnRespectedPartition}. If it is, then return \texttt{infinity}. 
\item[{ \texttt{Induction(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape f}})} }]  Computes \texttt{f * g * RightInverse(\mbox{\texttt{\mdseries\slshape f}})}. 
\ g}},\mbox{\texttt{\mdseries\slshape f}})} to the generators \mbox{\texttt{mdseries\slshape g}} of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. 
\item[{ \texttt{InjectiveAsMappingFrom(\mbox{\texttt{\mdseries\slshape f}})} }]  The function starts with the entire source of \mbox{\texttt{\mdseries\slshape f}} as ``preimage'' \texttt{pre} and the empty set as ``image''{\nobreakspace}\texttt{im}. It loops over the residue classes (mod{\nobreakspace}\texttt{Mod(\mbox{\texttt{\mdseries\slshape f}})}). For any such residue class \texttt{cl} the following is done: Firstly, the image of \texttt{cl} under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is added to{\nobreakspace}\texttt{im}. Secondly, the intersection of the preimage of the intersection of the image
of \texttt{cl} under \mbox{\texttt{\mdseries\slshape f}} and \texttt{im} under \mbox{\texttt{\mdseries\slshape f}} and \texttt{cl} is subtracted from{\nobreakspace}\texttt{pre}. 
\item[{ \texttt{IntegralConjugate(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{IntegralConjugate(\mbox{\texttt{\mdseries\slshape G}})} }]  Uses the algorithm described in the proof of Theorem{\nobreakspace}2.5.14
in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{IntegralizingConjugator(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{IntegralizingConjugator(\mbox{\texttt{\mdseries\slshape G}})} }]  Uses the algorithm described in the proof of Theorem{\nobreakspace}2.5.14
in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{Inverse(\mbox{\texttt{\mdseries\slshape f}})} }]  Essentially \item[{ \texttt{OrbitsModulo(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries`''.
Part{\nobreakspace}(b) in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{IsBalanced(\mbox{\texttt{\mdseries\slshape f}})} }]  Checks whether the sets of prime factors of the multiplier and the divisor
of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} are the same. 
\item[{ \texttt{IsBijective(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial'', respectively, see \texttt{IsInjective} and \texttt{IsSurjective}. 
\item[{ \provide straightforward optimizations via computing with coefficients
\item[{ \texttt{IsClassRotation(\mbox{\texttt{\mdseries\slshape g}})} }]  Computes the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}}, extracts the possible rotation factor from the coefficients and
compares{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} with the corresponding class rotation. 
\item[{ \texttt{IsClassShift(\mbox{\texttt{\mdseries\slshape g}})} }]  Computes the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}}, and compares{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} with the corresponding class shift. 
\item[{ \texttt{IsClassTransposition(\mbox{\texttt{\mdseries\slshape g}}), {\nobreakspace} IsGeneralizedClassTransposition(\mbox{\texttt{\mdseries\slshape g}})} }]  Computes the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}}, writes it as a disjoint union of two residue classes and
compares{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} with the class transposition which interchanges them. 
\item[{ \texttt{IsClassWiseOrderPreserving(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{IsClassWiseTranslating(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{IsConjugate(RCWA(Integers),\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape g}})} }]  Test whether \mbox{\texttt{\mdseries\slshape f}} and \mbox{\texttt{\mdseries\slshape g}} have the same order, and whether either both or none of them is tame. If not,
return \texttt{false}. 

 If the mappings are wild, use \texttt{ShortCycles} to search for finite cycles not belonging to an infinite series, until their
numbers for a particular length differ. This may run into an infinite loop. If
it terminates, return \texttt{false}. 

 If the mappings are tame, use the method described in the proof of
Theorem{\nobreakspace}2.5.14 in{\nobreakspace}\cite{Kohl05} to construct integral conjugates of \mbox{\texttt{\mdseries\slshape f}} and \mbox{\texttt{\mdseries\slshape g}}. Then essentially use the algorithm described in the proof of
Theorem{\nobreakspace}2.6.7 in{\nobreakspace}\cite{Kohl05} to compute ``standard representatives'' of the conjugacy classes which the integral conjugates of \mbox{\texttt{\mdseries\slshape f}} and \mbox{\texttt{\mdseries\slshape g}} belong to. Finally compare these standard representatives, and return \texttt{true} if they are equal and \texttt{false} if not. 
\item[{ \texttt{IsInjective(\mbox{\texttt{\mdseries\slshape f}})} }]  See \texttt{Image}. 
\item[{ \texttt{IsIntegral(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{IsNaturalCT(\mbox{\texttt{\mdseries\slshape G}})}, {\nobreakspace} \texttt{IsNaturalRCWA(\mbox{\texttt{\mdseries\slshape G}})} }]  Only checks a set flag. 
\item[{ \texttt{IsomorphismMatrixGroup(\mbox{\texttt{\mdseries\slshape G}})} }]  Uses the algorithm described in the proof of Theorem{\nobreakspace}2.6.3
in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{IsomorphismPermGroup(\mbox{\texttt{\mdseries\slshape G}})} }]  If the group \mbox{\texttt{\mdseries\slshape G}} is finite and class\texttt{\symbol{45}}wise
order\texttt{\symbol{45}}preserving, use \texttt{ActionOnRespectedPartition}. If \mbox{\texttt{\mdseries\slshape G}} is finite, but not class\texttt{\symbol{45}}wise
order\texttt{\symbol{45}}preserving, compute the action on the respected
partition which is obtained by splitting any residue class $r(m)$ in \texttt{RespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} into three residue classes $r(3m), r+m(3m), r+2m(3m)$. If \mbox{\texttt{\mdseries\slshape G}} is infinite, there is no isomorphism to a finite permutation group, thus
return \texttt{fail}. 
\item[{ \texttt{IsomorphismRcwaGroup(\mbox{\texttt{\mdseries\slshape G}})} }]  The method for finite groups uses \texttt{RcwaMapping}, Part{\nobreakspace}(d). 

 The method for free products of finite groups uses the
Table\texttt{\symbol{45}}Tennis Lemma (which is also known as \emph{Ping\texttt{\symbol{45}}Pong Lemma}, cf. e.g. Section{\nobreakspace}II.B. in{\nobreakspace}\cite{LaHarpe00}). It uses regular permutation representations of the factors $G_r$ ($r = 0, \dots ,m-1$) of the free product on residue classes modulo $n_r := |G_r|$. The basic idea is that since point stabilizers in regular permutation groups
are trivial, all non\texttt{\symbol{45}}identity elements map any of the
permuted residue classes into their complements. To get into a situation where
the Table\texttt{\symbol{45}}Tennis Lemma is applicable, the method computes
conjugates of the images of the mentioned permutation representations under
rcwa permutations $\sigma_r$ which satisfy $0(n_r)^{\sigma_r} = {\ensuremath{\mathbb Z}} \setminus r(m)$. 

 The method for free groups uses an adaptation of the construction given on
page{\nobreakspace}27 in{\nobreakspace}\cite{LaHarpe00} from PSL(2,{\ensuremath{\mathbb C}}) to RCWA({\ensuremath{\mathbb Z}}). As an
equivalent for the closed discs used there, the method takes the residue
classes modulo two times the rank of the free group. 
\item[{ \texttt{IsOne(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{IsPerfectGroup(\mbox{\texttt{\mdseries\slshape G}})} }]  If the group \mbox{\texttt{\mdseries\slshape G}} is trivial, then return \texttt{true}. \item[{ \texttt{Sources(\mbox{\texttt{\mdseries\slshape f}})} }]  Computes the strongly connected components of the transition graph by the

 If the underlying ring is{\nobreakspace}{\ensuremath{\mathbb Z}}, then do the
following: If one of the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} has sign{\nobreakspace}\texttt{\symbol{45}}1, then return \texttt{false}. If{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} is class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving and one
of the generators has nonzero determinant, then return \texttt{false}. 

 If \mbox{\texttt{\mdseries\slshape G}} is wild, and perfectness has not been decided so far, then give up. If \mbox{\texttt{\mdseries\slshape G}} is finite, then check the image of \texttt{IsomorphismPermGroup(\mbox{\texttt{\mdseries\slshape G}})} for perfectness, and return \texttt{true} or \texttt{false} accordingly. 

 If the group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} is tame and if it acts transitively on its stored respected partition, then
return \texttt{true} or \texttt{false} depending on whether the finite permutation group \texttt{ActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} is perfect or not. If{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} does not act transitively on its stored respected partition, then give up. 
\item[{ \texttt{IsPrimeSwitch(\mbox{\texttt{\mdseries\slshape g}})} }]  Checks whether the multiplier of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} is an odd prime, and compares \mbox{\texttt{\mdseries\slshape g}} with the corresponding prime switch. 
\item[{ \texttt{IsSignPreserving(\mbox{\texttt{\mdseries\slshape f}})} }]  If \mbox{\texttt{\mdseries\slshape f}} is not class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving, then
return \texttt{false}. Otherwise let $c \geq 1$ be greater than or equal to the maximum of the absolute values of the
coefficients $b_{r(m)}$ of the affine partial mappings of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}, and check whether the minimum of the image of $\{0, \dots, c\}$ under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is nonnegative and whether the maximum of the image of $\{-c, \dots, -1\}$ under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} is negative. If both is the case, then return \texttt{true}, otherwise return \texttt{false}. 
\item[{ \texttt{IsSolvableGroup(\mbox{\texttt{\mdseries\slshape G}})} }]  If \mbox{\texttt{\mdseries\slshape G}} is abelian, then return \texttt{true}. If \mbox{\texttt{\mdseries\slshape G}} is tame, then return \texttt{true} or \texttt{false} depending on whether \texttt{ActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} is solvable or not. If \mbox{\texttt{\mdseries\slshape G}} is wild, then give up. 
\item[{ \texttt{IsSubset(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape H}})} (checking for a subgroup relation) }]  Check whether the set of stored generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} is a subset of the set of stored generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If so, return \texttt{true}. Check whether the prime set of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} is a subset of the prime set of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If not, return \texttt{false}. Check whether the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} is a subset of the support of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If not, return \texttt{false}. Check whether \mbox{\texttt{\mdseries\slshape G}} is tame, but \mbox{\texttt{\mdseries\slshape H}} is wild. If so, return \texttt{false}. 

 If \mbox{\texttt{\mdseries\slshape G}} and \mbox{\texttt{\mdseries\slshape H}} are both tame, then proceed as follows: If the multiplier of \mbox{\texttt{\mdseries\slshape H}} does not divide the multiplier of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, then return \texttt{false}. If \mbox{\texttt{\mdseries\slshape H}} does not respect the stored respected partition of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, then return \texttt{false}. Check whether the finite permutation group induced by \mbox{\texttt{\mdseries\slshape H}} on \texttt{RespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} is a subgroup of \texttt{ActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})}. If yes, return \texttt{true}. Check whether the order of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} is greater than the order of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. If so, return \texttt{false}. 

 Finally use the membership test to check whether all generators
of{\nobreakspace}\mbox{\texttt{\mdseries\slshape H}} lie in{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, and return \texttt{true} or \texttt{false} accordingly. 
\item[{ \texttt{IsSurjective(\mbox{\texttt{\mdseries\slshape f}})} }]  See \texttt{Image}. 
\item[{ \texttt{IsTame(\mbox{\texttt{\mdseries\slshape G}})} }]  Checks whether the modulus of the group is nonzero. 
\item[{ \texttt{IsTame(\mbox{\texttt{\mdseries\slshape f}})} }]  Application of the criteria given in Corollary{\nobreakspace}2.5.10
and{\nobreakspace}2.5.12 and Theorem{\nobreakspace}A.8 and{\nobreakspace}A.11
in{\nobreakspace}\cite{Kohl05}, as well as of the criteria given in{\nobreakspace}\cite{Kohl07b}. The criterion ``surjective, but not injective means wild'' (Theorem{\nobreakspace}A.8 in{\nobreakspace}\cite{Kohl05}) is the subject of{\nobreakspace}\cite{Kohl07a}. The package 
permutation is wild if a transition graph has a
weakly\texttt{\symbol{45}}connected component which is not
strongly\texttt{\symbol{45}}connected (cf. Theorem{\nobreakspace}A.11
in{\nobreakspace}\cite{Kohl05}). 
\item[{ \texttt{IsTransitive(\mbox{\texttt{\mdseries\slshape G}},Integers)} }]  Look for finite orbits, using \texttt{ShortOrbits} on a couple of intervals. If a finite orbit is found, return \texttt{false}. Test if \mbox{\texttt{\mdseries\slshape G}} is finite. If yes, return \texttt{false}. 

 Search for an element \texttt{g} and a residue class $r(m)$ such that the restriction of \texttt{g} to $r(m)$ is given by $n \mapsto hyperdef{L}X85A08CF187A6D986{
different generators. The search for such an element may run into an infinite
loop, as there is no guarantee that the group has a suitable element. 

 If suitable \texttt{g} and $r(m)$ are found, proceed as follows: 

 Put $S := r(m)$. Put $S := S \cup S^g$ for all generators $g$ of \mbox{\texttt{\mdseries\slshape G}}, and repeat this until $S$ remains constant. This may run into an infinite loop. 

 If it terminates: If $S = {\ensuremath{\mathbb Z}}$, return \texttt{true}, otherwise return \texttt{false}. 
\item[{ \texttt{IsTransitiveOnNonnegativeIntegersInSupport(\mbox{\texttt{\mdseries\slshape G}})} }]  Computes balls about 1 with successively increasing radii, and checks whether
the union of the sets where the elements of these balls are decreasing or
shifting down equals the support of \mbox{\texttt{\mdseries\slshape G}}. If a positive answer is found, transitivity on ``small'' points (nonnegative integers less than an explicit bound) is verified. 
\item[{ \texttt{IsZero(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{KernelOfActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} }]  First determine the abelian invariants of the kernel{\nobreakspace}\texttt{K}. For this, compute sufficiently many quotients of orders of permutation
groups induced by{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} on refinements of the stored respected partition{\nobreakspace}\texttt{P} by the order of the permutation group induced by{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} on{\nobreakspace}\texttt{P} itself. Then use a random walk through the group \mbox{\texttt{\mdseries\slshape G}}. Compute powers of elements encountered along the way which
fix{\nobreakspace}\texttt{P}. Translate these kernel elements into elements of a polycyclically presented
group isomorphic to the \texttt{|P|}\texttt{\symbol{45}}fold direct product of the infinite dihedral group (\texttt{K} certainly embeds into this group). Use \textsf{Polycyclic}{\nobreakspace}\cite{Polycyclic} to collect independent ``nice'' generators of{\nobreakspace}\texttt{K}. Proceed until the permutation groups induced by{\nobreakspace}\texttt{K} on the refined respected partitions all equal the initially stored quotients. 
\item[{ \texttt{LargestSourcesOfAffineMappings(\mbox{\texttt{\mdseries\slshape f}})} }]  Forms unions of residue classes modulo the modulus of the mapping, whose
corresponding coefficient triples are equal. 
\item[{ \texttt{LaTeXStringRcwaMapping(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{LaTeXAndXDVI(\mbox{\texttt{\mdseries\slshape f}})} }]  Collects residue classes those corresponding coefficient triples are equal. 
\item[{ \texttt{LikelyContractionCentre(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape maxn}},\mbox{\texttt{\mdseries\slshape bound}})} }]  Computes trajectories with starting values from a given interval, until a
cycle is reached. Aborts if the trajectory exceeds the prescribed bound. Form
the union of the detected cycles. 
\item[{ \texttt{LoadDatabaseOf...()}, {\nobreakspace} \texttt{LoadRCWAExamples()} }]  ``Trivial''. \texttt{\symbol{45}}\texttt{\symbol{45}} These functions do nothing more
than reading in certain files. 
\item[{ \texttt{LocalizedRcwaMapping(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape p}})} }]  ``Trivial''. 
\item[{ \texttt{Log2HTML(\mbox{\texttt{\mdseries\slshape logfilename}})} }]  Straightforward string operations. 
\item[{ \texttt{Loops(\mbox{\texttt{\mdseries\slshape f}})} }]  Runs over the residue classes modulo the modulus of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}, and selects those of them which \mbox{\texttt{\mdseries\slshape f}} does not map to themselves, but which intersect
non\texttt{\symbol{45}}trivially with their images under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 
\item[{ \texttt{MaximalShift(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{MergerExtension(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape points}},\mbox{\texttt{\mdseries\slshape point}})} }]  As described in \texttt{MergerExtension} (\ref{MergerExtension:for finite permutation groups}). 
\item[{ \texttt{Mirrored(\mbox{\texttt{\mdseries\slshape g}})}, {\nobreakspace} \texttt{Mirrored(\mbox{\texttt{\mdseries\slshape G}})} }]  Conjugates with $n \mapsto -n - 1$, as indicated in the definition. 
\item[{ \texttt{mKnot(\mbox{\texttt{\mdseries\slshape m}})} }]  ``Straightforward'', following the definition given in \cite{Keller99}. 
\item[{ \texttt{Modulus(\mbox{\texttt{\mdseries\slshape G}})} }]  Searches for a wild element in the group. If unsuccessful, tries to construct
a respected partition (see \texttt{RespectedPartition}). 
\item[{ \texttt{Modulus(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{MovedPoints(\mbox{\texttt{\mdseries\slshape G}})} }]  Needs only forming unions of residue classes and determining fixed points of
affine mappings. 
\item[{ \texttt{Multiplier(\mbox{\texttt{\mdseries\slshape f}})} }]  Lcm of coefficients, as indicated. 
\item[{ \texttt{Multpk(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape p}},\mbox{\texttt{\mdseries\slshape k}})} }]  Forms the union of the residue classes modulo the modulus of the mapping,
which are determined by the given divisibility criteria for the coefficients
of the corresponding affine mapping. 
\item[{ \texttt{NrClassPairs(\mbox{\texttt{\mdseries\slshape m}})} }]  Relatively straightforward. \texttt{\symbol{45}}\texttt{\symbol{45}} Practical
for values of \mbox{\texttt{\mdseries\slshape m}} ranging up into the hundreds and corresponding counts of
\$10\texttt{\symbol{94}}9\$ and more. 
\item[{ \texttt{NrConjugacyClassesOfCTZOfOrder(\mbox{\texttt{\mdseries\slshape ord}})}, }]  Evaluation of the expression \texttt{Length(Filtered(Combinations(DivisorsInt(ord)), l
\texttt{\symbol{45}}{\textgreater} l {\textless}{\textgreater} [] and Lcm(l) =
ord))}. 
\item[{ \texttt{NrConjugacyClassesOfRCWAZOfOrder(\mbox{\java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 29
in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{ObjByExtRep(\mbox{\texttt{\mdseries\slshape fam}},\mbox{\texttt{\mdseries\slshape l}})} }]  ``Trivial''. 
\item[{ \texttt{One(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{One(\mbox{\texttt{\mdseries\slshape G}})}, }]  ``Trivial''. 
\item[{ \texttt{Orbit(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape pnt}},\mbox{\texttt{\mdseries\slshape gens}},\mbox{\texttt{\mdseries\slshape acts}},\mbox{\texttt{\mdseries\slshape act}})} }]  Check if the orbit has length less than a certain bound. If so, then return it
as a list. Otherwise test whether the group \mbox{\texttt{\mdseries\slshape G}} is tame or wild. 

 If \mbox{\texttt{\mdseries\slshape G}} is tame, then test whether \mbox{\texttt{\mdseries\slshape G}} is finite. If yes, then compute the orbit by the \textsf{GAP} Library method. Otherwise proceed as follows: Compute a respected
partition{\nobreakspace}$\mathcal{P}$ of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. Use{\nobreakspace}$\mathcal{P}$ to find a residue class{\nobreakspace}$r(m)$ which is a subset of the orbit to be computed. In general, $r(m)$ will not be one of the residue classes in{\nobreakspace}$\mathcal{P}$, but a subset of one of them. Put $\Omega := r(m)$. Unite the set{\nobreakspace}$\Omega$ with its images under all the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} and their inverses. Repeat that until $\Omega$ does not change any more. Return{\nobreakspace}$\Omega$. 

 If \mbox{\texttt{\mdseries\slshape G}} is wild, then return an orbit object which stores the group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, the representative{\nobreakspace}\mbox{\texttt{\mdseries\slshape rep}} and the action{\nobreakspace}\mbox{\texttt{\mdseries\slshape act}}. 
\item[{ \texttt{OrbitsModulo(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape m}})} }]  Uses \textsf{GRAPE} to compute the connected components of the transition graph. 
\item[{ \texttt{OrbitsModulo(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape m}})} }]  ``Straightforward''. 
\item[{ \texttt{Order(\mbox{\texttt{\mdseries\slshape f}})} }]  Test for \texttt{IsTame}. If the mapping is not tame, then return \texttt{infinity}. Otherwise use Corollary{\nobreakspace}2.5.10 in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{PermutationOpNC(\mbox{\texttt{\mdseries\slshape sigma}},\mbox{\texttt{\mdseries\slshape P}},\mbox{\texttt{\mdseries\slshape act}})} }]  Several different methods for different types of arguments, which either
provide straightforward optimizations via computing with coefficients
directly, or just delegate to \texttt{PermutationOp}. 
\item[{ \texttt{PreImage(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape S}})} }]  See \texttt{Image}. 
\item[{ \texttt{PreImagesRepresentative(\mbox{\texttt{\mdseries\slshape phi}},\mbox{\texttt{\mdseries\slshape g}})}, {\nobreakspace} \texttt{PreImagesRepresentatives(\mbox{\texttt{\mdseries\slshape phi}},\mbox{\texttt
successively compute two balls around{\nobreakspace}1 and{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}} until they intersect non\texttt{\symbol{45}}trivially is standard in
computational group theory. For rcwa groups it would mean wasting both memory
and run time to actually compute group elements. Thus only images of tuples of
points are computed and stored. 
\item[{ \texttt{PrimeSet(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{PrimeSet(\mbox{\texttt{\mdseries\slshape G}})} }]  ``Straightforward''. 
\item[{ \texttt{PrimeSwitch(\mbox{\texttt{\mdseries\slshape p}})} }]  Multiplication of rcwa mappings as indicated. 
\item[{ \texttt{Print(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{\mbox{\texttt{\mdseries\slshape f}}*\mbox{\texttt{\mdseries\slshape g}}} }]  Essentially composition of affine mappings. See Lemma{\nobreakspace}1.3.1,
Part{\nobreakspace}(a) in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{ProjectionsToCoordinates(\mbox{\texttt{\mdseries\slshape f}})} }]  Straightforward coefficient operations. 
\item[{ \texttt{ProjectionsToInvariantUnionsOfResidueClasses(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape m}})} }]  Use \texttt{OrbitsModulo} to determine the supports of the images of the epimorphisms to be determined,
and use \texttt{RestrictedPerm} to compute the images of the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} under these epimorphisms. 
\item[{ \texttt{QuotientsList(\mbox{\texttt{\mdseries\slshape l}})} }]  ``Trivial''. 
\item[{ \texttt{Random(RCWA(Integers))} }]  Computes a product of ``randomly'' chosen class shifts, class reflections and class transpositions. This seems to
be suitable for generating reasonably good examples. 
\item[{ \texttt{RankOfKernelOfActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} }]  Performs the first part of the computations done by \texttt{KernelOfActionOnRespectedPartition}. 
\item[{ \texttt{Rcwa(\mbox{\texttt{\mdseries\slshape R}})} }]  ``Trivial''. \texttt{\symbol{45}}\texttt{\symbol{45}} Attributes and properties set can
be derived easily or hold by definition. 
\item[{ \texttt{RCWA(\mbox{\texttt{\mdseries\slshape R}})} }]  Attributes and properties are set according to Theorem{\nobreakspace}2.1.1,
Theorem{\nobreakspace}2.1.2, Corollary{\nobreakspace}2.1.6 and
Theorem{\nobreakspace}2.12.8 in{\nobreakspace}\cite{Kohl05}hfill{\scriptsize iclass)}\\
\item[{ \texttt{RcwaGroupByPermGroup(\mbox{\texttt{\mdseries\java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 0
\item[{ \texttt{RCWAInfo(\mbox{\texttt{\mdseries\slshape n}})} }]  ``Trivial''. 
\item[{ \texttt{RcwaMapping} }]  (a)\texttt{\symbol{45}}(c): ``trivial'', (d): \texttt{n\texttt{\symbol{94}}perm \texttt{\symbol{45}} n} for determining the coefficients, (e): ``affine mappings by values at two given points'', (f) and (g): ``trivial'', (h) and (i): java.lang.StringIndexOutOfBoundsException: Index 271 out of bounds for length 3
\item[{ \texttt{RCWATestAll()}, {\nobreakspace} \texttt{RCWATestInstall()} }]  Just read in files running / containing the tests. 
\item[{ \texttt{RCWATestExamples()} }]  Runs the example tester from the \textsf{GAPDoc} package. 
\item[{ \texttt{RepresentativeAction(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape src}},\mbox{\texttt{\mdseries\slshape dest}},\mbox{\texttt{\mdseries\slshape act}})}, {\nobreakspace} \texttt{RepresentativeActionPreImage} }]  As described in the documentation of these methods. The underlying idea to
successively compute two balls around \mbox{\texttt{\mdseries\slshape src}} and \mbox{\texttt{\mdseries\slshape dest}} until they intersect non\texttt{\symbol{45}}trivially is java.lang.StringIndexOutOfBoundsException: Range [0, 184) out of bounds for length 25
computational group theory. Words standing for products of generators of \mbox{\texttt{\mdseries\slshape G}} are stored for every image of \mbox{\texttt{\mdseries\slshape src}} or \mbox{\texttt{\mdseries\slshape dest}}. 
\item[{ \texttt{RepresentativeAction(RCWA(Integers),\mbox{\texttt{\mdseries\slshape P1}},\mbox{\texttt{\mdseries\slshape P2}})} }]  Arbitrary mapping: see Lemma{\nobreakspace}2.1.4 in{\nobreakspace}\cite{Kohl05}. Tame mapping: see proof of Theorem{\nobreakspace}2.8.9 in{\nobreakspace}\cite{Kohl05}. The former is almost trivial, while the latter is a bit complicated and
takes usually also much more time. 
\item[{ \texttt{RepresentativeAction(RCWA(Integers),\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape g}})} }]  The algorithm used by \texttt{IsConjugate} constructs actually also an element \texttt{x} such that \texttt{\mbox{\texttt{\mdseries\slshape f}}\texttt{\symbol{94}}x = \mbox{\texttt{\mdseries\slshape g}}}. 
\item[{ \texttt{RespectedPartition(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{RespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} }]  There are presently two sophisticated algorithms implemented for finding
respected partitions. One of them has evolved from the algorithm described in
the proof of Theorem{\nobreakspace}2.5.8 in{\nobreakspace}\cite{Kohl05}. The other one starts with the coarsest partition of the base ring such that
every generator of \mbox{\texttt{\mdseries\slshape G}} is affine on every part. This partition is then refined successively until a
respected partition is obtained. The refinement step is basically as follows:
Take the images of the partition under all generators of \mbox{\texttt{\mdseries\slshape G}}. This way one obtains as many further partitions of the base ring as there
are generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. Then the ``new'' partition is the coarsest common refinement of all these partitions. 
\write\agenrlog["nd] a{age]}
\item[{ \texttt{RestrictedBall(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape r}},\mbox{\texttt{\mdseries\slshape modulusbound}})} }]  ``Straightforward''. 
\item[{ \texttt{RestrictedPerm(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape S}})} }]  ``Straightforward''. 
\item[{ \texttt{Restriction(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape f}})} }]  Computes the action of \texttt{RightInverse(\mbox{\texttt{\mdseries\slshape f}}) * g * f} on the image of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 
\item[{ \texttt{Restriction(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape f}})} }]  Gets a set of generators by applying \texttt{Restriction(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape f}})} to the generators \mbox{\texttt{\mdseries\slshape g}} of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}. 
\item[{ \texttt{RightInverse(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Straightforward'' if one knows how to compute images of residue classes under affine mappings,
and how to compute inverses of affine mappings. 
\item[{ \texttt{Root(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape k}})} }]  If \mbox{\texttt{\mdseries\slshape f}} is bijective, class\texttt{\symbol{45}}wise
order\texttt{\symbol{45}}preserving and has finite order: 

 Find a conjugate of \mbox{\texttt{\mdseries\slshape f}} which is a product of class transpositions. Slice cycles $\prod_{i=2}^l \tau_{r_1(m_1),r_i(m_i)}$ of{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}} a respected partition $\mathcal{P}$ into cycles $\prod_{i=1}^l \prod_{j=0}^{k-1} \tau_{r_1(km_1),r_i+jm_i(km_i)}$ of the \mbox{\texttt{\mdseries\slshape k}}\texttt{\symbol{45}}fold length on the refined partition which one gets from $\mathcal{P}$ by decomposing any $r_i(m_i) \in \mathcal{P}$ into residue classes (mod{\nobreakspace}$km_i$). Finally conjugate the resulting permutation back. 

 Other cases seem to be more difficult and are currently not covered. 
\item[{ \texttt{RotationFactor(\mbox{\texttt{\mdseries\slshape g}})} }]  ``Trivial''. 
\item[{ \texttt{RunDemonstration(\mbox{\texttt{\mdseries\slshape filename}})} }]  ``Trivial'' \texttt{\symbol{45}}\texttt{\symbol{45}} only I/O operations. 
\item[{ \texttt{SemilocalizedRcwaMapping(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape pi}})} }]  ``Trivial''. 
\item[{ \texttt{ShiftsDownOn(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{ShiftsUpOn(\mbox{\texttt{\mdseries\slshape f}})} }]  Straightforward coefficient\texttt{\symbol{45}} and residue class operations. 
\item[{ \texttt{ShortCycles(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape maxlng}})} }]  Looks for fixed points of affine partial mappings of powers of{\nobreakspace}\mbox{\texttt{\mdseries\slshape g}}. 
\item[{ \texttt{ShortCycles(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape S}},\mbox{\texttt{\mdseries\slshape maxlng}})}, {\nobreakspace} \texttt{ShortCycles(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape S}},\mbox{\texttt{\mdseries\slshape maxlng}},\mbox{\texttt{\mdseries\slshape maxn}})} }]  ``Straightforward''. 
\item[{ \texttt{ShortOrbits(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape S}},\mbox{\texttt{\mdseries\slshape maxlng}})}, {\nobreakspace} \texttt{ShortOrbits(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape S}},\mbox{\texttt{\mdseries\slshape maxlng}},\mbox{\texttt{\mdseries\slshape maxn}})} }]  ``Straightforward''. 
\item[{ \texttt{ShortResidueClassCycles(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape modulusbound}},\mbox{\texttt{\mdseries\slshape maxlng}})} }]  Different methods \texttt{\symbol{45}}\texttt{\symbol{45}} see source code in \texttt{pkg/rcwa/lib/rcwamap.gi}. 
\item[{ \texttt{ShortResidueClassOrbits(\mbox{\texttt{\mdseries\slshape g}},\mbox{\texttt{\mdseries\slshape modulusbound}},\mbox{\texttt{\mdseries\slshape maxlng}})} }]  Different methods \texttt{\symbol{45}}\texttt{\symbol{45}} see source code in \texttt{pkg/rcwa/lib/rcwagrp.gi}. 
\item[{ \texttt{Sign(\mbox{\texttt{\mdseries\slshape g}})} }]  Evaluation of the given expression. For the mathematical meaning
(epimorphism!), see Theorem{\nobreakspace}2.12.8 in{\nobreakspace}\cite{Kohl05}. 
\item[{ \texttt{Sinks(\mbox{\texttt{\mdseries\slshape f}})} }]  Computes the strongly connected components of the transition graph by the
function \texttt{STRONGLY{\textunderscore}CONNECTED{\textunderscore}COMPONENTS{\textunderscore}DIGRAPH}, and selects those which are proper subsets of their preimages and proper
supersets of their images under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 
\item[{ \texttt{Size(\mbox{\texttt{\mdseries\slshape G}})} (order of an rcwa group) }]  Test whether one of the generators of the group{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}} has infinite order. If so, return \texttt{infinity}. Test whether the group \mbox{\texttt{\mdseries\slshape G}} is tame. If not, return \texttt{infinity}. Test whether \texttt{RankOfKernelOfActionOnRespectedPartition(\mbox{\texttt{\mdseries\slshape G}})} is nonzero. If so, return \texttt{infinity}. Otherwise if \mbox{\texttt{\mdseries\slshape G}} is class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving, return
the size of the permutation group induced on the stored respected partition.
If \mbox{\texttt{\mdseries\slshape G}} is not class\texttt{\symbol{45}}wise order\texttt{\symbol{45}}preserving,
return the size of the permutation group induced on the refinement of the
stored respected partition which is obtained by splitting each residue class
into three residue classes with equal moduli. 
\item[{ \texttt{Size(\mbox{\texttt{\mdseries\slshape M}})} (order of an rcwa monoid) }]  Check whether \mbox{\texttt{\mdseries\slshape M}} is in fact an rcwa group. If so, use the method for rcwa groups instead. Check
whether one of the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}} is surjective, but not injective. If so, return \texttt{infinity}. Check whether for all generators{\nobreakspace}$f$ of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}, the image of the union of the loops of{\nobreakspace}$f$ under{\nobreakspace}$f$ is finite. If not, return \texttt{infinity}. Check whether one of the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}} is bijective and has infinite order. If so, return \texttt{infinity}. Check whether one of the generators of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}} is wild. If so, return \texttt{infinity}. Apply the above criteria to the elements of the ball of
radius{\nobreakspace}2 around{\nobreakspace}1, and return \texttt{infinity} if appropriate. Finally attempt to compute the list of elements
of{\nobreakspace}\mbox{\texttt{\mdseries\slshape M}}. If this is successful, return the length of the resulting list. 
\item[{ \texttt{SmallGeneratingSet(\mbox{\texttt{\mdseries\slshape G}})} }]  Eliminates generators $g$ which can be found to be redundant \emph{easily}, i.e. by checking whether the balls about 1 and $g$ of some small radius $r$ in the group generated by all generators of \mbox{\texttt{\mdseries\slshape G}} except for $g$ intersect nontrivially. 
\item[{ \texttt{Sources(\mbox{\texttt{\mdseries\slshape f}})} }]  Computes the strongly connected components of the transition graph by the
function \texttt{STRONGLY{\textunderscore}CONNECTED{\textunderscore}COMPONENTS{\textunderscore}DIGRAPH}, and selects those which are proper supersets of their preimages and proper
subsets of their images under{\nobreakspace}\mbox{\texttt{\mdseries\slshape f}}. 
\item[{ \texttt{SparseRep(\mbox{\texttt{\mdseries\slshape f}})}, {\nobreakspace} \texttt{StandardRep(\mbox{\texttt{\mdseries\slshape f}})} }]  Straightforward coefficient operations. 
\item[{ \texttt{SplittedClassTransposition(\mbox{\texttt{\mdseries\slshape ct}},\mbox{\texttt{\mdseries\slshape k}})} }]  ``Straightforward''. 
\item[{ \texttt{StructureDescription(\mbox{\texttt{\mdseries\slshape G}})} }]  This method uses a combination of techniques to obtain some basic information
on the structure of an rcwa group. The returned description reflects the way
the group has been built (\texttt{DirectProduct}, \texttt{WreathProduct}, etc.). 
\item[{ \texttt{\mbox{\texttt{\mdseries\slshape f}}+\mbox{\texttt{\mdseries\slshape g}}} }]  Pointwise addition of affine mappings. 
\item[{ \texttt{String(\mbox{\texttt{\mdseries\slshape obj}})} }]  ``Trivial''. 
\item[{ \texttt{Support(\mbox{\texttt{\mdseries\slshape G}})} }]  ``Straightforward''. 
\item[{ \texttt{Trajectory(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape n}},...)} }]  Iterated application of an rcwa mapping. In the methods computing ``accumulated coefficients'', additionally composition of affine mappings. 
\item[{ \texttt{TransitionGraph(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape m}})} }]  ``Straightforward'' \texttt{\symbol{45}}\texttt{\symbol{45}} just check a sufficiently long
interval. 
\item[{ \texttt{TransitionMatrix(\mbox{\texttt{\mdseries\slshape f}},\mbox{\texttt{\mdseries\slshape m}})} }]  Evaluation of the given expression. 
\item[{ \texttt{TransposedClasses(\mbox{\texttt{\mdseries\slshape g}})} }]  ``Trivial''. 
\item[{ \texttt{View(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\item[{ \texttt{WreathProduct(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape P}})} }]  Uses \texttt{DirectProduct} to embed the \texttt{NrMovedPoints(\mbox{\texttt{\mdseries\slshape P}})}th direct power of{\nobreakspace}\mbox{\texttt{\mdseries\slshape G}}, and \texttt{RcwaMapping}, Part{\nobreakspace}(d) to embed the finite permutation group{\nobreakspace}\mbox{\texttt{\mdseries\slshape P}}. 
\item[{ \texttt{WreathProduct(\mbox{\texttt{\mdseries\slshape G}},\mbox{\texttt{\mdseries\slshape Z}})} }]  Restricts \mbox{\texttt{\mdseries\slshape G}} to the residue class{\nobreakspace}3(4), and encodes the generator
of{\nobreakspace}\mbox{\texttt{\mdseries\slshape Z}} as $\tau_{0(2),1(2)} \cdot \tau_{0(2),1(4)}$. It is used that the images of{\nobreakspace}3(4) under powers of this
mapping are pairwise disjoint residue classes. 
\item[{ \texttt{Zero(\mbox{\texttt{\mdseries\slshape f}})} }]  ``Trivial''. 
\end{description}
 }

       
\chapter{\textcolor{Chapter }{Installation and Auxiliary Functions}}\label{ch:InstallationAndAuxiliaryFunctions}
\logpage{[ 9, 0, 0 ]}
\hyperdef{L}{X859F6BF88754E5CC}{}
{
   
\section{\textcolor{Chapter }{Requirements}}\label{sec:Requirements}
\logpage{[ 9, 1, 0 ]}
\hyperdef{L}{X85A08CF187A6D986}{}
{
  This version of \textsf{RCWA} needs at least \textsf{GAP}{\nobreakspace}4.9.0 in 64\texttt{\symbol{45}}bit mode, \textsf{ResClasses}{\nobreakspace}4.7.0, \textsf{GRAPE}{\nobreakspace}4.7{\nobreakspace}\cite{GRAPE}, \textsf{Polycyclic}{\nobreakspace}2.11{\nobreakspace}\cite{Polycyclic}, \textsf{FR}{\nobreakspace}2.2.1{\nobreakspace}\cite{FR}, \textsf{GAPDoc}{\nobreakspace}1.5.1{\nobreakspace}\cite{GAPDoc}, and \textsf{Utils}{\nobreakspace}0.40{\nobreakspace}\cite{Utils}. With possible exception of the most recent version of \textsf{ResClasses}, all needed packages are already present in an
up\texttt{\symbol{45}}to\texttt{\symbol{45}}date standard \textsf{GAP} installation. The \textsf{RCWA} package is completely written in the \textsf{GAP} language and can be used on all platforms for which \textsf{GAP} is available. }

  
\section{\textcolor{Chapter }{Installation}}\label{sec:Installation}
\logpage{[ 9, 2, 0 ]}
\hyperdef{L}{X8360C04082558A12}{}
{
  Like any other \textsf{GAP} package, \textsf{RCWA} is usually installed in the \texttt{pkg} subdirectory of the \textsf{GAP} distribution. This is accomplished by extracting the distribution file in this
directory. If you have done this, you can load the package as usual via \texttt{LoadPackage( "rcwa" );}. }

  
\section{\textcolor{Chapter }{The testing routines}}\label{sec:TheTestingRoutines}
\logpage{[ 9, 3, 0 ]}
\hyperdef{L}{X865D6A49826B92EC}{}
{
  

\subsection{\textcolor{Chapter }{RCWATestInstall}}
\logpage{[ 9, 3, 1 ]}\nobreak
\hyperdef{L}{X8314E1597BF1555B}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RCWATestInstall({\mdseries\slshape })\index{RCWATestInstall@\texttt{RCWATestInstall}}
\label{RCWATestInstall}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 \texttt{true} if no errors were found, and \texttt{false} otherwise. 



 Performs a nontrivial computation to check whether an installation of \textsf{RCWA} appears to work. Errors, i.e. differences to the correct results of the test
computation, are reported. The processed test file is \texttt{pkg/rcwa/tst/testinstall.tst}. }

 

\subsection{\textcolor{Chapter }{RCWATestAll}}
\logpage{[ 9, 3, 2 ]}\nobreak
\hyperdef{L}{X877DDD787E4ABDC2}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RCWATestAll({\mdseries\slshape })\index{RCWATestAll@\texttt{RCWATestAll}}
\label{RCWATestAll}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 \texttt{true} if no errors were found, and \texttt{false} otherwise. 



 Runs the full test suite of the \textsf{RCWA} package. Any differences to the supposed results of the test computations are
reported. The processed test files are in the \texttt{tst} subdirectory of the package directory. 

 Please note that the test suite is a tool for developing. The tests are
deliberately very volatile to allow to spot possible problems of any kind also
in other packages or in the \textsf{GAP} Library. For this reason you may see reports of differences which simply
reflect improved methods in other packages or in the \textsf{GAP} Library (for example an object may already know more of its attributes or
properties than it is expected to, or an object may be represented in a better
way), or which are caused by changes of the way certain objects are printed,
and which are therefore harmless. However if the correct and the actual output
look different mathematically or if you see error messages or if \textsf{GAP} crashes, then something went wrong. Also, reports about significantly
increased run times of individual commands as well as run times of test files
which are much longer than the predicted times shown may indicate a problem. }

 

\subsection{\textcolor{Chapter }{RCWATestExamples}}
\logpage{[ 9, 3, 3 ]}\nobreak
\hyperdef{L}{X799793987AA3F34C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{RCWATestExamples({\mdseries\slshape })\index{RCWATestExamples@\texttt{RCWATestExamples}}
\label{RCWATestExamples}
}\hfill{\scriptsize (function)}}\\
\textbf{\indent Returns:\ }
 nothing. 



 Runs all examples in the manual of the \textsf{RCWA} package, and reports any differences between the actual output and the output
printed in the manual. }

 }

  
\section{\textcolor{Chapter }{The Info class of the package}}\label{sec:TheInfoClass}
\logpage{[ 9, 4, 0 ]}
\hyperdef{L}{X7A31FA44791E93C5}{}
{
  

\subsection{\textcolor{Chapter }{InfoRCWA}}
\logpage{[ 9, 4, 1 ]}\nobreak
\hyperdef{L}{X7BAF5F4986288983}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{InfoRCWA\index{InfoRCWA@\texttt{InfoRCWA}}
\label{InfoRCWA}
}\hfill{\scriptsize (info class)}}\\


 This is the Info class of the \textsf{RCWA} package. See section \emph{Info Functions} in the \textsf{GAP} Reference Manual for a description of the Info mechanism. For convenience: \texttt{RCWAInfo(}\mbox{\texttt{\mdseries\slshape n}}\texttt{)} is a shorthand for \texttt{SetInfoLevel(InfoRCWA},\mbox{\texttt{\mdseries\slshape n}}\texttt{)}. \index{RCWAInfo@\texttt{RCWAInfo}} }

 }

  }

  \def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}

\bibliographystyle{alpha}
\bibliography{rcwabib.xml}

\addcontentsline{toc}{chapter}{References}

\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}
\hyperdef{L}{X83A0356F839C696F}{}
}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Index}


\printindex

\immediate\write\pagenrlog{["Ind", 0, 0], \arabic{page},}
\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}

Messung V0.5 in Prozent
C=98 H=84 G=91

¤ 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.1.390Bemerkung:  ¤

*Bot Zugriff






Wurzel

Bemerkung:

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Anfrage:

Dauer der Verarbeitung:

Sekunden

sprechenden Kalenders