# Construction of a Plane

All functions which create a plane return three values:

**(i)**
the plane itself;

**(ii)**
the point–set of the plane;

**(iii)**
the line–set of the plane.

These “sets” ((ii) and (iii)) are used as the parent structures for points and lines respectively, and are explained more fully in the next section.

## `FiniteProjectivePlane< v | X : parameters >: RngIntElt, List -> PlaneProj`

## `FiniteProjectivePlane< V | X : parameters >: SetIndx, List -> PlaneProj`

```magma
Check: BoolElt                    Default: true
```

Construct the projective plane $P$ having as point set the indexed set $V$ (or $\lbrace @ 1, 2, \ldots, v @ \rbrace$ if an integer $v$ is given), and as line set $L = \lbrace L_1, L_2, \ldots, L_b \rbrace$ given by the list $X$. The value of $X$ must be either:

**(a)**
A list of subsets of the set $V$.

**(b)**
A sequence, set or indexed set of subsets of $V$.

**(c)**
A list of lines of an existing plane.

**(d)**
A sequence, set or indexed set of lines of an existing plane.

**(e)**
A combination of the above.

**(f)**
A $v \times b$ $(0,1)$-matrix $A$, where $A$ may be defined over any coefficient ring. The matrix $A$ will be interpreted as the incidence matrix for the plane $P$.

**(g)**
A set of codewords of a linear code with length $v$. The line set of $P$ is taken to be the set of supports of the codewords.

The optional boolean argument `Check` indicates whether or not to check that the given data satisfies the projective plane axioms.

## `FiniteProjectivePlane(W): ModTupFld -> PlaneProj`

## `FiniteProjectivePlane(F): FldFin -> PlaneProj`

## `FiniteProjectivePlane(q): RngIntElt -> PlaneProj`

Given a $3$–dimensional vector space $W$ defined over the field $F = {\bf F}_{q}$, construct the classical projective plane defined by the one–dimensional and two–dimensional subspaces of $W$.

## `FiniteAffinePlane< v | X : parameters >: RngIntElt, List -> PlaneAff`

## `FiniteAffinePlane< V | X : parameters >: SetIndx, List -> PlaneAff`

```magma
Check: BoolElt                    Default: true
```

Construct the affine plane $P$ having as point set the indexed set $V$ (or $\lbrace @ 1, 2, \ldots, v @ \rbrace$ if an integer $v$ is given), and as line set $L = \lbrace L_1, L_2, \ldots, L_b \rbrace$ given by the list $X$. The value of $X$ must be either:

**(a)**
A list of subsets of the set $V$.

**(b)**
A sequence, set or indexed set of subsets of $V$.

**(c)**
A list of lines of an existing plane.

**(d)**
A sequence, set or indexed set of lines of an existing plane.

**(e)**
A combination of the above.

**(f)**
A $v \times b$ $(0,1)$-matrix $A$, where $A$ may be defined over any coefficient ring. The matrix $A$ will be interpreted as the incidence matrix for the plane $P$.

**(g)**
A set of codewords of a linear code with length $v$. The line set of $P$ is taken to be the set of supports of the codewords.

The optional boolean argument `Check` indicates whether or not to check that the given data satisfies the affine plane axioms.

## `FiniteAffinePlane(W): ModFld -> PlaneAff`

## `FiniteAffinePlane(F): FldFin -> PlaneProj`

## `FiniteAffinePlane(q): RngIntElt -> PlaneProj`

Given a $2$–dimensional vector space $W$ defined over the field $F = {\bf F}_{q}$, construct the classical affine plane defined by the cosets of the subspaces of $W$.

## `Example: Constructors (ex-9ba67e)`

The classical projective plane of order 3 can be constructed by the following statement:

```magma
> P, V, L := FiniteProjectivePlane(3);
> P;
Projective Plane PG(2, 3)
> V;
Point-set of Projective Plane PG(2, 3)
> L;
Line-set of Projective Plane PG(2, 3)

```

A non-classical affine plane of order 2 can be constructed in the following way:

```magma
> A := FiniteAffinePlane< 4 | Setseq(Subsets({1, 2, 3, 4}, 2)) >;
> A: Maximal;
Affine Plane of order 2
Points: {@ 1, 2, 3, 4 @}
Lines:
    {1, 3},
    {1, 4},
    {2, 4},
    {2, 3},
    {1, 2},
    {3, 4}

```

To demonstrate the use of the `Check` argument, we recreate the classical projective plane of order 16 with `Check := true` (the default) and `Check := false`.

```magma
> P, V, L := FiniteProjectivePlane(16);
> time P2 := FiniteProjectivePlane<
>     Points(P) | {Set(l): l in L} : Check := true >;
Time: 10.769
> time P2 := FiniteProjectivePlane<
>     Points(P) | {Set(l): l in L} : Check := false >;
Time: 0.030

```
