\Chapter{Block Designs and Projective Planes}

This section contains functions to help studying projective planes.
There is also a function converting relative difference sets to block
designs. Those desings can be studied with the \package{DESIGN} \cite{DESIGN}
package by L. Soicher.

Projective planes are always assumed to consist of positive integers
(as points) and sets of integers (as blocks). The incidence relation
is assumed to be the element relation. The blocks of a projective
plane must be *sets*.

\Declaration{ProjectivePlane}
\Declaration{PointJoiningLinesProjectivePlane}

\beginexample
gap> b:=[ [ 1, 3 ], [ 1, 6 ], [ 2, 4 ], [ 2, 7 ], 
>       [ 3, 5 ], [ 4, 6 ], [ 5, 7 ] ];;
gap> plane:=ProjectivePlane(b);
rec( isBlockDesign := true, v := 7, 
     blocks := [ [ 1, 3 ], [ 1, 6 ], [ 2, 4 ], [ 2, 7 ], 
                 [ 3, 5 ], [ 4, 6 ], [ 5, 7 ] ], 
     jblock := [ [ 0, 0, 1, 0, 0, 2, 0 ], [ 0, 0, 0, 3, 0, 0, 4 ], 
     [ 1, 0, 0, 0, 5, 0, 0 ], [ 0, 3, 0, 0, 0, 6, 0 ], 
     [ 0, 0, 5, 0, 0, 0, 7 ], [ 2, 0, 0, 6, 0, 0, 0 ], 
     [ 0, 4, 0, 0, 7, 0, 0 ] ], 
     isProjectivePlane := true )
gap> PointJoiningLinesProjectivePlane(plane);
[ [ 0, 1, 0, 0, 3, 0, 0 ], [ 1, 0, 0, 0, 0, 6, 0 ], [ 0, 0, 0, 2, 0, 4, 0 ], 
  [ 0, 0, 2, 0, 0, 0, 7 ], [ 3, 0, 0, 0, 0, 0, 5 ], [ 0, 6, 4, 0, 0, 0, 0 ], 
  [ 0, 0, 0, 7, 5, 0, 0 ] ]
gap> RecNames(plane);
[ "isBlockDesign", "v", "blocks", "jblock", "isProjectivePlane", "jpoint" ]
\endexample

\Declaration{DevelopmentOfRDS}

\beginexample
gap> G:=CyclicGroup(21);;  Gdata:=PermutationRepForDiffsetCalculations(G);; 
gap> AllDiffsets([2],[1..21],4,[],Gdata,1);                                  
[ [ 2, 5, 16, 17 ], [ 2, 6, 10, 18 ] ]
gap> d1:=DevelopmentOfRDS(Set(G){[2,5,16,17]},Set(G)); 
rec( isBlockDesign := true, v := 21, 
  blocks := [ [ 1, 2, 5, 16, 17 ], [ 1, 3, 14, 15, 21 ], [ 1, 4, 8, 10, 13 ], 
      [ 1, 6, 7, 9, 20 ], [ 1, 11, 12, 18, 19 ], [ 2, 3, 9, 10, 12 ], 
      [ 2, 4, 7, 15, 19 ], [ 2, 6, 8, 11, 21 ], [ 2, 13, 14, 18, 20 ], 
      [ 3, 4, 6, 17, 18 ], [ 3, 5, 8, 19, 20 ], [ 3, 7, 11, 13, 16 ], 
      [ 4, 5, 9, 11, 14 ], [ 4, 12, 16, 20, 21 ], [ 5, 6, 12, 13, 15 ], 
      [ 5, 7, 10, 18, 21 ], [ 6, 10, 14, 16, 19 ], [ 7, 8, 12, 14, 17 ], 
      [ 8, 9, 15, 16, 18 ], [ 9, 13, 17, 19, 21 ], [ 10, 11, 15, 17, 20 ] ], 
  autSubgroup := <permutation group with 21 generators>, 
  pointNames := [ <identity> of ..., f1, f2, f1^2, f1*f2, f2^2, f1^2*f2, 
      f1*f2^2, f2^3, f1^2*f2^2, f1*f2^3, f2^4, f1^2*f2^3, f1*f2^4, f2^5, 
      f1^2*f2^4, f1*f2^5, f2^6, f1^2*f2^5, f1*f2^6, f1^2*f2^6 ], 
  blockSizes := [ 5 ], blockNumbers := [ 21 ], isSimple := true, 
  isBinary := true )
gap> d2:=DevelopmentOfRDS([2,5,16,17],Gdata);;
gap> d1=d2
true
gap> d1=DevelopmentOfRDS(Set(G){[2,5,16,17]},G);  
true
gap> d1=DevelopmentOfRDS([2,5,16,17],G);        
true
\endexample

