9 Affine Spaces

In this chapter we show how one can work with finite affine spaces in FinInG.

9.1 Affine spaces and basic operations

An affine space is a point-line incidence geometry, satisfying few well known axioms. An axiomatic treatment can e.g. be found in [VY65a] and [VY65b]. As is the case with projective spaces, affine spaces are axiomatically point-line geometries, but may contain higher dimensional affine subspaces too. An affine space can also be described as the "geometry you get" when you remove a hyperplane from a projective space. Conversely, each affine space can be extended to a projective space in a unique way (by "adding its hyperplane at infinity"). In FinInG, we deal with finite Desarguesian affine spaces, i.e. an affine space, such that its projective completion is Desarguesian. Other concepts can be easily defined using this projective completion. E.g. lines of the projective space which are concurrent in a point of the hyperplane at infinity, become now parallel in the affine space. In order to implement (Desarguesian) affine spaces in FinInG, we have to represent the elements of the affine space (the affine subspaces), in a standard way. By definition, the points (i.e. the elements of type 1) of the \(n\)-dimensional affine space \(\mathrm{AG}(n,q)\) are the vectors of the underlying \(n\)-dimensional vector space over the finite field \(\mathrm{GF}(q)\). The \(i\)-dimensional subspaces of \(\mathrm{AG}(n,q)\) (i.e. the elements of type \(i-1\)) are defined as the cosets of the \(i\)-dimensional subspaces of the underlying vector space. Hence, the common representation of such a subspace is

\[v+S,\]

where v is a vector and S is a subspace of a vector space. Equivalently one can also think of a subspace of an affine space as consisting of: (i) an affine point, representing the coset, and and (ii) a "direction", which is an element of an \(n-1\)-dimensional projective space, representing the hyperplane at infinity. In FinInG, we represent an \(i\)-dimensional subspace, \(1 \leq i \leq n-1\) as

\[[v, mat]\]

where v is a row vector and mat is a matrix (representing a basis of the projective element representing the direction at infinity). For affine points, we simply use vectors.

9.1-1 IsAffineSpace

‣ IsAffineSpace

( category )

This category is a subcategory of IsIncidenceGeometry, and contains all finite Desarguesian affine spaces.

9.1-2 AffineSpace

‣ AffineSpace( d, F )

( operation )

‣ AffineSpace( d, q )

( operation )

‣ AG( d, F )

( operation )

‣ AG( d, q )

( operation )

Returns: an affine space

d must be a positive integer. In the first form, F is a field and the function returns the affine space of dimension d over F. In the second form, q is a prime power specifying the size of the field. The user may also use an alias, namely, the common abbreviation AG(d, q).

9.1-3 Dimension

Returns: the dimension of the affine space as (which is equal to its rank)

gap>Dimension(AG(5,7));
5
gap>Rank(AG(5,7));
5

9.1-4 BaseField

‣ BaseField( as )

( operation )

Returns: returns the base field for the affine space as

gap>BaseField(AG(6,49));
GF(7^2)

9.1-5 UnderlyingVectorSpace

‣ UnderlyingVectorSpace( as )

( operation )

Returns: a vector space

The underlying vectorspace of \(\mathrm{AG}(n,q)\) is simply \(V(n,q)\).

gap>UnderlyingVectorSpace(AG(4,5));
( GF(5)^4 )

9.1-6 AmbientSpace

‣ AmbientSpace( as )

( attribute )

Returns: an affine space

The ambient space of an affine space as is the affine space itself. Hence, simply as will be returned.

gap>AmbientSpace(AG(4,7));
AG(4, 7)

9.2 Subspaces of affine spaces

9.2-1 AffineSubspace

‣ AffineSubspace( geo, v )

( operation )

‣ AffineSubspace( geo, v, M )

( operation )

Returns: a subspace of an affine space

geo is an affine space, v is a row vector, and M is a matrix. There are two representations necessary for affine subspaces in FinInG: (i) points represented as vectors and (ii) subspaces of dimension at least 1 represented as a coset of a vector subspace:

\[v+S.\]

For the former, the underlying object is just a vector, whereas the second is a pair \([v, M]\) where \(v\) is a vector and \(M\) is a matrix representing the basis of \(S\). Now there is a canonical representative for the coset \(v+ S\), and the matrix \(M\) is in semi-echelon form, therefore we can easily compare two affine subspaces. If no matrix is given in the arguments, then it is assumed that the user is constructing an affine point.

