
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{The Database}

This package gives access to the database of Lie $p$-rings of order at most
$p^7$ as determined by Mike Newman, Eamonn O'Brien and Michael Vaughan-Lee,
see \cite{NOV04} and \cite{OVL05}. A description of the database can also be 
found in \cite{Notes}.
\medskip

For each $n \in \{1, \ldots, 7\}$ this package contains a (finite) list of 
generic presentations of Lie $p$-rings. For each prime $p \geq 5$, each
of the generic Lie $p$-rings gives rise to a family of Lie $p$-rings over
the considered prime $p$ by specialising the indeterminates to a certain list
of values. The resulting lists of Lie $p$-rings provides a complete and
irredundant set of isomorphism type representatives of the Lie $p$-rings of
order $p^n$. The generic Lie $p$-rings of $p$-class at most 2 can also be
considered for the prime $p=3$ and yield a list of isomorphism type
representatives for the Lie $p$-rings of order $3^n$ and $p$-class at most 
$2$.
\medskip

The Lazard correspondence has been used to check the correctness of the
database of Lie $p$-rings: for various small primes it has been checked
that the Lie $p$-rings of this database define non-isomorphic finite
$p$-groups.
\medskip

In the following we describe functions to access the database. Throughout 
this chapter, we assume that $dim \in \{1, \ldots, 7\}$ and $P$ is a prime 
with $P \neq 2$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Accessing Lie p-rings}

\> LiePRingsByLibrary( dim )
\> LiePRingsByLibrary( dim, gen, cl )

returns the generic Lie $p$-rings of dimension $dim$ in the database. The
second form returns the Lie $p$-rings of minimal generator number $gen$ 
and $p$-class $cl$ only. 

\> LiePRingsByLibrary( dim, P )
\> LiePRingsByLibrary( dim, P, gen, cl )

returns isomorphism type representatives of ordinary Lie $p$-rings of 
dimension $dim$ for the prime $P$. The second form returns the Lie $p$-rings 
of minimal generator number $gen$ and $p$-class $cl$ only. The function 
assumes $P \geq 3$ and for $P = 3$ there are only the Lie $p$-rings of 
$p$-class at most 2 available.

The first example yields the generic Lie $p$-rings of dimension $4$.

\beginexample
gap> LiePRingsByLibrary(4);
[ <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p>, 
  <LiePRing of dimension 4 over prime p> ]
\endexample

The next example yields the isomorphism type representatives of Lie 
$p$-rings of dimension $3$ for the prime $5$.

\beginexample
gap> LiePRingsByLibrary(3, 5);
[ <LiePRing of dimension 3 over prime 5>, 
  <LiePRing of dimension 3 over prime 5>, 
  <LiePRing of dimension 3 over prime 5>, 
  <LiePRing of dimension 3 over prime 5>, 
  <LiePRing of dimension 3 over prime 5> ]
\endexample

The following example extracts the generic Lie $p$-rings of dimension
$5$ with minimal generator number $2$ and $p$-class $4$.

\beginexample
gap> LiePRingsByLibrary(5, 2, 4);
[ <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p> ]
\endexample

Finally, we determine the isomorphism type representatives of Lie
$p$-rings of dimension $5$, minimal generator number $2$ and $p$-class
$4$ for the prime $7$.

\beginexample
gap> LiePRingsByLibrary(5, 7, 2, 4);
[ <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7>, 
  <LiePRing of dimension 5 over prime 7> ]
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Numbers of Lie p-rings}

\> NumberOfLiePRings( dim )

returns the number of generic Lie $p$-rings in the database of the
considered dimension for $dim \{ 1, \ldots, 7\}$.

\beginexample
gap> List([1..7], x -> NumberOfLiePRings(x));
[ 1, 2, 5, 15, 75, 542, 4773 ]
\endexample

\> NumberOfLiePRings( dim, P )

returns the number of isomorphism types of ordinary Lie $p$-rings of order
$P^{dim}$ in the database. If $P \geq 5$, then this is the number of all
isomorphism types of Lie $p$-rings of order $P^{dim}$ and if $P = 3$ then
this is the number of all isomorphism types of Lie $p$-rings of $p$-class
at most $2$. If $P \geq 7$, then this number coincides with
NumberSmallGroups($P^{dim}$).

\> NumberOfLiePRingsInFamily( L )

returns the number of Lie $p$-rings associated to $L$ as a polynomial in
<p> and possibly some residue classes.

\beginexample
gap> L := LiePRingsByLibrary(7)[780];
<LiePRing of dimension 7 over prime p with parameters
[ w, x, y, z, t, s, u, v ]>
gap> NumberOfLiePRingsInFamily(L);
-1/3*p^5*(p-1,3)+p^5-1/3*p^4*(p-1,3)+p^4-1/3*p^3*(p-1,3)+p^3-1/3*p^2*(p-1,3)
+p^2-p*(p-1,3)+3*p-3/2*(p-1,3)+9/2
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Searching the database}

We now consider a generic Lie $p$-ring <L> from the database and consider
the family of ordinary Lie $p$-rings that arise from it.

