%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this is a latex-file
\documentclass{slides}
\usepackage{fancyheadings}
\usepackage{german}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setze Seiten-outfit
\parindent 0cm
\setlength{\topmargin}{0cm}
\setlength{\headheight}{1cm}
\setlength{\headsep}{0cm}
\setlength{\topskip}{0cm}
\setlength{\textheight}{23cm}
\setlength{\textwidth}{19cm}
\setlength{\oddsidemargin}{-1.5cm}
\setlength{\evensidemargin}{-1.5cm}
\pagestyle{fancy}

\lhead{{\tiny \it The AutPGrp share package - Bettina Eick}}
\rhead{{\tiny \it \thepage}}
\chead{}
\cfoot{}
\lfoot{}
\rfoot{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unterdr"ucke Underfull h-boxes
\let\nwline=\newline
\renewcommand{\newline}{\nwline\mbox{}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% start of document
\begin{document}

Setting up the pgaut share package: \\

\begin{itemize}
\item[$\bullet$] Copy the ``example'' share package
\item[$\bullet$] Fill up the empty spaces
\end{itemize}

{\tiny \begin{verbatim}

eick:/.../pgaut > ls
README   doc   gap    init.g   read.g

\end{verbatim}}

\begin{itemize}
\item[$\bullet$] Place your code in the directory ``gap''
\item[$\bullet$] Place your documentation in the directory ``doc''
\item[$\bullet$] Edit the files ``init.g'' and ``read.g''
\end{itemize}
\newpage

The file init.g: \\

{\tiny \begin{verbatim}

DeclarePackage( "autpgrp", "1.0", ReturnTrue );


DeclarePackageDocumentation( "autpgrp", "doc" );

\end{verbatim}}
\newpage

The file read.g: \\

{\tiny \begin{verbatim}

##
## Print a banner
##
Print("#I -- The AutPGrp share package -- \n");
Print("#I -- Computing automorphism groups of p-groups -- \n");



##
## Read .gd files containing declarations
##
ReadPkg( "autpgrp", "gap/autos.gd");




##
## Read .gi files containing methods and functions
##
ReadPkg( "autpgrp", "gap/autoops.gi");
ReadPkg( "autpgrp", "gap/general.gi");
ReadPkg( "autpgrp", "gap/nosubgp.gi");
ReadPkg( "autpgrp", "gap/charsub.gi");
ReadPkg( "autpgrp", "gap/overgrp.gi");
ReadPkg( "autpgrp", "gap/cover.gi");
ReadPkg( "autpgrp", "gap/blockst.gi");
ReadPkg( "autpgrp", "gap/orbstab.gi");
ReadPkg( "autpgrp", "gap/autos.gi");

\end{verbatim}}
\newpage

Install a method for AutomorphismGroup: \\

{\tiny \begin{verbatim}

###################################################################
##
#M AutomorphismGroup
##
InstallMethod( AutomorphismGroup,
               "for finite p-groups",
               true,
               [IsPGroup and CanEasilyComputePcgs],
               25,
function( G )
    local p, r;

    p := PrimePGroup( G );
    r := RankPGroup( G );

    # choose a initialisation
    if (p^r - 1) / (p - 1) < 1000 then
        InitAutGroup := InitAutomorphismGroupOver;
    else
        InitAutGroup := InitAutomorphismGroupChar;
    fi;

    # choose flags
    CHOP_MULT := true;
    CHOP_NUCL := true;
    NICE_STAB := true;

    return AutomorphismGroupPGroup( G );
end );

\end{verbatim}}
\newpage


Check that the method installation has been successful: \\

{\tiny \begin{verbatim}
gap> G := SmallGroup( 3^6, 200 ); 
<pc group with 6 generators>

gap> IsPGroup(G);
true

gap> ApplicableMethod( AutomorphismGroup, [G], 4 );
#I  Searching Method for AutomorphismGroup with 1 arguments:
#I  Total: 8 entries
#I  Method 1: ``AutomorphismGroup: system getter'', value: 2*SUM_FLAGS+8
#I   - 1st argument needs [ "Tester(AutomorphismGroup)" ]
#I  Method 2: ``AutomorphismGroup: for finite p-groups'', value: 49
function( G ) ... end

gap> AutomorphismGroup(G);
<group of size 118098 with 11 generators>
\end{verbatim}}

That works!
\newpage

Without setting the flag `IsPGroup': \\

{\tiny \begin{verbatim}
gap> G := SmallGroup( 3^6, 200 );
<pc group with 6 generators>

gap> ApplicableMethod( AutomorphismGroup, [G], 4 );
#I  Searching Method for AutomorphismGroup with 1 arguments:
#I  Total: 8 entries
#I  Method 1: ``AutomorphismGroup: system getter'', value: 2*SUM_FLAGS+8
#I   - 1st argument needs [ "Tester(AutomorphismGroup)" ]
#I  Method 2: ``AutomorphismGroup: for finite p-groups'', value: 49
#I   - 1st argument needs [ "IsPGroup", "Tester(IsPGroup)" ]
#I  Method 3: ``AutomorphismGroup: finite abelian groups'', value: 34
#I   - 1st argument needs [ "IsCommutative", "Tester(IsCommutative)" ]
#I  Method 4: ``AutomorphismGroup: finite solvable groups'', value: 26
function( G ) ... end
\end{verbatim}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end of document
\end{document}