9.2-2 ElementsOfIncidenceStructure

‣ ElementsOfIncidenceStructure( as, j )

( operation )

Returns: the collection of elements of the affine space as of type j

For the affine space as of dimension \(d\) and the type j, \(1 \leq j \leq d\) this operation returns the collection of \(j-1\) dimensional subspaces. An error message is produced when the projective space ps has no elements of a required type.

gap>ag := AffineSpace(9, 64);
AG(9, 64)
gap>ElementsOfIncidenceStructure(ag,1);
<points of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,2);
<lines of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,3);
<planes of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,4);
<solids of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,6);
<affine. subspaces of dim. 5 of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,9);
<affine. subspaces of dim. 8 of AG(9, 64)>
gap>ElementsOfIncidenceStructure(ag,10);
Error, <as> has no elements of type <j> called from
<function "unknown">( <arguments> )
called from read-eval loop at line 15 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>quit;

9.2-3 Short names for ElementsOfIncidenceStructure

‣ Points( ps )

( operation )

‣ Lines( ps )

( operation )

‣ Planes( ps )

( operation )

‣ Solids( ps )

( operation )

‣ Hyperplanes( ps )

( operation )

Returns: The elements of ps of respective type 1, 2, 3, 4, and the hyperplanes

An error message is produced when the projective space ps has no elements of a required type.

9.2-4 Incidence and containment

‣ IsIncident( el1, el2 )

( operation )

‣ \*( el1, el2 )

( operation )

‣ \in( el1, el2 )

( operation )

Returns: true or false

Recall that for affine spaces, incidence is symmetrized containment, where the whole affine space is excluded as one of the arguments for the operation IsIncident, since they it is not considered as an element of the geometry, but the whole affine space is allowed as one of the arguments for \in. The method for \* is using IsIncident.

9.2-9 IsParallel

‣ IsParallel( u, v )

( operation )

Returns: true or false

The arguments u and v must be affine subspaces of a common affine space. Two subspaces are parallel if and only if the direction space of the first is contained in the direction space of the second or viceversa.

9.2-10 ParallelClass

‣ ParallelClass( as, v )

( operation )

‣ ParallelClass( v )

( operation )

Returns: a collection of affine subspaces

The argument v is an affine subspace of as. This operation returns a collection for which an iterator is installed. The collection represents the set of elements of as of the same type as v which are parallel to v; they have the same direction. If v is a point, then this operation returns the collection of all points of as. If one argument is given, then it is assumed that the affine space which we are working with is the ambient space of v.

9.3 Shadows of Affine Subspaces

9.3-1 ShadowOfElement

‣ ShadowOfElement( as, v, type )

( operation )

Returns: the subspaces of the affine space as of dimension type which are incident with v

as is an affine space and v is an element of as. This operation computes and returns the subspaces of dimension type which are incident with v. In fact, this operation returns a collection which is only computed when iterated (e.g. when applying AsList to the collection). Some shorthand notation for ShadowOfElement is available for affine spaces: Points(as,v), Points(v), Lines(v), etc.

9.3-2 ShadowOfFlag

‣ ShadowOfFlag( as, list, type )

( operation )

Returns: the subspaces of the affine space as of dimension type which are incident with each element of list

as is an affine space and list is a list of pairwise incident elements of as. This operation computes and returns the subspaces of dimension type which are incident with every element of list. In fact, this operation returns a collection which is only computed when iterated (e.g. when applying AsList to the collection).

9.4 Iterators and enumerators

Recall from Section 4.4 ("Enumerating subspaces of a projective space", Chapter 4), that an iterator allows us to obtain elements from a collection one at a time in sequence, whereas an enumerator for a collection give us a way of picking out the i-th element. In FinInG we have enumerators and iterators for subspace collections of affine spaces.

9.4-1 Iterator

‣ Iterator( subs )

( operation )

Returns: an iterator for the given subspaces collection

subs is a collection of subspaces of an affine space, such as Points( AffineSpace(3, 3) ).

9.5 Affine groups