\> LiePRingsInFamily( L, P )

takes as input a generic Lie $p$-ring <L> from the database and a prime <P> 
and returns all Lie $p$-rings determined by <L> and <P> up to isomorphism. 
This function returns fail if the generic Lie $p$-ring does not exist for 
the special prime <P>; this may be due to the conditions on the prime or
(if $P=3$) to the $p$-class of the Lie $p$-ring. 

\beginexample
gap> L := LiePRingsByLibrary(7)[118];
<LiePRing of dimension 7 over prime p with parameters [ x, y ]>
gap> LibraryConditions(L);
[ "all x,y, y~-y", "p=1 mod 4" ]
gap> LiePRingsInFamily(L,3);
fail
gap> Length(LiePRingsInFamily(L,5));
15
gap> LiePRingsInFamily(L, 7);
fail
gap> Length(LiePRingsInFamily(L,13));
91
gap> 13^2;
169
\endexample

The following example shows how to determine all Lie $p$-rings of dimension
$5$ and $p$-class $4$ over the prime $29$ up to isomorphism.

\beginexample
gap> L := LiePRingsByLibrary(5);;
gap> L := Filtered(L, x -> PClassOfLiePRing(x)=4);
[ <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 5 over prime p>, 
  <LiePRing of dimension 5 over prime p> ]
gap> K := List(L, x-> LiePRingsInFamily(x, 29));
[ [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], fail, fail, 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ], fail, fail, 
  [ <LiePRing of dimension 5 over prime 29> ], 
  [ <LiePRing of dimension 5 over prime 29> ] ]
gap> K := Filtered(Flat(K), x -> x<>fail);
[ <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29>, 
  <LiePRing of dimension 5 over prime 29> ]
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{More details}

Let $L$ be a Lie $p$-ring from the database. Then the following additional
attributes are available. 

\> LibraryName(L)

returns a string with the name of $L$ in the database. See p567.pdf for
further background.

\> ShortPresentation(L)

returns a string exhibiting a short presentation of $L$.

\> LibraryConditions(L)

returns the conditions on $L$. This is a list of two strings. The first
string exhibits the conditions on the parameters of $L$, the second shows
the conditions on primes.

\> MinimalGeneratorNumberOfLiePRing(L)

returns the minimial generator number of $L$.

\> PClassOfLiePRing(L)

returns the $p$-class of $L$.

\beginexample
gap> L := LiePRingsByLibrary(7)[118];
<LiePRing of dimension 7 over prime p with parameters [ x, y ]>
gap> LibraryName(L);
"7.118"
gap> LibraryConditions(L);
[ "all x,y, y~-y", "p=1 mod 4" ]
\endexample

All of the information listed in this section is inherited when $L$
is specialised.

\beginexample
gap> L := LiePRingsByLibrary(7)[118];
<LiePRing of dimension 7 over prime p with parameters [ x, y ]>
gap> K := SpecialiseLiePRing(L, 5, ParametersOfLiePRing(L), [0,0]);
<LiePRing of dimension 7 over prime 5>
gap> LibraryName(K);
"7.118"
gap> LibraryConditions(K);
[ "all x,y, y~-y", "p=1 mod 4" ]
\endexample

The following example shows how to find a Lie $p$-ring with a 
given name in the database.

\beginexample
gap> L := LiePRingsByLibrary(7);;
gap> Filtered(L, x -> LibraryName(x) = "7.1010")[1];
<LiePRing of dimension 7 over prime p> 
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Special functions for dimension $7$}

The database of Lie $p$-rings of dimension $7$ is very large and it may
be time-consuming (or even impossible due to storage problems) to generate
all Lie $p$-rings of dimension $7$ for a given prime $P$. 

Thus there are some special functions available that can be used to access
a particular set of Lie $p$-rings of dimension $7$ only. In particular, it
is possible to consider the descendants of a single Lie $p$-ring of smaller
dimension by itself. The Lie $p$-rings of this type are all stored in one
file of the library. Thus, equivalently, it is possible to access the Lie
$p$-rings in one single file only.

The table LIE_TABLE contains a list of all possible files together with
the number of Lie $p$-rings generated by their corresponding Lie $p$-rings. 

\> LiePRingsDim7ByFile( nr )

returns the generic Lie $p$-rings in file number $nr$.

\> LiePRingsDim7ByFile( nr, P )

returns the isomorphism types of Lie $p$-rings in file number $nr$ for
the prime <P>.

\beginexample
gap> LIE_TABLE[100];
[ "3gen/gapdec6.139", 1/2*p+g3+3/2 ]
gap> LiePRingsDim7ByFile(100);
[ <LiePRing of dimension 7 over prime p>, 
  <LiePRing of dimension 7 over prime p>, 
  <LiePRing of dimension 7 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 7 over prime p with parameters [ w ]>, 
  <LiePRing of dimension 7 over prime p with parameters [ x ]> ]
gap> LiePRingsDim7ByFile(100, 7);
[ <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7>, 
  <LiePRing of dimension 7 over prime 7> ]
\endexample