Note that equality for block designs means equality of records. So
`DevelopmentOfRDS' generates exactly the same record in each of the
above examples. The output is in fact independent of the chosen data type of the input (as long as it is valid). In particular, the design always knows its `pointNames'.

\Declaration{ProjectiveClosureOfPointSet}

Let's find a Baer subplane in the desarguesian plane of order $4$:
\beginexample
gap> G:=CyclicGroup(21);; Gdata:=PermutationRepForDiffsetCalculations(G);;
gap> AllDiffsets([2],[1..21],4,[],Gdata,1);                                  
[ [ 2, 5, 16, 17 ], [ 2, 6, 10, 18 ] ]
gap> plane:=DevelopmentOfRDS([2,5,16,17],Gdata);;
gap> ProjectiveClosureOfPointSet([1,3,4],plane);  
rec( closure := rec( isBlockDesign := true, v := 3, 
     blocks := [ [ 1, 2 ], [ 1, 3 ], [ 2, 3 ] ] 
     pointNames := [ <identity> of ..., f2, f1^2 ]), 
     embedding := (2,3,4) )
gap> IsProjectivePlane(last.closure);
false
gap> baer:=ProjectiveClosureOfPointSet([1,3,4,5],plane);;
gap> baer.closure.blocks;
[ [ 1, 2, 6 ], [ 1, 3, 5 ], [ 1, 4, 7 ], [ 2, 3, 7 ], 
  [ 2, 4, 5 ], [ 3, 4, 6 ], [ 5, 6, 7 ] ]
gap> IsProjectivePlane(baer.closure);
true
gap> Set(baer.closure.blocks,b->OnSets(b,baer.embedding));
[ [ 1, 3, 14 ], [ 1, 4, 8 ], [ 1, 5, 17 ], [ 3, 4, 17 ], 
  [ 3, 5, 8 ], [ 4, 5, 14 ], [ 8, 14, 17 ] ]
\endexample

%%%%%%%%%%%%%%%%%%%%
\Section{Isomorphisms and Collineations} 

Isomorphisms of projective planes are mappings which take points to
points and blocks to blocks and respect incidence. A *collineation* of
a projective plane $P$ is an isomorphism from $P$ to $P$.

As projective planes are assumed to live on the integers, isomorphisms
of projective planes are represented by permutations. To test if a
permutation on points is actually an isomorphism of projective planes,
the following methods can be used.

\Declaration{IsIsomorphismOfProjectivePlanes}
\Declaration{IsCollineationOfProjectivePlane}
\Declaration{IsomorphismProjPlanesByGenerators}

Look at the above example again:
\beginexample
gap> P:=ProjectivePlane( [ [ 1, 2, 6 ], [ 1, 3, 5 ], [ 1, 4, 7 ], 
>       [ 2, 3, 7 ], [ 2, 4, 5 ], [ 3, 4, 6 ], [ 5, 6, 7 ] ]);;
gap> pi:=IsomorphismProjPlanesByGenerators([1,2,3,4],P,[2,4,6,7],P);
(1,2,4,7,3,6,5)
gap> IsIsomorphismOfProjectivePlanes(pi,P,P);
true
gap> IsCollineationOfProjectivePlane(pi,P);                 
true
gap> IsomorphismProjPlanesByGenerators([1,2,3,4],P,[1,2,3,5],P);
fail
gap> ProjectiveClosureOfPointSet([1,2,3,5],P).closure.v;
4
\endexample


%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Central Collineations}

Let $\phi$ be a collineation of a projective plane which fixes one
point block-wise (the so-called *centre*) and one block point-wise
(the so-called *axis*). If the centre is contained in the axis, $\phi$
is called *elation*. Otherwise, $\phi$ is called *homology*. The group
of elations with given axis is called *translation group* of the plane
(relative to the chosen axis). A projective plane with transitive
translation group is called *translation plane*. Here transitivity is
on the points outside the axis.

\Declaration{ElationByPair}
\Declaration{AllElationsCentAx}
\Declaration{AllElationsAx}
\beginexample
gap> P:=ProjectivePlane( [ [ 1, 2, 6 ], [ 1, 3, 5 ], [ 1, 4, 7 ], 
>       [ 2, 3, 7 ], [ 2, 4, 5 ], [ 3, 4, 6 ], [ 5, 6, 7 ] ]);;
gap> pi:=ElationByPair(1,[1,2,6],[3,5],P);
(3,5)(4,7)
gap> AllElationsCentAx(1,[1,2,6],P);
Group([ (3,5)(4,7) ])
gap> AllElationsAx([1,2,6],P); 
Group([ (3,5)(4,7), (3,7)(4,5) ])
gap> AllElationsAx([1,2,6],P);
Group([ (3,5)(4,7), (3,7)(4,5) ])
gap> Size(last);
4
\endexample