A collineation of an affine space is a permutation of the points which preserves the relation of collinearity within the affine space. The fundamental theorem of affine geometry states that the group \(\mathrm{A}\Gamma\mathrm{L}(n,q)\) of collineations of an affine space \(\mathrm{AG}(n,q)\) is generated by the translations \(T\), the matrices of \(\mathrm{GL}(n,q)\) and the automorphisms of the field \(\mathrm{GF}(q)\). The translations \(T\) form a normal subgroup of \(\mathrm{A}\Gamma\mathrm{L}(n,q)\), and \(\mathrm{A}\Gamma\mathrm{L}(n,q)\) is the semidirect product of \(T\) and \(\Gamma\mathrm{L}(n,q)\).

Suppose we have an affine transformation of the form \(x+A\) where \(x\) is a vector representing a translation, and \(A\) is a matrix in \(\mathrm{GL}(n,q)\) Then by using the natural embedding of \(\mathrm{AGL}(n,q)\) in \(\mathrm{PGL}(n+1,q)\), we can write this collineation as a matrix:

As we have seen, in FinInG, we represent an element of an affine collineation group as a projective semilinear element, i.e. as an object in the category ProjElsWithFrob, so that we can use all the functionality that exists for such objects. However, an affine collineation group (i.e. a group of collineations of the affine space \(\mathrm{AG}(n,q)\) is not by default constructed as a subgroup of \(\mathrm{P}\Gamma\mathrm{L}(n+1,q)\), but the compatibility between the elements of both groups enables testing for such relations.

9.5-1 AffineGroup

‣ AffineGroup( as )

( operation )

Returns: a group

If as is the affine space \(\mathrm{AG}(n,q)\) This operation returnes the affine linear group \(\mathrm{AGL}(n,q)\) acting on as. The elements of this group are projectivities of the associated projective space. In order to get the full group of collineations of the affine space, one needs to use the operation CollineationGroup.

9.5-2 CollineationGroup

‣ CollineationGroup( as )

( operation )

Returns: a group

If as is the affine space \(\mathrm{AG}(n,q)\), then this operation returns the affine semilinear group \(\mathrm{A}\Gamma\mathrm{L}(n,q)\). The elements of this group are collineations of the associated projective space. Note that if the defining field has prime order, then the groups \(\mathrm{A}\Gamma\mathrm{L}(n,q)\) and \(\mathrm{AGL}(n,q)\) coincide.

9.5-3 OnAffineSpaces

‣ OnAffineSpaces( subspace, el )

( operation )

‣ \^( subspace, el )

( operation )

Returns: an element of an affine space

subspace must be an element of an affine space and el a collineation of an affine space (which is in fact also a collineation of an associated projective space). This is the action one should use for collineations of affine spaces, and it acts on subspaces of all types of affine spaces: points, lines, planes, etc.

9.6 Low level operations

One technical aspect of the design behind affine spaces in FinInG is having canonical transversals for subspaces of vector spaces. We provide some documentation below for the interested user.

9.6-1 IsVectorSpaceTransversal

‣ IsVectorSpaceTransversal

( filter )

The category IsVectorSpaceTransversal represents a special object in FinInG which carries a record with two components: space and subspace. This category is a subcategory of IsSubspacesOfVectorSpace, however, we do not recommend the user to apply methods to objects in IsVectorSpaceTransversal, which are normally used for the category IsSubspacesOfVectorSpace (they won't work!). The objects in IsVectorSpaceTransversal are only used in order to facilitate computing enumerators of subspace collections.

9.6-2 VectorSpaceTransversal

‣ VectorSpaceTransversal( space, mat )

( operation )

Returns: a collection for representing a transversal of a subspaces of a vector space

space is a vector space \(V\) and mat is a matrix whose rows are a basis for a subspace \(U\) of \(V\). A transversal for \(U\) in \(V\) is a set of coset representatives for the quotient \(V/U\). This collection comes equipped with an enumerator operation.

9.6-3 VectorSpaceTransversalElement

‣ VectorSpaceTransversalElement( space, mat, vector )

( operation )

Returns: a canonical coset representative

space is a vector space \(V\), mat is a matrix whose rows are a basis for a subspace \(U\) of \(V\), and vector is a vector \(v\) of \(V\). A canonical representative \(v'\) is returned for the coset \(U+v\).

9.6-4 ComplementSpace

‣ ComplementSpace( space, mat )

( operation )

Returns: a collection for representing a transversal of a subspaces of a vector space

space is a vector space \(V\) and mat is a matrix whose rows are a basis for a subspace \(U\) of \(V\). The operation is almost a complete copy of the function BaseSteinitzVector except that just a basis for the complement of \(U\) is returned instead of a full record.