\Declaration{IsTranslationPlane}

\beginexample
gap> AllElationsAx(P.blocks[1],P);
Group([ (3,5)(4,7), (3,7)(4,5) ])
gap> Size(last);
4
gap> IsTranslationPlane(P);
true
\endexample

\Declaration{HomologyByPair}
\Declaration{GroupOfHomologies}
\beginexample
gap> HomologyByPair(3,[1,2,6],[4,5],P);
Error, The centre must be fixed blockwise called from
 # ...
gap> GroupOfHomologies(3,[1,2,6],P);   
Group(())
\endexample

%%%%%%%%%%%%%%%%%%%%
\Section{Collineations on Baer Subplanes}

Let $P$ be a projective plane of order $n^2$. A subplane $B$ of order
$n$ of $P$ is called *Baer subplane*. Baer suplanes are exactly the
maximal subplanes of $P$.

\Declaration{InducedCollineation}

Let's go back to an earlier example and find a planar collineation:
\beginexample
gap> G:=CyclicGroup(21);; Gdata:=PermutationRepForDiffsetCalculations(G);; 
gap> AllDiffsets([2],[1..21],4,[],Gdata,1); 
[ [ 2, 5, 16, 17 ], [ 2, 6, 10, 18 ] ]
gap> plane:=DevelopmentOfRDS([2,5,16,17],Gdata);;
gap> baer:=ProjectiveClosureOfPointSet([1,3,4,5],plane);; 
gap> pi:=InducedCollineation(baer.closure,(),21,15,plane,baer.embedding);
(2,16)(6,18)(7,12)(9,11)(10,13)(15,21)(19,20)
gap> 21^pi;
15
gap> ForAll(OnSets([1..7],baer.embedding),i->i^pi=i);
true
\endexample

%%%%%%%%%%%%%%%%%%%%
\Section{Invariants for Projective Planes}

The functions `NrFanoPlanesAtPoints', `pRank', `FingerprintAntiFlag'
and `FingerprintProjPlane' calculate invariants for finite projective
planes. For more details see \cite{RoederDiss} and
\cite{MoorhouseGraphs}. The values of some of these invariants are
available from the homepages of \cite{Moorhouse} and \cite{Royle} for
many planes.

\Declaration{NrFanoPlanesAtPoints}
\beginexample
gap> G:=CyclicGroup(4^2+5);
<pc group of size 21 with 2 generators>
gap> diffset:=OneDiffset(G);        
[ f1, f1*f2, f1^2*f2^4, f1*f2^5 ]
gap> P:=DevelopmentOfRDS(diffset,G);;
gap> NrFanoPlanesAtPoints([3],P);
[ [ 3, 240 ] ]
\endexample
\Declaration{IncidenceMatrix}
\Declaration{pRank}
\beginexample
gap> G:=CyclicGroup(2^2+3);
<pc group of size 7 with 1 generators>
gap> P:=DevelopmentOfRDS(OneDiffset(G),G);;
gap> IncidenceMatrix(P);
[ [ 1, 1, 1, 0, 0, 0, 0 ], [ 1, 0, 0, 1, 1, 0, 0 ], [ 0, 1, 0, 1, 0, 1, 0 ], 
  [ 1, 0, 0, 0, 0, 1, 1 ], [ 0, 0, 1, 1, 0, 0, 1 ], [ 0, 0, 1, 0, 1, 1, 0 ], 
  [ 0, 1, 0, 0, 1, 0, 1 ] ]
gap> pRank(P,3);
6
gap> pRank(P,2);
4
\endexample
\Declaration{FingerprintProjPlane}
\Declaration{FingerprintAntiFlag}
Look at the above example again:
\beginexample
gap> NrFanoPlanesAtPoints([1,2,3],plane);
[ [ 1, 240 ], [ 2, 240 ], [ 3, 240 ] ]
gap> Set(NrFanoPlanesAtPoints([1..plane.v],plane),i->i[2])=[240];
true
gap> pRank(plane,2);
10
gap> pRank(plane,3);
21
gap> pRank(plane,5);
20
gap> FingerprintProjPlane(plane);
[ [ 12, 420 ], [ 16, 21 ] ]
gap> FingerprintAntiFlag(1,6,plane);
[ [ 3, 20 ], [ 4, 5 ] ]
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%E
%%

